Depend on external libpopt
authorRalf Corsépius <corsepiu@fedoraproject.org>
Fri, 10 Aug 2007 07:43:52 +0000 (09:43 +0200)
committerRalf Corsépius <corsepiu@fedoraproject.org>
Fri, 10 Aug 2007 07:43:52 +0000 (09:43 +0200)
Makefile.am
configure.ac

index 41f702a..5e5091b 100644 (file)
@@ -7,7 +7,7 @@ EXTRA_DIST = CHANGES ChangeLog CREDITS Doxyheader GROUPS INSTALL \
        config.site db db3/configure installplatform platform* \
        rpm.magic rpmpopt-$(VERSION)
 
-SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build python tools scripts doc .
+SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build python tools scripts doc .
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = rpm.pc
index 9520c6b..8fba26f 100644 (file)
@@ -541,26 +541,22 @@ AC_SUBST(WITH_MAGIC_INCLUDE)
 AC_SUBST(WITH_MAGIC_LIB)
 
 #=================
-# Check for popt library. Prefer internal, otherwise external.
-WITH_POPT_SUBDIR=
+# Check for popt library.
 WITH_POPT_INCLUDE=
 WITH_POPT_LIB=
 
-if test -d popt ; then
-  WITH_POPT_SUBDIR=popt
-  WITH_POPT_INCLUDE="-I\${top_srcdir}/${WITH_POPT_SUBDIR}"
-  WITH_POPT_LIB="\${top_builddir}/${WITH_POPT_SUBDIR}/libpopt.la"
-else
-  AC_CHECK_HEADER([popt.h], [
-    AC_CHECK_LIB(popt, poptGetContext, [
-      WITH_POPT_SUBDIR=
+AC_CHECK_HEADER([popt.h], [
+  AC_CHECK_LIB(popt, poptGetContext, [
       WITH_POPT_INCLUDE=
       WITH_POPT_LIB="-lpopt"
-    ])
+      WITH_POPT=yes
+  ],[
+    AC_MSG_ERROR([missing required library popt])
   ])
-fi
+],[
+  AC_MSG_ERROR([missing required header popt.h])
+])
 
-AC_SUBST(WITH_POPT_SUBDIR)
 AC_SUBST(WITH_POPT_INCLUDE)
 AC_SUBST(WITH_POPT_LIB)