1 dnl aclocal.m4 generated automatically by aclocal 1.4a
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 Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
14 dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
16 dnl OpenLDAP Autoconf Macros
18 builtin(include, build/openldap.m4)dnl
20 # Do all the work for Automake. This macro actually does too much --
21 # some checks are only needed if your package does certain things.
22 # But this isn't really a big deal.
27 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
29 AC_DEFUN(AM_INIT_AUTOMAKE,
30 [AC_REQUIRE([AC_PROG_INSTALL])
31 dnl We require 2.13 because we rely on SHELL being computed by configure.
37 dnl test to see if srcdir already configured
38 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
39 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
42 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
43 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
44 AC_REQUIRE([AM_SANITY_CHECK])
45 AC_REQUIRE([AC_ARG_PROGRAM])
46 dnl FIXME This is truly gross.
47 missing_dir=`cd $ac_aux_dir && pwd`
48 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
49 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
50 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
51 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
52 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
53 dnl Set install_sh for make dist
54 install_sh="$missing_dir/install-sh"
55 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
57 dnl We check for tar when the user configures the end package.
58 dnl This is sad, since we only need this for "dist". However,
59 dnl there's no other good way to do it. We prefer GNU tar if
60 dnl we can find it. If we can't find a tar, it doesn't really matter.
61 AC_CHECK_PROGS(AMTAR, gnutar gtar tar)
62 dnl We need awk for the "check" target. The system "awk" is bad on
64 AC_REQUIRE([AC_PROG_AWK])
66 if test -n "$AMTAR"; then
67 if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
73 AC_REQUIRE([AC_PROG_MAKE_SET])])
76 # Check to make sure that the build environment is sane.
79 AC_DEFUN(AM_SANITY_CHECK,
80 [AC_MSG_CHECKING([whether build environment is sane])
83 echo timestamp > conftestfile
84 # Do `set' in a subshell so we don't clobber the current shell's
85 # arguments. Must try -L first in case configure is actually a
86 # symlink; some systems play weird games with the mod time of symlinks
87 # (eg FreeBSD returns the mod time of the symlink's containing
90 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
91 if test "[$]*" = "X"; then
93 set X `ls -t $srcdir/configure conftestfile`
95 if test "[$]*" != "X $srcdir/configure conftestfile" \
96 && test "[$]*" != "X conftestfile $srcdir/configure"; then
98 # If neither matched, then we have a broken ls. This can happen
99 # if, for instance, CONFIG_SHELL is bash and it inherits a
100 # broken ls alias from the environment. This has actually
101 # happened. Such a system could not be considered "sane".
102 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
103 alias in your environment])
106 test "[$]2" = conftestfile
112 AC_MSG_ERROR([newly created file is older than distributed files!
113 Check your system clock])
118 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
119 dnl The program must properly implement --version.
120 AC_DEFUN(AM_MISSING_PROG,
121 [AC_MSG_CHECKING(for working $2)
122 # Run test in a subshell; some versions of sh will print an error if
123 # an executable is not found, even if stderr is redirected.
124 # Redirect stdin to placate older versions of autoconf. Sigh.
125 if ($2 --version) < /dev/null > /dev/null 2>&1; then
130 AC_MSG_RESULT(missing)
135 # serial 40 AC_PROG_LIBTOOL
136 AC_DEFUN(AC_PROG_LIBTOOL,
137 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
139 # Save cache, so that ltconfig can load it
142 # Actually configure libtool. ac_aux_dir is where install-sh is found.
143 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
144 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
145 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
146 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
147 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
148 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
149 || AC_MSG_ERROR([libtool configure failed])
151 # Reload cache, that may have been modified by ltconfig
154 # This can be used to rebuild libtool when needed
155 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
157 # Always use our own libtool.
158 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
161 # Redirect the config.log output again, so that the ltconfig log is not
162 # clobbered by the next message.
166 AC_DEFUN(AC_LIBTOOL_SETUP,
168 AC_REQUIRE([AC_ENABLE_SHARED])dnl
169 AC_REQUIRE([AC_ENABLE_STATIC])dnl
170 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
171 AC_REQUIRE([AC_CANONICAL_HOST])dnl
172 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
173 AC_REQUIRE([AC_PROG_RANLIB])dnl
174 AC_REQUIRE([AC_PROG_CC])dnl
175 AC_REQUIRE([AC_PROG_LD])dnl
176 AC_REQUIRE([AC_PROG_NM])dnl
177 AC_REQUIRE([AC_PROG_LN_S])dnl
181 NONE) lt_target="$host" ;;
182 *) lt_target="$target" ;;
185 # Check for any special flags to pass to ltconfig.
186 libtool_flags="--cache-file=$cache_file"
187 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
188 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
189 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
190 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
191 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
192 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
193 [libtool_flags="$libtool_flags --enable-dlopen"])
194 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
195 [libtool_flags="$libtool_flags --enable-win32-dll"])
196 AC_ARG_ENABLE(libtool-lock,
197 [ --disable-libtool-lock avoid locking (might break parallel builds)])
198 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
199 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
201 # Some flags need to be propagated to the compiler or linker for good
205 # Find out which ABI we are using.
206 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
207 if AC_TRY_EVAL(ac_compile); then
208 case "`/usr/bin/file conftest.o`" in
224 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
225 SAVE_CFLAGS="$CFLAGS"
226 CFLAGS="$CFLAGS -belf"
227 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
228 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
229 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
230 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
231 CFLAGS="$SAVE_CFLAGS"
235 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
236 [*-*-cygwin* | *-*-mingw*)
237 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
238 AC_CHECK_TOOL(AS, as, false)
239 AC_CHECK_TOOL(OBJDUMP, objdump, false)
245 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
246 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
248 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
249 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
251 # AC_ENABLE_SHARED - implement the --enable-shared flag
252 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
253 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
255 AC_DEFUN(AC_ENABLE_SHARED, [dnl
256 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
257 AC_ARG_ENABLE(shared,
258 changequote(<<, >>)dnl
259 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
261 [p=${PACKAGE-default}
263 yes) enable_shared=yes ;;
264 no) enable_shared=no ;;
267 # Look at the argument we got. We use all the common list separators.
268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
269 for pkg in $enableval; do
270 if test "X$pkg" = "X$p"; then
277 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
280 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
281 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
282 AC_ENABLE_SHARED(no)])
284 # AC_ENABLE_STATIC - implement the --enable-static flag
285 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
286 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
288 AC_DEFUN(AC_ENABLE_STATIC, [dnl
289 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
290 AC_ARG_ENABLE(static,
291 changequote(<<, >>)dnl
292 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
294 [p=${PACKAGE-default}
296 yes) enable_static=yes ;;
297 no) enable_static=no ;;
300 # Look at the argument we got. We use all the common list separators.
301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
302 for pkg in $enableval; do
303 if test "X$pkg" = "X$p"; then
310 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
313 # AC_DISABLE_STATIC - set the default static flag to --disable-static
314 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
315 AC_ENABLE_STATIC(no)])
318 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
319 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
320 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
322 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
323 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
324 AC_ARG_ENABLE(fast-install,
325 changequote(<<, >>)dnl
326 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
328 [p=${PACKAGE-default}
330 yes) enable_fast_install=yes ;;
331 no) enable_fast_install=no ;;
333 enable_fast_install=no
334 # Look at the argument we got. We use all the common list separators.
335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
336 for pkg in $enableval; do
337 if test "X$pkg" = "X$p"; then
338 enable_fast_install=yes
344 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
347 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
348 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
349 AC_ENABLE_FAST_INSTALL(no)])
351 # AC_PROG_LD - find the path to the GNU or non-GNU linker
354 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
355 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
356 AC_REQUIRE([AC_PROG_CC])dnl
357 AC_REQUIRE([AC_CANONICAL_HOST])dnl
358 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
360 if test "$ac_cv_prog_gcc" = yes; then
361 # Check if gcc -print-prog-name=ld gives a path.
362 AC_MSG_CHECKING([for ld used by GCC])
363 ac_prog=`($CC -print-prog-name=ld) 2>&5`
365 # Accept absolute paths.
367 [\\/]* | [A-Za-z]:[\\/]*)
368 re_direlt='/[^/][^/]*/\.\./'
370 # Canonicalize the path of ld
371 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
372 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
373 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
375 test -z "$LD" && LD="$ac_prog"
378 # If it fails, then pretend we aren't using GCC.
382 # If it is relative, then search for the first ld in PATH.
386 elif test "$with_gnu_ld" = yes; then
387 AC_MSG_CHECKING([for GNU ld])
389 AC_MSG_CHECKING([for non-GNU ld])
391 AC_CACHE_VAL(ac_cv_path_LD,
392 [if test -z "$LD"; then
393 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
394 for ac_dir in $PATH; do
395 test -z "$ac_dir" && ac_dir=.
396 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
397 ac_cv_path_LD="$ac_dir/$ac_prog"
398 # Check to see if the program is GNU ld. I'd rather use --version,
399 # but apparently some GNU ld's only accept -v.
400 # Break only if it was the GNU/non-GNU ld that we prefer.
401 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
402 test "$with_gnu_ld" != no && break
404 test "$with_gnu_ld" != yes && break
410 ac_cv_path_LD="$LD" # Let the user override the test with a path.
413 if test -n "$LD"; then
418 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
422 AC_DEFUN(AC_PROG_LD_GNU,
423 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
424 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
425 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
426 ac_cv_prog_gnu_ld=yes
432 # AC_PROG_NM - find the path to a BSD-compatible name lister
434 [AC_MSG_CHECKING([for BSD-compatible nm])
435 AC_CACHE_VAL(ac_cv_path_NM,
436 [if test -n "$NM"; then
437 # Let the user override the test.
440 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
441 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
442 test -z "$ac_dir" && ac_dir=.
443 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
444 # Check to see if the nm accepts a BSD-compat flag.
445 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
446 # nm: unknown option "B" ignored
447 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
448 ac_cv_path_NM="$ac_dir/nm -B"
450 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
451 ac_cv_path_NM="$ac_dir/nm -p"
454 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
455 continue # so that we can try to find one that supports BSD flags
460 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
466 # AC_CHECK_LIBM - check for math library
467 AC_DEFUN(AC_CHECK_LIBM,
468 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
471 *-*-beos* | *-*-cygwin*)
472 # These system don't have libm
475 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
476 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
479 AC_CHECK_LIB(m, main, LIBM="-lm")
484 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
485 # the libltdl convenience library, adds --enable-ltdl-convenience to
486 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
487 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
488 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
489 # '${top_builddir}/' (note the single quotes!) if your package is not
490 # flat, and, if you're not using automake, define top_builddir as
491 # appropriate in the Makefiles.
492 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
493 case "$enable_ltdl_convenience" in
494 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
495 "") enable_ltdl_convenience=yes
496 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
498 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
499 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
502 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
503 # the libltdl installable library, and adds --enable-ltdl-install to
504 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
505 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
506 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
507 # '${top_builddir}/' (note the single quotes!) if your package is not
508 # flat, and, if you're not using automake, define top_builddir as
509 # appropriate in the Makefiles.
510 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
511 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
512 AC_CHECK_LIB(ltdl, main,
513 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
514 [if test x"$enable_ltdl_install" = xno; then
515 AC_MSG_WARN([libltdl not installed, but installation disabled])
517 enable_ltdl_install=yes
520 if test x"$enable_ltdl_install" = x"yes"; then
521 ac_configure_args="$ac_configure_args --enable-ltdl-install"
522 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
523 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
525 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
532 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
533 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
534 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
535 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
536 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
537 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
538 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
540 dnl This is just to silence aclocal about the macro not being used
541 ifelse([AC_DISABLE_FAST_INSTALL])dnl
546 # @defmac AC_PROG_CC_STDC
547 # @maindex PROG_CC_STDC
549 # If the C compiler in not in ANSI C mode by default, try to add an option
550 # to output variable @code{CC} to make it so. This macro tries various
551 # options that select ANSI C on some system or another. It considers the
552 # compiler to be in ANSI C mode if it handles function prototypes correctly.
554 # If you use this macro, you should check after calling it whether the C
555 # compiler has been set to accept ANSI C; if not, the shell variable
556 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
557 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
558 # program @code{ansi2knr}, which comes with Ghostscript.
561 AC_DEFUN(AM_PROG_CC_STDC,
562 [AC_REQUIRE([AC_PROG_CC])
563 AC_BEFORE([$0], [AC_C_INLINE])
564 AC_BEFORE([$0], [AC_C_CONST])
565 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
566 dnl a magic option to avoid problems with ANSI preprocessor commands
568 dnl FIXME: can't do this because then AC_AIX won't work due to a
569 dnl circular dependency.
570 dnl AC_BEFORE([$0], [AC_PROG_CPP])
571 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
572 AC_CACHE_VAL(am_cv_prog_cc_stdc,
573 [am_cv_prog_cc_stdc=no
575 # Don't try gcc -ansi; that turns off useful extensions and
576 # breaks some systems' header files.
578 # Ultrix and OSF/1 -std1
579 # HP-UX 10.20 and later -Ae
580 # HP-UX older versions -Aa -D_HPUX_SOURCE
581 # SVR4 -Xc -D__EXTENSIONS__
582 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
584 CC="$ac_save_CC $ac_arg"
588 #include <sys/types.h>
589 #include <sys/stat.h>
590 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
591 struct buf { int x; };
592 FILE * (*rcsopen) (struct buf *, struct stat *, int);
593 static char *e (p, i)
599 static char *f (char * (*g) (char **, int), char **p, ...)
604 s = g (p, va_arg (v,int));
608 int test (int i, double x);
609 struct s1 {int (*f) (int a);};
610 struct s2 {int (*f) (double a);};
611 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
615 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
617 [am_cv_prog_cc_stdc="$ac_arg"; break])
621 if test -z "$am_cv_prog_cc_stdc"; then
622 AC_MSG_RESULT([none needed])
624 AC_MSG_RESULT($am_cv_prog_cc_stdc)
626 case "x$am_cv_prog_cc_stdc" in
628 *) CC="$CC $am_cv_prog_cc_stdc" ;;
632 dnl From Jim Meyering.
636 AC_DEFUN(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL,
637 [AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
638 AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
639 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
640 [am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
642 gwinsz_in_termios_h=no
643 if test $am_cv_sys_posix_termios = yes; then
645 [#include <sys/types.h>
646 # include <termios.h>
650 ], gwinsz_in_termios_h=yes)
653 if test $gwinsz_in_termios_h = no; then
655 [#include <sys/types.h>
656 # include <sys/ioctl.h>
660 ], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
663 if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
664 AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
665 [Define if TIOCGWINSZ requires sys/ioctl.h])
669 dnl From Jim Meyering.
673 AC_DEFUN(AM_SYS_POSIX_TERMIOS,
674 [AC_CACHE_CHECK([POSIX termios], am_cv_sys_posix_termios,
675 [AC_TRY_LINK([#include <sys/types.h>
677 #include <termios.h>],
678 [/* SunOS 4.0.3 has termios.h but not the library calls. */
680 am_cv_sys_posix_termios=yes,
681 am_cv_sys_posix_termios=no)])
684 # From Ulrich Drepper.
688 AC_DEFUN(AM_TYPE_PTRDIFF_T,
689 [AC_CACHE_CHECK([for ptrdiff_t], am_cv_type_ptrdiff_t,
690 [AC_TRY_COMPILE([#include <stddef.h>], [ptrdiff_t p],
691 am_cv_type_ptrdiff_t=yes, am_cv_type_ptrdiff_t=no)])
692 if test $am_cv_type_ptrdiff_t = yes; then
693 AC_DEFINE(HAVE_PTRDIFF_T,1,[Define if system has ptrdiff_t type])