Annotation of XML/aclocal.m4, revision 1.8
1.1 veillard 1: dnl aclocal.m4 generated automatically by aclocal 1.4
2:
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.
7:
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.
12:
13: dnl Like AC_TRY_EVAL but also errors out if the compiler generates
14: dnl _any_ output. Some compilers might issue warnings which we want
15: dnl to catch.
16: AC_DEFUN(AC_TRY_EVAL2,
17: [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
18: (eval [$]$1) 2>&AC_FD_CC; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }])
19:
20: dnl Like AC_TRY_COMPILE but calls AC_TRY_EVAL2 instead of AC_TRY_EVAL
21: AC_DEFUN(AC_TRY_COMPILE2,
22: [cat > conftest.$ac_ext <<EOF
23: [#]line __oline__ "configure"
24: #include "confdefs.h"
25: [$1]
26: int main() {
27: [$2]
28: ; return 0; }
29: EOF
30: if AC_TRY_EVAL2(ac_compile); then
31: ifelse([$3], , :, [rm -rf conftest*
32: $3])
33: else
34: echo "configure: failed program was:" >&AC_FD_CC
35: cat conftest.$ac_ext >&AC_FD_CC
36: ifelse([$4], , , [ rm -rf conftest*
37: $4
38: ])dnl
39: fi
40: rm -f conftest*])
41:
42: # Like AC_CONFIG_HEADER, but automatically create stamp file.
43:
44: AC_DEFUN(AM_CONFIG_HEADER,
45: [AC_PREREQ([2.12])
46: AC_CONFIG_HEADER([$1])
47: dnl When config.status generates a header, we must update the stamp-h file.
48: dnl This file resides in the same directory as the config header
49: dnl that is generated. We must strip everything past the first ":",
50: dnl and everything past the last "/".
51: AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
52: ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
53: <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
54: <<am_indx=1
55: for am_file in <<$1>>; do
56: case " <<$>>CONFIG_HEADERS " in
57: *" <<$>>am_file "*<<)>>
58: echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
59: ;;
60: esac
61: am_indx=`expr "<<$>>am_indx" + 1`
62: done<<>>dnl>>)
63: changequote([,]))])
64:
65: # Do all the work for Automake. This macro actually does too much --
66: # some checks are only needed if your package does certain things.
67: # But this isn't really a big deal.
68:
69: # serial 1
70:
71: dnl Usage:
72: dnl AM_INIT_AUTOMAKE(package,version, [no-define])
73:
74: AC_DEFUN(AM_INIT_AUTOMAKE,
75: [AC_REQUIRE([AC_PROG_INSTALL])
76: PACKAGE=[$1]
77: AC_SUBST(PACKAGE)
78: VERSION=[$2]
79: AC_SUBST(VERSION)
80: dnl test to see if srcdir already configured
81: if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
82: AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
83: fi
84: ifelse([$3],,
85: AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
86: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
87: AC_REQUIRE([AM_SANITY_CHECK])
88: AC_REQUIRE([AC_ARG_PROGRAM])
89: dnl FIXME This is truly gross.
90: missing_dir=`cd $ac_aux_dir && pwd`
91: AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
92: AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
93: AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
94: AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
95: AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
96: AC_REQUIRE([AC_PROG_MAKE_SET])])
97:
98: #
99: # Check to make sure that the build environment is sane.
100: #
101:
102: AC_DEFUN(AM_SANITY_CHECK,
103: [AC_MSG_CHECKING([whether build environment is sane])
104: # Just in case
105: sleep 1
106: echo timestamp > conftestfile
107: # Do `set' in a subshell so we don't clobber the current shell's
108: # arguments. Must try -L first in case configure is actually a
109: # symlink; some systems play weird games with the mod time of symlinks
110: # (eg FreeBSD returns the mod time of the symlink's containing
111: # directory).
112: if (
113: set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
114: if test "[$]*" = "X"; then
115: # -L didn't work.
116: set X `ls -t $srcdir/configure conftestfile`
117: fi
118: if test "[$]*" != "X $srcdir/configure conftestfile" \
119: && test "[$]*" != "X conftestfile $srcdir/configure"; then
120:
121: # If neither matched, then we have a broken ls. This can happen
122: # if, for instance, CONFIG_SHELL is bash and it inherits a
123: # broken ls alias from the environment. This has actually
124: # happened. Such a system could not be considered "sane".
125: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
126: alias in your environment])
127: fi
128:
129: test "[$]2" = conftestfile
130: )
131: then
132: # Ok.
133: :
134: else
135: AC_MSG_ERROR([newly created file is older than distributed files!
136: Check your system clock])
137: fi
138: rm -f conftest*
139: AC_MSG_RESULT(yes)])
140:
141: dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
142: dnl The program must properly implement --version.
143: AC_DEFUN(AM_MISSING_PROG,
144: [AC_MSG_CHECKING(for working $2)
145: # Run test in a subshell; some versions of sh will print an error if
146: # an executable is not found, even if stderr is redirected.
147: # Redirect stdin to placate older versions of autoconf. Sigh.
148: if ($2 --version) < /dev/null > /dev/null 2>&1; then
149: $1=$2
150: AC_MSG_RESULT(found)
151: else
152: $1="$3/missing $2"
153: AC_MSG_RESULT(missing)
154: fi
155: AC_SUBST($1)])
156:
157:
158: # serial 1
159:
160: AC_DEFUN(AM_C_PROTOTYPES,
161: [AC_REQUIRE([AM_PROG_CC_STDC])
162: AC_REQUIRE([AC_PROG_CPP])
163: AC_MSG_CHECKING([for function prototypes])
164: if test "$am_cv_prog_cc_stdc" != no; then
165: AC_MSG_RESULT(yes)
166: AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
167: U= ANSI2KNR=
168: else
169: AC_MSG_RESULT(no)
170: U=_ ANSI2KNR=./ansi2knr
171: # Ensure some checks needed by ansi2knr itself.
172: AC_HEADER_STDC
173: AC_CHECK_HEADERS(string.h)
174: fi
175: AC_SUBST(U)dnl
176: AC_SUBST(ANSI2KNR)dnl
177: ])
178:
179:
180: # serial 1
181:
182: # @defmac AC_PROG_CC_STDC
183: # @maindex PROG_CC_STDC
184: # @ovindex CC
185: # If the C compiler in not in ANSI C mode by default, try to add an option
186: # to output variable @code{CC} to make it so. This macro tries various
187: # options that select ANSI C on some system or another. It considers the
188: # compiler to be in ANSI C mode if it handles function prototypes correctly.
189: #
190: # If you use this macro, you should check after calling it whether the C
191: # compiler has been set to accept ANSI C; if not, the shell variable
192: # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
193: # code in ANSI C, you can make an un-ANSIfied copy of it by using the
194: # program @code{ansi2knr}, which comes with Ghostscript.
195: # @end defmac
196:
197: AC_DEFUN(AM_PROG_CC_STDC,
198: [AC_REQUIRE([AC_PROG_CC])
199: AC_BEFORE([$0], [AC_C_INLINE])
200: AC_BEFORE([$0], [AC_C_CONST])
201: dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
202: dnl a magic option to avoid problems with ANSI preprocessor commands
203: dnl like #elif.
204: dnl FIXME: can't do this because then AC_AIX won't work due to a
205: dnl circular dependency.
206: dnl AC_BEFORE([$0], [AC_PROG_CPP])
207: AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
208: AC_CACHE_VAL(am_cv_prog_cc_stdc,
209: [am_cv_prog_cc_stdc=no
210: ac_save_CC="$CC"
211: # Don't try gcc -ansi; that turns off useful extensions and
212: # breaks some systems' header files.
213: # AIX -qlanglvl=ansi
214: # Ultrix and OSF/1 -std1
215: # HP-UX -Aa -D_HPUX_SOURCE
216: # SVR4 -Xc -D__EXTENSIONS__
217: for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
218: do
219: CC="$ac_save_CC $ac_arg"
220: AC_TRY_COMPILE(
221: [#include <stdarg.h>
222: #include <stdio.h>
223: #include <sys/types.h>
224: #include <sys/stat.h>
225: /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
226: struct buf { int x; };
227: FILE * (*rcsopen) (struct buf *, struct stat *, int);
228: static char *e (p, i)
229: char **p;
230: int i;
231: {
232: return p[i];
233: }
234: static char *f (char * (*g) (char **, int), char **p, ...)
235: {
236: char *s;
237: va_list v;
238: va_start (v,p);
239: s = g (p, va_arg (v,int));
240: va_end (v);
241: return s;
242: }
243: int test (int i, double x);
244: struct s1 {int (*f) (int a);};
245: struct s2 {int (*f) (double a);};
246: int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
247: int argc;
248: char **argv;
249: ], [
250: return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
251: ],
252: [am_cv_prog_cc_stdc="$ac_arg"; break])
253: done
254: CC="$ac_save_CC"
255: ])
256: if test -z "$am_cv_prog_cc_stdc"; then
257: AC_MSG_RESULT([none needed])
258: else
259: AC_MSG_RESULT($am_cv_prog_cc_stdc)
260: fi
261: case "x$am_cv_prog_cc_stdc" in
262: x|xno) ;;
263: *) CC="$CC $am_cv_prog_cc_stdc" ;;
264: esac
265: ])
266:
267:
268: # serial 40 AC_PROG_LIBTOOL
269: AC_DEFUN(AC_PROG_LIBTOOL,
270: [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
271:
272: # Save cache, so that ltconfig can load it
273: AC_CACHE_SAVE
274:
275: # Actually configure libtool. ac_aux_dir is where install-sh is found.
276: CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
277: LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
278: LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
279: DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
280: ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
281: $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
282: || AC_MSG_ERROR([libtool configure failed])
283:
284: # Reload cache, that may have been modified by ltconfig
285: AC_CACHE_LOAD
286:
287: # This can be used to rebuild libtool when needed
288: LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
289:
290: # Always use our own libtool.
291: LIBTOOL='$(SHELL) $(top_builddir)/libtool'
292: AC_SUBST(LIBTOOL)dnl
293:
294: # Redirect the config.log output again, so that the ltconfig log is not
295: # clobbered by the next message.
296: exec 5>>./config.log
297: ])
298:
299: AC_DEFUN(AC_LIBTOOL_SETUP,
300: [AC_PREREQ(2.13)dnl
301: AC_REQUIRE([AC_ENABLE_SHARED])dnl
302: AC_REQUIRE([AC_ENABLE_STATIC])dnl
303: AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
304: AC_REQUIRE([AC_CANONICAL_HOST])dnl
305: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
306: AC_REQUIRE([AC_PROG_RANLIB])dnl
307: AC_REQUIRE([AC_PROG_CC])dnl
308: AC_REQUIRE([AC_PROG_LD])dnl
309: AC_REQUIRE([AC_PROG_NM])dnl
310: AC_REQUIRE([AC_PROG_LN_S])dnl
311: dnl
312:
313: case "$target" in
314: NONE) lt_target="$host" ;;
315: *) lt_target="$target" ;;
316: esac
317:
318: # Check for any special flags to pass to ltconfig.
319: #
320: # the following will cause an existing older ltconfig to fail, so
321: # we ignore this at the expense of the cache file... Checking this
322: # will just take longer ... bummer!
323: #libtool_flags="--cache-file=$cache_file"
324: #
325: test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
326: test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
327: test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
328: test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
329: test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
330: ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
331: [libtool_flags="$libtool_flags --enable-dlopen"])
332: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
333: [libtool_flags="$libtool_flags --enable-win32-dll"])
334: AC_ARG_ENABLE(libtool-lock,
335: [ --disable-libtool-lock avoid locking (might break parallel builds)])
336: test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
337: test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
338:
339: # Some flags need to be propagated to the compiler or linker for good
340: # libtool support.
341: case "$lt_target" in
342: *-*-irix6*)
343: # Find out which ABI we are using.
344: echo '[#]line __oline__ "configure"' > conftest.$ac_ext
345: if AC_TRY_EVAL(ac_compile); then
346: case "`/usr/bin/file conftest.o`" in
347: *32-bit*)
348: LD="${LD-ld} -32"
349: ;;
350: *N32*)
351: LD="${LD-ld} -n32"
352: ;;
353: *64-bit*)
354: LD="${LD-ld} -64"
355: ;;
356: esac
357: fi
358: rm -rf conftest*
359: ;;
360:
361: *-*-sco3.2v5*)
362: # On SCO OpenServer 5, we need -belf to get full-featured binaries.
363: SAVE_CFLAGS="$CFLAGS"
364: CFLAGS="$CFLAGS -belf"
365: AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
366: [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
367: if test x"$lt_cv_cc_needs_belf" != x"yes"; then
368: # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
369: CFLAGS="$SAVE_CFLAGS"
370: fi
371: ;;
372:
373: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
374: [*-*-cygwin* | *-*-mingw*)
375: AC_CHECK_TOOL(DLLTOOL, dlltool, false)
376: AC_CHECK_TOOL(AS, as, false)
377: AC_CHECK_TOOL(OBJDUMP, objdump, false)
378: ;;
379: ])
380: esac
381: ])
382:
383: # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
384: AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
385:
386: # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
387: AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
388:
389: # AC_ENABLE_SHARED - implement the --enable-shared flag
390: # Usage: AC_ENABLE_SHARED[(DEFAULT)]
391: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
392: # `yes'.
393: AC_DEFUN(AC_ENABLE_SHARED, [dnl
394: define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
395: AC_ARG_ENABLE(shared,
396: changequote(<<, >>)dnl
397: << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
398: changequote([, ])dnl
399: [p=${PACKAGE-default}
400: case "$enableval" in
401: yes) enable_shared=yes ;;
402: no) enable_shared=no ;;
403: *)
404: enable_shared=no
405: # Look at the argument we got. We use all the common list separators.
406: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
407: for pkg in $enableval; do
408: if test "X$pkg" = "X$p"; then
409: enable_shared=yes
410: fi
411: done
412: IFS="$ac_save_ifs"
413: ;;
414: esac],
415: enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
416: ])
417:
418: # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
419: AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
420: AC_ENABLE_SHARED(no)])
421:
422: # AC_ENABLE_STATIC - implement the --enable-static flag
423: # Usage: AC_ENABLE_STATIC[(DEFAULT)]
424: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
425: # `yes'.
426: AC_DEFUN(AC_ENABLE_STATIC, [dnl
427: define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
428: AC_ARG_ENABLE(static,
429: changequote(<<, >>)dnl
430: << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
431: changequote([, ])dnl
432: [p=${PACKAGE-default}
433: case "$enableval" in
434: yes) enable_static=yes ;;
435: no) enable_static=no ;;
436: *)
437: enable_static=no
438: # Look at the argument we got. We use all the common list separators.
439: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
440: for pkg in $enableval; do
441: if test "X$pkg" = "X$p"; then
442: enable_static=yes
443: fi
444: done
445: IFS="$ac_save_ifs"
446: ;;
447: esac],
448: enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
449: ])
450:
451: # AC_DISABLE_STATIC - set the default static flag to --disable-static
452: AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
453: AC_ENABLE_STATIC(no)])
454:
455:
456: # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
457: # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
458: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
459: # `yes'.
460: AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
461: define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
462: AC_ARG_ENABLE(fast-install,
463: changequote(<<, >>)dnl
464: << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
465: changequote([, ])dnl
466: [p=${PACKAGE-default}
467: case "$enableval" in
468: yes) enable_fast_install=yes ;;
469: no) enable_fast_install=no ;;
470: *)
471: enable_fast_install=no
472: # Look at the argument we got. We use all the common list separators.
473: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
474: for pkg in $enableval; do
475: if test "X$pkg" = "X$p"; then
476: enable_fast_install=yes
477: fi
478: done
479: IFS="$ac_save_ifs"
480: ;;
481: esac],
482: enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
483: ])
484:
485: # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
486: AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
487: AC_ENABLE_FAST_INSTALL(no)])
488:
489: # AC_PROG_LD - find the path to the GNU or non-GNU linker
490: AC_DEFUN(AC_PROG_LD,
491: [AC_ARG_WITH(gnu-ld,
492: [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
493: test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
494: AC_REQUIRE([AC_PROG_CC])dnl
495: AC_REQUIRE([AC_CANONICAL_HOST])dnl
496: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
497: ac_prog=ld
498: if test "$ac_cv_prog_gcc" = yes; then
499: # Check if gcc -print-prog-name=ld gives a path.
500: AC_MSG_CHECKING([for ld used by GCC])
501: ac_prog=`($CC -print-prog-name=ld) 2>&5`
502: case "$ac_prog" in
503: # Accept absolute paths.
504: changequote(,)dnl
505: [\\/]* | [A-Za-z]:[\\/]*)
506: re_direlt='/[^/][^/]*/\.\./'
507: changequote([,])dnl
508: # Canonicalize the path of ld
509: ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
510: while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
511: ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
512: done
513: test -z "$LD" && LD="$ac_prog"
514: ;;
515: "")
516: # If it fails, then pretend we aren't using GCC.
517: ac_prog=ld
518: ;;
519: *)
520: # If it is relative, then search for the first ld in PATH.
521: with_gnu_ld=unknown
522: ;;
523: esac
524: elif test "$with_gnu_ld" = yes; then
525: AC_MSG_CHECKING([for GNU ld])
526: else
527: AC_MSG_CHECKING([for non-GNU ld])
528: fi
529: AC_CACHE_VAL(ac_cv_path_LD,
530: [if test -z "$LD"; then
531: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
532: for ac_dir in $PATH; do
533: test -z "$ac_dir" && ac_dir=.
534: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
535: ac_cv_path_LD="$ac_dir/$ac_prog"
536: # Check to see if the program is GNU ld. I'd rather use --version,
537: # but apparently some GNU ld's only accept -v.
538: # Break only if it was the GNU/non-GNU ld that we prefer.
539: if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
540: test "$with_gnu_ld" != no && break
541: else
542: test "$with_gnu_ld" != yes && break
543: fi
544: fi
545: done
546: IFS="$ac_save_ifs"
547: else
548: ac_cv_path_LD="$LD" # Let the user override the test with a path.
549: fi])
550: LD="$ac_cv_path_LD"
551: if test -n "$LD"; then
552: AC_MSG_RESULT($LD)
553: else
554: AC_MSG_RESULT(no)
555: fi
556: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
557: AC_PROG_LD_GNU
558: ])
559:
560: AC_DEFUN(AC_PROG_LD_GNU,
561: [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
562: [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
563: if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
564: ac_cv_prog_gnu_ld=yes
565: else
566: ac_cv_prog_gnu_ld=no
567: fi])
568: ])
569:
570: # AC_PROG_NM - find the path to a BSD-compatible name lister
571: AC_DEFUN(AC_PROG_NM,
572: [AC_MSG_CHECKING([for BSD-compatible nm])
573: AC_CACHE_VAL(ac_cv_path_NM,
574: [if test -n "$NM"; then
575: # Let the user override the test.
576: ac_cv_path_NM="$NM"
577: else
578: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
579: for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
580: test -z "$ac_dir" && ac_dir=.
581: if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
582: # Check to see if the nm accepts a BSD-compat flag.
583: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
584: # nm: unknown option "B" ignored
585: if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
586: ac_cv_path_NM="$ac_dir/nm -B"
587: break
588: elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
589: ac_cv_path_NM="$ac_dir/nm -p"
590: break
591: else
592: ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
593: continue # so that we can try to find one that supports BSD flags
594: fi
595: fi
596: done
597: IFS="$ac_save_ifs"
598: test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
599: fi])
600: NM="$ac_cv_path_NM"
601: AC_MSG_RESULT([$NM])
602: ])
603:
604: # AC_CHECK_LIBM - check for math library
605: AC_DEFUN(AC_CHECK_LIBM,
606: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
607: LIBM=
608: case "$lt_target" in
609: *-*-beos* | *-*-cygwin*)
610: # These system don't have libm
611: ;;
612: *-ncr-sysv4.3*)
613: AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
614: AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
615: ;;
616: *)
617: AC_CHECK_LIB(m, main, LIBM="-lm")
618: ;;
619: esac
620: ])
621:
622: # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
1.8 ! veillard 623: # the libltdl convenience library and INCLTDL to the include flags for
! 624: # the libltdl header and adds --enable-ltdl-convenience to the
! 625: # configure arguments. Note that LIBLTDL and INCLTDL are not
! 626: # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
! 627: # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
! 628: # with '${top_builddir}/' and INCLTDL will be prefixed with
! 629: # '${top_srcdir}/' (note the single quotes!). If your package is not
! 630: # flat and you're not using automake, define top_builddir and
! 631: # top_srcdir appropriately in the Makefiles.
1.1 veillard 632: AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
633: case "$enable_ltdl_convenience" in
634: no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
635: "") enable_ltdl_convenience=yes
636: ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
637: esac
1.8 ! veillard 638: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
! 639: INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
1.1 veillard 640: ])
641:
642: # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
1.8 ! veillard 643: # the libltdl installable library and INCLTDL to the include flags for
! 644: # the libltdl header and adds --enable-ltdl-install to the configure
! 645: # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
! 646: # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
! 647: # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
! 648: # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
! 649: # with '${top_srcdir}/' (note the single quotes!). If your package is
! 650: # not flat and you're not using automake, define top_builddir and
! 651: # top_srcdir appropriately in the Makefiles.
1.1 veillard 652: # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
653: AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
654: AC_CHECK_LIB(ltdl, main,
655: [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
656: [if test x"$enable_ltdl_install" = xno; then
657: AC_MSG_WARN([libltdl not installed, but installation disabled])
658: else
659: enable_ltdl_install=yes
660: fi
661: ])
662: if test x"$enable_ltdl_install" = x"yes"; then
663: ac_configure_args="$ac_configure_args --enable-ltdl-install"
1.8 ! veillard 664: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
! 665: INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
1.1 veillard 666: else
667: ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
668: LIBLTDL="-lltdl"
669: INCLTDL=
670: fi
671: ])
672:
673: dnl old names
674: AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
675: AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
676: AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
677: AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
678: AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
679: AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
680: AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
681:
682: dnl This is just to silence aclocal about the macro not being used
683: ifelse([AC_DISABLE_FAST_INSTALL])dnl
684:
685: # Add --enable-maintainer-mode option to configure.
686: # From Jim Meyering
687:
688: # serial 1
689:
690: AC_DEFUN(AM_MAINTAINER_MODE,
691: [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
692: dnl maintainer-mode is disabled by default
693: AC_ARG_ENABLE(maintainer-mode,
694: [ --enable-maintainer-mode enable make rules and dependencies not useful
695: (and sometimes confusing) to the casual installer],
696: USE_MAINTAINER_MODE=$enableval,
697: USE_MAINTAINER_MODE=no)
698: AC_MSG_RESULT($USE_MAINTAINER_MODE)
699: AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
700: MAINT=$MAINTAINER_MODE_TRUE
701: AC_SUBST(MAINT)dnl
702: ]
703: )
704:
705: # Define a conditional.
706:
707: AC_DEFUN(AM_CONDITIONAL,
708: [AC_SUBST($1_TRUE)
709: AC_SUBST($1_FALSE)
710: if $2; then
711: $1_TRUE=
712: $1_FALSE='#'
713: else
714: $1_TRUE='#'
715: $1_FALSE=
716: fi])
717:
Webmaster