diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | camlibs/Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 37 | ||||
-rw-r--r-- | examples/Makefile.am | 1 | ||||
-rw-r--r-- | libgphoto2/Makefile.am | 2 | ||||
-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 | ||||
-rw-r--r-- | packaging/generic/Makefile.am | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 1 |
11 files changed, 26 insertions, 50 deletions
@@ -4,6 +4,9 @@ libgphoto2 2.5.1.2 release translations: * updated ukrainian, finish, dutch, polish, russian, french, vietnamese +build: +* cleaned up AM_CPPFLAGS/CPPFLAGS usage, do not use both together. + ------------------------------------------------------------------------------ libgphoto2 2.5.1.1 release diff --git a/camlibs/Makefile.am b/camlibs/Makefile.am index 640d903a8..0e87a82f9 100644 --- a/camlibs/Makefile.am +++ b/camlibs/Makefile.am @@ -52,6 +52,7 @@ camlib_ldflags = -module -no-undefined -avoid-version -export-dynamic \ -rpath '$(camlibdir)' camlib_libadd = $(top_builddir)/libgphoto2/libgphoto2.la +AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/libgphoto2_port -I$(top_srcdir)/libgphoto2 -I$(top_builddir)/libgphoto2 ######################################################################## # You can generate this Makefile-files include list by running diff --git a/configure.ac b/configure.ac index 5e4c4af14..11581b553 100644 --- a/configure.ac +++ b/configure.ac @@ -67,18 +67,6 @@ AC_SUBST([LIBGPHOTO2_VERSION_INFO], [$LIBGPHOTO2_CURRENT:$LIBGPHOTO2_REVISION:$LIBGPHOTO2_AGE]) -dnl Set up compiler options -dnl "CPPFLAGS" concerns the C preprocessor, i.e. both C and C++ source code. -dnl C only would be CFLAGS, C++ only CXXFLAGS -AM_CPPFLAGS="$CPPFLAGS" - -AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)" -AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)" -AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/libgphoto2_port" -AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/libgphoto2" -AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)/libgphoto2" - - dnl --------------------------------------------------------------------------- dnl Checks for programs. dnl --------------------------------------------------------------------------- @@ -88,34 +76,20 @@ AC_PROG_CPP AC_PROG_CXX 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 dnl sequence seems to get mixed up. SED=${SED-sed} - -# 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 (almost) all warnings when using gcc dnl --------------------------------------------------------------------------- if test "x$GCC" = "xyes"; then - AM_CPPFLAGS="$AM_CPPFLAGS -Wall" - # AM_CFLAGS="$AM_CFLAGS --std=c99 -Wall -Wextra -Werror -pedantic" - AM_CFLAGS="$AM_CFLAGS -Wall" - # AM_CFLAGS="$AM_CFLAGS -Wno-pointer-sign -Wno-unused -Wno-sign-compare" - AM_CFLAGS="$AM_CFLAGS -Wmissing-declarations -Wmissing-prototypes" - AM_LDFLAGS="$AM_LDFLAGS -Wall" - # FIXME: Check for --enable-debug here - AM_CPPFLAGS="$AM_CPPFLAGS -g" - AM_LDFLAGS="$AM_LDFLAGS -g" + # CFLAGS="$CFLAGS --std=c99 -Wall -Wextra -Werror -pedantic" + CFLAGS="$CFLAGS -Wall -g -Wmissing-declarations -Wmissing-prototypes" + LDFLAGS="$LDFLAGS -g" AC_SUBST([NO_UNUSED_CFLAGS], [-Wno-unused]) fi AM_CONDITIONAL([HAVE_GCC], [test "x$GCC" = "xyes"]) @@ -135,11 +109,8 @@ AC_SUBST([AM_LDFLAGS]) # Check for va_copy() GP_VA_COPY -# Define compiler flags for later compile tests # Note: Do NOT add specific libraries and stuff to the generic _FLAGS. # Put these into LIBFOO_CFLAGS and LIBFOO_LIBS instead. -CFLAGS="$AM_CFLAGS" -CPPFLAGS="$AM_CPPFLAGS" try_gp2ddb=false diff --git a/examples/Makefile.am b/examples/Makefile.am index b84d9e4df..2c51fe4de 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -17,6 +17,7 @@ INSTALL_TESTS_ENVIRONMENT = env \ CAMLIBS="$(DESTDIR)$(camlibdir)" \ LD_LIBRARY_PATH="$(DESTDIR)$(libdir)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}}" +AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/libgphoto2_port -I$(top_srcdir)/libgphoto2 -I$(top_builddir)/libgphoto2 CLEANFILES = $(check_SCRIPTS) diff --git a/libgphoto2/Makefile.am b/libgphoto2/Makefile.am index f5ab27b7f..705413f88 100644 --- a/libgphoto2/Makefile.am +++ b/libgphoto2/Makefile.am @@ -12,6 +12,8 @@ lib_LTLIBRARIES = libgphoto2.la # Yes, this is messy, but we are going to clean this up. libgphoto2_la_CPPFLAGS = \ + -I$(top_srcdir) -I$(top_builddir) \ + -I$(top_srcdir)/libgphoto2_port -I$(top_builddir)/libgphoto2_port \ $(AM_CPPFLAGS) $(CPPFLAGS) \ $(LTDLINCL) \ $(LIBEXIF_CFLAGS) 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 diff --git a/packaging/generic/Makefile.am b/packaging/generic/Makefile.am index fefd90979..c9582e041 100644 --- a/packaging/generic/Makefile.am +++ b/packaging/generic/Makefile.am @@ -4,6 +4,8 @@ udevscript_SCRIPTS = check-ptp-camera endif EXTRA_DIST = check-ptp-camera +AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/libgphoto2_port -I$(top_srcdir)/libgphoto2 -I$(top_builddir)/libgphoto2 + print_camera_list_SOURCE = print-camera-list.c print_camera_list_LDADD = \ $(top_builddir)/libgphoto2/libgphoto2.la \ diff --git a/tests/Makefile.am b/tests/Makefile.am index ae2b98b00..9896c937e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,6 +19,7 @@ INSTALL_TESTS_ENVIRONMENT = env \ CAMLIBS="$(DESTDIR)$(camlibdir)" \ LD_LIBRARY_PATH="$(DESTDIR)$(libdir)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}}" +AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/libgphoto2_port -I$(top_srcdir)/libgphoto2 -I$(top_builddir)/libgphoto2 CLEANFILES = $(check_SCRIPTS) |