You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-db/recutils/files/recutils-1.5-automagic.patch

58 lines
1.7 KiB

--- recutils-1.5/configure.ac.orig
+++ recutils-1.5/configure.ac
@@ -85,17 +85,35 @@
fi
AC_SUBST([CHECKLIBS])
+AC_ARG_ENABLE([curl],
+ AS_HELP_STRING([--enable-curl],
+ [Enable support for remote descriptors using libcurl (default is YES)]),
+ [curl_enabled=$enableval], [curl_enabled=yes])
+
have_curl=no
-AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],)
-if test "x$have_curl" = "xyes"; then
- CURLLIBS=-lcurl
+if test "x$curl_enabled" = "xyes"; then
+ AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],)
+ if test "x$have_curl" = "xyes"; then
+ CURLLIBS=-lcurl
+ else
+ AC_MSG_ERROR([curl support enabled but libcurl not found])
+ fi
fi
AC_SUBST([CURLLIBS])
+AC_ARG_ENABLE([mdb],
+ AS_HELP_STRING([--enable-mdb],
+ [Build the mdb2rec utility (default is YES)]),
+ [mdb_enabled=$enableval], [mdb_enabled=yes])
+
have_mdb=no
-AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],)
-if test "x$have_mdb" = "xyes"; then
- MDBLIBS=-lmdb
+if test "x$mdb_enabled" = "xyes"; then
+ AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],)
+ if test "x$have_mdb" = "xyes"; then
+ MDBLIBS=-lmdb
+ else
+ AC_MSG_ERROR([mdb support enabled but libmdb not found])
+ fi
fi
AC_SUBST([MDBLIBS])
@@ -119,8 +137,10 @@
AC_SUBST([crypt_support])
have_glib=no
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0],
- [have_glib=yes], [have_glib=no])
+if test "x$mdb_enabled" = "xyes"; then
+ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0],
+ [have_glib=yes], [have_glib=no])
+fi
AM_CONDITIONAL([COMPILE_MDB2REC],
[test "x$have_glib" = "xyes" && test "x$have_mdb" = "xyes"])