From 55a8c69cf2c35d39820bf0a68c52f6f675788937 Mon Sep 17 00:00:00 2001 From: "Richard B. Kreckel" Date: Sat, 24 Jan 2009 22:27:54 +0100 Subject: [PATCH] Override automake's DEFAULT_INCLUDES. Automake adds all kinds of subdirectories to -I, the list of directories to be searched for header files. However, CLN's header files are not supposed to be included without the cln/ subdirectory, so adding -Iinclude/cln can lead to conflicts with other header files. (The problem at hand was a conflict between CLN's string.h and the C library's string.h). --- benchmarks/Makefile.am | 1 + examples/Makefile.am | 1 + src/Makefile.am | 1 + tests/Makefile.am | 1 + 4 files changed, 4 insertions(+) diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index a93dd14..3d3dfe6 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -13,6 +13,7 @@ timebench2b_SOURCES = timebench2b.cc timebench2b_LDADD = ../src/libcln.la AM_CPPFLAGS = -I../include -I$(top_srcdir)/include +DEFAULT_INCLUDES = -I.@am__isrc@ EXTRA_DIST = README bench2.txt timebench2.sh diff --git a/examples/Makefile.am b/examples/Makefile.am index 627d72c..e20a75f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -27,3 +27,4 @@ pi_LDADD = ../src/libcln.la AM_CPPFLAGS = -I../include -I$(top_srcdir)/include +DEFAULT_INCLUDES = -I.@am__isrc@ diff --git a/src/Makefile.am b/src/Makefile.am index ae092bb..3b36689 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,7 @@ lib_LTLIBRARIES = libcln.la AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/include -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/autoconf libcln_la_LDFLAGS = -version-info $(LT_VERSION_INFO) libcln_la_SOURCES = \ diff --git a/tests/Makefile.am b/tests/Makefile.am index e6a3acd..1a3fd4c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -44,6 +44,7 @@ EXTRA_PROGRAMS = $(ALL_TIMINGS) AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/autoconf exam_SOURCES = exam.h exam.cc \