1 |
idl0r 10/09/01 20:23:20 |
2 |
|
3 |
Added: cfengine-3.0.5_p1-configure.ac.patch |
4 |
Log: |
5 |
Add cfengine-3.0.5_p1. Add several new useflags. Fix configure.ac to allow the use of configure switches properly. Some QA fixes. |
6 |
|
7 |
(Portage version: 2.2_rc72/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/cfengine/files/cfengine-3.0.5_p1-configure.ac.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/cfengine/files/cfengine-3.0.5_p1-configure.ac.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/cfengine/files/cfengine-3.0.5_p1-configure.ac.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: cfengine-3.0.5_p1-configure.ac.patch |
16 |
=================================================================== |
17 |
diff --git a/configure.ac b/configure.ac |
18 |
index 64b2a13..09821a5 100644 |
19 |
--- a/configure.ac |
20 |
+++ b/configure.ac |
21 |
@@ -84,13 +84,9 @@ AC_CHECK_LIB(m,main) |
22 |
|
23 |
dnl Look for ldap |
24 |
|
25 |
-AC_ARG_WITH(ldap, |
26 |
- AS_HELP_STRING(--without-ldap, [support ldap functions]),with_ldap=no, |
27 |
- with_ldap=yes) |
28 |
- |
29 |
-if test "x$with_ldap" != xno; then |
30 |
- AC_CHECK_LIB(ldap,ldap_get_values_len) |
31 |
-fi |
32 |
+AC_ARG_WITH([ldap], |
33 |
+ [AS_HELP_STRING([--without-ldap], [support ldap functions])]) |
34 |
+AS_IF([test "x$with_ldap" = "xyes"], [AC_CHECK_LIB([ldap], [ldap_get_values_len])]) |
35 |
|
36 |
dnl Now check for database connectors |
37 |
|
38 |
@@ -99,15 +95,9 @@ dnl ###################################################################### |
39 |
dnl Look for SQL connectors. |
40 |
dnl ###################################################################### |
41 |
|
42 |
-AC_ARG_WITH(sql, |
43 |
- AS_HELP_STRING(--with-sql, [support database functions]), , |
44 |
- with_sql=check) |
45 |
- |
46 |
-if test "x$with_sql" != xno; then |
47 |
- WITH_SQL=1 |
48 |
-else |
49 |
- WITH_SQL=0 |
50 |
-fi |
51 |
+AC_ARG_WITH([sql], |
52 |
+ [AS_HELP_STRING([--with-sql], [support database functions])]) |
53 |
+AS_IF([test "x$with_sql" = "xyes"], [WITH_SQL=1], [WITH_SQL=0]) |
54 |
|
55 |
if test $WITH_SQL = 1; then |
56 |
case "$target_os" in |
57 |
@@ -124,31 +114,17 @@ if test $WITH_SQL = 1; then |
58 |
fi |
59 |
|
60 |
|
61 |
-AC_ARG_WITH(nova, |
62 |
- AS_HELP_STRING(--without-nova, [support some graphic functions]),with_nova=no, |
63 |
- with_nova=yes) |
64 |
- |
65 |
-if test "x$with_nova" != xno; then |
66 |
- AC_CHECK_LIB(cfnova,main) |
67 |
-fi |
68 |
+AC_ARG_WITH([nova], |
69 |
+ [AS_HELP_STRING([--without-nova], [support some graphic functions])]) |
70 |
+AS_IF([test "x$with_nova" = "xyes"], [AC_CHECK_LIB([cfnova], [main])]) |
71 |
|
72 |
-AC_ARG_WITH(constellation, |
73 |
- AS_HELP_STRING(--without-constellation, [support some graphic functions]),with_constellation=no, |
74 |
- with_constellation=yes) |
75 |
+AC_ARG_WITH([constellation], |
76 |
+ [AS_HELP_STRING([--without-constellation], [support some graphic functions])]) |
77 |
+AS_IF([test "x$with_constellation" == "xyes"], [AC_CHECK_LIB([cfconstellation], [main])]) |
78 |
|
79 |
-if test "x$with_constellation" != xno; then |
80 |
- AC_CHECK_LIB(cfconstellation,main) |
81 |
- |
82 |
-fi |
83 |
- |
84 |
-AC_ARG_WITH(galaxy, |
85 |
- AS_HELP_STRING(--without-galaxy, [support some graphic functions]),with_galaxy=no, |
86 |
- with_galaxy=yes) |
87 |
- |
88 |
-if test "x$with_galaxy" != xno; then |
89 |
- AC_CHECK_LIB(cfgalaxy,main) |
90 |
- |
91 |
-fi |
92 |
+AC_ARG_WITH([galaxy], |
93 |
+ [AS_HELP_STRING([--without-galaxy], [support some graphic functions])]) |
94 |
+AS_IF([test "x$with_galaxy" = "xyes"], [AC_CHECK_LIB([cfgalaxy], [main])]) |
95 |
|
96 |
AC_CHECK_FUNC(door_create,door) |
97 |
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
98 |
@@ -162,18 +138,12 @@ dnl |
99 |
dnl Choose a database |
100 |
dnl |
101 |
|
102 |
-AC_ARG_WITH(tokyocabinet, |
103 |
- AS_HELP_STRING(--with-tokyocabinet, [support database functions]),with_tokyo=yes, |
104 |
- with_tokyo=no) |
105 |
- |
106 |
-if test "x$with_tokyo" = xyes; then |
107 |
- AC_MSG_CHECKING(for TokyoCabinet) |
108 |
- WITH_TOKYO=1 |
109 |
-else |
110 |
- WITH_TOKYO=0 |
111 |
-fi |
112 |
+AC_ARG_WITH([tokyocabinet], |
113 |
+ [AS_HELP_STRING([--with-tokyocabinet], [support database functions])]) |
114 |
+AS_IF([test "x$with_tokyocabinet" = "xyes"], [WITH_TOKYO=1], [WITH_TOKYO=0]) |
115 |
|
116 |
if test $WITH_TOKYO = 1; then |
117 |
+ AC_MSG_CHECKING(for TokyoCabinet) |
118 |
AC_CHECK_LIB(tokyocabinet,main, [], [AC_MSG_ERROR(Cannot find Tokyo Cabinet)]) |
119 |
AC_CHECK_HEADERS(tcutil.h) |
120 |
AC_CHECK_HEADERS(tchdb.h) |
121 |
@@ -182,18 +152,12 @@ fi |
122 |
|
123 |
dnl else qdbm? |
124 |
|
125 |
-AC_ARG_WITH(qdbm, |
126 |
- AS_HELP_STRING(--with-qdbm, [support database functions qdbm]),with_qdbm=yes, |
127 |
- with_qdbm=no) |
128 |
- |
129 |
-if test "x$with_qdbm" = xyes; then |
130 |
- AC_MSG_CHECKING(for QDBM) |
131 |
- WITH_QDBM=1 |
132 |
-else |
133 |
- WITH_QDBM=0 |
134 |
-fi |
135 |
+AC_ARG_WITH([qdbm], |
136 |
+ [AS_HELP_STRING([--with-qdbm], [support database functions qdbm])]) |
137 |
+AS_IF([test "x$with_qdbm" = "xyes"], [WITH_QDBM=1], [WITH_QDBM=0]) |
138 |
|
139 |
if test $WITH_QDBM = 1; then |
140 |
+ AC_MSG_CHECKING(for QDBM) |
141 |
AC_CHECK_LIB(qdbm,main, [], [AC_MSG_ERROR(Cannot find Quick Database Manager)]) |
142 |
AC_CHECK_HEADERS(depot.h) |
143 |
AC_DEFINE(QDB, 1, [Define if QDBM is available.]) |
144 |
@@ -471,18 +435,12 @@ AC_SUBST(OPENSSL_LIB_LIB) |
145 |
# Others |
146 |
# |
147 |
|
148 |
-AC_ARG_WITH(libvirt, |
149 |
- AS_HELP_STRING(--with-libvirt, [support virtual machine management]),with_virt=yes, |
150 |
- with_virt=no) |
151 |
- |
152 |
-if test "x$with_virt" = xyes; then |
153 |
- AC_MSG_CHECKING(for libvirt) |
154 |
- WITH_VIRT=1 |
155 |
-else |
156 |
- WITH_VIRT=0 |
157 |
-fi |
158 |
+AC_ARG_WITH([libvirt], |
159 |
+ [AS_HELP_STRING([--with-libvirt], [support virtual machine management])]) |
160 |
+AS_IF([test "x$with_libvirt" = "xyes"], [WITH_VIRT=1], [WITH_VIRT=0]) |
161 |
|
162 |
if test $WITH_VIRT = 1; then |
163 |
+ AC_MSG_CHECKING(for libvirt) |
164 |
AC_CHECK_LIB(virt,main, [], [AC_MSG_ERROR(Cannot find libvirt)]) |
165 |
fi |
166 |
|
167 |
@@ -491,60 +449,52 @@ dnl ###################################################################### |
168 |
dnl Checks for perl compatible regular expressions |
169 |
dnl ###################################################################### |
170 |
|
171 |
-AC_ARG_WITH(pcre, |
172 |
- [ --with-pcre[[=PATH]] directory where Perl compatible regex exists (optionally in PATH)], |
173 |
- [ |
174 |
- AC_MSG_CHECKING(pcre) |
175 |
- |
176 |
- if test "x$withval" != "xno" ; then |
177 |
- if test "x$withval" != "xyes" ; then |
178 |
- if test "x$withval" = "xdefault" ; then |
179 |
- for d in $prefix /usr/local /usr; do |
180 |
- if test -f "$d/include/pcreposix.h" ; then |
181 |
- CPPFLAGS="$CPPFLAGS -I$d/include" |
182 |
- LDFLAGS="$LDFLAGS -L$d/lib" |
183 |
- PCRE_LIB="-lpcreposix" |
184 |
- AC_MSG_RESULT($d) |
185 |
- break |
186 |
- fi |
187 |
- done |
188 |
- if test x"$PCRE_LIB" = x ; then |
189 |
- AC_MSG_ERROR(Cannot find PCRE - specify the path) |
190 |
- fi |
191 |
- else |
192 |
- if test -f "${withval}/include/pcreposix.h" ; then |
193 |
- CPPFLAGS="$CPPFLAGS -I${withval}/include" |
194 |
- LDFLAGS="$LDFLAGS -L${withval}/lib" |
195 |
- AC_MSG_RESULT("${withval}") |
196 |
- else |
197 |
- AC_MSG_ERROR(Cannot find PCRE - specify the path) |
198 |
- fi |
199 |
- fi |
200 |
- else |
201 |
- AC_MSG_RESULT("yes") |
202 |
- fi |
203 |
- LIBS="$LIBS -lpcreposix" |
204 |
- AC_DEFINE(USE_PCRE, 1, [Define if PCRE is available.]) |
205 |
- fi |
206 |
- ] |
207 |
-) |
208 |
+AC_ARG_WITH([pcre], |
209 |
+ [AS_HELP_STRING([--without-pcre[[=PATH]]], [support for Perl compatible regex (optionally search in PATH)])]) |
210 |
+AS_IF([test "x$with_pcre" != "xno"], [ |
211 |
+ AC_MSG_CHECKING([pcre]) |
212 |
+ if test "x$with_pcre" = "xyes" -o "x$with_pcre" = "x" ; then |
213 |
+ for d in $prefix /usr/local /usr; do |
214 |
+ if test -f "$d/include/pcre.h" ; then |
215 |
+ CPPFLAGS="$CPPFLAGS -I$d/include" |
216 |
+ LDFLAGS="$LDFLAGS -L$d/lib" |
217 |
+ AC_MSG_RESULT($d) |
218 |
+ FOUND_PCRE=1 |
219 |
+ break |
220 |
+ fi |
221 |
+ done |
222 |
+ if test "x$FOUND_PCRE" = "x" ; then |
223 |
+ AC_MSG_NOTICE([Cannot find PCRE - specify the path]) |
224 |
+ fi |
225 |
+ else |
226 |
+ if test -f "${withval}/include/pcre.h" ; then |
227 |
+ CPPFLAGS="$CPPFLAGS -I${withval}/include" |
228 |
+ LDFLAGS="$LDFLAGS -L${withval}/lib" |
229 |
+ AC_MSG_RESULT("${withval}") |
230 |
+ else |
231 |
+ AC_MSG_NOTICE([Cannot find PCRE in $withval]) |
232 |
+ fi |
233 |
+ fi |
234 |
|
235 |
-AC_CHECK_LIB(pcre, main, [], [AC_MSG_ERROR(Cannot find PCRE)]) |
236 |
+ AC_CHECK_HEADERS([pcre.h pcre/pcre.h]) |
237 |
+ AC_CHECK_LIB(pcre, main, [], [AC_MSG_WARN([Cannot find PCRE])]) |
238 |
+ AC_DEFINE(USE_PCRE, 1, [Define if PCRE is available.]) |
239 |
+]) |
240 |
|
241 |
-LIBS="$LIBS $BERKELEY_DB_LDFLAGS $BERKELEY_DB_LIB $OPENSSL_LIB_LDFLAGS $OPENSSL_LIB_LIB" |
242 |
+if test "x$ac_cv_lib_pcre_main" != "xyes"; then |
243 |
+ AC_CHECK_HEADERS([regex.h rxposix.h]) |
244 |
+ AC_CHECK_FUNC([regcomp]) |
245 |
|
246 |
-dnl ###################################################################### |
247 |
-dnl Checks for regular expressions |
248 |
-dnl GNU regex lib if you have regcomp in libc you should NOT have this lib too |
249 |
-dnl ###################################################################### |
250 |
+ if test "x$ac_cv_header_regex_h" != "xyes" -a "x$ac_cv_header_rxposix_h" != "xyes" ; then |
251 |
+ AC_MSG_ERROR([Either PCRE, rxposix or GNU regex is required]) |
252 |
+ fi |
253 |
+fi |
254 |
|
255 |
+LIBS="$LIBS $BERKELEY_DB_LDFLAGS $BERKELEY_DB_LIB $OPENSSL_LIB_LDFLAGS $OPENSSL_LIB_LIB" |
256 |
|
257 |
dnl AC_CHECK_LIB(rx, main) deprecated |
258 |
AC_CHECK_LIB(rt, main) |
259 |
|
260 |
-AC_CHECK_HEADERS(pcre.h) |
261 |
-AC_CHECK_HEADERS(pcre/pcre.h) |
262 |
- |
263 |
dnl ###################################################################### |
264 |
dnl Checks for header files. |
265 |
dnl ###################################################################### |
266 |
@@ -564,7 +514,6 @@ AC_CHECK_HEADERS(sys/param.h) |
267 |
AC_CHECK_HEADERS(fcntl.h) |
268 |
AC_CHECK_HEADERS(sys/filesys.h) |
269 |
AC_CHECK_HEADERS(dustat.h) |
270 |
-AC_CHECK_HEADERS(regex.h rxposix.h) |
271 |
AC_CHECK_HEADERS(sys/systeminfo.h) |
272 |
AC_CHECK_HEADERS(sys/acl.h winsock2.h) |
273 |
|
274 |
@@ -579,32 +528,23 @@ dnl ###################################################################### |
275 |
dnl Checks for graph support |
276 |
dnl ###################################################################### |
277 |
|
278 |
-AC_ARG_WITH(graphviz, |
279 |
- AS_HELP_STRING(--with-graphviz, [support some graphic functions]),with_graphviz=yes, |
280 |
- with_graphviz=no) |
281 |
- |
282 |
-if test "x$with_graphviz" = xyes; then |
283 |
- AC_MSG_CHECKING(for Graphviz) |
284 |
- WITH_GVC=1 |
285 |
-else |
286 |
- WITH_GVC=0 |
287 |
-fi |
288 |
+AC_ARG_WITH([graphviz], |
289 |
+ [AS_HELP_STRING([--with-graphviz], [support some graphic functions])]) |
290 |
+AS_IF([test "x$with_graphviz" = "xyes"], [WITH_GVC=1], [WITH_GVC=0]) |
291 |
|
292 |
if test $WITH_GVC = 1; then |
293 |
+ AC_MSG_CHECKING(for Graphviz) |
294 |
AC_CHECK_HEADERS(graphviz/gvc.h) |
295 |
AC_CHECK_LIB(gvc,main) |
296 |
fi |
297 |
|
298 |
|
299 |
-AC_ARG_WITH(gd, |
300 |
- AS_HELP_STRING(--without-gd, [support some graphic functions]),with_gd=no, |
301 |
- with_gd=yes) |
302 |
- |
303 |
-if test "x$with_gd" != xno; then |
304 |
- AC_CHECK_LIB(gd,main) |
305 |
- AC_CHECK_HEADERS(gd.h) |
306 |
-fi |
307 |
- |
308 |
+AC_ARG_WITH([gd], |
309 |
+ [AS_HELP_STRING([--without-gd], [support some graphic functions])]) |
310 |
+AS_IF([test "x$with_gd" = "xyes"], [ |
311 |
+ AC_CHECK_LIB(gd,main) |
312 |
+ AC_CHECK_HEADERS(gd.h) |
313 |
+]) |
314 |
|
315 |
dnl ###################################################################### |
316 |
dnl Checks for data types |
317 |
@@ -627,7 +567,7 @@ dnl Check for special functions |
318 |
dnl ###################################################################### |
319 |
|
320 |
AC_CHECK_FUNCS(getcwd getnetgrent waitpid seteuid setegid setreuid setregid) |
321 |
-AC_CHECK_FUNCS(uname gethostname realpath regcomp chflags) |
322 |
+AC_CHECK_FUNCS(uname gethostname realpath chflags) |
323 |
AC_CHECK_FUNCS(strstr strsep putenv drand48 srand48 getaddrinfo) |
324 |
AC_CHECK_FUNCS(bcopy mkfifo statfs statvfs door) |
325 |
AC_CHECK_FUNCS(sysinfo setsid strdup strrchr strerror snprintf sysconf) |
326 |
@@ -691,30 +631,27 @@ AC_CHECK_FUNC(lchown, AC_DEFINE(HAVE_LCHOWN)) |
327 |
AC_CHECK_FUNC(pthread_attr_setstacksize, AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE), AC_CHECK_LIB(pthread, pthread_create)) |
328 |
AC_CHECK_FUNC(pthread_sigmask, AC_DEFINE(HAVE_PTHREAD_SIGMASK), AC_CHECK_LIB(pthread, pthread_create)) |
329 |
|
330 |
-AC_ARG_ENABLE(DCE,[ --enable-DCE support for DCE and ACLs],[ |
331 |
- case "$enableval" in |
332 |
- no) |
333 |
- ;; |
334 |
- *) |
335 |
- AC_CHECK_LIB(thread, main) |
336 |
- AC_CHECK_LIB(dce, main) dnl DFS |
337 |
- AC_CHECK_HEADERS(dce/daclif.h) |
338 |
- AC_CHECK_HEADERS(pthread.h) |
339 |
- AC_CHECK_HEADERS(sched.h) |
340 |
- ;; |
341 |
- esac |
342 |
- ]) |
343 |
+AC_ARG_ENABLE([DCE], [AS_HELP_STRING([--enable-DCE], [support for DCE and ACLs])]) |
344 |
+AS_IF([test "x$enable_DCE" = "xyes"], [ |
345 |
+ AC_CHECK_LIB(thread, main) |
346 |
+ AC_CHECK_LIB(dce, main) dnl DFS |
347 |
+ AC_CHECK_HEADERS(dce/daclif.h) |
348 |
+ AC_CHECK_HEADERS(pthread.h) |
349 |
+ AC_CHECK_HEADERS(sched.h) |
350 |
+]) |
351 |
|
352 |
dnl ###################################################################### |
353 |
dnl Give the chance to enable SELINUX |
354 |
dnl ###################################################################### |
355 |
dnl |
356 |
-AC_ARG_ENABLE(selinux, dnl |
357 |
- [ --enable-selinux Enable use of the SELINUX libraries], |
358 |
- [AC_DEFINE(WITH_SELINUX, 1, [Define if you want to use SELINUX]) |
359 |
- LIB_SELINUX="-lselinux" |
360 |
- LIBS="$LIBS $LIB_SELINUX" |
361 |
- AC_SUBST(LIB_SELINUX)]) |
362 |
+AC_ARG_ENABLE([selinux], dnl |
363 |
+ [AS_HELP_STRING([--enable-selinux], [Enable use of the SELINUX libraries])]) |
364 |
+AS_IF([test "x$enable_selinux" = "xyes"], [ |
365 |
+ AC_DEFINE(WITH_SELINUX, 1, [Define if you want to use SELINUX]) |
366 |
+ LIB_SELINUX="-lselinux" |
367 |
+ LIBS="$LIBS $LIB_SELINUX" |
368 |
+ AC_SUBST(LIB_SELINUX) |
369 |
+]) |
370 |
|
371 |
|
372 |
dnl ###################################################################### |
373 |
@@ -995,7 +932,7 @@ AC_MSG_RESULT( ) |
374 |
AC_MSG_RESULT( Summary of options...) |
375 |
|
376 |
|
377 |
-if test $ac_cv_lib_pcre_main = "yes"; then |
378 |
+if test "x$ac_cv_lib_pcre_main" = "xyes"; then |
379 |
AC_MSG_RESULT( -> Configured with PCRE libraries) |
380 |
else |
381 |
AC_MSG_RESULT( -> No PCRE library support - reverting to POSIX builtins) |
382 |
@@ -1003,11 +940,11 @@ fi |
383 |
|
384 |
if test $WITH_SQL = 1; then |
385 |
|
386 |
- if test $ac_cv_lib_mysqlclient_main = "yes"; then |
387 |
+ if test "x$ac_cv_lib_mysqlclient_main" = "xyes"; then |
388 |
AC_MSG_RESULT( -> Configured with MYSQL libraries) |
389 |
fi |
390 |
|
391 |
- if test $ac_cv_lib_pq_main = "yes"; then |
392 |
+ if test "x$ac_cv_lib_pq_main" = "xyes"; then |
393 |
AC_MSG_RESULT( -> Configured with Postgres libraries) |
394 |
fi |
395 |
|
396 |
@@ -1016,14 +953,14 @@ else |
397 |
fi |
398 |
|
399 |
if test $WITH_GVC = 1; then |
400 |
- if test $ac_cv_lib_gvc_main = "yes"; then |
401 |
+ if test "x$ac_cv_lib_gvc_main" = "xyes"; then |
402 |
AC_MSG_RESULT( -> Configured with Graphviz libraries) |
403 |
fi |
404 |
else |
405 |
AC_MSG_RESULT( -> No Graphviz libraries included) |
406 |
fi |
407 |
|
408 |
-if test $ac_cv_lib_ldap_ldap_get_values_len = "yes"; then |
409 |
+if test "x$ac_cv_lib_ldap_ldap_get_values_len" = "xyes"; then |
410 |
AC_MSG_RESULT( -> Configured with LDAP libraries) |
411 |
else |
412 |
AC_MSG_RESULT( -> No LDAP libraries included) |