source: trunk/aclocal.m4@ 29

Last change on this file since 29 was 18, checked in by rainer, 19 years ago

Optimized version of tiger algorithm, and basic ingredients for unit testing (part 2)

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