forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
recutils-1.5-automagic.patch
57 lines (52 loc) · 1.68 KB
/
recutils-1.5-automagic.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- 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"])