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.
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_REDCRAP_BUGS(prefix,bindir,libdir)
42 AC_DEFUN(WM_CHECK_REDCRAP_BUGS,
44 AC_MSG_CHECKING(for RedHat system)
47 if test -f /etc/redhat-release; then
51 AC_MSG_RESULT($wm_check_flag)
55 if test "$wm_check_flag" = yes; then
57 AC_MSG_WARN([Red Hat system; checking for Red-Hat-specific bugs.])
60 # Check old wmaker from RedHat
62 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
63 AC_MSG_CHECKING(for multiple installed wmaker versions)
64 if test -f /usr/X11R6/bin/wmaker; then
70 AC_MSG_RESULT(no apparent problems)
74 # Check for infamous en_RN bug
75 # Wont work because autoconf will change LANG in the beginning of the
79 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
81 #if test "x$LANG" = xen_RN; then
83 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
84 #locale. Please unset it or you will have mysterious problems when
85 #using various software packages.])
88 #AC_MSG_RESULT(no problem)
91 # If binary installation path is /usr/local/bin, check if it's in PATH
93 if test "[$2]" = "/usr/local/bin"; then
94 AC_MSG_CHECKING(if /usr/local/bin is in the search PATH)
96 rh_missing_usr_local_bin=yes
100 if test "x$i" = "x/usr/local/bin"; then
102 rh_missing_usr_local_bin=no
107 if test "$wm_check_flag" = no; then
111 AC_MSG_RESULT(no problem)
115 # If library installation path is /usr/local/lib,
116 # check if it's in /etc/ld.so.conf
118 if test "[$3]" = "/usr/local/lib"; then
120 rh_missing_usr_local_lib=no
121 AC_MSG_CHECKING(if /usr/local/lib is in /etc/ld.so.conf)
122 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
123 test "$?" -eq 0 && wm_check_flag=no
124 if test "$wm_check_flag" = no; then
126 rh_missing_usr_local_lib=yes
129 AC_MSG_RESULT(no problem)
133 # Check for symbolic links
135 AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
136 rh_missing_usr_include_x11=no
137 if test -d "/usr/include/X11"; then
141 rh_missing_usr_include_x11=yes
148 AC_MSG_CHECKING(for /lib/cpp)
149 rh_missing_lib_cpp=no
150 if test -f "/lib/cpp"; then
154 rh_missing_lib_cpp=yes
164 dnl WM_PRINT_REDCRAP_BUG_STATUS()
166 AC_DEFUN(WM_PRINT_REDCRAP_BUG_STATUS,
168 if test "$rh_is_redhat" = yes; then
169 if test "$mins_found" = yes -o "$bugs_found" = yes; then
171 AC_MSG_WARN([It seems you are using a system packaged by Red Hat.
172 I have done some checks for Red-Hat-specific bugs, and I found some
173 problems. Please read the INSTALL file regarding Red Hat, resolve
174 the problems, and try to run configure again.
176 Here are the problems I found:
178 if test "x$rh_old_wmaker" = xyes; then
179 echo "Problem: Old version of Window Maker in /usr/X11R6/bin."
180 echo "Description: You seem to have an old version of Window Maker"
181 echo " installed in /usr/X11R6/bin. It is recommended"
182 echo " that you uninstall any previously installed"
183 echo " packages of WindowMaker before installing a new one."
186 if test "x$rh_missing_usr_local_bin" = xyes; then
187 echo "Problem: PATH is missing /usr/local/bin."
188 echo "Description: Your PATH environment variable does not appear to"
189 echo " contain the directory /usr/local/bin. Please add it."
192 if test "x$rh_missing_usr_local_lib" = xyes; then
193 echo "Problem: /etc/ld.so.conf missing /usr/local/lib"
194 echo "Description: Your /etc/ld.so.conf file does not appear to contain"
195 echo " the directory /usr/local/lib. Please add it."
198 if test "x$rh_missing_usr_x11" = xyes; then
199 echo "Problem: Missing /usr/X11 symbolic link."
200 echo "Description: Your system is missing a symbolic link from"
201 echo " /usr/X11R6 to /usr/X11. Please create one."
204 if test "x$rh_missing_usr_include_x11" = xyes; then
205 echo "Problem: Missing /usr/include/X11 symbolic link."
206 echo "Description: Your system is missing a symbolic link from"
207 echo " /usr/X11R6/include/X11 to /usr/include/X11."
208 echo " Please create one."
211 if test "x$rh_missing_lib_cpp" = xyes; then
212 echo "Problem: Missing /lib/cpp symbolic link."
213 echo "Description: Your system is missing a symbolic link from the"
214 echo " cpp (C preprocessor) program to /lib/cpp."
215 echo " Please create one."
218 if test "x$bugs_found" = xyes; then
219 AC_MSG_ERROR([One or more of the problems above can potentially
220 cause Window Maker not to install or run properly. Please resolve
221 the problems and try to run configure again.])
223 elif test "x$mins_found" = xyes; then
224 AC_MSG_WARN([The problems above may or may not cause Window Maker
225 not to install or run properly. If you have any problems during
226 installation or execution, please resolve the problems and try to
227 install Window Maker again.])
232 echo "You appear to have a system packaged by Red Hat, but I could"
233 echo "not find any Red-Hat-specific problems that I know about."
240 # Do all the work for Automake. This macro actually does too much --
241 # some checks are only needed if your package does certain things.
242 # But this isn't really a big deal.
247 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
249 AC_DEFUN(AM_INIT_AUTOMAKE,
250 [AC_REQUIRE([AC_PROG_INSTALL])
255 dnl test to see if srcdir already configured
256 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
257 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
260 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
261 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
262 AC_REQUIRE([AM_SANITY_CHECK])
263 AC_REQUIRE([AC_ARG_PROGRAM])
264 dnl FIXME This is truly gross.
265 missing_dir=`cd $ac_aux_dir && pwd`
266 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
267 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
268 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
269 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
270 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
271 AC_REQUIRE([AC_PROG_MAKE_SET])])
274 # Check to make sure that the build environment is sane.
277 AC_DEFUN(AM_SANITY_CHECK,
278 [AC_MSG_CHECKING([whether build environment is sane])
281 echo timestamp > conftestfile
282 # Do `set' in a subshell so we don't clobber the current shell's
283 # arguments. Must try -L first in case configure is actually a
284 # symlink; some systems play weird games with the mod time of symlinks
285 # (eg FreeBSD returns the mod time of the symlink's containing
288 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
289 if test "[$]*" = "X"; then
291 set X `ls -t $srcdir/configure conftestfile`
293 if test "[$]*" != "X $srcdir/configure conftestfile" \
294 && test "[$]*" != "X conftestfile $srcdir/configure"; then
296 # If neither matched, then we have a broken ls. This can happen
297 # if, for instance, CONFIG_SHELL is bash and it inherits a
298 # broken ls alias from the environment. This has actually
299 # happened. Such a system could not be considered "sane".
300 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
301 alias in your environment])
304 test "[$]2" = conftestfile
310 AC_MSG_ERROR([newly created file is older than distributed files!
311 Check your system clock])
316 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
317 dnl The program must properly implement --version.
318 AC_DEFUN(AM_MISSING_PROG,
319 [AC_MSG_CHECKING(for working $2)
320 # Run test in a subshell; some versions of sh will print an error if
321 # an executable is not found, even if stderr is redirected.
322 # Redirect stdin to placate older versions of autoconf. Sigh.
323 if ($2 --version) < /dev/null > /dev/null 2>&1; then
328 AC_MSG_RESULT(missing)
333 # serial 40 AC_PROG_LIBTOOL
334 AC_DEFUN(AC_PROG_LIBTOOL,
335 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
337 # Save cache, so that ltconfig can load it
340 # Actually configure libtool. ac_aux_dir is where install-sh is found.
341 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
342 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
343 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
344 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
345 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
346 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
347 || AC_MSG_ERROR([libtool configure failed])
349 # Reload cache, that may have been modified by ltconfig
352 # This can be used to rebuild libtool when needed
353 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
355 # Always use our own libtool.
356 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
359 # Redirect the config.log output again, so that the ltconfig log is not
360 # clobbered by the next message.
364 AC_DEFUN(AC_LIBTOOL_SETUP,
366 AC_REQUIRE([AC_ENABLE_SHARED])dnl
367 AC_REQUIRE([AC_ENABLE_STATIC])dnl
368 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
369 AC_REQUIRE([AC_CANONICAL_HOST])dnl
370 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
371 AC_REQUIRE([AC_PROG_RANLIB])dnl
372 AC_REQUIRE([AC_PROG_CC])dnl
373 AC_REQUIRE([AC_PROG_LD])dnl
374 AC_REQUIRE([AC_PROG_NM])dnl
375 AC_REQUIRE([AC_PROG_LN_S])dnl
378 # Check for any special flags to pass to ltconfig.
379 libtool_flags="--cache-file=$cache_file"
380 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
381 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
382 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
383 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
384 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
385 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
386 [libtool_flags="$libtool_flags --enable-dlopen"])
387 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
388 [libtool_flags="$libtool_flags --enable-win32-dll"])
389 AC_ARG_ENABLE(libtool-lock,
390 [ --disable-libtool-lock avoid locking (might break parallel builds)])
391 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
392 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
394 # Some flags need to be propagated to the compiler or linker for good
398 # Find out which ABI we are using.
399 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
400 if AC_TRY_EVAL(ac_compile); then
401 case "`/usr/bin/file conftest.o`" in
417 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
418 SAVE_CFLAGS="$CFLAGS"
419 CFLAGS="$CFLAGS -belf"
420 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
421 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
422 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
423 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
424 CFLAGS="$SAVE_CFLAGS"
428 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
429 [*-*-cygwin* | *-*-mingw*)
430 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
431 AC_CHECK_TOOL(AS, as, false)
432 AC_CHECK_TOOL(OBJDUMP, objdump, false)
438 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
439 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
441 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
442 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
444 # AC_ENABLE_SHARED - implement the --enable-shared flag
445 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
446 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
448 AC_DEFUN(AC_ENABLE_SHARED, [dnl
449 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
450 AC_ARG_ENABLE(shared,
451 changequote(<<, >>)dnl
452 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
454 [p=${PACKAGE-default}
456 yes) enable_shared=yes ;;
457 no) enable_shared=no ;;
460 # Look at the argument we got. We use all the common list separators.
461 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
462 for pkg in $enableval; do
463 if test "X$pkg" = "X$p"; then
470 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
473 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
474 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
475 AC_ENABLE_SHARED(no)])
477 # AC_ENABLE_STATIC - implement the --enable-static flag
478 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
479 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
481 AC_DEFUN(AC_ENABLE_STATIC, [dnl
482 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
483 AC_ARG_ENABLE(static,
484 changequote(<<, >>)dnl
485 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
487 [p=${PACKAGE-default}
489 yes) enable_static=yes ;;
490 no) enable_static=no ;;
493 # Look at the argument we got. We use all the common list separators.
494 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
495 for pkg in $enableval; do
496 if test "X$pkg" = "X$p"; then
503 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
506 # AC_DISABLE_STATIC - set the default static flag to --disable-static
507 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
508 AC_ENABLE_STATIC(no)])
511 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
512 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
513 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
515 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
516 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
517 AC_ARG_ENABLE(fast-install,
518 changequote(<<, >>)dnl
519 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
521 [p=${PACKAGE-default}
523 yes) enable_fast_install=yes ;;
524 no) enable_fast_install=no ;;
526 enable_fast_install=no
527 # Look at the argument we got. We use all the common list separators.
528 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
529 for pkg in $enableval; do
530 if test "X$pkg" = "X$p"; then
531 enable_fast_install=yes
537 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
540 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
541 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
542 AC_ENABLE_FAST_INSTALL(no)])
544 # AC_PROG_LD - find the path to the GNU or non-GNU linker
547 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
548 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
549 AC_REQUIRE([AC_PROG_CC])dnl
550 AC_REQUIRE([AC_CANONICAL_HOST])dnl
551 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
553 if test "$ac_cv_prog_gcc" = yes; then
554 # Check if gcc -print-prog-name=ld gives a path.
555 AC_MSG_CHECKING([for ld used by GCC])
556 ac_prog=`($CC -print-prog-name=ld) 2>&5`
558 # Accept absolute paths.
560 [\\/]* | [A-Za-z]:[\\/]*)
561 re_direlt='/[^/][^/]*/\.\./'
563 # Canonicalize the path of ld
564 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
565 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
566 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
568 test -z "$LD" && LD="$ac_prog"
571 # If it fails, then pretend we aren't using GCC.
575 # If it is relative, then search for the first ld in PATH.
579 elif test "$with_gnu_ld" = yes; then
580 AC_MSG_CHECKING([for GNU ld])
582 AC_MSG_CHECKING([for non-GNU ld])
584 AC_CACHE_VAL(ac_cv_path_LD,
585 [if test -z "$LD"; then
586 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
587 for ac_dir in $PATH; do
588 test -z "$ac_dir" && ac_dir=.
589 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
590 ac_cv_path_LD="$ac_dir/$ac_prog"
591 # Check to see if the program is GNU ld. I'd rather use --version,
592 # but apparently some GNU ld's only accept -v.
593 # Break only if it was the GNU/non-GNU ld that we prefer.
594 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
595 test "$with_gnu_ld" != no && break
597 test "$with_gnu_ld" != yes && break
603 ac_cv_path_LD="$LD" # Let the user override the test with a path.
606 if test -n "$LD"; then
611 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
616 AC_DEFUN(AC_PROG_LD_GNU,
617 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
618 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
619 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
620 ac_cv_prog_gnu_ld=yes
626 # AC_PROG_NM - find the path to a BSD-compatible name lister
628 [AC_MSG_CHECKING([for BSD-compatible nm])
629 AC_CACHE_VAL(ac_cv_path_NM,
630 [if test -n "$NM"; then
631 # Let the user override the test.
634 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
635 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
636 test -z "$ac_dir" && ac_dir=.
637 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
638 # Check to see if the nm accepts a BSD-compat flag.
639 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
640 # nm: unknown option "B" ignored
641 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
642 ac_cv_path_NM="$ac_dir/nm -B"
644 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
645 ac_cv_path_NM="$ac_dir/nm -p"
648 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
649 continue # so that we can try to find one that supports BSD flags
654 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
661 # AC_CHECK_LIBM - check for math library
662 AC_DEFUN(AC_CHECK_LIBM,
663 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
666 *-*-beos* | *-*-cygwin*)
667 # These system don't have libm
670 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
671 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
674 AC_CHECK_LIB(m, main, LIBM="-lm")
679 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
680 # the libltdl convenience library, adds --enable-ltdl-convenience to
681 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
682 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
683 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
684 # '${top_builddir}/' (note the single quotes!) if your package is not
685 # flat, and, if you're not using automake, define top_builddir as
686 # appropriate in the Makefiles.
687 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
688 case "$enable_ltdl_convenience" in
689 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
690 "") enable_ltdl_convenience=yes
691 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
693 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
694 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
697 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
698 # the libltdl installable library, and adds --enable-ltdl-install to
699 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
700 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
701 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
702 # '${top_builddir}/' (note the single quotes!) if your package is not
703 # flat, and, if you're not using automake, define top_builddir as
704 # appropriate in the Makefiles.
705 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
706 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
707 AC_CHECK_LIB(ltdl, main,
708 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
709 [if test x"$enable_ltdl_install" = xno; then
710 AC_MSG_WARN([libltdl not installed, but installation disabled])
712 enable_ltdl_install=yes
715 if test x"$enable_ltdl_install" = x"yes"; then
716 ac_configure_args="$ac_configure_args --enable-ltdl-install"
717 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
718 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
720 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
727 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
728 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
729 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
730 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
731 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
732 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
733 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
735 dnl This is just to silence aclocal about the macro not being used
736 ifelse([AC_DISABLE_FAST_INSTALL])dnl
738 # Like AC_CONFIG_HEADER, but automatically create stamp file.
740 AC_DEFUN(AM_CONFIG_HEADER,
742 AC_CONFIG_HEADER([$1])
743 dnl When config.status generates a header, we must update the stamp-h file.
744 dnl This file resides in the same directory as the config header
745 dnl that is generated. We must strip everything past the first ":",
746 dnl and everything past the last "/".
747 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
748 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
749 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
751 for am_file in <<$1>>; do
752 case " <<$>>CONFIG_HEADERS " in
753 *" <<$>>am_file "*<<)>>
754 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
757 am_indx=`expr "<<$>>am_indx" + 1`