Permalink
Browse files

Change the order of -I directives in Makefile.

If ZNC was already installed, it had its headers somewhere.
The chances are that something else can be installed at the same place,
including some ZNC's dependency	whose include dir would be included to
CXXFLAGS. Another possibility of including that dir is triggered when
using FreeBSD - ./configure explicitly adds -I/usr/local/include in that
case.

And so we get a directory with old ZNC headers included to CXXFLAGS
before our new shiny ./include.

With their order changed, the proper headers are included now.

Thanks to those who repored the issue, thanks to PsWii60 for helping to
track it down, thanks to my parents for creating me and therefore
enabling me to fix it, and to many other people.
  • Loading branch information...
1 parent 0b6d609 commit 8af35e1fe51565faa7928a1414c82947b1d4e45f Alexey Sokolov committed Nov 5, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 Makefile.in
  2. +1 −1 modules/Makefile.in
View
@@ -15,7 +15,7 @@ includedir := @includedir@
sbindir := @sbindir@
localstatedir := @localstatedir@
CXX := @CXX@
-CXXFLAGS := @CPPFLAGS@ @CXXFLAGS@ -I$(srcdir)/include -Iinclude
+CXXFLAGS := -I$(srcdir)/include -Iinclude @CPPFLAGS@ @CXXFLAGS@
LDFLAGS := @LDFLAGS@
LIBS := @LIBS@
LIBZNC := @LIBZNC@
View
@@ -17,7 +17,7 @@ sbindir := @sbindir@
localstatedir := @localstatedir@
CXX := @CXX@
# CXXFLAGS are for the main binary, so don't use them here, use MODFLAGS instead
-MODFLAGS := @CPPFLAGS@ @MODFLAGS@ -I$(srcdir)/../include -I../include
+MODFLAGS := -I$(srcdir)/../include -I../include @CPPFLAGS@ @MODFLAGS@
MODLINK := @MODLINK@
LDFLAGS := @LDFLAGS@
# LIBS are not and should not be used in here.

0 comments on commit 8af35e1

Please sign in to comment.