diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2014-01-22 14:54:40 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2014-01-22 15:57:12 +0800 |
commit | ace549c774b91f1a92f7d172f2dbf6641733b0e4 (patch) | |
tree | 83d4a46e82dc7122d14e1ed9b44e87bc0e02df19 | |
parent | 59c84e185087814de13582af27dee4c099d83def (diff) | |
download | gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.tar gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.tar.gz gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.tar.bz2 gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.tar.lz gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.tar.xz gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.tar.zst gsoc2013-libgnome-autoar-ace549c774b91f1a92f7d172f2dbf6641733b0e4.zip |
Remove unused CFLAGS and LIBS. Allow using libarchive without a pc file.
Unused CFLAGS and LIBS may cause strange error in some system. FreeBSD system
libarchive does not have a pc file installed. Use AC_SEARCH_LIBS to find it,
so FreeBSD users do not have to install libarchive from ports.
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | docs/reference/Makefile.am | 2 |
3 files changed, 17 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index cb46bfb..0430124 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,12 +66,17 @@ gnome_autoar_libgnome_autoar_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(NULL) gnome_autoar_libgnome_autoar_la_CFLAGS = \ - $(DEPENDENCIES_CFLAGS) \ + $(GTK_CFLAGS) \ + $(GIO_CFLAGS) \ + $(LIBARCHIVE_CFLAGS) \ -I$(top_srcdir) \ -I$(top_builddir)/gnome-autoar \ $(AM_CFLAGS) \ $(NULL) gnome_autoar_libgnome_autoar_la_LIBADD = \ + $(GTK_LIBS) \ + $(GIO_LIBS) \ + $(LIBARCHIVE_LIBS) \ $(DEPENDENCIES_LIBS) \ $(NULL) @@ -131,14 +136,15 @@ noinst_PROGRAMS = \ $(NULL) test_cflags = \ - $(DEPENDENCIES_CFLAGS) \ + $(GTK_CFLAGS) \ + $(GIO_CFLAGS) \ + $(LIBARCHIVE_CFLAGS) \ -I$(top_srcdir) \ $(AM_CFLAGS) \ $(NULL) test_libs = \ $(top_builddir)/gnome-autoar/libgnome-autoar.la \ - $(DEPENDENCIES_LIBS) \ $(NULL) tests_test_extract_SOURCES = tests/test-extract.c diff --git a/configure.ac b/configure.ac index 4b076b3..87c4d85 100644 --- a/configure.ac +++ b/configure.ac @@ -37,14 +37,19 @@ GOBJECT_INTROSPECTION_CHECK([1.30.0]) GLIB_REQUIRED=2.35.6 GTK_REQUIRED=3.2 LIBARCHIVE_REQUIRED=3.1.0 -PKG_CHECK_MODULES([DEPENDENCIES], [ + +PKG_CHECK_MODULES([LIBARCHIVE], [libarchive >= $LIBARCHIVE_REQUIRED], [], + [AC_SEARCH_LIBS([archive_read_new], [archive], [], + [AC_MSG_ERROR([libarchive not found])])]) + +PKG_CHECK_MODULES([GIO], [ glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED - gtk+-3.0 >= $GTK_REQUIRED - libarchive >= $LIBARCHIVE_REQUIRED ]) +PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_REQUIRED]) + AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS" AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS" AC_SUBST([AM_CPPFLAGS]) diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 4f06d44..3f83fa7 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -20,12 +20,10 @@ IGNORE_HFILES = \ GTKDOC_CFLAGS = \ -I$(top_srcdir) \ - -I$(DEPENDENCIES_CFLAGS) \ $(NULL) GTKDOC_LIBS = \ $(top_builddir)/gnome-autoar/libgnome-autoar.la \ - $(DEPENDENCIES_LIBS) \ $(NULL) # This includes the standard gtk-doc make rules, copied by gtkdocize. |