diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2013-03-10 14:59:08 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2013-03-10 14:59:08 +0000 |
commit | 60038db2e4d6672d26c913750d5ffa1fc9570e01 (patch) | |
tree | 2e4bc58ddf88c347342e60db1eb6f3458be92b2c /libgphoto2_port | |
parent | c4026b14fb0078297c43e696325aa98de93ff057 (diff) | |
download | libgphoto2-60038db2e4d6672d26c913750d5ffa1fc9570e01.tar.gz |
cleaned up AM_CPPFLAGS and CPPFLAGS usage patterns.
AM_CPPFLAGS and CPPFLAGS are used both during build, so
no need to use merge them together in configure.
also move the -I$(xx) stuff into Makefile* to avoid
shell expansion issues.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14269 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port')
-rw-r--r-- | libgphoto2_port/Makefile.am | 2 | ||||
-rw-r--r-- | libgphoto2_port/configure.ac | 23 | ||||
-rw-r--r-- | libgphoto2_port/libgphoto2_port/Makefile.am | 2 | ||||
-rw-r--r-- | libgphoto2_port/test/Makefile.am | 2 |
4 files changed, 12 insertions, 17 deletions
diff --git a/libgphoto2_port/Makefile.am b/libgphoto2_port/Makefile.am index 46975f207..80b785329 100644 --- a/libgphoto2_port/Makefile.am +++ b/libgphoto2_port/Makefile.am @@ -46,6 +46,8 @@ iolib_ldflags = -module -no-undefined -avoid-version \ -rpath '$(iolibdir)' iolib_libadd = $(top_builddir)/libgphoto2_port/libgphoto2_port.la +AM_CPPFLAGS += -I$(top_srcdir) + include disk/Makefile-files include ptpip/Makefile-files include serial/Makefile-files diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac index 93fa03766..575dbc099 100644 --- a/libgphoto2_port/configure.ac +++ b/libgphoto2_port/configure.ac @@ -63,7 +63,8 @@ AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AM_PROG_CC_C_O -m4_pattern_allow([AM_PROG_AR], [AM_PROG_AR]) +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + dnl Something with the sequences is not quite alright yet. dnl SED is supposed to be set in AC_LIBTOOL_SETUP, but the @@ -98,9 +99,7 @@ GP_CONFIG_MSG([libltdl library],[$LIBLTDL]) AC_DEFINE_UNQUOTED(HAVE_CC,"$CC",[The C compiler we're using]) -AM_CPPFLAGS="$CPPFLAGS" -AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)" - +AM_CPPFLAGS="" # ---------------------------------------------------------------------- # References to external resources (web sites, mailing listes, etc.) @@ -438,23 +437,15 @@ GP_CHECK_DOC_DIR()dnl GP_BUILD_GTK_DOCS()dnl -# Make sure that the *FLAGS given at ./configure time will be active by -# default in AM_*FLAGS -AM_CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" -AM_CFLAGS="$AM_CFLAGS $CFLAGS" -AM_CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS" -AM_LDFLAGS="$AM_LDFLAGS $LDFLAGS" - dnl --------------------------------------------------------------------------- dnl Turn on all warnings when using gcc dnl --------------------------------------------------------------------------- if test "$GCC" = "yes"; then - AM_CPPFLAGS="$AM_CPPFLAGS -Wall" - AM_CPPFLAGS="$AM_CPPFLAGS -Wmissing-declarations -Wmissing-prototypes" - AM_LDFLAGS="$AM_LDFLAGS -Wall" + CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes" # FIXME: Check for --enable-debug here - AM_CPPFLAGS="$AM_CPPFLAGS -g" - AM_LDFLAGS="$AM_LDFLAGS -g" + CFLAGS="$CFLAGS -g" + LDFLAGS="$LDFLAGS -g" fi # Activate internal code diff --git a/libgphoto2_port/libgphoto2_port/Makefile.am b/libgphoto2_port/libgphoto2_port/Makefile.am index 9ea61e30e..862aa7e10 100644 --- a/libgphoto2_port/libgphoto2_port/Makefile.am +++ b/libgphoto2_port/libgphoto2_port/Makefile.am @@ -1,7 +1,7 @@ lib_LTLIBRARIES = libgphoto2_port.la libgphoto2_port_la_CPPFLAGS = \ - -I$(srcdir) \ + -I$(srcdir) -I$(top_srcdir) \ $(AM_CPPFLAGS) $(CPPFLAGS) \ $(LTDLINCL) diff --git a/libgphoto2_port/test/Makefile.am b/libgphoto2_port/test/Makefile.am index aca1c5305..99e489ce3 100644 --- a/libgphoto2_port/test/Makefile.am +++ b/libgphoto2_port/test/Makefile.am @@ -13,6 +13,8 @@ INSTALL_TESTS_ENVIRONMENT = env \ IOLIBS="$(DESTDIR)$(iolibdir)" \ LD_LIBRARY_PATH="$(DESTDIR)$(libdir)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}}" +AM_CPPFLAGS += -I$(top_srcdir) + noinst_PROGRAMS += test-gp-port test-port-list test_gp_port_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) $(CPPFLAGS) test_gp_port_SOURCE = test-gp-port.c |