source: branches/samhain-2_2-branch/aclocal.m4@ 145

Last change on this file since 145 was 64, checked in by rainer, 18 years ago

Dont use assembly implementation of tiger on i86/solaris, may fail to compile.

File size: 41.0 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.3
2
3dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4dnl This Makefile.in is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13#
14# Check to make sure that the build environment is sane.
15#
16AC_DEFUN([AM_INIT_AUTOMAKE],
17[
18AC_REQUIRE([AC_PROG_INSTALL])
19PACKAGE=[$1]
20AC_SUBST(PACKAGE)
21VERSION=[$2]
22AC_SUBST(VERSION)
23dnl test to see if srcdir already configured
24if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
25 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
26fi
27ifelse([$3],,
28AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
29AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
30AC_REQUIRE([AC_PROG_MAKE_SET])])
31
32
33# Define a conditional.
34
35AC_DEFUN([AM_CONDITIONAL],
36[AC_SUBST($1_TRUE)
37AC_SUBST($1_FALSE)
38if $2; then
39 $1_TRUE=
40 $1_FALSE='#'
41else
42 $1_TRUE='#'
43 $1_FALSE=
44fi])
45
46
47AC_DEFUN([sh_run_prog],
48[if test "$cross_compiling" = "yes"; then
49 AC_MSG_ERROR([Can not probe non-portable values when cross compiling])
50fi
51cat > conftest.$ac_ext <<EOF
52[#]line __oline__ "configure"
53#include "confdefs.h"
54ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
55extern "C" void exit(int);
56#endif
57])
58[$1]
59EOF
60if AC_TRY_EVAL(ac_link) && test -s conftest && $2=`(./conftest 2>/dev/null)`
61then
62dnl Don't remove the temporary files here, so they can be examined.
63ifelse([$3], , :, [$3])
64else
65echo "configure: failed program was:" >&AC_FD_CC
66cat conftest.$ac_ext >&AC_FD_CC
67ifelse([$4], , , [ rm -fr conftest*
68 $4
69])
70fi
71rm -fr conftest* ])
72
73dnl fs type number of the proc filing system
74AC_DEFUN([sh_procfs_id],
75[AC_MSG_CHECKING([f_type of /proc])
76AC_CACHE_VAL([sh_cv_proc_fstype],
77[sh_run_prog(
78changequote(<<, >>)dnl
79<<#include <stdio.h>
80#ifdef HAVE_STDLIB_H
81#include <stdlib.h>
82#endif /* HAVE_STDLIB_H */
83#ifdef HAVE_UNISTD_H
84#include <unistd.h>
85#endif /* HAVE_UNISTD_H */
86#ifdef HAVE_SYS_VFS_H
87#include <sys/vfs.h>
88#endif
89#ifndef Q
90#define __Q(x) #x
91#define Q(x) __Q(x)
92#endif
93int main(void)
94{
95struct statfs fsbuf;
96long ft;
97if (statfs("/", &fsbuf)!=0)
98 exit(1);
99ft=fsbuf.f_type;
100if (statfs("/proc/1", &fsbuf)!=0)
101 exit(1);
102if (ft!=fsbuf.f_type)
103 printf("0x%08lx", fsbuf.f_type);
104else
105 puts("statfs useless");
106exit(0);
107} >>
108changequote([, ]), sh_cv_proc_fstype,, sh_cv_proc_fstype="a fatal error occured")])
109AC_MSG_RESULT($sh_cv_proc_fstype)
110if test "${sh_cv_proc_fstype}" = "a fatal error occured"; then
111 $1=$2
112 $4
113else if test "${sh_cv_proc_fstype}" = "statfs useless"; then
114 $1=$2
115 $4
116else
117 $1=$sh_cv_proc_fstype
118 $3
119fi; fi ])
120
121# Check whether mlock is broken (hpux 10.20 raises a SIGBUS if mlock
122# is not called from uid 0 (not tested whether uid 0 works)
123dnl AC_CHECK_MLOCK
124dnl
125define([AC_CHECK_MLOCK],
126 [ AC_CHECK_FUNCS(mlock)
127 if test "$ac_cv_func_mlock" = "yes"; then
128 AC_MSG_CHECKING(whether mlock is broken)
129 AC_CACHE_VAL(ac_cv_have_broken_mlock,
130 AC_TRY_RUN([
131 #include <stdlib.h>
132 #include <unistd.h>
133 #include <errno.h>
134 #include <sys/mman.h>
135 #include <sys/types.h>
136 #include <fcntl.h>
137
138 int main()
139 {
140 char *pool;
141 int err;
142 long int pgsize = getpagesize();
143
144 pool = malloc( 4096 + pgsize );
145 if( !pool )
146 return 2;
147 pool += (pgsize - ((long int)pool % pgsize));
148
149 err = mlock( pool, 4096 );
150 if( !err || errno == EPERM )
151 return 0; /* okay */
152
153 return 1; /* hmmm */
154 }
155
156 ],
157 ac_cv_have_broken_mlock="no",
158 ac_cv_have_broken_mlock="yes",
159 ac_cv_have_broken_mlock="assume-no"
160 )
161 )
162 if test "$ac_cv_have_broken_mlock" = "yes"; then
163 AC_DEFINE(HAVE_BROKEN_MLOCK)
164 AC_MSG_RESULT(yes)
165 else
166 if test "$ac_cv_have_broken_mlock" = "no"; then
167 AC_MSG_RESULT(no)
168 else
169 AC_MSG_RESULT(assuming no)
170 fi
171 fi
172 fi
173 ])
174
175dnl @synopsis AC_FUNC_VSNPRINTF
176dnl
177dnl Check whether there is a reasonably sane vsnprintf() function installed.
178dnl "Reasonably sane" in this context means never clobbering memory beyond
179dnl the buffer supplied, and having a sensible return value. It is
180dnl explicitly allowed not to NUL-terminate the return value, however.
181dnl
182dnl @version $Id: ac_func_vsnprintf.m4,v 1.1 2001/07/26 02:00:21 guidod Exp $
183dnl @author Gaute Strokkenes <gs234@cam.ac.uk>
184dnl
185AC_DEFUN([SL_CHECK_VSNPRINTF],
186[AC_CACHE_CHECK(for working vsnprintf,
187 ac_cv_func_vsnprintf,
188[AC_TRY_RUN(
189[#include <stdio.h>
190#include <stdarg.h>
191
192int
193doit(char * s, ...)
194{
195 char buffer[32];
196 va_list args;
197 int r;
198
199 buffer[5] = 'X';
200
201 va_start(args, s);
202 r = vsnprintf(buffer, 5, s, args);
203 va_end(args);
204
205 /* -1 is pre-C99, 7 is C99. R.W. 17.01.2003 disallow -1 */
206
207 if (r != 7)
208 exit(1);
209
210 /* We deliberately do not care if the result is NUL-terminated or
211 not, since this is easy to work around like this. */
212
213 buffer[4] = 0;
214
215 /* Simple sanity check. */
216
217 if (strcmp(buffer, "1234"))
218 exit(1);
219
220 if (buffer[5] != 'X')
221 exit(1);
222
223 exit(0);
224}
225
226int
227main(void)
228{
229 doit("1234567");
230 exit(1);
231}], ac_cv_func_vsnprintf=yes, ac_cv_func_vsnprintf=no, ac_cv_func_vsnprintf=no)])
232dnl Note that the default is to be pessimistic in the case
233dnl of cross compilation.
234dnl If you know that the target has a sensible vsnprintf(),
235dnl you can get around this
236dnl by setting ac_func_vsnprintf to yes, as described in the Autoconf manual.
237if test $ac_cv_func_vsnprintf = yes; then
238 :
239else
240 AC_DEFINE(HAVE_BROKEN_VSNPRINTF, 1,
241 [Define if you have a broken version of the `vsnprintf' function.])
242fi
243])# AC_FUNC_VSNPRINTF
244
245dnl SH_CHECK_TYPEDEF(TYPE, HAVE_NAME)
246dnl Check whether a typedef exists and create a #define $2 if it exists
247dnl
248AC_DEFUN([SH_CHECK_TYPEDEF],
249 [ AC_MSG_CHECKING(for $1 typedef)
250 sh_cv_typedef_foo=`echo sh_cv_typedef_$1 | sed -e 's% %_%g'`
251 AC_CACHE_VAL( $sh_cv_typedef_foo,
252 [AC_TRY_COMPILE([#include <stdlib.h>
253 #include <sys/types.h>], [
254 #undef $1
255 int a = sizeof($1);
256 ], sh_cv_typedef=yes, sh_cv_typedef=no )])
257 AC_MSG_RESULT($sh_cv_typedef)
258 if test "$sh_cv_typedef" = yes; then
259 AC_DEFINE($2)
260 sh_$2=yes
261 else
262 sh_$2=no
263 fi
264 ])
265
266
267
268dnl **********************
269dnl *** va_copy checks ***
270dnl **********************
271AC_DEFUN([SL_CHECK_VA_COPY],
272[AC_MSG_CHECKING(for va_copy())
273AC_CACHE_VAL(sh_cv_va_copy,[
274 AC_TRY_RUN([
275 #include <stdarg.h>
276 void f (int i, ...) {
277 va_list args1, args2;
278 va_start (args1, i);
279 va_copy (args2, args1);
280 if (va_arg (args2, int) != 42)
281 exit (1);
282 if (va_arg (args1, int) != 42)
283 exit (1);
284 va_end (args1); va_end (args2);
285 }
286 int main() {
287 f (0, 42);
288 return 0;
289 }],
290 sh_cv_va_copy=yes
291 ,
292 sh_cv_va_copy=no
293 ,
294 sh_cv_va_copy=no)
295])
296AC_MSG_RESULT($sh_cv_va_copy)
297AC_MSG_CHECKING(for __va_copy())
298AC_CACHE_VAL(sh_cv___va_copy,[
299 AC_TRY_RUN([
300 #include <stdarg.h>
301 void f (int i, ...) {
302 va_list args1, args2;
303 va_start (args1, i);
304 __va_copy (args2, args1);
305 if (va_arg (args2, int) != 42)
306 exit (1);
307 if (va_arg (args1, int) != 42)
308 exit (1);
309 va_end (args1); va_end (args2);
310 }
311 int main() {
312 f (0, 42);
313 return 0;
314 }],
315 sh_cv___va_copy=yes
316 ,
317 sh_cv___va_copy=no
318 ,
319 sh_cv___va_copy=no)
320])
321AC_MSG_RESULT($sh_cv___va_copy)
322AC_MSG_CHECKING(whether va_lists can be copied by value)
323AC_CACHE_VAL(sh_cv_va_val_copy,[
324 AC_TRY_RUN([
325 #include <stdarg.h>
326 void f (int i, ...) {
327 va_list args1, args2;
328 va_start (args1, i);
329 args2 = args1;
330 if (va_arg (args2, int) != 42)
331 exit (1);
332 if (va_arg (args1, int) != 42)
333 exit (1);
334 va_end (args1); va_end (args2);
335 }
336 int main() {
337 f (0, 42);
338 return 0;
339 }],
340 sh_cv_va_val_copy=yes
341 ,
342 sh_cv_va_val_copy=no
343 ,
344 sh_cv_va_val_copy=no)
345])
346if test "x$sh_cv_va_copy" = "xyes"; then
347 AC_DEFINE(VA_COPY, va_copy)
348else if test "x$sh_cv___va_copy" = "xyes"; then
349 AC_DEFINE(VA_COPY, __va_copy)
350fi
351fi
352if test "x$sh_cv_va_val_copy" = "xno"; then
353 AC_DEFINE(VA_COPY_AS_ARRAY)
354fi
355AC_MSG_RESULT($sh_cv_va_val_copy)
356])
357
358
359dnl SH_INIT_PARSE_ARGS()
360m4_define([SH_INIT_PARSE_ARGS],
361[
362m4_divert_push([PARSE_ARGS])dnl
363
364as_cr_letters='abcdefghijklmnopqrstuvwxyz'
365as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
366as_cr_Letters=$as_cr_letters$as_cr_LETTERS
367as_cr_digits='0123456789'
368as_cr_alnum=$as_cr_Letters$as_cr_digits
369
370# Sed expression to map a string onto a valid CPP name.
371as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g"
372
373as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'"
374# IFS
375# We need space, tab and new line, in precisely that order.
376as_nl='
377'
378IFS=" $as_nl"
379
380# CDPATH.
381$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
382
383
384# Initialize some variables set by options.
385ac_init_help=
386ac_init_version=false
387# The variables have the same names as the options, with
388# dashes changed to underlines.
389cache_file=/dev/null
390AC_SUBST(exec_prefix, NONE)dnl
391no_create=
392no_recursion=
393AC_SUBST(prefix, NONE)dnl
394program_prefix=NONE
395program_suffix=NONE
396AC_SUBST(program_transform_name, [s,x,x,])dnl
397silent=
398site=
399srcdir=
400verbose=
401x_includes=NONE
402x_libraries=NONE
403DESTDIR=
404SH_ENABLE_OPTS="db-reload xml-log message-queue login-watch mounts-check userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp"
405SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
406
407# Installation directory options.
408# These are left unexpanded so users can "make install exec_prefix=/foo"
409# and all the variables that are supposed to be based on exec_prefix
410# by default will actually change.
411dnl Use braces instead of parens because sh, perl, etc. also accept them.
412sbindir='${exec_prefix}/sbin'
413sysconfdir='${prefix}/etc'
414localstatedir='${prefix}/var'
415mandir='${prefix}/share/man'
416
417AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
418AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
419AC_SUBST([localstatedir], ['${prefix}/var'])dnl
420AC_SUBST([mandir], ['${prefix}/share/man'])dnl
421
422
423# Initialize some other variables.
424subdirs=
425MFLAGS= MAKEFLAGS=
426SHELL=${CONFIG_SHELL-/bin/sh}
427# Maximum number of lines to put in a shell here document.
428ac_max_here_lines=12
429
430ac_prev=
431for ac_option
432do
433
434 # If the previous option needs an argument, assign it.
435 if test -n "$ac_prev"; then
436 eval "$ac_prev=\$ac_option"
437 ac_prev=
438 continue
439 fi
440
441 case "$ac_option" in
442changequote(, )dnl
443 *=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
444changequote([, ])dnl
445 *) ac_optarg= ;;
446 esac
447
448 # Accept the important Cygnus configure options, so we can diagnose typos.
449
450 case "$ac_option" in
451
452 -build | --build | --buil | --bui | --bu)
453 ac_prev=build_alias ;;
454 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
455 build_alias="$ac_optarg" ;;
456
457 -cache-file | --cache-file | --cache-fil | --cache-fi \
458 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
459 ac_prev=cache_file ;;
460 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
461 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
462 cache_file="$ac_optarg" ;;
463
464 --config-cache | -C)
465 cache_file=config.cache ;;
466
467 -disable-* | --disable-*)
468 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
469 # Reject names that are not valid shell variable names.
470 expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
471 AC_MSG_ERROR([invalid feature name: $ac_feature])
472 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
473 ac_enable_check_opt=no
474 for f in ${SH_ENABLE_OPTS}
475 do
476 f=`echo $f | sed 's/-/_/g'`
477 if test x${f} = x"${ac_feature}"
478 then
479 ac_enable_check_opt=yes
480 fi
481 done
482 if test x${ac_enable_check_opt} = xno
483 then
484 AC_MSG_ERROR([unrecognized option: $ac_option
485Try `$[0] --help' for more information.])
486 fi
487 eval "enable_$ac_feature=no" ;;
488
489 -enable-* | --enable-*)
490 ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
493 AC_MSG_ERROR([invalid feature name: $ac_feature])
494 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
495 case $ac_option in
496 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
497 *) ac_optarg=yes ;;
498 esac
499 ac_enable_check_opt=no
500 for f in ${SH_ENABLE_OPTS}
501 do
502 f=`echo $f | sed 's/-/_/g'`
503 if test x${f} = x"${ac_feature}"
504 then
505 ac_enable_check_opt=yes
506 fi
507 done
508 if test x${ac_enable_check_opt} = xno
509 then
510 AC_MSG_ERROR([unrecognized option: $ac_option
511Try `$[0] --help' for more information.])
512 fi
513 eval "enable_$ac_feature='$ac_optarg'" ;;
514
515 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
516 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
517 | --exec | --exe | --ex)
518 ac_prev=exec_prefix
519 ac_exec_prefix_set="yes"
520 ;;
521 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
522 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
523 | --exec=* | --exe=* | --ex=*)
524 exec_prefix="$ac_optarg"
525 ac_exec_prefix_set="yes"
526 ;;
527
528 -gas | --gas | --ga | --g)
529 # Obsolete; use --with-gas.
530 with_gas=yes ;;
531
532 -help | --help | --hel | --he | -h)
533 ac_init_help=long ;;
534 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
535 ac_init_help=recursive ;;
536 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
537 ac_init_help=short ;;
538
539 -host | --host | --hos | --ho)
540 ac_prev=host_alias ;;
541 -host=* | --host=* | --hos=* | --ho=*)
542 host_alias="$ac_optarg" ;;
543
544 -localstatedir | --localstatedir | --localstatedi | --localstated \
545 | --localstate | --localstat | --localsta | --localst \
546 | --locals | --local | --loca | --loc | --lo)
547 ac_prev=localstatedir
548 ac_localstatedir_set="yes"
549 ;;
550 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
551 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
552 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
553 localstatedir="$ac_optarg"
554 ac_localstatedir_set="yes"
555 ;;
556
557 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
558 ac_prev=mandir
559 ac_mandir_set="yes"
560 ;;
561 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
562 mandir="$ac_optarg"
563 ac_mandir_set="yes"
564 ;;
565
566 -nfp | --nfp | --nf)
567 # Obsolete; use --without-fp.
568 with_fp=no ;;
569
570 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
571 | --no-cr | --no-c | -n)
572 no_create=yes ;;
573
574 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
575 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
576 no_recursion=yes ;;
577
578 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
579 ac_prev=prefix
580 ac_prefix_set="yes"
581 ;;
582 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
583 prefix="$ac_optarg"
584 ac_prefix_set="yes"
585 ;;
586
587 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
588 | -silent | --silent | --silen | --sile | --sil)
589 silent=yes ;;
590
591 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
592 ac_prev=sbindir
593 ac_sbindir_set="yes"
594 ;;
595 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
596 | --sbi=* | --sb=*)
597 sbindir="$ac_optarg"
598 ac_sbindir_set="yes"
599 ;;
600
601 -bindir | --bindir | --bindi | --bind | --bin | --bi | --b)
602 echo "WARNING: bindir will be ignored, use sbindir"
603 ;;
604 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* \
605 | --bi=* | --b=*)
606 echo "WARNING: bindir will be ignored, use sbindir"
607 ;;
608
609 -datadir | --datadir)
610 echo "WARNING: datadir will be ignored"
611 ;;
612 -datadir=* | --datadir=*)
613 echo "WARNING: datadir will be ignored"
614 ;;
615
616 -includedir | --includedir)
617 echo "WARNING: includedir will be ignored"
618 ;;
619 -includedir=* | --includedir=*)
620 echo "WARNING: includedir will be ignored"
621 ;;
622
623 -infodir | --infodir)
624 echo "WARNING: infodir will be ignored"
625 ;;
626 -infodir=* | --infodir=*)
627 echo "WARNING: infodir will be ignored"
628 ;;
629
630 -libdir | --libdir)
631 echo "WARNING: libdir will be ignored"
632 ;;
633 -libdir=* | --libdir=*)
634 echo "WARNING: libdir will be ignored"
635 ;;
636
637 -libexecdir | --libexecdir)
638 echo "WARNING: libexecdir will be ignored"
639 ;;
640 -libexecdir=* | --libexecdir=*)
641 echo "WARNING: libexecdir will be ignored"
642 ;;
643
644 -sharedstatedir | --sharedstatedir)
645 echo "WARNING: sharedstatedir will be ignored"
646 ;;
647 -sharedstatedir=* | --sharedstatedir=*)
648 echo "WARNING: sharedstatedir will be ignored"
649 ;;
650
651 -site | --site | --sit)
652 ac_prev=site ;;
653 -site=* | --site=* | --sit=*)
654 site="$ac_optarg" ;;
655
656 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
657 ac_prev=srcdir ;;
658 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
659 srcdir="$ac_optarg" ;;
660
661 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
662 | --syscon | --sysco | --sysc | --sys | --sy)
663 ac_prev=sysconfdir
664 ac_sysconfdir_set="yes"
665 ;;
666 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
667 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
668 sysconfdir="$ac_optarg"
669 ac_sysconfdir_set="yes"
670 ;;
671
672 -target | --target | --targe | --targ | --tar | --ta | --t)
673 ac_prev=target_alias ;;
674 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
675 target_alias="$ac_optarg" ;;
676
677 -v | -verbose | --verbose | --verbos | --verbo | --verb)
678 verbose=yes ;;
679
680 -version | --version | --versio | --versi | --vers)
681 ac_init_version=: ;;
682
683
684 -with-* | --with-*)
685 ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
686 # Reject names that are not valid shell variable names.
687 expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
688 AC_MSG_ERROR([invalid package name: $ac_package])
689 ac_package=`echo $ac_package| sed 's/-/_/g'`
690 case $ac_option in
691 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
692 *) ac_optarg=yes ;;
693 esac
694 ac_with_check_opt=no
695 for f in ${SH_WITH_OPTS}
696 do
697 f=`echo $f | sed 's/-/_/g'`
698 if test x${f} = x"${ac_package}"
699 then
700 ac_with_check_opt=yes
701 fi
702 done
703 if test x${ac_with_check_opt} = xno
704 then
705 AC_MSG_ERROR([unrecognized option: $ac_option
706Try `$[0] --help' for more information.])
707 fi
708 eval "with_$ac_package='$ac_optarg'" ;;
709
710 -without-* | --without-*)
711 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
712 # Reject names that are not valid shell variable names.
713 expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
714 AC_MSG_ERROR([invalid package name: $ac_package])
715 ac_package=`echo $ac_package | sed 's/-/_/g'`
716 ac_with_check_opt=no
717 for f in ${SH_WITH_OPTS}
718 do
719 f=`echo $f | sed 's/-/_/g'`
720 if test x${f} = x"${ac_package}"
721 then
722 ac_with_check_opt=yes
723 fi
724 done
725 if test x${ac_with_check_opt} = xno
726 then
727 AC_MSG_ERROR([unrecognized option: $ac_option
728Try `$[0] --help' for more information.])
729 fi
730 eval "with_$ac_package=no" ;;
731
732
733 -*) AC_MSG_ERROR([unrecognized option: $ac_option
734Try `$[0] --help' for more information.])
735 ;;
736
737 *=*)
738 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
739 # Reject names that are not valid shell variable names.
740 expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
741 AC_MSG_ERROR([invalid variable name: $ac_envvar])
742 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
743 eval "$ac_envvar='$ac_optarg'"
744 export $ac_envvar ;;
745
746 *)
747 # FIXME: should be removed in autoconf 3.0.
748 AC_MSG_WARN([you should use --build, --host, --target])
749 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
750 AC_MSG_WARN([invalid host type: $ac_option])
751 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
752 ;;
753
754
755 esac
756done
757
758if test -n "$ac_prev"; then
759 AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
760fi
761
762# Be sure to have absolute paths.
763for ac_var in prefix exec_prefix
764do
765 eval ac_val=$`echo $ac_var`
766 case $ac_val in
767 [[\\/$]]* | ?:[[\\/]]* | NONE | '' | OPT | USR ) ;;
768 *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
769 esac
770done
771
772# Be sure to have absolute paths.
773for ac_var in sbindir sysconfdir localstatedir mandir
774do
775 eval ac_val=$`echo $ac_var`
776 case $ac_val in
777 [[\\/$]]* | ?:[[\\/]]* ) ;;
778 *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
779 esac
780done
781
782# There might be people who depend on the old broken behavior: `$host'
783# used to hold the argument of --host etc.
784# FIXME: To remove some day.
785build=$build_alias
786host=$host_alias
787target=$target_alias
788
789# FIXME: To remove some day.
790if test "x$host_alias" != x; then
791 if test "x$build_alias" = x; then
792 cross_compiling=maybe
793 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
794 If a cross compiler is detected then cross compile mode will be used.])
795 elif test "x$build_alias" != "x$host_alias"; then
796 cross_compiling=yes
797 fi
798fi
799
800ac_tool_prefix=
801test -n "$host_alias" && ac_tool_prefix=$host_alias-
802
803test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
804
805m4_divert_pop([PARSE_ARGS])dnl
806])# SH_INIT_PARSE_ARGS
807
808m4_define([SH_INIT_HELP],
809[m4_divert_push([HELP_BEGIN])dnl
810
811#
812# Report the --help message.
813#
814if test "$ac_init_help" = "long"; then
815 # Omit some internal or obsolete options to make the list less imposing.
816 # This message is too long to be a string in the A/UX 3.1 sh.
817 cat <<_ACEOF
818\`configure' configures m4_ifset([AC_PACKAGE_STRING],
819 [AC_PACKAGE_STRING],
820 [this package]) to adapt to many kinds of systems.
821
822Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
823
824[To assign environment variables (e.g., CC, CFLAGS...), specify them as
825VAR=VALUE. See below for descriptions of some of the useful variables.
826
827Defaults for the options are specified in brackets.
828
829Configuration:
830 -h, --help display this help and exit
831 --help=short display options specific to this package
832 --help=recursive display the short help of all the included packages
833 -V, --version display version information and exit
834 -q, --quiet, --silent do not print \`checking...' messages
835 --cache-file=FILE cache test results in FILE [disabled]
836 -C, --config-cache alias for \`--cache-file=config.cache'
837 -n, --no-create do not create output files
838 --srcdir=DIR find the sources in DIR [configure dir or \`..']
839
840_ACEOF
841
842 cat <<_ACEOF
843Installation directories:
844 --prefix=PREFIX install architecture-independent files in PREFIX
845 [$ac_default_prefix]
846 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
847 [PREFIX]
848
849By default, \`make install' will install binaries in \`/usr/local/sbin',
850the config file in \`/etc', manpage in \`/usr/local/share/man', and state
851data in \`/var/lib/INSTALL_NAME' (FSH layout). You can specify other
852FSH compliant layouts with \`--prefix=OPT' or \`--prefix=USR', or you
853can specify a directory with \`--prefix=DIR' to install in \`DIR/sbin',
854\`DIR/etc', etc.
855
856For better control, use the options below.
857
858Fine tuning of the installation directories:
859 --sbindir=DIR system admin executables [EPREFIX/sbin]
860 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
861 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
862 --mandir=DIR man documentation [PREFIX/man]
863
864For even finer tuning, paths can be specified for individual files (see below)
865
866_ACEOF
867
868 cat <<\_ACEOF]
869m4_divert_pop([HELP_BEGIN])dnl
870dnl The order of the diversions here is
871dnl - HELP_BEGIN
872dnl which may be prolongated by extra generic options such as with X or
873dnl AC_ARG_PROGRAM. Displayed only in long --help.
874dnl
875dnl - HELP_CANON
876dnl Support for cross compilation (--build, --host and --target).
877dnl Display only in long --help.
878dnl
879dnl - HELP_ENABLE
880dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
881dnl then implements the header of the non generic options.
882dnl
883dnl - HELP_WITH
884dnl
885dnl - HELP_VAR
886dnl
887dnl - HELP_VAR_END
888dnl
889dnl - HELP_END
890dnl initialized below, in which we dump the trailer (handling of the
891dnl recursion for instance).
892m4_divert_push([HELP_ENABLE])dnl
893_ACEOF
894fi
895
896if test -n "$ac_init_help"; then
897m4_ifset([AC_PACKAGE_STRING],
898[ case $ac_init_help in
899 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
900 esac])
901 cat <<\_ACEOF
902m4_divert_pop([HELP_ENABLE])dnl
903m4_divert_push([HELP_END])dnl
904m4_ifset([AC_PACKAGE_BUGREPORT], [
905Report bugs to <AC_PACKAGE_BUGREPORT>.])
906_ACEOF
907fi
908
909if test "$ac_init_help" = "recursive"; then
910 # If there are subdirs, report their specific --help.
911 ac_popdir=`pwd`
912 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
913 test -d $ac_dir || continue
914 _AC_SRCPATHS(["$ac_dir"])
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 AC_MSG_WARN([no configuration information is in $ac_dir])
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935m4_divert_pop([HELP_END])dnl
936])# SH_INIT_HELP
937
938
939
940
941
942
943
944
945# Check whether sa_sigaction works.
946# Rainer Wichmann <support@la-samhna.de>, 2003.
947#
948# This file can be copied and used freely without restrictions. It can
949# be used in projects which are not available under the GNU Public License.
950
951# serial 1
952
953AC_DEFUN([AM_SA_SIGACTION_WORKS],
954 [
955 am_cv_val_SA_SIGACTION=no
956 AC_CHECK_HEADER(signal.h,
957 [
958 AM_SI_USER
959 AM_SA_SIGINFO
960 if test $am_cv_val_SI_USER = yes && test $am_cv_val_SA_SIGINFO = yes
961 then
962 AC_TRY_RUN([
963#include <signal.h>
964#include <setjmp.h>
965#include <stdio.h>
966#include <stdlib.h>
967
968volatile int xnum = 0;
969volatile int xcode = 0;
970jmp_buf Buf;
971int xsig = SIGSEGV;
972
973void sighandler (int xsignam, siginfo_t * xsiginfo, void * xsigadd)
974{
975 static sigset_t x;
976
977 if (xsiginfo == NULL)
978 exit(__LINE__);
979 if (xsiginfo->si_signo != xsignam)
980 exit(__LINE__);
981 ++xnum;
982 xcode = xsiginfo->si_code;
983 sigemptyset (&x);
984 sigprocmask(SIG_SETMASK, &x, NULL);
985 longjmp ( Buf, 1);
986}
987
988int main ()
989{
990 struct sigaction newact;
991
992 newact.sa_sigaction = sighandler;
993 sigemptyset (&newact.sa_mask);
994 newact.sa_flags = SA_SIGINFO;
995 if (0 != sigaction (xsig, &newact, NULL))
996 exit (__LINE__);
997 if(setjmp ( Buf)) {
998 if (xnum > 1)
999 goto Third;
1000 goto Second;
1001 }
1002 memcpy((void *) 0x0, "test", 5);
1003 Second:
1004 if (xcode == SI_USER)
1005 exit (__LINE__);
1006 raise(xsig);
1007 Third:
1008 if (xcode != SI_USER)
1009 exit (__LINE__);
1010 if (xnum != 2)
1011 exit (__LINE__);
1012 return (0);
1013}], am_cv_val_SA_SIGACTION=yes, am_cv_val_SA_SIGACTION=no, am_cv_val_SA_SIGACTION=no)
1014 fi
1015 ])
1016 AC_MSG_CHECKING([whether sa_sigaction is supported])
1017 if test $am_cv_val_SA_SIGACTION = yes
1018 then
1019 AC_MSG_RESULT(yes)
1020 AC_DEFINE([SA_SIGACTION_WORKS], 1, [Define if sa_sigaction works])
1021 else
1022 AC_MSG_RESULT(no)
1023 fi
1024 ])
1025
1026# Check whether SI_USER is available in <signal.h>.
1027# Rainer Wichmann <support@la-samhna.de>, 2003.
1028#
1029# This file can be copied and used freely without restrictions. It can
1030# be used in projects which are not available under the GNU Public License.
1031
1032# serial 1
1033
1034
1035AC_DEFUN([AM_SI_USER],
1036 [if test $ac_cv_header_signal_h = yes; then
1037 AC_CACHE_CHECK([for SI_USER in signal.h], am_cv_val_SI_USER,
1038 [AC_TRY_LINK([#include <signal.h>], [return SI_USER],
1039 am_cv_val_SI_USER=yes, am_cv_val_SI_USER=no)])
1040 if test $am_cv_val_SI_USER = yes; then
1041 AC_DEFINE([HAVE_SI_USER], 1, [Define if you have SI_USER])
1042 fi
1043 fi])
1044
1045# Check whether SA_SIGINFO is available in <signal.h>.
1046# Rainer Wichmann <support@la-samhna.de>, 2003.
1047#
1048# This file can be copied and used freely without restrictions. It can
1049# be used in projects which are not available under the GNU Public License.
1050
1051# serial 1
1052
1053
1054AC_DEFUN([AM_SA_SIGINFO],
1055 [if test $ac_cv_header_signal_h = yes; then
1056 AC_CACHE_CHECK([for SA_SIGINFO in signal.h], am_cv_val_SA_SIGINFO,
1057 [AC_TRY_LINK([#include <signal.h>], [return SA_SIGINFO],
1058 am_cv_val_SA_SIGINFO=yes, am_cv_val_SA_SIGINFO=no)])
1059 if test $am_cv_val_SA_SIGINFO = yes; then
1060 AC_DEFINE([HAVE_SA_SIGINFO], 1, [Define if you have SA_SIGINFO])
1061 fi
1062 fi])
1063
1064dnl
1065dnl Useful macros for autoconf to check for ssp-patched gcc
1066dnl 1.0 - September 2003 - Tiago Sousa <mirage@kaotik.org>
1067dnl
1068dnl About ssp:
1069dnl GCC extension for protecting applications from stack-smashing attacks
1070dnl http://www.research.ibm.com/trl/projects/security/ssp/
1071dnl
1072dnl Usage:
1073dnl After calling the correct AC_LANG_*, use the corresponding macro:
1074dnl
1075dnl GCC_STACK_PROTECT_CC
1076dnl checks -fstack-protector with the C compiler, if it exists then updates
1077dnl CFLAGS and defines ENABLE_SSP_CC
1078dnl
1079AC_DEFUN([GCC_STACK_PROTECT_CC],[
1080 ssp_cc=yes
1081 if test "X$GCC" = "Xyes"; then
1082 AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
1083 ssp_old_cflags="$CFLAGS"
1084 CFLAGS="$CFLAGS -fstack-protector"
1085 AC_TRY_LINK(,,, ssp_cc=no)
1086 # echo $ssp_cc
1087 if test "X$ssp_cc" = "Xno"; then
1088 CFLAGS="$ssp_old_cflags"
1089 AC_MSG_RESULT(no)
1090 else
1091 AC_MSG_RESULT(yes)
1092 AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
1093 fi
1094 fi
1095])
1096
1097AC_DEFUN([SAMHAIN_POSIX],[
1098 AC_MSG_CHECKING([whether _POSIX_SOURCE is necessary])
1099 AC_TRY_COMPILE([#include <stdio.h>
1100void fileno(int);int fdopen(int, char *); ],,
1101 [
1102 AC_MSG_RESULT(yes)
1103 AC_DEFINE([_POSIX_SOURCE],1,[Define if POSIX functions are required])
1104 ],
1105 [AC_MSG_RESULT(no)])
1106])dnl
1107
1108dnl checks for a known 64 bit programming environment
1109dnl AC_RUN_IFELSE(PROGRAM,
1110dnl [ACTION-IF-TRUE], [ACTION-IF-FALSE],
1111dnl [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
1112dnl
1113AC_DEFUN([SAMHAIN_PRG_ENV],[
1114 AC_MSG_CHECKING([for a known 64 bit programming environment])
1115 # Compile and run a program that determines the programming environment
1116 AC_RUN_IFELSE([
1117 AC_LANG_SOURCE([[
1118#include <stdio.h>
1119int main(int argc,char **argv)
1120{
1121 if (argc > 1) {
1122#if defined(__arch64__)
1123 printf("__arch64__\n");
1124#elif defined(__ia64__)
1125 printf("__ia64__\n");
1126#elif defined(__x86_64__)
1127 printf("__x86_64__\n");
1128#elif defined(__LP64__)
1129 printf("__LP64__\n");
1130#elif defined(__64BIT__)
1131 printf("__64BIT__\n");
1132#elif defined(_LP64)
1133 printf("_LP64\n");
1134#elif defined(_M_IA64)
1135 printf("_M_IA64\n");
1136#elif defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64)
1137 printf("_MIPS_64\n");
1138#else
1139choke me
1140#endif
1141 }
1142 return 0;
1143}
1144 ]])
1145 ],[
1146 # Program compiled and ran, so get version by adding argument.
1147 samhain_prg_ENV=`./conftest$ac_exeext x`
1148 samhain_64=yes
1149 AC_MSG_RESULT([$samhain_prg_ENV])
1150 ],[
1151 AC_MSG_RESULT([none])
1152 ],[
1153 AC_MSG_RESULT([none])
1154 ])
1155])dnl
1156
1157AC_DEFUN([SAMHAIN_X86_64],[
1158 AC_MSG_CHECKING([for x86_64])
1159 AC_TRY_RUN([
1160int main() {
1161__asm__ volatile (
1162"movq %rax, %rax"
1163);
1164return 0;
1165}
1166 ],
1167 [
1168 AC_MSG_RESULT(yes)
1169 samhain_64=yes
1170 tiger_src=sh_tiger1_64.c
1171 AC_DEFINE([TIGER_OPT_ASM],1,[Define to use tiger x86_64 optimized assembly])
1172 ],
1173 [
1174 AC_MSG_RESULT([no])
1175 ],[
1176 AC_MSG_RESULT([no])
1177 ])
1178])dnl
1179
1180
1181AC_DEFUN([SAMHAIN_64],[
1182samhain_64=no
1183tiger_src=sh_tiger1.c
1184#
1185# if sizeof(unsigned long) = 4, try compiler macros for 64bit
1186#
1187if test "x$ac_cv_sizeof_unsigned_long" = x4; then
1188 if test "x$ac_cv_sizeof_unsigned_long_long" = x8; then
1189 SAMHAIN_PRG_ENV
1190 if test "x$samhain_64" = xyes; then
1191 tiger_src=sh_tiger1_64.c
1192 fi
1193 #
1194 # if GCC and __i386__, use precompiled assembler
1195 #
1196 if test "x$GCC" = xyes; then
1197 AC_MSG_CHECKING([for non-apple non-cygwin i386])
1198 samhain_i386=no
1199 $CC -E -dM - < /dev/null | egrep '__i386__' >/dev/null 2>&1
1200 if test $? = 0; then
1201 # apples gcc does not understand the assembly we provide
1202 $CC -E -dM - < /dev/null | egrep '(__sun__|__APPLE__|__CYGWIN__)' >/dev/null 2>&1 || samhain_i386=yes
1203 fi
1204 if test "x$samhain_i386" = xyes; then
1205 tiger_src=sh_tiger1.s
1206 AC_DEFINE([TIGER_32_BIT_S],1,[Define to use tiger 32 bit i386 assembler])
1207 fi
1208 AC_MSG_RESULT([$samhain_i386])
1209 fi
1210 #
1211 #
1212 #
1213 else
1214 samhain_64=no
1215 tiger_src=sh_tiger1.c
1216 fi
1217else
1218 #
1219 # sizeof(unsigned long) = 8
1220 #
1221 tiger_src=sh_tiger1_64.c
1222 samhain_64=yes
1223 #
1224 # check for x86_64 (enables assembly optimizations)
1225 #
1226 if test "x$GCC" = xyes; then
1227 SAMHAIN_X86_64
1228 fi
1229fi
1230if test "x$samhain_64" = xyes; then
1231 AC_DEFINE([TIGER_64_BIT],1,[Define to use tiger 64 bit implementation])
1232fi
1233AC_MSG_CHECKING([for 64 bit environment])
1234AC_MSG_RESULT([$samhain_64])
1235AC_MSG_CHECKING([for tiger source to use])
1236AC_MSG_RESULT([$tiger_src])
1237AC_SUBST(tiger_src)
1238])dnl
1239
1240
1241dnl Autoconf macros for libprelude
1242dnl $id$
1243
1244# Modified for LIBPRELUDE -- Yoann Vandoorselaere
1245# Modified for LIBGNUTLS -- nmav
1246# Configure paths for LIBGCRYPT
1247# Shamelessly stolen from the one of XDELTA by Owen Taylor
1248# Werner Koch 99-12-09
1249
1250dnl AM_PATH_LIBPRELUDE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
1251dnl Test for libprelude, and define LIBPRELUDE_PREFIX, LIBPRELUDE_CFLAGS, LIBPRELUDE_PTHREAD_CFLAGS,
1252dnl LIBPRELUDE_LDFLAGS, and LIBPRELUDE_LIBS
1253dnl
1254AC_DEFUN([AM_PATH_LIBPRELUDE],
1255[dnl
1256dnl Get the cflags and libraries from the libprelude-config script
1257dnl
1258dnl AC_ARG_WITH(libprelude-prefix,
1259dnl [ --with-libprelude-prefix=PFX Prefix where libprelude is installed (optional)],
1260dnl libprelude_config_prefix="$withval", libprelude_config_prefix="")
1261dnl
1262dnl if test x$libprelude_config_prefix != x ; then
1263dnl if test x${LIBPRELUDE_CONFIG+set} != xset ; then
1264dnl LIBPRELUDE_CONFIG=$libprelude_config_prefix/bin/libprelude-config
1265dnl fi
1266dnl fi
1267dnl
1268dnl AC_PATH_PROG(LIBPRELUDE_CONFIG, libprelude-config, no)
1269 min_libprelude_version=ifelse([$1], ,0.1.0,$1)
1270 AC_MSG_CHECKING(for libprelude - version >= $min_libprelude_version)
1271 no_libprelude=""
1272 if test "$LIBPRELUDE_CONFIG" = "no" ; then
1273 no_libprelude=yes
1274 else
1275 LIBPRELUDE_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --cflags`
1276 LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --pthread-cflags`
1277 LIBPRELUDE_LDFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --ldflags`
1278 LIBPRELUDE_LIBS=`$LIBPRELUDE_CONFIG $libprelude_config_args --libs`
1279 LIBPRELUDE_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --prefix`
1280 LIBPRELUDE_CONFIG_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --config-prefix`
1281 libprelude_config_version=`$LIBPRELUDE_CONFIG $libprelude_config_args --version`
1282
1283
1284 ac_save_CFLAGS="$CFLAGS"
1285 ac_save_LDFLAGS="$LDFLAGS"
1286 ac_save_LIBS="$LIBS"
1287 CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS"
1288 LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS"
1289 LIBS="$LIBS $LIBPRELUDE_LIBS"
1290dnl
1291dnl Now check if the installed libprelude is sufficiently new. Also sanity
1292dnl checks the results of libprelude-config to some extent
1293dnl
1294 rm -f conf.libpreludetest
1295 AC_TRY_RUN([
1296#include <stdio.h>
1297#include <stdlib.h>
1298#include <string.h>
1299#include <libprelude/prelude.h>
1300
1301int
1302main ()
1303{
1304 system ("touch conf.libpreludetest");
1305
1306 if( strcmp( prelude_check_version(NULL), "$libprelude_config_version" ) )
1307 {
1308 printf("\n*** 'libprelude-config --version' returned %s, but LIBPRELUDE (%s)\n",
1309 "$libprelude_config_version", prelude_check_version(NULL) );
1310 printf("*** was found! If libprelude-config was correct, then it is best\n");
1311 printf("*** to remove the old version of LIBPRELUDE. You may also be able to fix the error\n");
1312 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1313 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1314 printf("*** required on your system.\n");
1315 printf("*** If libprelude-config was wrong, set the environment variable LIBPRELUDE_CONFIG\n");
1316 printf("*** to point to the correct copy of libprelude-config, and remove the file config.cache\n");
1317 printf("*** before re-running configure\n");
1318 }
1319 else if ( strcmp(prelude_check_version(NULL), LIBPRELUDE_VERSION ) )
1320 {
1321 printf("\n*** LIBPRELUDE header file (version %s) does not match\n", LIBPRELUDE_VERSION);
1322 printf("*** library (version %s)\n", prelude_check_version(NULL) );
1323 }
1324 else
1325 {
1326 if ( prelude_check_version( "$min_libprelude_version" ) )
1327 {
1328 return 0;
1329 }
1330 else
1331 {
1332 printf("no\n*** An old version of LIBPRELUDE (%s) was found.\n",
1333 prelude_check_version(NULL) );
1334 printf("*** You need a version of LIBPRELUDE newer than %s. The latest version of\n",
1335 "$min_libprelude_version" );
1336 printf("*** LIBPRELUDE is always available from http://www.prelude-ids.org/download/releases.\n");
1337 printf("*** \n");
1338 printf("*** If you have already installed a sufficiently new version, this error\n");
1339 printf("*** probably means that the wrong copy of the libprelude-config shell script is\n");
1340 printf("*** being found. The easiest way to fix this is to remove the old version\n");
1341 printf("*** of LIBPRELUDE, but you can also set the LIBPRELUDE_CONFIG environment to point to the\n");
1342 printf("*** correct copy of libprelude-config. (In this case, you will have to\n");
1343 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1344 printf("*** so that the correct libraries are found at run-time))\n");
1345 }
1346 }
1347 return 1;
1348}
1349],, no_libprelude=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1350 CFLAGS="$ac_save_CFLAGS"
1351 LIBS="$ac_save_LIBS"
1352 LDFLAGS="$ac_save_LDFLAGS"
1353 fi
1354
1355 if test "x$no_libprelude" = x ; then
1356 AC_MSG_RESULT(yes)
1357 ifelse([$2], , :, [$2])
1358 else
1359 if test -f conf.libpreludetest ; then
1360 :
1361 else
1362 AC_MSG_RESULT(no)
1363 fi
1364 if test "$LIBPRELUDE_CONFIG" = "no" ; then
1365 echo "*** The libprelude-config script installed by LIBPRELUDE could not be found"
1366 echo "*** If LIBPRELUDE was installed in PREFIX, make sure PREFIX/bin is in"
1367 echo "*** your path, or set the LIBPRELUDE_CONFIG environment variable to the"
1368 echo "*** full path to libprelude-config."
1369 else
1370 if test -f conf.libpreludetest ; then
1371 :
1372 else
1373 echo "*** Could not run libprelude test program, checking why..."
1374 CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS"
1375 LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS"
1376 LIBS="$LIBS $LIBPRELUDE_LIBS"
1377 AC_TRY_LINK([
1378#include <stdio.h>
1379#include <stdlib.h>
1380#include <string.h>
1381#include <libprelude/prelude.h>
1382], [ return !!prelude_check_version(NULL); ],
1383 [ echo "*** The test program compiled, but did not run. This usually means"
1384 echo "*** that the run-time linker is not finding LIBPRELUDE or finding the wrong"
1385 echo "*** version of LIBPRELUDE. If it is not finding LIBPRELUDE, you'll need to set your"
1386 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1387 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1388 echo "*** is required on your system"
1389 echo "***"
1390 echo "*** If you have an old version installed, it is best to remove it, although"
1391 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1392 echo "***" ],
1393 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1394 echo "*** exact error that occured. This usually means LIBPRELUDE was incorrectly installed"
1395 echo "*** or that you have moved LIBPRELUDE since it was installed. In the latter case, you"
1396 echo "*** may want to edit the libprelude-config script: $LIBPRELUDE_CONFIG" ])
1397 CFLAGS="$ac_save_CFLAGS"
1398 LDFLAGS="$ac_save_LDFLAGS"
1399 LIBS="$ac_save_LIBS"
1400 fi
1401 fi
1402 LIBPRELUDE_CFLAGS=""
1403 LIBPRELUDE_LDFLAGS=""
1404 LIBPRELUDE_LIBS=""
1405 ifelse([$3], , :, [$3])
1406 fi
1407 rm -f conf.libpreludetest
1408 AC_SUBST(LIBPRELUDE_CFLAGS)
1409 AC_SUBST(LIBPRELUDE_PTHREAD_CFLAGS)
1410 AC_SUBST(LIBPRELUDE_LDFLAGS)
1411 AC_SUBST(LIBPRELUDE_LIBS)
1412 AC_SUBST(LIBPRELUDE_PREFIX)
1413 AC_SUBST(LIBPRELUDE_CONFIG_PREFIX)
1414])
1415
1416dnl *-*wedit:notab*-* Please keep this as the last line.
1417
Note: See TracBrowser for help on using the repository browser.