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"
41 dnl WM_CHECK_REDCRAP_BUGS(prefix,bindir,libdir)
43 AC_DEFUN(WM_CHECK_REDCRAP_BUGS,
45 AC_MSG_CHECKING(for RedHat system)
48 if test -f /etc/redhat-release; then
52 AC_MSG_RESULT($wm_check_flag)
56 if test "$wm_check_flag" = yes; then
58 AC_MSG_WARN([Red Hat system; checking for Red-Hat-specific bugs.])
61 # Check old wmaker from RedHat
63 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
64 AC_MSG_CHECKING(for multiple installed wmaker versions)
65 if test -f /usr/X11R6/bin/wmaker; then
71 AC_MSG_RESULT(no apparent problems)
75 # Check for infamous en_RN bug
76 # Wont work because autoconf will change LANG in the beginning of the
80 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
82 #if test "x$LANG" = xen_RN; then
84 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
85 #locale. Please unset it or you will have mysterious problems when
86 #using various software packages.])
89 #AC_MSG_RESULT(no problem)
92 # If binary installation path is /usr/local/bin, check if it's in PATH
94 if test "[$2]" = "/usr/local/bin"; then
95 AC_MSG_CHECKING(if /usr/local/bin is in the search PATH)
97 rh_missing_usr_local_bin=yes
101 if test "x$i" = "x/usr/local/bin"; then
103 rh_missing_usr_local_bin=no
108 if test "$wm_check_flag" = no; then
112 AC_MSG_RESULT(no problem)
116 # If library installation path is /usr/local/lib,
117 # check if it's in /etc/ld.so.conf
119 if test "[$3]" = "/usr/local/lib"; then
121 rh_missing_usr_local_lib=no
122 AC_MSG_CHECKING(if /usr/local/lib is in /etc/ld.so.conf)
123 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
124 test "$?" -eq 0 && wm_check_flag=no
125 if test "$wm_check_flag" = no; then
127 rh_missing_usr_local_lib=yes
130 AC_MSG_RESULT(no problem)
134 # Check for symbolic links
136 AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
137 rh_missing_usr_include_x11=no
138 if test -d "/usr/include/X11"; then
142 rh_missing_usr_include_x11=yes
149 AC_MSG_CHECKING(for /lib/cpp)
150 rh_missing_lib_cpp=no
151 if test -f "/lib/cpp"; then
155 rh_missing_lib_cpp=yes
165 dnl WM_PRINT_REDCRAP_BUG_STATUS()
167 AC_DEFUN(WM_PRINT_REDCRAP_BUG_STATUS,
169 if test "$rh_is_redhat" = yes; then
170 if test "$mins_found" = yes -o "$bugs_found" = yes; then
172 AC_MSG_WARN([It seems you are using a system packaged by Red Hat.
173 I have done some checks for Red-Hat-specific bugs, and I found some
174 problems. Please read the INSTALL file regarding Red Hat, resolve
175 the problems, and try to run configure again.
177 Here are the problems I found:
179 if test "x$rh_old_wmaker" = xyes; then
180 echo "Problem: Old version of Window Maker in /usr/X11R6/bin."
181 echo "Description: You seem to have an old version of Window Maker"
182 echo " installed in /usr/X11R6/bin. It is recommended"
183 echo " that you uninstall any previously installed"
184 echo " packages of WindowMaker before installing a new one."
187 if test "x$rh_missing_usr_local_bin" = xyes; then
188 echo "Problem: PATH is missing /usr/local/bin."
189 echo "Description: Your PATH environment variable does not appear to"
190 echo " contain the directory /usr/local/bin. Please add it."
193 if test "x$rh_missing_usr_local_lib" = xyes; then
194 echo "Problem: /etc/ld.so.conf missing /usr/local/lib"
195 echo "Description: Your /etc/ld.so.conf file does not appear to contain"
196 echo " the directory /usr/local/lib. Please add it."
199 if test "x$rh_missing_usr_x11" = xyes; then
200 echo "Problem: Missing /usr/X11 symbolic link."
201 echo "Description: Your system is missing a symbolic link from"
202 echo " /usr/X11R6 to /usr/X11. Please create one."
205 if test "x$rh_missing_usr_include_x11" = xyes; then
206 echo "Problem: Missing /usr/include/X11 symbolic link."
207 echo "Description: Your system is missing a symbolic link from"
208 echo " /usr/X11R6/include/X11 to /usr/include/X11."
209 echo " Please create one."
212 if test "x$rh_missing_lib_cpp" = xyes; then
213 echo "Problem: Missing /lib/cpp symbolic link."
214 echo "Description: Your system is missing a symbolic link from the"
215 echo " cpp (C preprocessor) program to /lib/cpp."
216 echo " Please create one."
219 if test "x$bugs_found" = xyes; then
220 AC_MSG_ERROR([One or more of the problems above can potentially
221 cause Window Maker not to install or run properly. Please resolve
222 the problems and try to run configure again.])
224 elif test "x$mins_found" = xyes; then
225 AC_MSG_WARN([The problems above may or may not cause Window Maker
226 not to install or run properly. If you have any problems during
227 installation or execution, please resolve the problems and try to
228 install Window Maker again.])
233 echo "You appear to have a system packaged by Red Hat, but I could"
234 echo "not find any Red-Hat-specific problems that I know about."
241 # Do all the work for Automake. This macro actually does too much --
242 # some checks are only needed if your package does certain things.
243 # But this isn't really a big deal.
248 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
250 AC_DEFUN(AM_INIT_AUTOMAKE,
251 [AC_REQUIRE([AC_PROG_INSTALL])
256 dnl test to see if srcdir already configured
257 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
258 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
261 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
262 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
263 AC_REQUIRE([AM_SANITY_CHECK])
264 AC_REQUIRE([AC_ARG_PROGRAM])
265 dnl FIXME This is truly gross.
266 missing_dir=`cd $ac_aux_dir && pwd`
267 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
268 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
269 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
270 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
271 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
272 AC_REQUIRE([AC_PROG_MAKE_SET])])
275 # Check to make sure that the build environment is sane.
278 AC_DEFUN(AM_SANITY_CHECK,
279 [AC_MSG_CHECKING([whether build environment is sane])
282 echo timestamp > conftestfile
283 # Do `set' in a subshell so we don't clobber the current shell's
284 # arguments. Must try -L first in case configure is actually a
285 # symlink; some systems play weird games with the mod time of symlinks
286 # (eg FreeBSD returns the mod time of the symlink's containing
289 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
290 if test "[$]*" = "X"; then
292 set X `ls -t $srcdir/configure conftestfile`
294 if test "[$]*" != "X $srcdir/configure conftestfile" \
295 && test "[$]*" != "X conftestfile $srcdir/configure"; then
297 # If neither matched, then we have a broken ls. This can happen
298 # if, for instance, CONFIG_SHELL is bash and it inherits a
299 # broken ls alias from the environment. This has actually
300 # happened. Such a system could not be considered "sane".
301 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
302 alias in your environment])
305 test "[$]2" = conftestfile
311 AC_MSG_ERROR([newly created file is older than distributed files!
312 Check your system clock])
317 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
318 dnl The program must properly implement --version.
319 AC_DEFUN(AM_MISSING_PROG,
320 [AC_MSG_CHECKING(for working $2)
321 # Run test in a subshell; some versions of sh will print an error if
322 # an executable is not found, even if stderr is redirected.
323 # Redirect stdin to placate older versions of autoconf. Sigh.
324 if ($2 --version) < /dev/null > /dev/null 2>&1; then
329 AC_MSG_RESULT(missing)
334 # serial 40 AC_PROG_LIBTOOL
335 AC_DEFUN(AC_PROG_LIBTOOL,
336 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
338 # Save cache, so that ltconfig can load it
341 # Actually configure libtool. ac_aux_dir is where install-sh is found.
342 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
343 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
344 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
345 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
346 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
347 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
348 || AC_MSG_ERROR([libtool configure failed])
350 # Reload cache, that may have been modified by ltconfig
353 # This can be used to rebuild libtool when needed
354 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
356 # Always use our own libtool.
357 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
360 # Redirect the config.log output again, so that the ltconfig log is not
361 # clobbered by the next message.
365 AC_DEFUN(AC_LIBTOOL_SETUP,
367 AC_REQUIRE([AC_ENABLE_SHARED])dnl
368 AC_REQUIRE([AC_ENABLE_STATIC])dnl
369 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
370 AC_REQUIRE([AC_CANONICAL_HOST])dnl
371 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
372 AC_REQUIRE([AC_PROG_RANLIB])dnl
373 AC_REQUIRE([AC_PROG_CC])dnl
374 AC_REQUIRE([AC_PROG_LD])dnl
375 AC_REQUIRE([AC_PROG_NM])dnl
376 AC_REQUIRE([AC_PROG_LN_S])dnl
379 # Check for any special flags to pass to ltconfig.
380 libtool_flags="--cache-file=$cache_file"
381 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
382 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
383 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
384 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
385 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
386 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
387 [libtool_flags="$libtool_flags --enable-dlopen"])
388 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
389 [libtool_flags="$libtool_flags --enable-win32-dll"])
390 AC_ARG_ENABLE(libtool-lock,
391 [ --disable-libtool-lock avoid locking (might break parallel builds)])
392 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
393 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
395 # Some flags need to be propagated to the compiler or linker for good
399 # Find out which ABI we are using.
400 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
401 if AC_TRY_EVAL(ac_compile); then
402 case "`/usr/bin/file conftest.o`" in
418 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
419 SAVE_CFLAGS="$CFLAGS"
420 CFLAGS="$CFLAGS -belf"
421 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
422 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
423 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
424 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
425 CFLAGS="$SAVE_CFLAGS"
429 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
430 [*-*-cygwin* | *-*-mingw*)
431 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
432 AC_CHECK_TOOL(AS, as, false)
433 AC_CHECK_TOOL(OBJDUMP, objdump, false)
439 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
440 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
442 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
443 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
445 # AC_ENABLE_SHARED - implement the --enable-shared flag
446 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
447 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
449 AC_DEFUN(AC_ENABLE_SHARED, [dnl
450 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
451 AC_ARG_ENABLE(shared,
452 changequote(<<, >>)dnl
453 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
455 [p=${PACKAGE-default}
457 yes) enable_shared=yes ;;
458 no) enable_shared=no ;;
461 # Look at the argument we got. We use all the common list separators.
462 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
463 for pkg in $enableval; do
464 if test "X$pkg" = "X$p"; then
471 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
474 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
475 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
476 AC_ENABLE_SHARED(no)])
478 # AC_ENABLE_STATIC - implement the --enable-static flag
479 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
480 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
482 AC_DEFUN(AC_ENABLE_STATIC, [dnl
483 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
484 AC_ARG_ENABLE(static,
485 changequote(<<, >>)dnl
486 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
488 [p=${PACKAGE-default}
490 yes) enable_static=yes ;;
491 no) enable_static=no ;;
494 # Look at the argument we got. We use all the common list separators.
495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
496 for pkg in $enableval; do
497 if test "X$pkg" = "X$p"; then
504 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
507 # AC_DISABLE_STATIC - set the default static flag to --disable-static
508 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
509 AC_ENABLE_STATIC(no)])
512 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
513 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
514 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
516 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
517 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
518 AC_ARG_ENABLE(fast-install,
519 changequote(<<, >>)dnl
520 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
522 [p=${PACKAGE-default}
524 yes) enable_fast_install=yes ;;
525 no) enable_fast_install=no ;;
527 enable_fast_install=no
528 # Look at the argument we got. We use all the common list separators.
529 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
530 for pkg in $enableval; do
531 if test "X$pkg" = "X$p"; then
532 enable_fast_install=yes
538 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
541 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
542 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
543 AC_ENABLE_FAST_INSTALL(no)])
545 # AC_PROG_LD - find the path to the GNU or non-GNU linker
548 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
549 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
550 AC_REQUIRE([AC_PROG_CC])dnl
551 AC_REQUIRE([AC_CANONICAL_HOST])dnl
552 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
554 if test "$ac_cv_prog_gcc" = yes; then
555 # Check if gcc -print-prog-name=ld gives a path.
556 AC_MSG_CHECKING([for ld used by GCC])
557 ac_prog=`($CC -print-prog-name=ld) 2>&5`
559 # Accept absolute paths.
561 [\\/]* | [A-Za-z]:[\\/]*)
562 re_direlt='/[^/][^/]*/\.\./'
564 # Canonicalize the path of ld
565 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
566 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
567 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
569 test -z "$LD" && LD="$ac_prog"
572 # If it fails, then pretend we aren't using GCC.
576 # If it is relative, then search for the first ld in PATH.
580 elif test "$with_gnu_ld" = yes; then
581 AC_MSG_CHECKING([for GNU ld])
583 AC_MSG_CHECKING([for non-GNU ld])
585 AC_CACHE_VAL(ac_cv_path_LD,
586 [if test -z "$LD"; then
587 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
588 for ac_dir in $PATH; do
589 test -z "$ac_dir" && ac_dir=.
590 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
591 ac_cv_path_LD="$ac_dir/$ac_prog"
592 # Check to see if the program is GNU ld. I'd rather use --version,
593 # but apparently some GNU ld's only accept -v.
594 # Break only if it was the GNU/non-GNU ld that we prefer.
595 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
596 test "$with_gnu_ld" != no && break
598 test "$with_gnu_ld" != yes && break
604 ac_cv_path_LD="$LD" # Let the user override the test with a path.
607 if test -n "$LD"; then
612 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
617 AC_DEFUN(AC_PROG_LD_GNU,
618 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
619 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
620 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
621 ac_cv_prog_gnu_ld=yes
627 # AC_PROG_NM - find the path to a BSD-compatible name lister
629 [AC_MSG_CHECKING([for BSD-compatible nm])
630 AC_CACHE_VAL(ac_cv_path_NM,
631 [if test -n "$NM"; then
632 # Let the user override the test.
635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
636 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
637 test -z "$ac_dir" && ac_dir=.
638 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
639 # Check to see if the nm accepts a BSD-compat flag.
640 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
641 # nm: unknown option "B" ignored
642 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
643 ac_cv_path_NM="$ac_dir/nm -B"
645 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
646 ac_cv_path_NM="$ac_dir/nm -p"
649 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
650 continue # so that we can try to find one that supports BSD flags
655 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
662 # AC_CHECK_LIBM - check for math library
663 AC_DEFUN(AC_CHECK_LIBM,
664 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
667 *-*-beos* | *-*-cygwin*)
668 # These system don't have libm
671 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
672 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
675 AC_CHECK_LIB(m, main, LIBM="-lm")
680 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
681 # the libltdl convenience library, adds --enable-ltdl-convenience to
682 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
683 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
684 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
685 # '${top_builddir}/' (note the single quotes!) if your package is not
686 # flat, and, if you're not using automake, define top_builddir as
687 # appropriate in the Makefiles.
688 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
689 case "$enable_ltdl_convenience" in
690 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
691 "") enable_ltdl_convenience=yes
692 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
694 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
695 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
698 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
699 # the libltdl installable library, and adds --enable-ltdl-install to
700 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
701 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
702 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
703 # '${top_builddir}/' (note the single quotes!) if your package is not
704 # flat, and, if you're not using automake, define top_builddir as
705 # appropriate in the Makefiles.
706 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
707 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
708 AC_CHECK_LIB(ltdl, main,
709 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
710 [if test x"$enable_ltdl_install" = xno; then
711 AC_MSG_WARN([libltdl not installed, but installation disabled])
713 enable_ltdl_install=yes
716 if test x"$enable_ltdl_install" = x"yes"; then
717 ac_configure_args="$ac_configure_args --enable-ltdl-install"
718 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
719 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
721 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
728 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
729 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
730 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
731 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
732 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
733 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
734 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
736 dnl This is just to silence aclocal about the macro not being used
737 ifelse([AC_DISABLE_FAST_INSTALL])dnl
739 # Like AC_CONFIG_HEADER, but automatically create stamp file.
741 AC_DEFUN(AM_CONFIG_HEADER,
743 AC_CONFIG_HEADER([$1])
744 dnl When config.status generates a header, we must update the stamp-h file.
745 dnl This file resides in the same directory as the config header
746 dnl that is generated. We must strip everything past the first ":",
747 dnl and everything past the last "/".
748 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
749 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
750 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
752 for am_file in <<$1>>; do
753 case " <<$>>CONFIG_HEADERS " in
754 *" <<$>>am_file "*<<)>>
755 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
758 am_indx=`expr "<<$>>am_indx" + 1`