From 8af35e1fe51565faa7928a1414c82947b1d4e45f Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 5 Nov 2011 11:51:53 +0700 Subject: [PATCH] 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. --- Makefile.in | 2 +- modules/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 3b3078ba..79e3a8ba 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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@ diff --git a/modules/Makefile.in b/modules/Makefile.in index faecfdf1..ccf3a178 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -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.