1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl $Id: acinclude.m4,v 1.15 1998/05/23 14:54:53 joda Exp $
15 dnl Only put things that for some reason can't live in the `cf'
16 dnl directory in this file.
19 dnl $xId: misc.m4,v 1.1 1997/12/14 15:59:04 joda Exp $
21 define(upcase,`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl
23 # Like AC_CONFIG_HEADER, but automatically create stamp file.
25 AC_DEFUN(AM_CONFIG_HEADER,
27 AC_CONFIG_HEADER([$1])
28 dnl When config.status generates a header, we must update the stamp-h file.
29 dnl This file resides in the same directory as the config header
30 dnl that is generated. We must strip everything past the first ":",
31 dnl and everything past the last "/".
32 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
33 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
34 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
36 for am_file in <<$1>>; do
37 case " <<$>>CONFIG_HEADERS " in
38 *" <<$>>am_file "*<<)>>
39 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
42 am_indx=`expr "<<$>>am_indx" + 1`
46 # Do all the work for Automake. This macro actually does too much --
47 # some checks are only needed if your package does certain things.
48 # But this isn't really a big deal.
53 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
55 AC_DEFUN(AM_INIT_AUTOMAKE,
56 [AC_REQUIRE([AC_PROG_INSTALL])
61 dnl test to see if srcdir already configured
62 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
63 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
66 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
67 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
68 AC_REQUIRE([AM_SANITY_CHECK])
69 AC_REQUIRE([AC_ARG_PROGRAM])
70 dnl FIXME This is truly gross.
71 missing_dir=`cd $ac_aux_dir && pwd`
72 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
73 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
74 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
75 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
76 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
77 AC_REQUIRE([AC_PROG_MAKE_SET])])
80 # Check to make sure that the build environment is sane.
83 AC_DEFUN(AM_SANITY_CHECK,
84 [AC_MSG_CHECKING([whether build environment is sane])
87 echo timestamp > conftestfile
88 # Do `set' in a subshell so we don't clobber the current shell's
89 # arguments. Must try -L first in case configure is actually a
90 # symlink; some systems play weird games with the mod time of symlinks
91 # (eg FreeBSD returns the mod time of the symlink's containing
94 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
95 if test "[$]*" = "X"; then
97 set X `ls -t $srcdir/configure conftestfile`
99 if test "[$]*" != "X $srcdir/configure conftestfile" \
100 && test "[$]*" != "X conftestfile $srcdir/configure"; then
102 # If neither matched, then we have a broken ls. This can happen
103 # if, for instance, CONFIG_SHELL is bash and it inherits a
104 # broken ls alias from the environment. This has actually
105 # happened. Such a system could not be considered "sane".
106 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
107 alias in your environment])
110 test "[$]2" = conftestfile
116 AC_MSG_ERROR([newly created file is older than distributed files!
117 Check your system clock])
122 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
123 dnl The program must properly implement --version.
124 AC_DEFUN(AM_MISSING_PROG,
125 [AC_MSG_CHECKING(for working $2)
126 # Run test in a subshell; some versions of sh will print an error if
127 # an executable is not found, even if stderr is redirected.
128 # Redirect stdin to placate older versions of autoconf. Sigh.
129 if ($2 --version) < /dev/null > /dev/null 2>&1; then
134 AC_MSG_RESULT(missing)
140 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
141 AC_DEFUN(AM_PROG_LEX,
142 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
143 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
147 dnl $Id: krb-prog-ln-s.m4,v 1.1 1997/12/14 15:59:01 joda Exp $
150 dnl Better test for ln -s, ln or cp
153 AC_DEFUN(AC_KRB_PROG_LN_S,
154 [AC_MSG_CHECKING(for ln -s or something else)
155 AC_CACHE_VAL(ac_cv_prog_LN_S,
157 if ln -s X conftestdata 2>/dev/null
160 ac_cv_prog_LN_S="ln -s"
163 if ln conftestdata1 conftestdata2; then
170 LN_S="$ac_cv_prog_LN_S"
171 AC_MSG_RESULT($ac_cv_prog_LN_S)
176 dnl $Id: mips-abi.m4,v 1.4 1998/05/16 20:44:15 joda Exp $
179 dnl Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext to some
182 AC_DEFUN(AC_MIPS_ABI, [
183 AC_ARG_WITH(mips_abi,
184 [ --with-mips-abi=abi ABI to use for IRIX (32, n32, or 64)])
188 with_mips_abi="${with_mips_abi:-yes}"
189 if test -n "$GCC"; then
191 # GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
192 # which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
194 # Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
195 # GCC and revert back to O32. The same goes if O32 is asked for - old
196 # GCCs doesn't like the -mabi option, and new GCCs can't output O32.
198 # Don't you just love *all* the different SGI ABIs?
200 case "${with_mips_abi}" in
201 32|o32) abi='-mabi=32'; abilibdirext='' ;;
202 n32|yes) abi='-mabi=n32'; abilibdirext='32' ;;
203 64) abi='-mabi=64'; abilibdirext='64' ;;
204 no) abi=''; abilibdirext='';;
205 *) AC_ERROR("Invalid ABI specified") ;;
207 if test -n "$abi" ; then
208 ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
210 dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
213 AC_MSG_CHECKING([if $CC supports the $abi option])
214 AC_CACHE_VAL($ac_foo, [
215 save_CFLAGS="$CFLAGS"
216 CFLAGS="$CFLAGS $abi"
217 AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
218 CFLAGS="$save_CFLAGS"
220 ac_res=`eval echo \\\$$ac_foo`
221 AC_MSG_RESULT($ac_res)
222 if test $ac_res = no; then
223 # Try to figure out why that failed...
226 save_CFLAGS="$CFLAGS"
227 CFLAGS="$CFLAGS -mabi=n32"
228 AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
230 if test $ac_res = yes; then
232 AC_ERROR([$CC does not support the $with_mips_abi ABI])
239 if test $with_mips_abi = yes; then
240 # Old GCC, default to O32
245 AC_ERROR([$CC does not support the $with_mips_abi ABI])
249 fi #if test $ac_res = no; then
250 fi #if test -n "$abi" ; then
252 case "${with_mips_abi}" in
253 32|o32) abi='-32'; abilibdirext='' ;;
254 n32|yes) abi='-n32'; abilibdirext='32' ;;
255 64) abi='-64'; abilibdirext='64' ;;
256 no) abi=''; abilibdirext='';;
257 *) AC_ERROR("Invalid ABI specified") ;;
259 fi #if test -n "$GCC"; then
265 dnl $Id: c-attribute.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
269 dnl Test for __attribute__
272 AC_DEFUN(AC_C___ATTRIBUTE__, [
273 AC_MSG_CHECKING(for __attribute__)
274 AC_CACHE_VAL(ac_cv___attribute__, [
279 static void foo(void) __attribute__ ((noreturn));
287 ac_cv___attribute__=yes,
288 ac_cv___attribute__=no)])
289 if test "$ac_cv___attribute__" = "yes"; then
290 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
292 AC_MSG_RESULT($ac_cv___attribute__)
297 # serial 25 AM_PROG_LIBTOOL
298 AC_DEFUN(AM_PROG_LIBTOOL,
299 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
300 AC_REQUIRE([AM_ENABLE_STATIC])dnl
301 AC_REQUIRE([AC_CANONICAL_HOST])dnl
302 AC_REQUIRE([AC_PROG_RANLIB])dnl
303 AC_REQUIRE([AC_PROG_CC])dnl
304 AC_REQUIRE([AM_PROG_LD])dnl
305 AC_REQUIRE([AM_PROG_NM])dnl
306 AC_REQUIRE([AC_PROG_LN_S])dnl
308 # Always use our own libtool.
309 LIBTOOL='$(top_builddir)/libtool'
312 # Check for any special flags to pass to ltconfig.
314 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
315 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
316 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
317 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
318 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
320 # Some flags need to be propagated to the compiler or linker for good
324 # Find out which ABI we are using.
325 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
326 if AC_TRY_EVAL(ac_compile); then
327 case "`/usr/bin/file conftest.o`" in
343 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
344 CFLAGS="$CFLAGS -belf"
348 # Actually configure libtool. ac_aux_dir is where install-sh is found.
349 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
350 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
351 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
352 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
353 || AC_MSG_ERROR([libtool configure failed])
355 # Redirect the config.log output again, so that the ltconfig log is not
356 # clobbered by the next message.
360 # AM_ENABLE_SHARED - implement the --enable-shared flag
361 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
362 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
364 AC_DEFUN(AM_ENABLE_SHARED,
365 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
366 AC_ARG_ENABLE(shared,
367 changequote(<<, >>)dnl
368 << --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
370 [p=${PACKAGE-default}
372 yes) enable_shared=yes ;;
373 no) enable_shared=no ;;
376 # Look at the argument we got. We use all the common list separators.
377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
378 for pkg in $enableval; do
379 if test "X$pkg" = "X$p"; then
386 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
389 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
390 AC_DEFUN(AM_DISABLE_SHARED,
391 [AM_ENABLE_SHARED(no)])
393 # AM_DISABLE_STATIC - set the default static flag to --disable-static
394 AC_DEFUN(AM_DISABLE_STATIC,
395 [AM_ENABLE_STATIC(no)])
397 # AM_ENABLE_STATIC - implement the --enable-static flag
398 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
399 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
401 AC_DEFUN(AM_ENABLE_STATIC,
402 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
403 AC_ARG_ENABLE(static,
404 changequote(<<, >>)dnl
405 << --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
407 [p=${PACKAGE-default}
409 yes) enable_static=yes ;;
410 no) enable_static=no ;;
413 # Look at the argument we got. We use all the common list separators.
414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
415 for pkg in $enableval; do
416 if test "X$pkg" = "X$p"; then
423 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
427 # AM_PROG_LD - find the path to the GNU or non-GNU linker
430 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
431 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
432 AC_REQUIRE([AC_PROG_CC])
434 if test "$ac_cv_prog_gcc" = yes; then
435 # Check if gcc -print-prog-name=ld gives a path.
436 AC_MSG_CHECKING([for ld used by GCC])
437 ac_prog=`($CC -print-prog-name=ld) 2>&5`
439 # Accept absolute paths.
443 test -z "$LD" && LD="$ac_prog"
446 # If it fails, then pretend we aren't using GCC.
450 # If it is relative, then search for the first ld in PATH.
454 elif test "$with_gnu_ld" = yes; then
455 AC_MSG_CHECKING([for GNU ld])
457 AC_MSG_CHECKING([for non-GNU ld])
459 AC_CACHE_VAL(ac_cv_path_LD,
460 [if test -z "$LD"; then
461 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
462 for ac_dir in $PATH; do
463 test -z "$ac_dir" && ac_dir=.
464 if test -f "$ac_dir/$ac_prog"; then
465 ac_cv_path_LD="$ac_dir/$ac_prog"
466 # Check to see if the program is GNU ld. I'd rather use --version,
467 # but apparently some GNU ld's only accept -v.
468 # Break only if it was the GNU/non-GNU ld that we prefer.
469 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
470 test "$with_gnu_ld" != no && break
472 test "$with_gnu_ld" != yes && break
478 ac_cv_path_LD="$LD" # Let the user override the test with a path.
481 if test -n "$LD"; then
486 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
491 AC_DEFUN(AM_PROG_LD_GNU,
492 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
493 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
494 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
495 ac_cv_prog_gnu_ld=yes
501 # AM_PROG_NM - find the path to a BSD-compatible name lister
503 [AC_MSG_CHECKING([for BSD-compatible nm])
504 AC_CACHE_VAL(ac_cv_path_NM,
505 [if test -n "$NM"; then
506 # Let the user override the test.
509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
510 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
511 test -z "$ac_dir" && ac_dir=.
512 if test -f $ac_dir/nm; then
513 # Check to see if the nm accepts a BSD-compat flag.
514 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
515 # nm: unknown option "B" ignored
516 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
517 ac_cv_path_NM="$ac_dir/nm -B"
518 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
519 ac_cv_path_NM="$ac_dir/nm -p"
521 ac_cv_path_NM="$ac_dir/nm"
527 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
534 dnl $Id: wflags.m4,v 1.3 1999/03/11 12:11:41 joda Exp $
540 WFLAGS_NOIMPLICITINT=""
541 if test -z "$WFLAGS" -a "$GCC" = "yes"; then
542 # -Wno-implicit-int for broken X11 headers
543 # leave these out for now:
544 # -Wcast-align doesn't work well on alpha osf/1
545 # -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
546 # -Wmissing-declarations -Wnested-externs
547 WFLAGS="ifelse($#, 0,-Wall, $1)"
548 WFLAGS_NOUNUSED="-Wno-unused"
549 WFLAGS_NOIMPLICITINT="-Wno-implicit-int"
552 AC_SUBST(WFLAGS_NOUNUSED)dnl
553 AC_SUBST(WFLAGS_NOIMPLICITINT)dnl
556 dnl $Id: test-package.m4,v 1.7 1999/04/19 13:33:05 assar Exp $
558 dnl AC_TEST_PACKAGE_NEW(package,headers,libraries,extra libs,default locations)
560 AC_DEFUN(AC_TEST_PACKAGE,[AC_TEST_PACKAGE_NEW($1,[#include <$2>],$4,,$5)])
562 AC_DEFUN(AC_TEST_PACKAGE_NEW,[
564 [ --with-$1=dir use $1 in dir])
566 [ --with-$1-lib=dir use $1 libraries in dir],
567 [if test "$withval" = "yes" -o "$withval" = "no"; then
568 AC_MSG_ERROR([No argument for --with-$1-lib])
569 elif test "X$with_$1" = "X"; then
572 AC_ARG_WITH($1-include,
573 [ --with-$1-include=dir use $1 headers in dir],
574 [if test "$withval" = "yes" -o "$withval" = "no"; then
575 AC_MSG_ERROR([No argument for --with-$1-include])
576 elif test "X$with_$1" = "X"; then
580 AC_MSG_CHECKING(for $1)
586 *) if test "$with_$1_include" = ""; then
587 with_$1_include="$with_$1/include"
589 if test "$with_$1_lib" = ""; then
590 with_$1_lib="$with_$1/lib$abilibdirext"
598 header_dirs="$header_dirs $i/include"
599 lib_dirs="$lib_dirs $i/lib$abilibdirext"
602 case "$with_$1_include" in
605 *) header_dirs="$with_$1_include $header_dirs";;
607 case "$with_$1_lib" in
610 *) lib_dirs="$with_$1_lib $lib_dirs";;
613 save_CFLAGS="$CFLAGS"
616 for i in $header_dirs; do
617 CFLAGS="-I$i $save_CFLAGS"
618 AC_TRY_COMPILE([$2],,ires=$i;break)
620 for i in $lib_dirs; do
621 LIBS="-L$i $3 $4 $save_LIBS"
622 AC_TRY_LINK([$2],,lres=$i;break)
624 CFLAGS="$save_CFLAGS"
627 if test "$ires" -a "$lres" -a "$with_$1" != "no"; then
628 $1_includedir="$ires"
630 INCLUDE_$1="-I$$1_includedir"
631 LIB_$1="-L$$1_libdir $3"
632 AC_DEFINE_UNQUOTED(upcase($1),1,[Define if you have the $1 package.])
634 AC_MSG_RESULT([headers $ires, libraries $lres])
639 AC_MSG_RESULT($with_$1)
645 dnl $Id: find-func.m4,v 1.1 1997/12/14 15:58:58 joda Exp $
647 dnl AC_FIND_FUNC(func, libraries, includes, arguments)
648 AC_DEFUN(AC_FIND_FUNC, [
649 AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
650 if test -n "$LIB_$1"; then
655 dnl $Id: find-func-no-libs.m4,v 1.5 1999/10/30 21:08:18 assar Exp $
658 dnl Look for function in any of the specified libraries
661 dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
662 AC_DEFUN(AC_FIND_FUNC_NO_LIBS, [
663 AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
665 dnl $Id: find-func-no-libs2.m4,v 1.3 1999/10/30 21:09:53 assar Exp $
668 dnl Look for function in any of the specified libraries
671 dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
672 AC_DEFUN(AC_FIND_FUNC_NO_LIBS2, [
674 AC_MSG_CHECKING([for $1])
675 AC_CACHE_VAL(ac_cv_funclib_$1,
677 if eval "test \"\$ac_cv_func_$1\" != yes" ; then
680 if test -n "$ac_lib"; then
685 LIBS="$6 $ac_lib $5 $ac_save_LIBS"
686 AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
688 eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
693 eval "ac_res=\$ac_cv_funclib_$1"
695 dnl autoheader tricks *sigh*
697 @@@funcs="$funcs $1"@@@
698 @@@libs="$libs $2"@@@
702 eval "ac_tr_func=HAVE_[]upcase($1)"
703 eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')"
704 eval "LIB_$1=$ac_res"
708 eval "ac_cv_func_$1=yes"
710 AC_DEFINE_UNQUOTED($ac_tr_func)
714 eval "ac_cv_func_$1=no"
719 eval "ac_cv_func_$1=yes"
720 eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
721 AC_DEFINE_UNQUOTED($ac_tr_func)
722 AC_DEFINE_UNQUOTED($ac_tr_lib)
723 AC_MSG_RESULT([yes, in $ac_res])
729 # Define a conditional.
731 AC_DEFUN(AM_CONDITIONAL,
742 dnl $Id: osfc2.m4,v 1.2 1999/03/27 17:28:16 joda Exp $
744 dnl enable OSF C2 stuff
746 AC_DEFUN(AC_CHECK_OSFC2,[
748 [ --enable-osfc2 enable some OSF C2 support])
750 if test "$enable_osfc2" = yes; then
751 AC_DEFINE(HAVE_OSFC2, 1, [Define to enable basic OSF C2 support.])
752 LIB_security=-lsecurity
754 AC_SUBST(LIB_security)
757 dnl $Id: check-man.m4,v 1.2 1999/03/21 14:30:50 joda Exp $
758 dnl check how to format manual pages
761 AC_DEFUN(AC_CHECK_MAN,
762 [AC_PATH_PROG(NROFF, nroff)
763 AC_PATH_PROG(GROFF, groff)
764 AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
765 [cat > conftest.1 << END
774 if test "$NROFF" ; then
775 for i in "-mdoc" "-mandoc"; do
776 if "$NROFF" $i conftest.1 2> /dev/null | \
777 grep Jan > /dev/null 2>&1 ; then
778 ac_cv_sys_man_format="$NROFF $i"
783 if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
784 for i in "-mdoc" "-mandoc"; do
785 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
786 grep Jan > /dev/null 2>&1 ; then
787 ac_cv_sys_man_format="$GROFF -Tascii $i"
792 if test "$ac_cv_sys_man_format"; then
793 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
796 if test "$ac_cv_sys_man_format"; then
797 CATMAN="$ac_cv_sys_man_format"
800 AM_CONDITIONAL(CATMAN, test "$CATMAN")
801 AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
802 [if grep _suffix /etc/man.conf > /dev/null 2>&1; then
803 ac_cv_sys_catman_ext=0
805 ac_cv_sys_catman_ext=number
808 if test "$ac_cv_sys_catman_ext" = number; then
817 dnl $Id: krb-bigendian.m4,v 1.5 2000/01/08 10:34:44 assar Exp $
820 dnl check if this computer is little or big-endian
821 dnl if we can figure it out at compile-time then don't define the cpp symbol
822 dnl otherwise test for it and define it. also allow options for overriding
823 dnl it when cross-compiling
825 AC_DEFUN(KRB_C_BIGENDIAN, [
826 AC_ARG_ENABLE(bigendian,
827 [ --enable-bigendian the target is big endian],
828 krb_cv_c_bigendian=yes)
829 AC_ARG_ENABLE(littleendian,
830 [ --enable-littleendian the target is little endian],
831 krb_cv_c_bigendian=no)
832 AC_CACHE_CHECK(whether byte order is known at compile time,
833 krb_cv_c_bigendian_compile,
835 #include <sys/types.h>
836 #include <sys/param.h>],[
837 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
839 #endif], krb_cv_c_bigendian_compile=yes, krb_cv_c_bigendian_compile=no)])
840 if test "$krb_cv_c_bigendian_compile" = "no"; then
841 AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[
842 if test "$krb_cv_c_bigendian" = ""; then
843 krb_cv_c_bigendian=unknown
846 #include <sys/types.h>
847 #include <sys/param.h>],[
848 #if BYTE_ORDER != BIG_ENDIAN
850 #endif], krb_cv_c_bigendian=yes, krb_cv_c_bigendian=no)
851 if test "$krb_cv_c_bigendian" = "unknown"; then
852 AC_TRY_RUN([main () {
853 /* Are we little or big endian? From Harbison&Steele. */
857 char c[sizeof (long)];
860 exit (u.c[sizeof (long) - 1] == 1);
861 }], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes,
862 AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian]))
865 if test "$krb_cv_c_bigendian" = "yes"; then
866 AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl
869 if test "$krb_cv_c_bigendian_compile" = "yes"; then
870 AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl
875 dnl See if there is any X11 present
877 dnl $Id: check-x.m4,v 1.2 1999/11/05 04:25:23 assar Exp $
879 AC_DEFUN(KRB_CHECK_X,[
882 # try to figure out if we need any additional ld flags, like -R
883 # and yes, the autoconf X test is utterly broken
884 if test "$no_x" != yes; then
885 AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[
887 ac_save_cflags="$CFLAGS"
888 CFLAGS="$CFLAGS $X_CFLAGS"
889 krb_cv_sys_x_libs_rpath=""
891 for rflag in "" "-R" "-R " "-rpath "; do
892 if test "$rflag" = ""; then
896 for flag in $X_LIBS; do
899 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
907 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
909 #include <X11/Xlib.h>
918 ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:)
921 CFLAGS="$ac_save_cflags"
923 X_LIBS="$krb_cv_sys_x_libs"
927 dnl $Id: check-xau.m4,v 1.3 1999/05/14 01:17:06 assar Exp $
929 dnl check for Xau{Read,Write}Auth and XauFileName
931 AC_DEFUN(AC_CHECK_XAU,[
932 save_CFLAGS="$CFLAGS"
933 CFLAGS="$X_CFLAGS $CFLAGS"
935 dnl LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
936 LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
937 save_LDFLAGS="$LDFLAGS"
938 LDFLAGS="$LDFLAGS $X_LIBS"
941 AC_FIND_FUNC_NO_LIBS(XauWriteAuth, X11 Xau)
943 LIBS="$LIB_XauWriteAuth $LIBS"
944 AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau)
945 LIBS="$LIB_XauReadAauth $LIBS"
946 AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau)
949 case "$ac_cv_funclib_XauWriteAuth" in
952 *) if test "$ac_cv_funclib_XauReadAuth" = yes; then
953 if test "$ac_cv_funclib_XauFileName" = yes; then
954 LIB_XauReadAuth="$LIB_XauWriteAuth"
956 LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName"
959 if test "$ac_cv_funclib_XauFileName" = yes; then
960 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth"
962 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName"
968 if test "$AUTOMAKE" != ""; then
969 AM_CONDITIONAL(NEED_WRITEAUTH, test "$ac_cv_func_XauWriteAuth" != "yes")
971 AC_SUBST(NEED_WRITEAUTH_TRUE)
972 AC_SUBST(NEED_WRITEAUTH_FALSE)
973 if test "$ac_cv_func_XauWriteAuth" != "yes"; then
975 NEED_WRITEAUTH_FALSE='#'
977 NEED_WRITEAUTH_TRUE='#'
978 NEED_WRITEAUTH_FALSE=
983 LDFLAGS=$save_LDFLAGS
986 dnl $Id: check-type-extra.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
988 dnl ac_check_type + extra headers
990 dnl AC_CHECK_TYPE_EXTRA(TYPE, DEFAULT, HEADERS)
991 AC_DEFUN(AC_CHECK_TYPE_EXTRA,
992 [AC_REQUIRE([AC_HEADER_STDC])dnl
993 AC_MSG_CHECKING(for $1)
994 AC_CACHE_VAL(ac_cv_type_$1,
996 changequote(<<,>>)dnl
997 <<$1[^a-zA-Z_0-9]>>dnl
998 changequote([,]), [#include <sys/types.h>
1003 $3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
1004 AC_MSG_RESULT($ac_cv_type_$1)
1005 if test $ac_cv_type_$1 = no; then
1006 AC_DEFINE($1, $2, [Define this to what the type $1 should be.])
1010 dnl $Id: have-type.m4,v 1.5 1999/12/31 03:10:22 assar Exp $
1012 dnl check for existance of a type
1014 dnl AC_HAVE_TYPE(TYPE,INCLUDES)
1015 AC_DEFUN(AC_HAVE_TYPE, [
1016 AC_REQUIRE([AC_HEADER_STDC])
1017 cv=`echo "$1" | sed 'y%./+- %__p__%'`
1018 AC_MSG_CHECKING(for $1)
1019 AC_CACHE_VAL([ac_cv_type_$cv],
1021 [#include <sys/types.h>
1028 eval "ac_cv_type_$cv=yes",
1029 eval "ac_cv_type_$cv=no"))dnl
1030 AC_MSG_RESULT(`eval echo \\$ac_cv_type_$cv`)
1031 if test `eval echo \\$ac_cv_type_$cv` = yes; then
1032 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
1033 dnl autoheader tricks *sigh*
1034 define(foo,translit($1, [ ], [_]))
1036 @@@funcs="$funcs foo"@@@
1039 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
1044 dnl $Id: check-netinet-ip-and-tcp.m4,v 1.2 1999/05/14 13:15:40 assar Exp $
1047 dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
1048 dnl you have to include standards.h before including these files
1050 AC_DEFUN(CHECK_NETINET_IP_AND_TCP,
1052 AC_CHECK_HEADERS(standards.h)
1053 for i in netinet/ip.h netinet/tcp.h; do
1055 cv=`echo "$i" | sed 'y%./+-%__p_%'`
1057 AC_MSG_CHECKING([for $i])
1058 AC_CACHE_VAL([ac_cv_header_$cv],
1060 #ifdef HAVE_STANDARDS_H
1061 #include <standards.h>
1065 eval "ac_cv_header_$cv=yes",
1066 eval "ac_cv_header_$cv=no")])
1067 AC_MSG_RESULT(`eval echo \\$ac_cv_header_$cv`)
1069 if test `eval echo \\$ac_cv_header_$cv` = yes; then
1070 ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1071 changequote([, ])dnl
1072 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
1075 dnl autoheader tricks *sigh*
1077 @@@headers="$headers netinet/ip.h netinet/tcp.h"@@@
1082 dnl $Id: krb-ipv6.m4,v 1.8 2000/01/01 11:44:45 assar Exp $
1086 AC_DEFUN(AC_KRB_IPV6, [
1088 [ --without-ipv6 do not enable IPv6 support],[
1089 if test "$withval" = "no"; then
1092 AC_CACHE_VAL(ac_cv_lib_ipv6,
1093 [dnl check for different v6 implementations (by itojun)
1097 AC_MSG_CHECKING([ipv6 stack type])
1098 for i in v6d toshiba kame inria zeta linux; do
1101 AC_EGREP_CPP(yes, [dnl
1102 #include </usr/local/v6/include/sys/types.h>
1106 [v6type=$i; v6lib=v6;
1107 v6libdir=/usr/local/v6/lib;
1108 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
1111 AC_EGREP_CPP(yes, [dnl
1112 #include <sys/param.h>
1113 #ifdef _TOSHIBA_INET6
1116 [v6type=$i; v6lib=inet6;
1117 v6libdir=/usr/local/v6/lib;
1118 CFLAGS="-DINET6 $CFLAGS"])
1121 AC_EGREP_CPP(yes, [dnl
1122 #include <netinet/in.h>
1126 [v6type=$i; v6lib=inet6;
1127 v6libdir=/usr/local/v6/lib;
1128 CFLAGS="-DINET6 $CFLAGS"])
1131 AC_EGREP_CPP(yes, [dnl
1132 #include <netinet/in.h>
1133 #ifdef IPV6_INRIA_VERSION
1136 [v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
1139 AC_EGREP_CPP(yes, [dnl
1140 #include <sys/param.h>
1141 #ifdef _ZETA_MINAMI_INET6
1144 [v6type=$i; v6lib=inet6;
1145 v6libdir=/usr/local/v6/lib;
1146 CFLAGS="-DINET6 $CFLAGS"])
1149 if test -d /usr/inet6; then
1153 CFLAGS="-DINET6 $CFLAGS"
1157 if test "$v6type" != "unknown"; then
1161 AC_MSG_RESULT($v6type)
1163 if test "$v6lib" != "none"; then
1164 for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
1165 if test -d $dir -a -f $dir/lib$v6lib.a; then
1166 LIBS="-L$dir -l$v6lib $LIBS"
1172 #ifdef HAVE_SYS_TYPES_H
1173 #include <sys/types.h>
1175 #ifdef HAVE_SYS_SOCKET_H
1176 #include <sys/socket.h>
1178 #ifdef HAVE_NETINET_IN_H
1179 #include <netinet/in.h>
1181 #ifdef HAVE_NETINET_IN6_H
1182 #include <netinet/in6.h>
1186 struct sockaddr_in6 sin6;
1189 s = socket(AF_INET6, SOCK_DGRAM, 0);
1191 sin6.sin6_family = AF_INET6;
1192 sin6.sin6_port = htons(17);
1193 sin6.sin6_addr = in6addr_any;
1194 bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
1197 ac_cv_lib_ipv6=no)])
1198 AC_MSG_CHECKING(for IPv6)
1199 AC_MSG_RESULT($ac_cv_lib_ipv6)
1200 if test "$ac_cv_lib_ipv6" = yes; then
1201 AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.])
1205 dnl $Id: broken-snprintf.m4,v 1.3 1999/03/01 09:52:22 joda Exp $
1207 AC_DEFUN(AC_BROKEN_SNPRINTF, [
1208 AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working,
1209 ac_cv_func_snprintf_working=yes
1218 snprintf(foo, 2, "12");
1219 return strcmp(foo, "1");
1220 }],:,ac_cv_func_snprintf_working=no,:))
1222 if test "$ac_cv_func_snprintf_working" = yes; then
1223 AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf])
1225 if test "$ac_cv_func_snprintf_working" = yes; then
1226 AC_NEED_PROTO([#include <stdio.h>],snprintf)
1230 AC_DEFUN(AC_BROKEN_VSNPRINTF,[
1231 AC_CACHE_CHECK(for working vsnprintf,ac_cv_func_vsnprintf_working,
1232 ac_cv_func_vsnprintf_working=yes
1238 int foo(int num, ...)
1245 vsnprintf(bar, 2, "%s", arg);
1247 return strcmp(bar, "1");
1253 return foo(0, "12");
1254 }],:,ac_cv_func_vsnprintf_working=no,:))
1256 if test "$ac_cv_func_vsnprintf_working" = yes; then
1257 AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf])
1259 if test "$ac_cv_func_vsnprintf_working" = yes; then
1260 AC_NEED_PROTO([#include <stdio.h>],vsnprintf)
1264 dnl $Id: need-proto.m4,v 1.2 1999/03/01 09:52:24 joda Exp $
1267 dnl Check if we need the prototype for a function
1270 dnl AC_NEED_PROTO(includes, function)
1272 AC_DEFUN(AC_NEED_PROTO, [
1273 if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then
1274 AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto,
1275 AC_TRY_COMPILE([$1],
1276 [struct foo { int foo; } xx;
1277 extern int $2 (struct foo*);
1280 eval "ac_cv_func_$2_noproto=yes",
1281 eval "ac_cv_func_$2_noproto=no"))
1282 define([foo], [NEED_]translit($2, [a-z], [A-Z])[_PROTO])
1283 if test "$ac_cv_func_$2_noproto" = yes; then
1284 AC_DEFINE(foo, 1, [define if the system is missing a prototype for $2()])
1290 dnl $Id: broken-glob.m4,v 1.2 1999/03/01 09:52:15 joda Exp $
1292 dnl check for glob(3)
1294 AC_DEFUN(AC_BROKEN_GLOB,[
1295 AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working,
1296 ac_cv_func_glob_working=yes
1299 #include <glob.h>],[
1300 glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE, NULL, NULL);
1301 ],:,ac_cv_func_glob_working=no,:))
1303 if test "$ac_cv_func_glob_working" = yes; then
1304 AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
1305 GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, and GLOB_TILDE])
1307 if test "$ac_cv_func_glob_working" = yes; then
1308 AC_NEED_PROTO([#include <stdio.h>
1309 #include <glob.h>],glob)
1314 dnl $Id: krb-func-getlogin.m4,v 1.1 1999/07/13 17:45:30 assar Exp $
1316 dnl test for POSIX (broken) getlogin
1320 AC_DEFUN(AC_FUNC_GETLOGIN, [
1321 AC_CHECK_FUNCS(getlogin setlogin)
1322 if test "$ac_cv_func_getlogin" = yes; then
1323 AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
1324 if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
1325 ac_cv_func_getlogin_posix=no
1327 ac_cv_func_getlogin_posix=yes
1330 if test "$ac_cv_func_getlogin_posix" = yes; then
1331 AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])
1337 dnl $Id: capabilities.m4,v 1.2 1999/09/01 11:02:26 joda Exp $
1341 dnl Test SGI capabilities
1344 AC_DEFUN(KRB_CAPABILITIES,[
1346 AC_CHECK_HEADERS(capability.h sys/capability.h)
1348 AC_CHECK_FUNCS(sgi_getcapabilitybyname cap_set_proc)
1351 dnl $Id: check-getpwnam_r-posix.m4,v 1.2 1999/03/23 16:47:31 joda Exp $
1353 dnl check for getpwnam_r, and if it's posix or not
1355 AC_DEFUN(AC_CHECK_GETPWNAM_R_POSIX,[
1356 AC_FIND_FUNC_NO_LIBS(getpwnam_r,c_r)
1357 if test "$ac_cv_func_getpwnam_r" = yes; then
1358 AC_CACHE_CHECK(if getpwnam_r is posix,ac_cv_func_getpwnam_r_posix,
1360 LIBS="$LIBS $LIB_getpwnam_r"
1365 struct passwd pw, *pwd;
1366 return getpwnam_r("", &pw, NULL, 0, &pwd) < 0;
1368 ],ac_cv_func_getpwnam_r_posix=yes,ac_cv_func_getpwnam_r_posix=no,:)
1370 if test "$ac_cv_func_getpwnam_r_posix" = yes; then
1371 AC_DEFINE(POSIX_GETPWNAM_R, 1, [Define if getpwnam_r has POSIX flavour.])
1375 dnl $Id: find-if-not-broken.m4,v 1.2 1998/03/16 22:16:27 joda Exp $
1378 dnl Mix between AC_FIND_FUNC and AC_BROKEN
1381 AC_DEFUN(AC_FIND_IF_NOT_BROKEN,
1382 [AC_FIND_FUNC([$1], [$2], [$3], [$4])
1383 if eval "test \"$ac_cv_func_$1\" != yes"; then
1384 LIBOBJS[]="$LIBOBJS $1.o"
1386 AC_SUBST(LIBOBJS)dnl
1389 dnl $Id: broken.m4,v 1.3 1998/03/16 22:16:19 joda Exp $
1392 dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal
1398 AC_CHECK_FUNC($ac_func, [
1399 ac_tr_func=HAVE_[]upcase($ac_func)
1400 AC_DEFINE_UNQUOTED($ac_tr_func)],[LIBOBJS[]="$LIBOBJS ${ac_func}.o"])
1401 dnl autoheader tricks *sigh*
1403 @@@funcs="$funcs $1"@@@
1406 AC_SUBST(LIBOBJS)dnl
1409 dnl $Id: proto-compat.m4,v 1.3 1999/03/01 13:03:48 joda Exp $
1412 dnl Check if the prototype of a function is compatible with another one
1415 dnl AC_PROTO_COMPAT(includes, function, prototype)
1417 AC_DEFUN(AC_PROTO_COMPAT, [
1418 AC_CACHE_CHECK([if $2 is compatible with system prototype],
1419 ac_cv_func_$2_proto_compat,
1420 AC_TRY_COMPILE([$1],
1422 eval "ac_cv_func_$2_proto_compat=yes",
1423 eval "ac_cv_func_$2_proto_compat=no"))
1424 define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
1425 if test "$ac_cv_func_$2_proto_compat" = yes; then
1426 AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
1431 dnl $Id: check-var.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
1433 dnl AC_CHECK_VAR(includes, variable)
1434 AC_DEFUN(AC_CHECK_VAR, [
1435 AC_MSG_CHECKING(for $2)
1436 AC_CACHE_VAL(ac_cv_var_$2, [
1437 AC_TRY_LINK([extern int $2;
1438 int foo() { return $2; }],
1440 ac_cv_var_$2=yes, ac_cv_var_$2=no)
1442 define([foo], [HAVE_]translit($2, [a-z], [A-Z]))
1444 AC_MSG_RESULT(`eval echo \\$ac_cv_var_$2`)
1445 if test `eval echo \\$ac_cv_var_$2` = yes; then
1446 AC_DEFINE_UNQUOTED(foo, 1, [define if you have $2])
1447 AC_CHECK_DECLARATION([$1],[$2])
1452 dnl $Id: check-declaration.m4,v 1.3 1999/03/01 13:03:08 joda Exp $
1455 dnl Check if we need the declaration of a variable
1458 dnl AC_HAVE_DECLARATION(includes, variable)
1459 AC_DEFUN(AC_CHECK_DECLARATION, [
1460 AC_MSG_CHECKING([if $2 is properly declared])
1461 AC_CACHE_VAL(ac_cv_var_$2_declaration, [
1463 extern struct { int foo; } $2;],
1465 eval "ac_cv_var_$2_declaration=no",
1466 eval "ac_cv_var_$2_declaration=yes")
1469 define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
1471 AC_MSG_RESULT($ac_cv_var_$2_declaration)
1472 if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then
1473 AC_DEFINE(foo, 1, [define if your system declares $2])
1478 dnl $Id: have-struct-field.m4,v 1.6 1999/07/29 01:44:32 assar Exp $
1480 dnl check for fields in a structure
1482 dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
1484 AC_DEFUN(AC_HAVE_STRUCT_FIELD, [
1485 define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_]))
1486 AC_CACHE_CHECK([for $2 in $1], cache_val,[
1487 AC_TRY_COMPILE([$3],[$1 x; x.$2;],
1490 if test "$cache_val" = yes; then
1491 define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_]))
1492 AC_DEFINE(foo, 1, [Define if $1 has field $2.])
1495 undefine([cache_val])
1498 dnl $Id: krb-struct-winsize.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
1501 dnl Search for struct winsize
1504 AC_DEFUN(AC_KRB_STRUCT_WINSIZE, [
1505 AC_MSG_CHECKING(for struct winsize)
1506 AC_CACHE_VAL(ac_cv_struct_winsize, [
1507 ac_cv_struct_winsize=no
1508 for i in sys/termios.h sys/ioctl.h; do
1511 struct[ ]*winsize,dnl
1513 $i, ac_cv_struct_winsize=yes; break)dnl
1516 if test "$ac_cv_struct_winsize" = "yes"; then
1517 AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h])
1519 AC_MSG_RESULT($ac_cv_struct_winsize)
1520 AC_EGREP_HEADER(ws_xpixel, termios.h,
1521 AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel]))
1522 AC_EGREP_HEADER(ws_ypixel, termios.h,
1523 AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel]))
1526 dnl $Id: krb-struct-spwd.m4,v 1.3 1999/07/13 21:04:11 assar Exp $
1528 dnl Test for `struct spwd'
1530 AC_DEFUN(AC_KRB_STRUCT_SPWD, [
1531 AC_MSG_CHECKING(for struct spwd)
1532 AC_CACHE_VAL(ac_cv_struct_spwd, [
1535 #ifdef HAVE_SHADOW_H
1539 ac_cv_struct_spwd=yes,
1540 ac_cv_struct_spwd=no)
1542 AC_MSG_RESULT($ac_cv_struct_spwd)
1544 if test "$ac_cv_struct_spwd" = "yes"; then
1545 AC_DEFINE(HAVE_STRUCT_SPWD, 1, [define if you have struct spwd])
1549 dnl $Id: grok-type.m4,v 1.4 1999/11/29 11:16:48 joda Exp $
1551 AC_DEFUN(AC_GROK_TYPE, [
1552 AC_CACHE_VAL(ac_cv_type_$1,
1554 #ifdef HAVE_INTTYPES_H
1555 #include <inttypes.h>
1557 #ifdef HAVE_SYS_TYPES_H
1558 #include <sys/types.h>
1560 #ifdef HAVE_SYS_BITYPES_H
1561 #include <sys/bitypes.h>
1563 #ifdef HAVE_BIND_BITYPES_H
1564 #include <bind/bitypes.h>
1566 #ifdef HAVE_NETINET_IN6_MACHTYPES_H
1567 #include <netinet/in6_machtypes.h>
1572 eval ac_cv_type_$1=yes,
1573 eval ac_cv_type_$1=no))])
1575 AC_DEFUN(AC_GROK_TYPES, [
1577 AC_MSG_CHECKING(for $i)
1579 eval ac_res=\$ac_cv_type_$i
1580 if test "$ac_res" = yes; then
1581 type=HAVE_[]upcase($i)
1582 AC_DEFINE_UNQUOTED($type)
1584 AC_MSG_RESULT($ac_res)
1588 dnl $Id: auth-modules.m4,v 1.1 1999/03/21 13:48:00 joda Exp $
1590 dnl Figure what authentication modules should be built
1592 AC_DEFUN(AC_AUTH_MODULES,[
1593 AC_MSG_CHECKING(which authentication modules should be built)
1597 if test "$ac_cv_header_siad_h" = yes; then
1598 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia"
1601 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_shared" = yes; then
1602 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam"
1607 *-*-irix[56]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;;
1611 AC_MSG_RESULT($LIB_AUTH_SUBDIRS)
1613 AC_SUBST(LIB_AUTH_SUBDIRS)dnl