1 |
radhermit 14/10/31 01:40:49 |
2 |
|
3 |
Added: recutils-1.7-automagic.patch |
4 |
Log: |
5 |
Version bump, add uuid use flag. |
6 |
|
7 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-db/recutils/files/recutils-1.7-automagic.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/recutils/files/recutils-1.7-automagic.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/recutils/files/recutils-1.7-automagic.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: recutils-1.7-automagic.patch |
16 |
=================================================================== |
17 |
--- recutils-1.7/configure.ac |
18 |
+++ recutils-1.7/configure.ac |
19 |
@@ -85,17 +85,32 @@ |
20 |
fi |
21 |
AC_SUBST([CHECKLIBS]) |
22 |
|
23 |
+AC_ARG_ENABLE([curl], |
24 |
+ AS_HELP_STRING([--enable-curl], |
25 |
+ [Enable support for remote descriptors using libcurl (default is YES)]), |
26 |
+ [curl_enabled=$enableval], [curl_enabled=yes]) |
27 |
have_curl=no |
28 |
-AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],) |
29 |
-if test "x$have_curl" = "xyes"; then |
30 |
- CURLLIBS=-lcurl |
31 |
+if test "x$curl_enabled" = "xyes"; then |
32 |
+ AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],) |
33 |
+ if test "x$have_curl" = "xyes"; then |
34 |
+ CURLLIBS=-lcurl |
35 |
+ else |
36 |
+ AC_MSG_ERROR([curl support enabled but libcurl not found]) |
37 |
+ fi |
38 |
fi |
39 |
AC_SUBST([CURLLIBS]) |
40 |
|
41 |
+AC_ARG_ENABLE([uuid], |
42 |
+ AS_HELP_STRING([--enable-uuid], |
43 |
+ [Compile recutils with support for uuid types (default is YES)]), |
44 |
+ [uuid_enabled=$enableval], [uuid_enabled=yes]) |
45 |
+ |
46 |
have_uuid=no |
47 |
-AC_CHECK_LIB([uuid],[uuid_generate],[have_uuid=yes],) |
48 |
-if test "x$have_uuid" = "xyes"; then |
49 |
- UUIDLIBS=-luuid |
50 |
+if test "x$uuid_enabled" = "xyes"; then |
51 |
+ AC_CHECK_LIB([uuid],[uuid_generate],[have_uuid=yes],) |
52 |
+ if test "x$have_uuid" = "xyes"; then |
53 |
+ UUIDLIBS=-luuid |
54 |
+ fi |
55 |
fi |
56 |
AC_SUBST([UUIDLIBS]) |
57 |
AC_SUBST([have_uuid]) |
58 |
@@ -119,32 +134,42 @@ |
59 |
AM_CONDITIONAL([CRYPT], [test "x$crypt_support" = "xyes"]) |
60 |
AC_SUBST([crypt_support]) |
61 |
|
62 |
-have_glib=no |
63 |
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0], |
64 |
- [have_glib=yes], [have_glib=no]) |
65 |
- |
66 |
+AC_ARG_ENABLE([mdb], |
67 |
+ AS_HELP_STRING([--enable-mdb], |
68 |
+ [Build the mdb2rec utility (default is YES)]), |
69 |
+ [mdb_enabled=$enableval], [mdb_enabled=yes]) |
70 |
have_mdb=no |
71 |
-AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],) |
72 |
-if test "x$have_mdb" = "xyes"; then |
73 |
- MDBLIBS=-lmdb |
74 |
- |
75 |
- OLD_CFLAGS=$CFLAGS |
76 |
- CFLAGS="$CFLAGS $pkg_cv_GLIB_CFLAGS" |
77 |
- mdb_uses_sdatetime=no |
78 |
- AC_CHECK_DECL([MDB_SDATETIME],[mdb_uses_sdatetime=yes],,[#include <glib.h> |
79 |
+if test "x$mdb_enabled" = "xyes"; then |
80 |
+ AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],) |
81 |
+ if test "x$have_mdb" = "xyes"; then |
82 |
+ MDBLIBS=-lmdb |
83 |
+ |
84 |
+ OLD_CFLAGS=$CFLAGS |
85 |
+ CFLAGS="$CFLAGS $pkg_cv_GLIB_CFLAGS" |
86 |
+ mdb_uses_sdatetime=no |
87 |
+ AC_CHECK_DECL([MDB_SDATETIME],[mdb_uses_sdatetime=yes],,[#include <glib.h> |
88 |
#include <mdbtools.h>]) |
89 |
- CFLAGS=$OLD_CFLAGS |
90 |
+ CFLAGS=$OLD_CFLAGS |
91 |
|
92 |
- if test "x$mdb_uses_sdatetime" = "xyes"; then |
93 |
- MDB_DATETIME="MDB_SDATETIME" |
94 |
+ if test "x$mdb_uses_sdatetime" = "xyes"; then |
95 |
+ MDB_DATETIME="MDB_SDATETIME" |
96 |
+ else |
97 |
+ MDB_DATETIME="MDB_DATETIME" |
98 |
+ fi |
99 |
else |
100 |
- MDB_DATETIME="MDB_DATETIME" |
101 |
+ AC_MSG_ERROR([mdb support enabled but libmdb not found]) |
102 |
fi |
103 |
|
104 |
AC_SUBST([MDB_DATETIME]) |
105 |
fi |
106 |
AC_SUBST([MDBLIBS]) |
107 |
|
108 |
+have_glib=no |
109 |
+if test "x$mdb_enabled" = "xyes"; then |
110 |
+ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0], |
111 |
+ [have_glib=yes], [have_glib=no]) |
112 |
+fi |
113 |
+ |
114 |
AM_CONDITIONAL([COMPILE_MDB2REC], |
115 |
[test "x$have_glib" = "xyes" && test "x$have_mdb" = "xyes"]) |
116 |
AM_CONDITIONAL([REMOTE_DESCRIPTORS], [test "x$have_curl" = "xyes"]) |
117 |
@@ -233,29 +258,6 @@ |
118 |
|
119 |
dnl Report warnings |
120 |
|
121 |
-if test "x$have_check" = "xno"; then |
122 |
- echo "warning: libcheck was not found in the system." |
123 |
- echo "warning: unit tests wont be compiled and executed upon make check." |
124 |
-fi |
125 |
- |
126 |
-if test "x$have_mdb" = "xno"; then |
127 |
- echo "warning: libmdb was not found in the system." |
128 |
- echo "warning: the mdb2rec utility won't get built." |
129 |
-fi |
130 |
- |
131 |
-if test "x$have_glib" = "xno"; then |
132 |
- echo "warning: glib was not found in the system." |
133 |
- echo "warning: the mdb2rec utility won't get built." |
134 |
-fi |
135 |
- |
136 |
-if test "x$crypt_support" = "xno"; then |
137 |
- echo "warning: building recutils without encryption support." |
138 |
-fi |
139 |
- |
140 |
-if test "x$have_uuid" = "xno"; then |
141 |
- echo "warning: building recutils without support for uuid types." |
142 |
-fi |
143 |
- |
144 |
if test "x$bash_headers_available" = "xno" || test "x$bash_builtins_enabled" = "xno"; then |
145 |
echo "warning: not building the recutils bash builtins." |
146 |
fi |