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.
16 dnl WM_CHECK_LIB(NAME, FUNCTION, EXTRALIBS)
18 AC_DEFUN(WM_CHECK_LIB,
20 LDFLAGS_old="$LDFLAGS"
21 LDFLAGS="$LDFLAGS $lib_search_path"
22 AC_CHECK_LIB([$1],[$2],yes=yes,no=no,[$3])
23 LDFLAGS="$LDFLAGS_old"
28 dnl WM_CHECK_HEADER(NAME)
30 AC_DEFUN(WM_CHECK_HEADER,
32 CPPFLAGS_old="$CPPFLAGS"
33 CPPFLAGS="$CPPFLAGS $inc_search_path"
35 CPPFLAGS="$CPPFLAGS_old"
40 dnl WM_CHECK_PROPLIST_VERSION(MIN_VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
42 AC_DEFUN(WM_CHECK_PROPLIST_VERSION,
44 CPPFLAGS_old="$CPPFLAGS"
45 CPPFLAGS="$CPPFLAGS $inc_search_path"
46 lPL_major_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
47 lPL_minor_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
48 lPL_micro_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
49 AC_MSG_CHECKING([whether libPropList is newer than $1])
50 AC_CACHE_VAL(ac_cv_lib_proplist_version_ok,
52 [/* Test version of libPropList we have */
55 #if !defined(PROPLIST_VERSION) || PROPLIST_VERSION < $lPL_major_version*10000 + $lPL_minor_version*100 + $lPL_micro_version
56 #error libPropList on this system is too old. Consider upgrading to at least $1
59 eval "ac_cv_lib_proplist_version_ok=yes",
60 eval "ac_cv_lib_proplist_version_ok=no")])
61 if eval "test \"`echo '$ac_cv_lib_proplist_version_ok'`\" = yes"; then
63 ifelse([$2], , :, [$2])
69 CPPFLAGS="$CPPFLAGS_old"
74 dnl WM_CHECK_REDCRAP_BUGS(prefix,bindir,libdir)
76 AC_DEFUN(WM_CHECK_REDCRAP_BUGS,
78 AC_MSG_CHECKING(for RedHat system)
81 if test -f /etc/redhat-release; then
85 AC_MSG_RESULT($wm_check_flag)
89 if test "$wm_check_flag" = yes; then
91 AC_MSG_WARN([Red Hat system; checking for Red-Hat-specific bugs.])
94 # Check old wmaker from RedHat
96 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
97 AC_MSG_CHECKING(for multiple installed wmaker versions)
98 if test -f /usr/X11R6/bin/wmaker; then
104 AC_MSG_RESULT(no apparent problems)
108 # Check for infamous en_RN bug
109 # Wont work because autoconf will change LANG in the beginning of the
113 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
115 #if test "x$LANG" = xen_RN; then
116 #AC_MSG_RESULT(uh oh)
117 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
118 #locale. Please unset it or you will have mysterious problems when
119 #using various software packages.])
122 #AC_MSG_RESULT(no problem)
125 # If binary installation path is /usr/local/bin, check if it's in PATH
127 if test "[$2]" = "/usr/local/bin"; then
128 AC_MSG_CHECKING(if /usr/local/bin is in the search PATH)
130 rh_missing_usr_local_bin=yes
134 if test "x$i" = "x/usr/local/bin"; then
136 rh_missing_usr_local_bin=no
141 if test "$wm_check_flag" = no; then
145 AC_MSG_RESULT(no problem)
149 # If library installation path is /usr/local/lib,
150 # check if it's in /etc/ld.so.conf
152 if test "[$3]" = "/usr/local/lib"; then
154 rh_missing_usr_local_lib=no
155 AC_MSG_CHECKING(if /usr/local/lib is in /etc/ld.so.conf)
156 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
157 test "$?" -eq 0 && wm_check_flag=no
158 if test "$wm_check_flag" = no; then
160 rh_missing_usr_local_lib=yes
163 AC_MSG_RESULT(no problem)
167 # Check for symbolic links
169 AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
170 rh_missing_usr_include_x11=no
171 if test -d "/usr/include/X11"; then
175 rh_missing_usr_include_x11=yes
182 AC_MSG_CHECKING(for /lib/cpp)
183 rh_missing_lib_cpp=no
184 if test -f "/lib/cpp"; then
188 rh_missing_lib_cpp=yes
198 dnl WM_PRINT_REDCRAP_BUG_STATUS()
200 AC_DEFUN(WM_PRINT_REDCRAP_BUG_STATUS,
202 if test "$rh_is_redhat" = yes; then
203 if test "$mins_found" = yes -o "$bugs_found" = yes; then
205 AC_MSG_WARN([It seems you are using a system packaged by Red Hat.
206 I have done some checks for Red-Hat-specific bugs, and I found some
207 problems. Please read the INSTALL file regarding Red Hat, resolve
208 the problems, and try to run configure again.
210 Here are the problems I found:
212 if test "x$rh_old_wmaker" = xyes; then
213 echo "Problem: Old version of Window Maker in /usr/X11R6/bin."
214 echo "Description: You seem to have an old version of Window Maker"
215 echo " installed in /usr/X11R6/bin. It is recommended"
216 echo " that you uninstall any previously installed"
217 echo " packages of WindowMaker before installing a new one."
220 if test "x$rh_missing_usr_local_bin" = xyes; then
221 echo "Problem: PATH is missing /usr/local/bin."
222 echo "Description: Your PATH environment variable does not appear to"
223 echo " contain the directory /usr/local/bin. Please add it."
226 if test "x$rh_missing_usr_local_lib" = xyes; then
227 echo "Problem: /etc/ld.so.conf missing /usr/local/lib"
228 echo "Description: Your /etc/ld.so.conf file does not appear to contain"
229 echo " the directory /usr/local/lib. Please add it."
232 if test "x$rh_missing_usr_x11" = xyes; then
233 echo "Problem: Missing /usr/X11 symbolic link."
234 echo "Description: Your system is missing a symbolic link from"
235 echo " /usr/X11R6 to /usr/X11. Please create one."
238 if test "x$rh_missing_usr_include_x11" = xyes; then
239 echo "Problem: Missing /usr/include/X11 symbolic link."
240 echo "Description: Your system is missing a symbolic link from"
241 echo " /usr/X11R6/include/X11 to /usr/include/X11."
242 echo " Please create one."
245 if test "x$rh_missing_lib_cpp" = xyes; then
246 echo "Problem: Missing /lib/cpp symbolic link."
247 echo "Description: Your system is missing a symbolic link from the"
248 echo " cpp (C preprocessor) program to /lib/cpp."
249 echo " Please create one."
252 if test "x$bugs_found" = xyes; then
253 AC_MSG_ERROR([One or more of the problems above can potentially
254 cause Window Maker not to install or run properly. Please resolve
255 the problems and try to run configure again.])
257 elif test "x$mins_found" = xyes; then
258 AC_MSG_WARN([The problems above may or may not cause Window Maker
259 not to install or run properly. If you have any problems during
260 installation or execution, please resolve the problems and try to
261 install Window Maker again.])
266 echo "You appear to have a system packaged by Red Hat, but I could"
267 echo "not find any Red-Hat-specific problems that I know about."
274 # Do all the work for Automake. This macro actually does too much --
275 # some checks are only needed if your package does certain things.
276 # But this isn't really a big deal.
281 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
283 AC_DEFUN(AM_INIT_AUTOMAKE,
284 [AC_REQUIRE([AC_PROG_INSTALL])
285 dnl We require 2.13 because we rely on SHELL being computed by configure.
291 dnl test to see if srcdir already configured
292 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
293 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
296 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
297 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
298 AC_REQUIRE([AM_SANITY_CHECK])
299 AC_REQUIRE([AC_ARG_PROGRAM])
300 dnl FIXME This is truly gross.
301 missing_dir=`cd $ac_aux_dir && pwd`
302 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
303 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
304 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
305 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
306 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
307 AC_REQUIRE([AC_PROG_MAKE_SET])])
310 # Check to make sure that the build environment is sane.
313 AC_DEFUN(AM_SANITY_CHECK,
314 [AC_MSG_CHECKING([whether build environment is sane])
317 echo timestamp > conftestfile
318 # Do `set' in a subshell so we don't clobber the current shell's
319 # arguments. Must try -L first in case configure is actually a
320 # symlink; some systems play weird games with the mod time of symlinks
321 # (eg FreeBSD returns the mod time of the symlink's containing
324 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
325 if test "[$]*" = "X"; then
327 set X `ls -t $srcdir/configure conftestfile`
329 if test "[$]*" != "X $srcdir/configure conftestfile" \
330 && test "[$]*" != "X conftestfile $srcdir/configure"; then
332 # If neither matched, then we have a broken ls. This can happen
333 # if, for instance, CONFIG_SHELL is bash and it inherits a
334 # broken ls alias from the environment. This has actually
335 # happened. Such a system could not be considered "sane".
336 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
337 alias in your environment])
340 test "[$]2" = conftestfile
346 AC_MSG_ERROR([newly created file is older than distributed files!
347 Check your system clock])
352 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
353 dnl The program must properly implement --version.
354 AC_DEFUN(AM_MISSING_PROG,
355 [AC_MSG_CHECKING(for working $2)
356 # Run test in a subshell; some versions of sh will print an error if
357 # an executable is not found, even if stderr is redirected.
358 # Redirect stdin to placate older versions of autoconf. Sigh.
359 if ($2 --version) < /dev/null > /dev/null 2>&1; then
364 AC_MSG_RESULT(missing)
369 # serial 40 AC_PROG_LIBTOOL
370 AC_DEFUN(AC_PROG_LIBTOOL,
371 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
373 # Save cache, so that ltconfig can load it
376 # Actually configure libtool. ac_aux_dir is where install-sh is found.
377 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
378 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
379 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
380 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
381 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
382 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
383 || AC_MSG_ERROR([libtool configure failed])
385 # Reload cache, that may have been modified by ltconfig
388 # This can be used to rebuild libtool when needed
389 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
391 # Always use our own libtool.
392 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
395 # Redirect the config.log output again, so that the ltconfig log is not
396 # clobbered by the next message.
400 AC_DEFUN(AC_LIBTOOL_SETUP,
402 AC_REQUIRE([AC_ENABLE_SHARED])dnl
403 AC_REQUIRE([AC_ENABLE_STATIC])dnl
404 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
405 AC_REQUIRE([AC_CANONICAL_HOST])dnl
406 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
407 AC_REQUIRE([AC_PROG_RANLIB])dnl
408 AC_REQUIRE([AC_PROG_CC])dnl
409 AC_REQUIRE([AC_PROG_LD])dnl
410 AC_REQUIRE([AC_PROG_NM])dnl
411 AC_REQUIRE([AC_PROG_LN_S])dnl
414 # Check for any special flags to pass to ltconfig.
416 # the following will cause an existing older ltconfig to fail, so
417 # we ignore this at the expense of the cache file... Checking this
418 # will just take longer ... bummer!
419 #libtool_flags="--cache-file=$cache_file"
421 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
422 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
423 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
424 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
425 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
426 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
427 [libtool_flags="$libtool_flags --enable-dlopen"])
428 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
429 [libtool_flags="$libtool_flags --enable-win32-dll"])
430 AC_ARG_ENABLE(libtool-lock,
431 [ --disable-libtool-lock avoid locking (might break parallel builds)])
432 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
433 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
435 # Some flags need to be propagated to the compiler or linker for good
439 # Find out which ABI we are using.
440 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
441 if AC_TRY_EVAL(ac_compile); then
442 case "`/usr/bin/file conftest.o`" in
458 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
459 SAVE_CFLAGS="$CFLAGS"
460 CFLAGS="$CFLAGS -belf"
461 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
462 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
463 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
464 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
465 CFLAGS="$SAVE_CFLAGS"
469 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
470 [*-*-cygwin* | *-*-mingw*)
471 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
472 AC_CHECK_TOOL(AS, as, false)
473 AC_CHECK_TOOL(OBJDUMP, objdump, false)
479 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
480 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
482 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
483 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
485 # AC_ENABLE_SHARED - implement the --enable-shared flag
486 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
487 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
489 AC_DEFUN(AC_ENABLE_SHARED, [dnl
490 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
491 AC_ARG_ENABLE(shared,
492 changequote(<<, >>)dnl
493 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
495 [p=${PACKAGE-default}
497 yes) enable_shared=yes ;;
498 no) enable_shared=no ;;
501 # Look at the argument we got. We use all the common list separators.
502 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
503 for pkg in $enableval; do
504 if test "X$pkg" = "X$p"; then
511 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
514 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
515 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
516 AC_ENABLE_SHARED(no)])
518 # AC_ENABLE_STATIC - implement the --enable-static flag
519 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
520 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
522 AC_DEFUN(AC_ENABLE_STATIC, [dnl
523 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
524 AC_ARG_ENABLE(static,
525 changequote(<<, >>)dnl
526 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
528 [p=${PACKAGE-default}
530 yes) enable_static=yes ;;
531 no) enable_static=no ;;
534 # Look at the argument we got. We use all the common list separators.
535 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
536 for pkg in $enableval; do
537 if test "X$pkg" = "X$p"; then
544 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
547 # AC_DISABLE_STATIC - set the default static flag to --disable-static
548 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
549 AC_ENABLE_STATIC(no)])
552 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
553 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
554 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
556 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
557 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
558 AC_ARG_ENABLE(fast-install,
559 changequote(<<, >>)dnl
560 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
562 [p=${PACKAGE-default}
564 yes) enable_fast_install=yes ;;
565 no) enable_fast_install=no ;;
567 enable_fast_install=no
568 # Look at the argument we got. We use all the common list separators.
569 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
570 for pkg in $enableval; do
571 if test "X$pkg" = "X$p"; then
572 enable_fast_install=yes
578 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
581 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
582 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
583 AC_ENABLE_FAST_INSTALL(no)])
585 # AC_PROG_LD - find the path to the GNU or non-GNU linker
588 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
589 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
590 AC_REQUIRE([AC_PROG_CC])dnl
591 AC_REQUIRE([AC_CANONICAL_HOST])dnl
592 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
594 if test "$ac_cv_prog_gcc" = yes; then
595 # Check if gcc -print-prog-name=ld gives a path.
596 AC_MSG_CHECKING([for ld used by GCC])
597 ac_prog=`($CC -print-prog-name=ld) 2>&5`
599 # Accept absolute paths.
601 [\\/]* | [A-Za-z]:[\\/]*)
602 re_direlt='/[^/][^/]*/\.\./'
604 # Canonicalize the path of ld
605 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
606 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
607 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
609 test -z "$LD" && LD="$ac_prog"
612 # If it fails, then pretend we aren't using GCC.
616 # If it is relative, then search for the first ld in PATH.
620 elif test "$with_gnu_ld" = yes; then
621 AC_MSG_CHECKING([for GNU ld])
623 AC_MSG_CHECKING([for non-GNU ld])
625 AC_CACHE_VAL(ac_cv_path_LD,
626 [if test -z "$LD"; then
627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
628 for ac_dir in $PATH; do
629 test -z "$ac_dir" && ac_dir=.
630 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
631 ac_cv_path_LD="$ac_dir/$ac_prog"
632 # Check to see if the program is GNU ld. I'd rather use --version,
633 # but apparently some GNU ld's only accept -v.
634 # Break only if it was the GNU/non-GNU ld that we prefer.
635 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
636 test "$with_gnu_ld" != no && break
638 test "$with_gnu_ld" != yes && break
644 ac_cv_path_LD="$LD" # Let the user override the test with a path.
647 if test -n "$LD"; then
652 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
657 AC_DEFUN(AC_PROG_LD_GNU,
658 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
659 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
660 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
661 ac_cv_prog_gnu_ld=yes
667 # AC_PROG_NM - find the path to a BSD-compatible name lister
669 [AC_MSG_CHECKING([for BSD-compatible nm])
670 AC_CACHE_VAL(ac_cv_path_NM,
671 [if test -n "$NM"; then
672 # Let the user override the test.
675 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
676 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
677 test -z "$ac_dir" && ac_dir=.
678 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
679 # Check to see if the nm accepts a BSD-compat flag.
680 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
681 # nm: unknown option "B" ignored
682 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
683 ac_cv_path_NM="$ac_dir/nm -B"
685 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
686 ac_cv_path_NM="$ac_dir/nm -p"
689 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
690 continue # so that we can try to find one that supports BSD flags
695 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
702 # AC_CHECK_LIBM - check for math library
703 AC_DEFUN(AC_CHECK_LIBM,
704 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
707 *-*-beos* | *-*-cygwin*)
708 # These system don't have libm
711 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
712 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
715 AC_CHECK_LIB(m, main, LIBM="-lm")
720 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
721 # the libltdl convenience library, adds --enable-ltdl-convenience to
722 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
723 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
724 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
725 # '${top_builddir}/' (note the single quotes!) if your package is not
726 # flat, and, if you're not using automake, define top_builddir as
727 # appropriate in the Makefiles.
728 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
729 case "$enable_ltdl_convenience" in
730 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
731 "") enable_ltdl_convenience=yes
732 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
734 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
735 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
738 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
739 # the libltdl installable library, and adds --enable-ltdl-install to
740 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
741 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
742 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
743 # '${top_builddir}/' (note the single quotes!) if your package is not
744 # flat, and, if you're not using automake, define top_builddir as
745 # appropriate in the Makefiles.
746 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
747 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
748 AC_CHECK_LIB(ltdl, main,
749 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
750 [if test x"$enable_ltdl_install" = xno; then
751 AC_MSG_WARN([libltdl not installed, but installation disabled])
753 enable_ltdl_install=yes
756 if test x"$enable_ltdl_install" = x"yes"; then
757 ac_configure_args="$ac_configure_args --enable-ltdl-install"
758 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
759 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
761 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
768 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
769 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
770 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
771 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
772 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
773 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
774 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
776 dnl This is just to silence aclocal about the macro not being used
777 ifelse([AC_DISABLE_FAST_INSTALL])dnl
779 # Like AC_CONFIG_HEADER, but automatically create stamp file.
781 AC_DEFUN(AM_CONFIG_HEADER,
783 AC_CONFIG_HEADER([$1])
784 dnl When config.status generates a header, we must update the stamp-h file.
785 dnl This file resides in the same directory as the config header
786 dnl that is generated. We must strip everything past the first ":",
787 dnl and everything past the last "/".
788 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
789 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
790 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
792 for am_file in <<$1>>; do
793 case " <<$>>CONFIG_HEADERS " in
794 *" <<$>>am_file "*<<)>>
795 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
798 am_indx=`expr "<<$>>am_indx" + 1`