Annotation of parser3/aclocal.m4, revision 1.37
1.23 paf 1: # generated automatically by aclocal 1.7.2 -*- Autoconf -*-
1.1 paf 2:
1.23 paf 3: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4: # Free Software Foundation, Inc.
5: # This file is free software; the Free Software Foundation
6: # gives unlimited permission to copy and/or distribute it,
7: # with or without modifications, as long as this notice is preserved.
8:
9: # This program is distributed in the hope that it will be useful,
10: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12: # PARTICULAR PURPOSE.
1.1 paf 13:
14:
1.25 paf 15: AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
16: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.a
17: INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
18: ])
19:
20:
21:
22: # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
23:
24: # serial 46 AC_PROG_LIBTOOL
25:
26: AC_DEFUN([AC_PROG_LIBTOOL],
27: [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
28:
29: # This can be used to rebuild libtool when needed
30: LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
31:
32: # Always use our own libtool.
33: LIBTOOL='$(SHELL) $(top_builddir)/libtool'
34: AC_SUBST(LIBTOOL)dnl
35:
36: # Prevent multiple expansion
37: define([AC_PROG_LIBTOOL], [])
38: ])
39:
40: AC_DEFUN([AC_LIBTOOL_SETUP],
41: [AC_PREREQ(2.13)dnl
42: AC_REQUIRE([AC_ENABLE_SHARED])dnl
43: AC_REQUIRE([AC_ENABLE_STATIC])dnl
44: AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
45: AC_REQUIRE([AC_CANONICAL_HOST])dnl
46: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
47: AC_REQUIRE([AC_PROG_CC])dnl
48: AC_REQUIRE([AC_PROG_LD])dnl
49: AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
50: AC_REQUIRE([AC_PROG_NM])dnl
51: AC_REQUIRE([LT_AC_PROG_SED])dnl
52:
53: AC_REQUIRE([AC_PROG_LN_S])dnl
54: AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
55: AC_REQUIRE([AC_OBJEXT])dnl
56: AC_REQUIRE([AC_EXEEXT])dnl
57: dnl
58:
59: _LT_AC_PROG_ECHO_BACKSLASH
60: # Only perform the check for file, if the check method requires it
61: case $deplibs_check_method in
62: file_magic*)
63: if test "$file_magic_cmd" = '$MAGIC_CMD'; then
64: AC_PATH_MAGIC
65: fi
66: ;;
67: esac
68:
69: AC_CHECK_TOOL(RANLIB, ranlib, :)
70: AC_CHECK_TOOL(STRIP, strip, :)
71:
72: ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
73: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
74: enable_win32_dll=yes, enable_win32_dll=no)
75:
76: AC_ARG_ENABLE(libtool-lock,
77: [ --disable-libtool-lock avoid locking (might break parallel builds)])
78: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
79:
80: # Some flags need to be propagated to the compiler or linker for good
81: # libtool support.
82: case $host in
83: *-*-irix6*)
84: # Find out which ABI we are using.
85: echo '[#]line __oline__ "configure"' > conftest.$ac_ext
86: if AC_TRY_EVAL(ac_compile); then
87: case `/usr/bin/file conftest.$ac_objext` in
88: *32-bit*)
89: LD="${LD-ld} -32"
90: ;;
91: *N32*)
92: LD="${LD-ld} -n32"
93: ;;
94: *64-bit*)
95: LD="${LD-ld} -64"
96: ;;
97: esac
98: fi
99: rm -rf conftest*
100: ;;
101:
102: *-*-sco3.2v5*)
103: # On SCO OpenServer 5, we need -belf to get full-featured binaries.
104: SAVE_CFLAGS="$CFLAGS"
105: CFLAGS="$CFLAGS -belf"
106: AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
107: [AC_LANG_SAVE
108: AC_LANG_C
109: AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
110: AC_LANG_RESTORE])
111: if test x"$lt_cv_cc_needs_belf" != x"yes"; then
112: # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
113: CFLAGS="$SAVE_CFLAGS"
114: fi
115: ;;
116:
117: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
118: [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
119: AC_CHECK_TOOL(DLLTOOL, dlltool, false)
120: AC_CHECK_TOOL(AS, as, false)
121: AC_CHECK_TOOL(OBJDUMP, objdump, false)
122:
123: # recent cygwin and mingw systems supply a stub DllMain which the user
124: # can override, but on older systems we have to supply one
125: AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
126: [AC_TRY_LINK([],
127: [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
128: DllMain (0, 0, 0);],
129: [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
130:
131: case $host/$CC in
132: *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
133: # old mingw systems require "-dll" to link a DLL, while more recent ones
134: # require "-mdll"
135: SAVE_CFLAGS="$CFLAGS"
136: CFLAGS="$CFLAGS -mdll"
137: AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
138: [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
139: CFLAGS="$SAVE_CFLAGS" ;;
140: *-*-cygwin* | *-*-pw32*)
141: # cygwin systems need to pass --dll to the linker, and not link
142: # crt.o which will require a WinMain@16 definition.
143: lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
144: esac
145: ;;
146: ])
147: esac
148:
149: _LT_AC_LTCONFIG_HACK
150:
151: ])
152:
153: # AC_LIBTOOL_HEADER_ASSERT
154: # ------------------------
155: AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
156: [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
157: [lt_cv_func_assert_works],
158: [case $host in
159: *-*-solaris*)
160: if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
161: case `$CC --version 2>/dev/null` in
162: [[12]].*) lt_cv_func_assert_works=no ;;
163: *) lt_cv_func_assert_works=yes ;;
164: esac
165: fi
166: ;;
167: esac])
168:
169: if test "x$lt_cv_func_assert_works" = xyes; then
170: AC_CHECK_HEADERS(assert.h)
171: fi
172: ])# AC_LIBTOOL_HEADER_ASSERT
173:
174: # _LT_AC_CHECK_DLFCN
175: # --------------------
176: AC_DEFUN([_LT_AC_CHECK_DLFCN],
177: [AC_CHECK_HEADERS(dlfcn.h)
178: ])# _LT_AC_CHECK_DLFCN
179:
180: # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
181: # ---------------------------------
182: AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
183: [AC_REQUIRE([AC_CANONICAL_HOST])
184: AC_REQUIRE([AC_PROG_NM])
185: AC_REQUIRE([AC_OBJEXT])
186: # Check for command to grab the raw symbol name followed by C symbol from nm.
187: AC_MSG_CHECKING([command to parse $NM output])
188: AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
189:
190: # These are sane defaults that work on at least a few old systems.
191: # [They come from Ultrix. What could be older than Ultrix?!! ;)]
192:
193: # Character class describing NM global symbol codes.
194: symcode='[[BCDEGRST]]'
195:
196: # Regexp to match symbols that can be accessed directly from C.
197: sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
198:
199: # Transform the above into a raw symbol and a C symbol.
200: symxfrm='\1 \2\3 \3'
201:
202: # Transform an extracted symbol line into a proper C declaration
203: lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
204:
205: # Transform an extracted symbol line into symbol name and symbol address
206: lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
207:
208: # Define system-specific variables.
209: case $host_os in
210: aix*)
211: symcode='[[BCDT]]'
212: ;;
213: cygwin* | mingw* | pw32*)
214: symcode='[[ABCDGISTW]]'
215: ;;
216: hpux*) # Its linker distinguishes data from code symbols
217: lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
218: lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
219: ;;
220: irix* | nonstopux*)
221: symcode='[[BCDEGRST]]'
222: ;;
223: osf*)
224: symcode='[[BCDEGQRST]]'
225: ;;
226: solaris* | sysv5*)
227: symcode='[[BDT]]'
228: ;;
229: sysv4)
230: symcode='[[DFNSTU]]'
231: ;;
232: esac
233:
234: # Handle CRLF in mingw tool chain
235: opt_cr=
236: case $host_os in
237: mingw*)
238: opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
239: ;;
240: esac
241:
242: # If we're using GNU nm, then use its standard symbol codes.
243: if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
244: symcode='[[ABCDGISTW]]'
245: fi
246:
247: # Try without a prefix undercore, then with it.
248: for ac_symprfx in "" "_"; do
249:
250: # Write the raw and C identifiers.
251: lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
252:
253: # Check to see that the pipe works correctly.
254: pipe_works=no
255: rm -f conftest*
256: cat > conftest.$ac_ext <<EOF
257: #ifdef __cplusplus
258: extern "C" {
259: #endif
260: char nm_test_var;
261: void nm_test_func(){}
262: #ifdef __cplusplus
263: }
264: #endif
265: int main(){nm_test_var='a';nm_test_func();return(0);}
266: EOF
267:
268: if AC_TRY_EVAL(ac_compile); then
269: # Now try to grab the symbols.
270: nlist=conftest.nm
271: if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
272: # Try sorting and uniquifying the output.
273: if sort "$nlist" | uniq > "$nlist"T; then
274: mv -f "$nlist"T "$nlist"
275: else
276: rm -f "$nlist"T
277: fi
278:
279: # Make sure that we snagged all the symbols we need.
280: if egrep ' nm_test_var$' "$nlist" >/dev/null; then
281: if egrep ' nm_test_func$' "$nlist" >/dev/null; then
282: cat <<EOF > conftest.$ac_ext
283: #ifdef __cplusplus
284: extern "C" {
285: #endif
286:
287: EOF
288: # Now generate the symbol file.
289: eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
290:
291: cat <<EOF >> conftest.$ac_ext
292: #if defined (__STDC__) && __STDC__
293: # define lt_ptr void *
294: #else
295: # define lt_ptr char *
296: # define const
297: #endif
298:
299: /* The mapping between symbol names and symbols. */
300: const struct {
301: const char *name;
302: lt_ptr address;
303: }
304: lt_preloaded_symbols[[]] =
305: {
306: EOF
307: sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
308: cat <<\EOF >> conftest.$ac_ext
309: {0, (lt_ptr) 0}
310: };
311:
312: #ifdef __cplusplus
313: }
314: #endif
315: EOF
316: # Now try linking the two files.
317: mv conftest.$ac_objext conftstm.$ac_objext
318: save_LIBS="$LIBS"
319: save_CFLAGS="$CFLAGS"
320: LIBS="conftstm.$ac_objext"
321: CFLAGS="$CFLAGS$no_builtin_flag"
322: if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
323: pipe_works=yes
324: fi
325: LIBS="$save_LIBS"
326: CFLAGS="$save_CFLAGS"
327: else
328: echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
329: fi
330: else
331: echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
332: fi
333: else
334: echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
335: fi
336: else
337: echo "$progname: failed program was:" >&AC_FD_CC
338: cat conftest.$ac_ext >&5
339: fi
340: rm -f conftest* conftst*
341:
342: # Do not use the global_symbol_pipe unless it works.
343: if test "$pipe_works" = yes; then
344: break
345: else
346: lt_cv_sys_global_symbol_pipe=
347: fi
348: done
349: ])
350: global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
351: if test -z "$lt_cv_sys_global_symbol_pipe"; then
352: global_symbol_to_cdecl=
353: global_symbol_to_c_name_address=
354: else
355: global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
356: global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
357: fi
358: if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
359: then
360: AC_MSG_RESULT(failed)
361: else
362: AC_MSG_RESULT(ok)
363: fi
364: ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
365:
366: # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
367: # ---------------------------------
368: AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
369: [# Find the correct PATH separator. Usually this is `:', but
370: # DJGPP uses `;' like DOS.
371: if test "X${PATH_SEPARATOR+set}" != Xset; then
372: UNAME=${UNAME-`uname 2>/dev/null`}
373: case X$UNAME in
374: *-DOS) lt_cv_sys_path_separator=';' ;;
375: *) lt_cv_sys_path_separator=':' ;;
376: esac
377: PATH_SEPARATOR=$lt_cv_sys_path_separator
378: fi
379: ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
380:
381: # _LT_AC_PROG_ECHO_BACKSLASH
382: # --------------------------
383: # Add some code to the start of the generated configure script which
384: # will find an echo command which doesn't interpret backslashes.
385: AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
386: [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
387: [AC_DIVERT_PUSH(NOTICE)])
388: _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
389:
390: # Check that we are running under the correct shell.
391: SHELL=${CONFIG_SHELL-/bin/sh}
392:
393: case X$ECHO in
394: X*--fallback-echo)
395: # Remove one level of quotation (which was required for Make).
396: ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
397: ;;
398: esac
399:
400: echo=${ECHO-echo}
401: if test "X[$]1" = X--no-reexec; then
402: # Discard the --no-reexec flag, and continue.
403: shift
404: elif test "X[$]1" = X--fallback-echo; then
405: # Avoid inline document here, it may be left over
406: :
407: elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
408: # Yippee, $echo works!
409: :
410: else
411: # Restart under the correct shell.
412: exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
413: fi
414:
415: if test "X[$]1" = X--fallback-echo; then
416: # used as fallback echo
417: shift
418: cat <<EOF
419: $*
420: EOF
421: exit 0
422: fi
423:
424: # The HP-UX ksh and POSIX shell print the target directory to stdout
425: # if CDPATH is set.
426: if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
427:
428: if test -z "$ECHO"; then
429: if test "X${echo_test_string+set}" != Xset; then
430: # find a string as large as possible, as long as the shell can cope with it
431: for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
432: # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
433: if (echo_test_string="`eval $cmd`") 2>/dev/null &&
434: echo_test_string="`eval $cmd`" &&
435: (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
436: then
437: break
438: fi
439: done
440: fi
441:
442: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
443: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
444: test "X$echo_testing_string" = "X$echo_test_string"; then
445: :
446: else
447: # The Solaris, AIX, and Digital Unix default echo programs unquote
448: # backslashes. This makes it impossible to quote backslashes using
449: # echo "$something" | sed 's/\\/\\\\/g'
450: #
451: # So, first we look for a working echo in the user's PATH.
452:
453: IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
454: for dir in $PATH /usr/ucb; do
455: if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
456: test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
457: echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
458: test "X$echo_testing_string" = "X$echo_test_string"; then
459: echo="$dir/echo"
460: break
461: fi
462: done
463: IFS="$save_ifs"
464:
465: if test "X$echo" = Xecho; then
466: # We didn't find a better echo, so look for alternatives.
467: if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
468: echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
469: test "X$echo_testing_string" = "X$echo_test_string"; then
470: # This shell has a builtin print -r that does the trick.
471: echo='print -r'
472: elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
473: test "X$CONFIG_SHELL" != X/bin/ksh; then
474: # If we have ksh, try running configure again with it.
475: ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
476: export ORIGINAL_CONFIG_SHELL
477: CONFIG_SHELL=/bin/ksh
478: export CONFIG_SHELL
479: exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
480: else
481: # Try using printf.
482: echo='printf %s\n'
483: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
484: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
485: test "X$echo_testing_string" = "X$echo_test_string"; then
486: # Cool, printf works
487: :
488: elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
489: test "X$echo_testing_string" = 'X\t' &&
490: echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
491: test "X$echo_testing_string" = "X$echo_test_string"; then
492: CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
493: export CONFIG_SHELL
494: SHELL="$CONFIG_SHELL"
495: export SHELL
496: echo="$CONFIG_SHELL [$]0 --fallback-echo"
497: elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
498: test "X$echo_testing_string" = 'X\t' &&
499: echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
500: test "X$echo_testing_string" = "X$echo_test_string"; then
501: echo="$CONFIG_SHELL [$]0 --fallback-echo"
502: else
503: # maybe with a smaller string...
504: prev=:
505:
506: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
507: if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
508: then
509: break
510: fi
511: prev="$cmd"
512: done
513:
514: if test "$prev" != 'sed 50q "[$]0"'; then
515: echo_test_string=`eval $prev`
516: export echo_test_string
517: exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
518: else
519: # Oops. We lost completely, so just stick with echo.
520: echo=echo
521: fi
522: fi
523: fi
524: fi
525: fi
526: fi
527:
528: # Copy echo and quote the copy suitably for passing to libtool from
529: # the Makefile, instead of quoting the original, which is used later.
530: ECHO=$echo
531: if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
532: ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
533: fi
534:
535: AC_SUBST(ECHO)
536: AC_DIVERT_POP
537: ])# _LT_AC_PROG_ECHO_BACKSLASH
538:
539: # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
540: # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
541: # ------------------------------------------------------------------
542: AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
543: [if test "$cross_compiling" = yes; then :
544: [$4]
545: else
546: AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
547: lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
548: lt_status=$lt_dlunknown
549: cat > conftest.$ac_ext <<EOF
550: [#line __oline__ "configure"
551: #include "confdefs.h"
552:
553: #if HAVE_DLFCN_H
554: #include <dlfcn.h>
555: #endif
556:
557: #include <stdio.h>
558:
559: #ifdef RTLD_GLOBAL
560: # define LT_DLGLOBAL RTLD_GLOBAL
561: #else
562: # ifdef DL_GLOBAL
563: # define LT_DLGLOBAL DL_GLOBAL
564: # else
565: # define LT_DLGLOBAL 0
566: # endif
567: #endif
568:
569: /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
570: find out it does not work in some platform. */
571: #ifndef LT_DLLAZY_OR_NOW
572: # ifdef RTLD_LAZY
573: # define LT_DLLAZY_OR_NOW RTLD_LAZY
574: # else
575: # ifdef DL_LAZY
576: # define LT_DLLAZY_OR_NOW DL_LAZY
577: # else
578: # ifdef RTLD_NOW
579: # define LT_DLLAZY_OR_NOW RTLD_NOW
580: # else
581: # ifdef DL_NOW
582: # define LT_DLLAZY_OR_NOW DL_NOW
583: # else
584: # define LT_DLLAZY_OR_NOW 0
585: # endif
586: # endif
587: # endif
588: # endif
589: #endif
590:
591: #ifdef __cplusplus
592: extern "C" void exit (int);
593: #endif
594:
595: void fnord() { int i=42;}
596: int main ()
597: {
598: void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
599: int status = $lt_dlunknown;
600:
601: if (self)
602: {
603: if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
604: else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
605: /* dlclose (self); */
606: }
607:
608: exit (status);
609: }]
610: EOF
611: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
612: (./conftest; exit; ) 2>/dev/null
613: lt_status=$?
614: case x$lt_status in
615: x$lt_dlno_uscore) $1 ;;
616: x$lt_dlneed_uscore) $2 ;;
617: x$lt_unknown|x*) $3 ;;
618: esac
619: else :
620: # compilation failed
621: $3
622: fi
623: fi
624: rm -fr conftest*
625: ])# _LT_AC_TRY_DLOPEN_SELF
626:
627: # AC_LIBTOOL_DLOPEN_SELF
628: # -------------------
629: AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
630: [if test "x$enable_dlopen" != xyes; then
631: enable_dlopen=unknown
632: enable_dlopen_self=unknown
633: enable_dlopen_self_static=unknown
634: else
635: lt_cv_dlopen=no
636: lt_cv_dlopen_libs=
637:
638: case $host_os in
639: beos*)
640: lt_cv_dlopen="load_add_on"
641: lt_cv_dlopen_libs=
642: lt_cv_dlopen_self=yes
643: ;;
644:
645: cygwin* | mingw* | pw32*)
646: lt_cv_dlopen="LoadLibrary"
647: lt_cv_dlopen_libs=
648: ;;
649:
650: *)
651: AC_CHECK_FUNC([shl_load],
652: [lt_cv_dlopen="shl_load"],
653: [AC_CHECK_LIB([dld], [shl_load],
654: [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
655: [AC_CHECK_FUNC([dlopen],
656: [lt_cv_dlopen="dlopen"],
657: [AC_CHECK_LIB([dl], [dlopen],
658: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
659: [AC_CHECK_LIB([svld], [dlopen],
660: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
661: [AC_CHECK_LIB([dld], [dld_link],
662: [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
663: ])
664: ])
665: ])
666: ])
667: ])
668: ;;
669: esac
670:
671: if test "x$lt_cv_dlopen" != xno; then
672: enable_dlopen=yes
673: else
674: enable_dlopen=no
675: fi
676:
677: case $lt_cv_dlopen in
678: dlopen)
679: save_CPPFLAGS="$CPPFLAGS"
680: AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
681: test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
682:
683: save_LDFLAGS="$LDFLAGS"
684: eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
685:
686: save_LIBS="$LIBS"
687: LIBS="$lt_cv_dlopen_libs $LIBS"
688:
689: AC_CACHE_CHECK([whether a program can dlopen itself],
690: lt_cv_dlopen_self, [dnl
691: _LT_AC_TRY_DLOPEN_SELF(
692: lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
693: lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
694: ])
695:
696: if test "x$lt_cv_dlopen_self" = xyes; then
697: LDFLAGS="$LDFLAGS $link_static_flag"
698: AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
699: lt_cv_dlopen_self_static, [dnl
700: _LT_AC_TRY_DLOPEN_SELF(
701: lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
702: lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
703: ])
704: fi
705:
706: CPPFLAGS="$save_CPPFLAGS"
707: LDFLAGS="$save_LDFLAGS"
708: LIBS="$save_LIBS"
709: ;;
710: esac
711:
712: case $lt_cv_dlopen_self in
713: yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
714: *) enable_dlopen_self=unknown ;;
715: esac
716:
717: case $lt_cv_dlopen_self_static in
718: yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
719: *) enable_dlopen_self_static=unknown ;;
720: esac
721: fi
722: ])# AC_LIBTOOL_DLOPEN_SELF
723:
724: AC_DEFUN([_LT_AC_LTCONFIG_HACK],
725: [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
726: # Sed substitution that helps us do robust quoting. It backslashifies
727: # metacharacters that are still active within double-quoted strings.
728: Xsed='sed -e s/^X//'
729: sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
730:
731: # Same as above, but do not quote variable references.
732: double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
733:
734: # Sed substitution to delay expansion of an escaped shell variable in a
735: # double_quote_subst'ed string.
736: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
737:
738: # Constants:
739: rm="rm -f"
740:
741: # Global variables:
742: default_ofile=libtool
743: can_build_shared=yes
744:
745: # All known linkers require a `.a' archive for static linking (except M$VC,
746: # which needs '.lib').
747: libext=a
748: ltmain="$ac_aux_dir/ltmain.sh"
749: ofile="$default_ofile"
750: with_gnu_ld="$lt_cv_prog_gnu_ld"
751: need_locks="$enable_libtool_lock"
752:
753: old_CC="$CC"
754: old_CFLAGS="$CFLAGS"
755:
756: # Set sane defaults for various variables
757: test -z "$AR" && AR=ar
758: test -z "$AR_FLAGS" && AR_FLAGS=cru
759: test -z "$AS" && AS=as
760: test -z "$CC" && CC=cc
761: test -z "$DLLTOOL" && DLLTOOL=dlltool
762: test -z "$LD" && LD=ld
763: test -z "$LN_S" && LN_S="ln -s"
764: test -z "$MAGIC_CMD" && MAGIC_CMD=file
765: test -z "$NM" && NM=nm
766: test -z "$OBJDUMP" && OBJDUMP=objdump
767: test -z "$RANLIB" && RANLIB=:
768: test -z "$STRIP" && STRIP=:
769: test -z "$ac_objext" && ac_objext=o
770:
771: if test x"$host" != x"$build"; then
772: ac_tool_prefix=${host_alias}-
773: else
774: ac_tool_prefix=
775: fi
776:
777: # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
778: case $host_os in
779: linux-gnu*) ;;
780: linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
781: esac
782:
783: case $host_os in
784: aix3*)
785: # AIX sometimes has problems with the GCC collect2 program. For some
786: # reason, if we set the COLLECT_NAMES environment variable, the problems
787: # vanish in a puff of smoke.
788: if test "X${COLLECT_NAMES+set}" != Xset; then
789: COLLECT_NAMES=
790: export COLLECT_NAMES
791: fi
792: ;;
793: esac
794:
795: # Determine commands to create old-style static archives.
796: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
797: old_postinstall_cmds='chmod 644 $oldlib'
798: old_postuninstall_cmds=
799:
800: if test -n "$RANLIB"; then
801: case $host_os in
802: openbsd*)
803: old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
804: ;;
805: *)
806: old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
807: ;;
808: esac
809: old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
810: fi
811:
812: # Allow CC to be a program name with arguments.
813: set dummy $CC
814: compiler="[$]2"
815:
816: AC_MSG_CHECKING([for objdir])
817: rm -f .libs 2>/dev/null
818: mkdir .libs 2>/dev/null
819: if test -d .libs; then
820: objdir=.libs
821: else
822: # MS-DOS does not allow filenames that begin with a dot.
823: objdir=_libs
824: fi
825: rmdir .libs 2>/dev/null
826: AC_MSG_RESULT($objdir)
827:
828:
829: AC_ARG_WITH(pic,
830: [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
831: pic_mode="$withval", pic_mode=default)
832: test -z "$pic_mode" && pic_mode=default
833:
834: # We assume here that the value for lt_cv_prog_cc_pic will not be cached
835: # in isolation, and that seeing it set (from the cache) indicates that
836: # the associated values are set (in the cache) correctly too.
837: AC_MSG_CHECKING([for $compiler option to produce PIC])
838: AC_CACHE_VAL(lt_cv_prog_cc_pic,
839: [ lt_cv_prog_cc_pic=
840: lt_cv_prog_cc_shlib=
841: lt_cv_prog_cc_wl=
842: lt_cv_prog_cc_static=
843: lt_cv_prog_cc_no_builtin=
844: lt_cv_prog_cc_can_build_shared=$can_build_shared
845:
846: if test "$GCC" = yes; then
847: lt_cv_prog_cc_wl='-Wl,'
848: lt_cv_prog_cc_static='-static'
849:
850: case $host_os in
851: aix*)
852: # Below there is a dirty hack to force normal static linking with -ldl
853: # The problem is because libdl dynamically linked with both libc and
854: # libC (AIX C++ library), which obviously doesn't included in libraries
855: # list by gcc. This cause undefined symbols with -static flags.
856: # This hack allows C programs to be linked with "-static -ldl", but
857: # not sure about C++ programs.
858: lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
859: ;;
860: amigaos*)
861: # FIXME: we need at least 68020 code to build shared libraries, but
862: # adding the `-m68020' flag to GCC prevents building anything better,
863: # like `-m68040'.
864: lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
865: ;;
866: beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
867: # PIC is the default for these OSes.
868: ;;
869: darwin* | rhapsody*)
870: # PIC is the default on this platform
871: # Common symbols not allowed in MH_DYLIB files
872: lt_cv_prog_cc_pic='-fno-common'
873: ;;
874: cygwin* | mingw* | pw32* | os2*)
875: # This hack is so that the source file can tell whether it is being
876: # built for inclusion in a dll (and should export symbols for example).
877: lt_cv_prog_cc_pic='-DDLL_EXPORT'
878: ;;
879: sysv4*MP*)
880: if test -d /usr/nec; then
881: lt_cv_prog_cc_pic=-Kconform_pic
882: fi
883: ;;
884: *)
885: lt_cv_prog_cc_pic='-fPIC'
886: ;;
887: esac
888: else
889: # PORTME Check for PIC flags for the system compiler.
890: case $host_os in
891: aix3* | aix4* | aix5*)
892: lt_cv_prog_cc_wl='-Wl,'
893: # All AIX code is PIC.
894: if test "$host_cpu" = ia64; then
895: # AIX 5 now supports IA64 processor
896: lt_cv_prog_cc_static='-Bstatic'
897: else
898: lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
899: fi
900: ;;
901:
902: hpux9* | hpux10* | hpux11*)
903: # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
904: lt_cv_prog_cc_wl='-Wl,'
905: lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
906: lt_cv_prog_cc_pic='+Z'
907: ;;
908:
909: irix5* | irix6* | nonstopux*)
910: lt_cv_prog_cc_wl='-Wl,'
911: lt_cv_prog_cc_static='-non_shared'
912: # PIC (with -KPIC) is the default.
913: ;;
914:
915: cygwin* | mingw* | pw32* | os2*)
916: # This hack is so that the source file can tell whether it is being
917: # built for inclusion in a dll (and should export symbols for example).
918: lt_cv_prog_cc_pic='-DDLL_EXPORT'
919: ;;
920:
921: newsos6)
922: lt_cv_prog_cc_pic='-KPIC'
923: lt_cv_prog_cc_static='-Bstatic'
924: ;;
925:
926: osf3* | osf4* | osf5*)
927: # All OSF/1 code is PIC.
928: lt_cv_prog_cc_wl='-Wl,'
929: lt_cv_prog_cc_static='-non_shared'
930: ;;
931:
932: sco3.2v5*)
933: lt_cv_prog_cc_pic='-Kpic'
934: lt_cv_prog_cc_static='-dn'
935: lt_cv_prog_cc_shlib='-belf'
936: ;;
937:
938: solaris*)
939: lt_cv_prog_cc_pic='-KPIC'
940: lt_cv_prog_cc_static='-Bstatic'
941: lt_cv_prog_cc_wl='-Wl,'
942: ;;
943:
944: sunos4*)
945: lt_cv_prog_cc_pic='-PIC'
946: lt_cv_prog_cc_static='-Bstatic'
947: lt_cv_prog_cc_wl='-Qoption ld '
948: ;;
949:
950: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
951: lt_cv_prog_cc_pic='-KPIC'
952: lt_cv_prog_cc_static='-Bstatic'
953: lt_cv_prog_cc_wl='-Wl,'
954: ;;
955:
956: uts4*)
957: lt_cv_prog_cc_pic='-pic'
958: lt_cv_prog_cc_static='-Bstatic'
959: ;;
960:
961: sysv4*MP*)
962: if test -d /usr/nec ;then
963: lt_cv_prog_cc_pic='-Kconform_pic'
964: lt_cv_prog_cc_static='-Bstatic'
965: fi
966: ;;
967:
968: *)
969: lt_cv_prog_cc_can_build_shared=no
970: ;;
971: esac
972: fi
973: ])
974: if test -z "$lt_cv_prog_cc_pic"; then
975: AC_MSG_RESULT([none])
976: else
977: AC_MSG_RESULT([$lt_cv_prog_cc_pic])
978:
979: # Check to make sure the pic_flag actually works.
980: AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
981: AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
982: save_CFLAGS="$CFLAGS"
983: CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
984: AC_TRY_COMPILE([], [], [dnl
985: case $host_os in
986: hpux9* | hpux10* | hpux11*)
987: # On HP-UX, both CC and GCC only warn that PIC is supported... then
988: # they create non-PIC objects. So, if there were any warnings, we
989: # assume that PIC is not supported.
990: if test -s conftest.err; then
991: lt_cv_prog_cc_pic_works=no
992: else
993: lt_cv_prog_cc_pic_works=yes
994: fi
995: ;;
996: *)
997: lt_cv_prog_cc_pic_works=yes
998: ;;
999: esac
1000: ], [dnl
1001: lt_cv_prog_cc_pic_works=no
1002: ])
1003: CFLAGS="$save_CFLAGS"
1004: ])
1005:
1006: if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1007: lt_cv_prog_cc_pic=
1008: lt_cv_prog_cc_can_build_shared=no
1009: else
1010: lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1011: fi
1012:
1013: AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1014: fi
1015:
1016: # Check for any special shared library compilation flags.
1017: if test -n "$lt_cv_prog_cc_shlib"; then
1018: AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1019: if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1020: else
1021: AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1022: lt_cv_prog_cc_can_build_shared=no
1023: fi
1024: fi
1025:
1026: AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1027: AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1028: lt_cv_prog_cc_static_works=no
1029: save_LDFLAGS="$LDFLAGS"
1030: LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1031: AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1032: LDFLAGS="$save_LDFLAGS"
1033: ])
1034:
1035: # Belt *and* braces to stop my trousers falling down:
1036: test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1037: AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1038:
1039: pic_flag="$lt_cv_prog_cc_pic"
1040: special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1041: wl="$lt_cv_prog_cc_wl"
1042: link_static_flag="$lt_cv_prog_cc_static"
1043: no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1044: can_build_shared="$lt_cv_prog_cc_can_build_shared"
1045:
1046:
1047: # Check to see if options -o and -c are simultaneously supported by compiler
1048: AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1049: AC_CACHE_VAL([lt_cv_compiler_c_o], [
1050: $rm -r conftest 2>/dev/null
1051: mkdir conftest
1052: cd conftest
1053: echo "int some_variable = 0;" > conftest.$ac_ext
1054: mkdir out
1055: # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1056: # that will create temporary files in the current directory regardless of
1057: # the output directory. Thus, making CWD read-only will cause this test
1058: # to fail, enabling locking or at least warning the user not to do parallel
1059: # builds.
1060: chmod -w .
1061: save_CFLAGS="$CFLAGS"
1062: CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1063: compiler_c_o=no
1064: if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1065: # The compiler can only warn and ignore the option if not recognized
1066: # So say no if there are warnings
1067: if test -s out/conftest.err; then
1068: lt_cv_compiler_c_o=no
1069: else
1070: lt_cv_compiler_c_o=yes
1071: fi
1072: else
1073: # Append any errors to the config.log.
1074: cat out/conftest.err 1>&AC_FD_CC
1075: lt_cv_compiler_c_o=no
1076: fi
1077: CFLAGS="$save_CFLAGS"
1078: chmod u+w .
1079: $rm conftest* out/*
1080: rmdir out
1081: cd ..
1082: rmdir conftest
1083: $rm -r conftest 2>/dev/null
1084: ])
1085: compiler_c_o=$lt_cv_compiler_c_o
1086: AC_MSG_RESULT([$compiler_c_o])
1087:
1088: if test x"$compiler_c_o" = x"yes"; then
1089: # Check to see if we can write to a .lo
1090: AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1091: AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1092: lt_cv_compiler_o_lo=no
1093: save_CFLAGS="$CFLAGS"
1094: CFLAGS="$CFLAGS -c -o conftest.lo"
1095: save_objext="$ac_objext"
1096: ac_objext=lo
1097: AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1098: # The compiler can only warn and ignore the option if not recognized
1099: # So say no if there are warnings
1100: if test -s conftest.err; then
1101: lt_cv_compiler_o_lo=no
1102: else
1103: lt_cv_compiler_o_lo=yes
1104: fi
1105: ])
1106: ac_objext="$save_objext"
1107: CFLAGS="$save_CFLAGS"
1108: ])
1109: compiler_o_lo=$lt_cv_compiler_o_lo
1110: AC_MSG_RESULT([$compiler_o_lo])
1111: else
1112: compiler_o_lo=no
1113: fi
1114:
1115: # Check to see if we can do hard links to lock some files if needed
1116: hard_links="nottested"
1117: if test "$compiler_c_o" = no && test "$need_locks" != no; then
1118: # do not overwrite the value of need_locks provided by the user
1119: AC_MSG_CHECKING([if we can lock with hard links])
1120: hard_links=yes
1121: $rm conftest*
1122: ln conftest.a conftest.b 2>/dev/null && hard_links=no
1123: touch conftest.a
1124: ln conftest.a conftest.b 2>&5 || hard_links=no
1125: ln conftest.a conftest.b 2>/dev/null && hard_links=no
1126: AC_MSG_RESULT([$hard_links])
1127: if test "$hard_links" = no; then
1128: AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1129: need_locks=warn
1130: fi
1131: else
1132: need_locks=no
1133: fi
1134:
1135: if test "$GCC" = yes; then
1136: # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1137: AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1138: echo "int some_variable = 0;" > conftest.$ac_ext
1139: save_CFLAGS="$CFLAGS"
1140: CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1141: compiler_rtti_exceptions=no
1142: AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1143: # The compiler can only warn and ignore the option if not recognized
1144: # So say no if there are warnings
1145: if test -s conftest.err; then
1146: compiler_rtti_exceptions=no
1147: else
1148: compiler_rtti_exceptions=yes
1149: fi
1150: ])
1151: CFLAGS="$save_CFLAGS"
1152: AC_MSG_RESULT([$compiler_rtti_exceptions])
1153:
1154: if test "$compiler_rtti_exceptions" = "yes"; then
1155: no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1156: else
1157: no_builtin_flag=' -fno-builtin'
1158: fi
1159: fi
1160:
1161: # See if the linker supports building shared libraries.
1162: AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1163:
1164: allow_undefined_flag=
1165: no_undefined_flag=
1166: need_lib_prefix=unknown
1167: need_version=unknown
1168: # when you set need_version to no, make sure it does not cause -set_version
1169: # flags to be left without arguments
1170: archive_cmds=
1171: archive_expsym_cmds=
1172: old_archive_from_new_cmds=
1173: old_archive_from_expsyms_cmds=
1174: export_dynamic_flag_spec=
1175: whole_archive_flag_spec=
1176: thread_safe_flag_spec=
1177: hardcode_into_libs=no
1178: hardcode_libdir_flag_spec=
1179: hardcode_libdir_separator=
1180: hardcode_direct=no
1181: hardcode_minus_L=no
1182: hardcode_shlibpath_var=unsupported
1183: runpath_var=
1184: link_all_deplibs=unknown
1185: always_export_symbols=no
1186: export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1187: # include_expsyms should be a list of space-separated symbols to be *always*
1188: # included in the symbol list
1189: include_expsyms=
1190: # exclude_expsyms can be an egrep regular expression of symbols to exclude
1191: # it will be wrapped by ` (' and `)$', so one must not match beginning or
1192: # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1193: # as well as any symbol that contains `d'.
1194: exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1195: # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1196: # platforms (ab)use it in PIC code, but their linkers get confused if
1197: # the symbol is explicitly referenced. Since portable code cannot
1198: # rely on this symbol name, it's probably fine to never include it in
1199: # preloaded symbol tables.
1200: extract_expsyms_cmds=
1201:
1202: case $host_os in
1203: cygwin* | mingw* | pw32*)
1204: # FIXME: the MSVC++ port hasn't been tested in a loooong time
1205: # When not using gcc, we currently assume that we are using
1206: # Microsoft Visual C++.
1207: if test "$GCC" != yes; then
1208: with_gnu_ld=no
1209: fi
1210: ;;
1211: openbsd*)
1212: with_gnu_ld=no
1213: ;;
1214: esac
1215:
1216: ld_shlibs=yes
1217: if test "$with_gnu_ld" = yes; then
1218: # If archive_cmds runs LD, not CC, wlarc should be empty
1219: wlarc='${wl}'
1220:
1221: # See if GNU ld supports shared libraries.
1222: case $host_os in
1223: aix3* | aix4* | aix5*)
1224: # On AIX, the GNU linker is very broken
1225: # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1226: ld_shlibs=no
1227: cat <<EOF 1>&2
1228:
1229: *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1230: *** to be unable to reliably create shared libraries on AIX.
1231: *** Therefore, libtool is disabling shared libraries support. If you
1232: *** really care for shared libraries, you may want to modify your PATH
1233: *** so that a non-GNU linker is found, and then restart.
1234:
1235: EOF
1236: ;;
1237:
1238: amigaos*)
1239: archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1240: hardcode_libdir_flag_spec='-L$libdir'
1241: hardcode_minus_L=yes
1242:
1243: # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1244: # that the semantics of dynamic libraries on AmigaOS, at least up
1245: # to version 4, is to share data among multiple programs linked
1246: # with the same dynamic library. Since this doesn't match the
1247: # behavior of shared libraries on other platforms, we can use
1248: # them.
1249: ld_shlibs=no
1250: ;;
1251:
1252: beos*)
1253: if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1254: allow_undefined_flag=unsupported
1255: # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1256: # support --undefined. This deserves some investigation. FIXME
1257: archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1258: else
1259: ld_shlibs=no
1260: fi
1261: ;;
1262:
1263: cygwin* | mingw* | pw32*)
1264: # hardcode_libdir_flag_spec is actually meaningless, as there is
1265: # no search path for DLLs.
1266: hardcode_libdir_flag_spec='-L$libdir'
1267: allow_undefined_flag=unsupported
1268: always_export_symbols=yes
1269:
1270: extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1271: sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1272: test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1273: if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1274: else $CC -o impgen impgen.c ; fi)~
1275: $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1276:
1277: old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1278:
1279: # cygwin and mingw dlls have different entry points and sets of symbols
1280: # to exclude.
1281: # FIXME: what about values for MSVC?
1282: dll_entry=__cygwin_dll_entry@12
1283: dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1284: case $host_os in
1285: mingw*)
1286: # mingw values
1287: dll_entry=_DllMainCRTStartup@12
1288: dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1289: ;;
1290: esac
1291:
1292: # mingw and cygwin differ, and it's simplest to just exclude the union
1293: # of the two symbol sets.
1294: dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1295:
1296: # recent cygwin and mingw systems supply a stub DllMain which the user
1297: # can override, but on older systems we have to supply one (in ltdll.c)
1298: if test "x$lt_cv_need_dllmain" = "xyes"; then
1299: ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1300: ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1301: test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1302: else
1303: ltdll_obj=
1304: ltdll_cmds=
1305: fi
1306:
1307: # Extract the symbol export list from an `--export-all' def file,
1308: # then regenerate the def file from the symbol export list, so that
1309: # the compiled dll only exports the symbol export list.
1310: # Be careful not to strip the DATA tag left be newer dlltools.
1311: export_symbols_cmds="$ltdll_cmds"'
1312: $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1313: sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1314:
1315: # If the export-symbols file already is a .def file (1st line
1316: # is EXPORTS), use it as is.
1317: # If DATA tags from a recent dlltool are present, honour them!
1318: archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1319: cp $export_symbols $output_objdir/$soname-def;
1320: else
1321: echo EXPORTS > $output_objdir/$soname-def;
1322: _lt_hint=1;
1323: cat $export_symbols | while read symbol; do
1324: set dummy \$symbol;
1325: case \[$]# in
1326: 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1327: 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1328: *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1329: esac;
1330: _lt_hint=`expr 1 + \$_lt_hint`;
1331: done;
1332: fi~
1333: '"$ltdll_cmds"'
1334: $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1335: $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1336: $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1337: $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
1338: $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1339: ;;
1340:
1341: netbsd*)
1342: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1343: archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1344: wlarc=
1345: else
1346: archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1347: archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1348: fi
1349: ;;
1350:
1351: solaris* | sysv5*)
1352: if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1353: ld_shlibs=no
1354: cat <<EOF 1>&2
1355:
1356: *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1357: *** create shared libraries on Solaris systems. Therefore, libtool
1358: *** is disabling shared libraries support. We urge you to upgrade GNU
1359: *** binutils to release 2.9.1 or newer. Another option is to modify
1360: *** your PATH or compiler configuration so that the native linker is
1361: *** used, and then restart.
1362:
1363: EOF
1364: elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1365: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1366: archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1367: else
1368: ld_shlibs=no
1369: fi
1370: ;;
1371:
1372: sunos4*)
1373: archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1374: wlarc=
1375: hardcode_direct=yes
1376: hardcode_shlibpath_var=no
1377: ;;
1378:
1379: *)
1380: if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1381: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1382: archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1383: else
1384: ld_shlibs=no
1385: fi
1386: ;;
1387: esac
1388:
1389: if test "$ld_shlibs" = yes; then
1390: runpath_var=LD_RUN_PATH
1391: hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1392: export_dynamic_flag_spec='${wl}--export-dynamic'
1393: case $host_os in
1394: cygwin* | mingw* | pw32*)
1395: # dlltool doesn't understand --whole-archive et. al.
1396: whole_archive_flag_spec=
1397: ;;
1398: *)
1399: # ancient GNU ld didn't support --whole-archive et. al.
1400: if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1401: whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1402: else
1403: whole_archive_flag_spec=
1404: fi
1405: ;;
1406: esac
1407: fi
1408: else
1409: # PORTME fill in a description of your system's linker (not GNU ld)
1410: case $host_os in
1411: aix3*)
1412: allow_undefined_flag=unsupported
1413: always_export_symbols=yes
1414: archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1415: # Note: this linker hardcodes the directories in LIBPATH if there
1416: # are no directories specified by -L.
1417: hardcode_minus_L=yes
1418: if test "$GCC" = yes && test -z "$link_static_flag"; then
1419: # Neither direct hardcoding nor static linking is supported with a
1420: # broken collect2.
1421: hardcode_direct=unsupported
1422: fi
1423: ;;
1424:
1425: aix4* | aix5*)
1426: if test "$host_cpu" = ia64; then
1427: # On IA64, the linker does run time linking by default, so we don't
1428: # have to do anything special.
1429: aix_use_runtimelinking=no
1430: exp_sym_flag='-Bexport'
1431: no_entry_flag=""
1432: else
1433: aix_use_runtimelinking=no
1434:
1435: # Test if we are trying to use run time linking or normal
1436: # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1437: # need to do runtime linking.
1438: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1439: for ld_flag in $LDFLAGS; do
1440: case $ld_flag in
1441: *-brtl*)
1442: aix_use_runtimelinking=yes
1443: break
1444: ;;
1445: esac
1446: done
1447: esac
1448:
1449: exp_sym_flag='-bexport'
1450: no_entry_flag='-bnoentry'
1451: fi
1452:
1453: # When large executables or shared objects are built, AIX ld can
1454: # have problems creating the table of contents. If linking a library
1455: # or program results in "error TOC overflow" add -mminimal-toc to
1456: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1457: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1458:
1459: hardcode_direct=yes
1460: archive_cmds=''
1461: hardcode_libdir_separator=':'
1462: if test "$GCC" = yes; then
1463: case $host_os in aix4.[[012]]|aix4.[[012]].*)
1464: collect2name=`${CC} -print-prog-name=collect2`
1465: if test -f "$collect2name" && \
1466: strings "$collect2name" | grep resolve_lib_name >/dev/null
1467: then
1468: # We have reworked collect2
1469: hardcode_direct=yes
1470: else
1471: # We have old collect2
1472: hardcode_direct=unsupported
1473: # It fails to find uninstalled libraries when the uninstalled
1474: # path is not listed in the libpath. Setting hardcode_minus_L
1475: # to unsupported forces relinking
1476: hardcode_minus_L=yes
1477: hardcode_libdir_flag_spec='-L$libdir'
1478: hardcode_libdir_separator=
1479: fi
1480: esac
1481:
1482: shared_flag='-shared'
1483: else
1484: # not using gcc
1485: if test "$host_cpu" = ia64; then
1486: shared_flag='${wl}-G'
1487: else
1488: if test "$aix_use_runtimelinking" = yes; then
1489: shared_flag='${wl}-G'
1490: else
1491: shared_flag='${wl}-bM:SRE'
1492: fi
1493: fi
1494: fi
1495:
1496: # It seems that -bexpall can do strange things, so it is better to
1497: # generate a list of symbols to export.
1498: always_export_symbols=yes
1499: if test "$aix_use_runtimelinking" = yes; then
1500: # Warning - without using the other runtime loading flags (-brtl),
1501: # -berok will link without error, but may produce a broken library.
1502: allow_undefined_flag='-berok'
1503: hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1504: archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1505: else
1506: if test "$host_cpu" = ia64; then
1507: hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1508: allow_undefined_flag="-z nodefs"
1509: archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1510: else
1511: hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1512: # Warning - without using the other run time loading flags,
1513: # -berok will link without error, but may produce a broken library.
1514: allow_undefined_flag='${wl}-berok'
1515: # This is a bit strange, but is similar to how AIX traditionally builds
1516: # it's shared libraries.
1517: archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
1518: fi
1519: fi
1520: ;;
1521:
1522: amigaos*)
1523: archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1524: hardcode_libdir_flag_spec='-L$libdir'
1525: hardcode_minus_L=yes
1526: # see comment about different semantics on the GNU ld section
1527: ld_shlibs=no
1528: ;;
1529:
1530: cygwin* | mingw* | pw32*)
1531: # When not using gcc, we currently assume that we are using
1532: # Microsoft Visual C++.
1533: # hardcode_libdir_flag_spec is actually meaningless, as there is
1534: # no search path for DLLs.
1535: hardcode_libdir_flag_spec=' '
1536: allow_undefined_flag=unsupported
1537: # Tell ltmain to make .lib files, not .a files.
1538: libext=lib
1539: # FIXME: Setting linknames here is a bad hack.
1540: archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1541: # The linker will automatically build a .lib file if we build a DLL.
1542: old_archive_from_new_cmds='true'
1543: # FIXME: Should let the user specify the lib program.
1544: old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1545: fix_srcfile_path='`cygpath -w "$srcfile"`'
1546: ;;
1547:
1548: darwin* | rhapsody*)
1549: case "$host_os" in
1550: rhapsody* | darwin1.[[012]])
1551: allow_undefined_flag='-undefined suppress'
1552: ;;
1553: *) # Darwin 1.3 on
1554: allow_undefined_flag='-flat_namespace -undefined suppress'
1555: ;;
1556: esac
1557: # FIXME: Relying on posixy $() will cause problems for
1558: # cross-compilation, but unfortunately the echo tests do not
1559: # yet detect zsh echo's removal of \ escapes. Also zsh mangles
1560: # `"' quotes if we put them in here... so don't!
1561: archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
1562: # We need to add '_' to the symbols in $export_symbols first
1563: #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1564: hardcode_direct=yes
1565: hardcode_shlibpath_var=no
1566: whole_archive_flag_spec='-all_load $convenience'
1567: ;;
1568:
1569: freebsd1*)
1570: ld_shlibs=no
1571: ;;
1572:
1573: # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1574: # support. Future versions do this automatically, but an explicit c++rt0.o
1575: # does not break anything, and helps significantly (at the cost of a little
1576: # extra space).
1577: freebsd2.2*)
1578: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1579: hardcode_libdir_flag_spec='-R$libdir'
1580: hardcode_direct=yes
1581: hardcode_shlibpath_var=no
1582: ;;
1583:
1584: # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1585: freebsd2*)
1586: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1587: hardcode_direct=yes
1588: hardcode_minus_L=yes
1589: hardcode_shlibpath_var=no
1590: ;;
1591:
1592: # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1593: freebsd*)
1594: archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1595: hardcode_libdir_flag_spec='-R$libdir'
1596: hardcode_direct=yes
1597: hardcode_shlibpath_var=no
1598: ;;
1599:
1600: hpux9* | hpux10* | hpux11*)
1601: case $host_os in
1602: hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
1603: *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1604: esac
1605: hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1606: hardcode_libdir_separator=:
1607: hardcode_direct=yes
1608: hardcode_minus_L=yes # Not in the search PATH, but as the default
1609: # location of the library.
1610: export_dynamic_flag_spec='${wl}-E'
1611: ;;
1612:
1613: irix5* | irix6* | nonstopux*)
1614: if test "$GCC" = yes; then
1615: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1616: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1617: else
1618: archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1619: hardcode_libdir_flag_spec='-rpath $libdir'
1620: fi
1621: hardcode_libdir_separator=:
1622: link_all_deplibs=yes
1623: ;;
1624:
1625: netbsd*)
1626: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1627: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1628: else
1629: archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1630: fi
1631: hardcode_libdir_flag_spec='-R$libdir'
1632: hardcode_direct=yes
1633: hardcode_shlibpath_var=no
1634: ;;
1635:
1636: newsos6)
1637: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1638: hardcode_direct=yes
1639: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1640: hardcode_libdir_separator=:
1641: hardcode_shlibpath_var=no
1642: ;;
1643:
1644: openbsd*)
1645: hardcode_direct=yes
1646: hardcode_shlibpath_var=no
1647: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1648: archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1649: hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1650: export_dynamic_flag_spec='${wl}-E'
1651: else
1652: case "$host_os" in
1653: openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1654: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1655: hardcode_libdir_flag_spec='-R$libdir'
1656: ;;
1657: *)
1658: archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1659: hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1660: ;;
1661: esac
1662: fi
1663: ;;
1664:
1665: os2*)
1666: hardcode_libdir_flag_spec='-L$libdir'
1667: hardcode_minus_L=yes
1668: allow_undefined_flag=unsupported
1669: archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
1670: old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1671: ;;
1672:
1673: osf3*)
1674: if test "$GCC" = yes; then
1675: allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1676: archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1677: else
1678: allow_undefined_flag=' -expect_unresolved \*'
1679: archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1680: fi
1681: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1682: hardcode_libdir_separator=:
1683: ;;
1684:
1685: osf4* | osf5*) # as osf3* with the addition of -msym flag
1686: if test "$GCC" = yes; then
1687: allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1688: archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1689: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1690: else
1691: allow_undefined_flag=' -expect_unresolved \*'
1692: archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1693: archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1694: $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
1695:
1696: #Both c and cxx compiler support -rpath directly
1697: hardcode_libdir_flag_spec='-rpath $libdir'
1698: fi
1699: hardcode_libdir_separator=:
1700: ;;
1701:
1702: sco3.2v5*)
1703: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1704: hardcode_shlibpath_var=no
1705: runpath_var=LD_RUN_PATH
1706: hardcode_runpath_var=yes
1707: export_dynamic_flag_spec='${wl}-Bexport'
1708: ;;
1709:
1710: solaris*)
1711: # gcc --version < 3.0 without binutils cannot create self contained
1712: # shared libraries reliably, requiring libgcc.a to resolve some of
1713: # the object symbols generated in some cases. Libraries that use
1714: # assert need libgcc.a to resolve __eprintf, for example. Linking
1715: # a copy of libgcc.a into every shared library to guarantee resolving
1716: # such symbols causes other problems: According to Tim Van Holder
1717: # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
1718: # (to the application) exception stack for one thing.
1719: no_undefined_flag=' -z defs'
1720: if test "$GCC" = yes; then
1721: case `$CC --version 2>/dev/null` in
1722: [[12]].*)
1723: cat <<EOF 1>&2
1724:
1725: *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
1726: *** create self contained shared libraries on Solaris systems, without
1727: *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
1728: *** -no-undefined support, which will at least allow you to build shared
1729: *** libraries. However, you may find that when you link such libraries
1730: *** into an application without using GCC, you have to manually add
1731: *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
1732: *** upgrade to a newer version of GCC. Another option is to rebuild your
1733: *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
1734:
1735: EOF
1736: no_undefined_flag=
1737: ;;
1738: esac
1739: fi
1740: # $CC -shared without GNU ld will not create a library from C++
1741: # object files and a static libstdc++, better avoid it by now
1742: archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1743: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1744: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1745: hardcode_libdir_flag_spec='-R$libdir'
1746: hardcode_shlibpath_var=no
1747: case $host_os in
1748: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1749: *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1750: whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1751: esac
1752: link_all_deplibs=yes
1753: ;;
1754:
1755: sunos4*)
1756: if test "x$host_vendor" = xsequent; then
1757: # Use $CC to link under sequent, because it throws in some extra .o
1758: # files that make .init and .fini sections work.
1759: archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1760: else
1761: archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1762: fi
1763: hardcode_libdir_flag_spec='-L$libdir'
1764: hardcode_direct=yes
1765: hardcode_minus_L=yes
1766: hardcode_shlibpath_var=no
1767: ;;
1768:
1769: sysv4)
1770: case $host_vendor in
1771: sni)
1772: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1773: hardcode_direct=yes # is this really true???
1774: ;;
1775: siemens)
1776: ## LD is ld it makes a PLAMLIB
1777: ## CC just makes a GrossModule.
1778: archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1779: reload_cmds='$CC -r -o $output$reload_objs'
1780: hardcode_direct=no
1781: ;;
1782: motorola)
1783: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1784: hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1785: ;;
1786: esac
1787: runpath_var='LD_RUN_PATH'
1788: hardcode_shlibpath_var=no
1789: ;;
1790:
1791: sysv4.3*)
1792: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1793: hardcode_shlibpath_var=no
1794: export_dynamic_flag_spec='-Bexport'
1795: ;;
1796:
1797: sysv5*)
1798: no_undefined_flag=' -z text'
1799: # $CC -shared without GNU ld will not create a library from C++
1800: # object files and a static libstdc++, better avoid it by now
1801: archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1802: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1803: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1804: hardcode_libdir_flag_spec=
1805: hardcode_shlibpath_var=no
1806: runpath_var='LD_RUN_PATH'
1807: ;;
1808:
1809: uts4*)
1810: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1811: hardcode_libdir_flag_spec='-L$libdir'
1812: hardcode_shlibpath_var=no
1813: ;;
1814:
1815: dgux*)
1816: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1817: hardcode_libdir_flag_spec='-L$libdir'
1818: hardcode_shlibpath_var=no
1819: ;;
1820:
1821: sysv4*MP*)
1822: if test -d /usr/nec; then
1823: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1824: hardcode_shlibpath_var=no
1825: runpath_var=LD_RUN_PATH
1826: hardcode_runpath_var=yes
1827: ld_shlibs=yes
1828: fi
1829: ;;
1830:
1831: sysv4.2uw2*)
1832: archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1833: hardcode_direct=yes
1834: hardcode_minus_L=no
1835: hardcode_shlibpath_var=no
1836: hardcode_runpath_var=yes
1837: runpath_var=LD_RUN_PATH
1838: ;;
1839:
1840: sysv5uw7* | unixware7*)
1841: no_undefined_flag='${wl}-z ${wl}text'
1842: if test "$GCC" = yes; then
1843: archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1844: else
1845: archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1846: fi
1847: runpath_var='LD_RUN_PATH'
1848: hardcode_shlibpath_var=no
1849: ;;
1850:
1851: *)
1852: ld_shlibs=no
1853: ;;
1854: esac
1855: fi
1856: AC_MSG_RESULT([$ld_shlibs])
1857: test "$ld_shlibs" = no && can_build_shared=no
1858:
1859: # Check hardcoding attributes.
1860: AC_MSG_CHECKING([how to hardcode library paths into programs])
1861: hardcode_action=
1862: if test -n "$hardcode_libdir_flag_spec" || \
1863: test -n "$runpath_var"; then
1864:
1865: # We can hardcode non-existant directories.
1866: if test "$hardcode_direct" != no &&
1867: # If the only mechanism to avoid hardcoding is shlibpath_var, we
1868: # have to relink, otherwise we might link with an installed library
1869: # when we should be linking with a yet-to-be-installed one
1870: ## test "$hardcode_shlibpath_var" != no &&
1871: test "$hardcode_minus_L" != no; then
1872: # Linking always hardcodes the temporary library directory.
1873: hardcode_action=relink
1874: else
1875: # We can link without hardcoding, and we can hardcode nonexisting dirs.
1876: hardcode_action=immediate
1877: fi
1878: else
1879: # We cannot hardcode anything, or else we can only hardcode existing
1880: # directories.
1881: hardcode_action=unsupported
1882: fi
1883: AC_MSG_RESULT([$hardcode_action])
1884:
1885: striplib=
1886: old_striplib=
1887: AC_MSG_CHECKING([whether stripping libraries is possible])
1888: if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1889: test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1890: test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1891: AC_MSG_RESULT([yes])
1892: else
1893: AC_MSG_RESULT([no])
1894: fi
1895:
1896: reload_cmds='$LD$reload_flag -o $output$reload_objs'
1897: test -z "$deplibs_check_method" && deplibs_check_method=unknown
1898:
1899: # PORTME Fill in your ld.so characteristics
1900: AC_MSG_CHECKING([dynamic linker characteristics])
1901: library_names_spec=
1902: libname_spec='lib$name'
1903: soname_spec=
1904: postinstall_cmds=
1905: postuninstall_cmds=
1906: finish_cmds=
1907: finish_eval=
1908: shlibpath_var=
1909: shlibpath_overrides_runpath=unknown
1910: version_type=none
1911: dynamic_linker="$host_os ld.so"
1912: sys_lib_dlsearch_path_spec="/lib /usr/lib"
1913: sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1914:
1915: case $host_os in
1916: aix3*)
1917: version_type=linux
1918: library_names_spec='${libname}${release}.so$versuffix $libname.a'
1919: shlibpath_var=LIBPATH
1920:
1921: # AIX has no versioning support, so we append a major version to the name.
1922: soname_spec='${libname}${release}.so$major'
1923: ;;
1924:
1925: aix4* | aix5*)
1926: version_type=linux
1927: need_lib_prefix=no
1928: need_version=no
1929: hardcode_into_libs=yes
1930: if test "$host_cpu" = ia64; then
1931: # AIX 5 supports IA64
1932: library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1933: shlibpath_var=LD_LIBRARY_PATH
1934: else
1935: # With GCC up to 2.95.x, collect2 would create an import file
1936: # for dependence libraries. The import file would start with
1937: # the line `#! .'. This would cause the generated library to
1938: # depend on `.', always an invalid library. This was fixed in
1939: # development snapshots of GCC prior to 3.0.
1940: case $host_os in
1941: aix4 | aix4.[[01]] | aix4.[[01]].*)
1942: if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1943: echo ' yes '
1944: echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1945: :
1946: else
1947: can_build_shared=no
1948: fi
1949: ;;
1950: esac
1951: # AIX (on Power*) has no versioning support, so currently we can
1952: # not hardcode correct soname into executable. Probably we can
1953: # add versioning support to collect2, so additional links can
1954: # be useful in future.
1955: if test "$aix_use_runtimelinking" = yes; then
1956: # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1957: # instead of lib<name>.a to let people know that these are not
1958: # typical AIX shared libraries.
1959: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1960: else
1961: # We preserve .a as extension for shared libraries through AIX4.2
1962: # and later when we are not doing run time linking.
1963: library_names_spec='${libname}${release}.a $libname.a'
1964: soname_spec='${libname}${release}.so$major'
1965: fi
1966: shlibpath_var=LIBPATH
1967: fi
1968: hardcode_into_libs=yes
1969: ;;
1970:
1971: amigaos*)
1972: library_names_spec='$libname.ixlibrary $libname.a'
1973: # Create ${libname}_ixlibrary.a entries in /sys/libs.
1974: finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1975: ;;
1976:
1977: beos*)
1978: library_names_spec='${libname}.so'
1979: dynamic_linker="$host_os ld.so"
1980: shlibpath_var=LIBRARY_PATH
1981: ;;
1982:
1983: bsdi4*)
1984: version_type=linux
1985: need_version=no
1986: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1987: soname_spec='${libname}${release}.so$major'
1988: finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1989: shlibpath_var=LD_LIBRARY_PATH
1990: sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1991: sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1992: export_dynamic_flag_spec=-rdynamic
1993: # the default ld.so.conf also contains /usr/contrib/lib and
1994: # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1995: # libtool to hard-code these into programs
1996: ;;
1997:
1998: cygwin* | mingw* | pw32*)
1999: version_type=windows
2000: need_version=no
2001: need_lib_prefix=no
2002: case $GCC,$host_os in
2003: yes,cygwin*)
2004: library_names_spec='$libname.dll.a'
2005: soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2006: postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2007: dldir=$destdir/`dirname \$dlpath`~
2008: test -d \$dldir || mkdir -p \$dldir~
2009: $install_prog .libs/$dlname \$dldir/$dlname'
2010: postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2011: dlpath=$dir/\$dldll~
2012: $rm \$dlpath'
2013: ;;
2014: yes,mingw*)
2015: library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2016: sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2017: ;;
2018: yes,pw32*)
2019: library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2020: ;;
2021: *)
2022: library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2023: ;;
2024: esac
2025: dynamic_linker='Win32 ld.exe'
2026: # FIXME: first we should search . and the directory the executable is in
2027: shlibpath_var=PATH
2028: ;;
2029:
2030: darwin* | rhapsody*)
2031: dynamic_linker="$host_os dyld"
2032: version_type=darwin
2033: need_lib_prefix=no
2034: need_version=no
2035: # FIXME: Relying on posixy $() will cause problems for
2036: # cross-compilation, but unfortunately the echo tests do not
2037: # yet detect zsh echo's removal of \ escapes.
2038: library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2039: soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2040: shlibpath_overrides_runpath=yes
2041: shlibpath_var=DYLD_LIBRARY_PATH
2042: ;;
2043:
2044: freebsd1*)
2045: dynamic_linker=no
2046: ;;
2047:
2048: freebsd*)
2049: objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2050: version_type=freebsd-$objformat
2051: case $version_type in
2052: freebsd-elf*)
2053: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2054: need_version=no
2055: need_lib_prefix=no
2056: ;;
2057: freebsd-*)
2058: library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2059: need_version=yes
2060: ;;
2061: esac
2062: shlibpath_var=LD_LIBRARY_PATH
2063: case $host_os in
2064: freebsd2*)
2065: shlibpath_overrides_runpath=yes
2066: ;;
2067: *)
2068: shlibpath_overrides_runpath=no
2069: hardcode_into_libs=yes
2070: ;;
2071: esac
2072: ;;
2073:
2074: gnu*)
2075: version_type=linux
2076: need_lib_prefix=no
2077: need_version=no
2078: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2079: soname_spec='${libname}${release}.so$major'
2080: shlibpath_var=LD_LIBRARY_PATH
2081: hardcode_into_libs=yes
2082: ;;
2083:
2084: hpux9* | hpux10* | hpux11*)
2085: # Give a soname corresponding to the major version so that dld.sl refuses to
2086: # link against other versions.
2087: dynamic_linker="$host_os dld.sl"
2088: version_type=sunos
2089: need_lib_prefix=no
2090: need_version=no
2091: shlibpath_var=SHLIB_PATH
2092: shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2093: library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2094: soname_spec='${libname}${release}.sl$major'
2095: # HP-UX runs *really* slowly unless shared libraries are mode 555.
2096: postinstall_cmds='chmod 555 $lib'
2097: ;;
2098:
2099: irix5* | irix6* | nonstopux*)
2100: case $host_os in
2101: nonstopux*) version_type=nonstopux ;;
2102: *) version_type=irix ;;
2103: esac
2104: need_lib_prefix=no
2105: need_version=no
2106: soname_spec='${libname}${release}.so$major'
2107: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2108: case $host_os in
2109: irix5* | nonstopux*)
2110: libsuff= shlibsuff=
2111: ;;
2112: *)
2113: case $LD in # libtool.m4 will add one of these switches to LD
2114: *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2115: *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2116: *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2117: *) libsuff= shlibsuff= libmagic=never-match;;
2118: esac
2119: ;;
2120: esac
2121: shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2122: shlibpath_overrides_runpath=no
2123: sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2124: sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2125: ;;
2126:
2127: # No shared lib support for Linux oldld, aout, or coff.
2128: linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2129: dynamic_linker=no
2130: ;;
2131:
2132: # This must be Linux ELF.
2133: linux-gnu*)
2134: version_type=linux
2135: need_lib_prefix=no
2136: need_version=no
2137: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2138: soname_spec='${libname}${release}.so$major'
2139: finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2140: shlibpath_var=LD_LIBRARY_PATH
2141: shlibpath_overrides_runpath=no
2142: # This implies no fast_install, which is unacceptable.
2143: # Some rework will be needed to allow for fast_install
2144: # before this can be enabled.
2145: hardcode_into_libs=yes
2146:
2147: # We used to test for /lib/ld.so.1 and disable shared libraries on
2148: # powerpc, because MkLinux only supported shared libraries with the
2149: # GNU dynamic linker. Since this was broken with cross compilers,
2150: # most powerpc-linux boxes support dynamic linking these days and
2151: # people can always --disable-shared, the test was removed, and we
2152: # assume the GNU/Linux dynamic linker is in use.
2153: dynamic_linker='GNU/Linux ld.so'
2154: ;;
2155:
2156: netbsd*)
2157: version_type=sunos
2158: need_lib_prefix=no
2159: need_version=no
2160: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2161: library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2162: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2163: dynamic_linker='NetBSD (a.out) ld.so'
2164: else
2165: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2166: soname_spec='${libname}${release}.so$major'
2167: dynamic_linker='NetBSD ld.elf_so'
2168: fi
2169: shlibpath_var=LD_LIBRARY_PATH
2170: shlibpath_overrides_runpath=yes
2171: hardcode_into_libs=yes
2172: ;;
2173:
2174: newsos6)
2175: version_type=linux
2176: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2177: shlibpath_var=LD_LIBRARY_PATH
2178: shlibpath_overrides_runpath=yes
2179: ;;
2180:
2181: openbsd*)
2182: version_type=sunos
2183: need_lib_prefix=no
2184: need_version=no
2185: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2186: case "$host_os" in
2187: openbsd2.[[89]] | openbsd2.[[89]].*)
2188: shlibpath_overrides_runpath=no
2189: ;;
2190: *)
2191: shlibpath_overrides_runpath=yes
2192: ;;
2193: esac
2194: else
2195: shlibpath_overrides_runpath=yes
2196: fi
2197: library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2198: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2199: shlibpath_var=LD_LIBRARY_PATH
2200: ;;
2201:
2202: os2*)
2203: libname_spec='$name'
2204: need_lib_prefix=no
2205: library_names_spec='$libname.dll $libname.a'
2206: dynamic_linker='OS/2 ld.exe'
2207: shlibpath_var=LIBPATH
2208: ;;
2209:
2210: osf3* | osf4* | osf5*)
2211: version_type=osf
2212: need_version=no
2213: soname_spec='${libname}${release}.so$major'
2214: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2215: shlibpath_var=LD_LIBRARY_PATH
2216: sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2217: sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2218: hardcode_into_libs=yes
2219: ;;
2220:
2221: sco3.2v5*)
2222: version_type=osf
2223: soname_spec='${libname}${release}.so$major'
2224: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2225: shlibpath_var=LD_LIBRARY_PATH
2226: ;;
2227:
2228: solaris*)
2229: version_type=linux
2230: need_lib_prefix=no
2231: need_version=no
2232: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2233: soname_spec='${libname}${release}.so$major'
2234: shlibpath_var=LD_LIBRARY_PATH
2235: shlibpath_overrides_runpath=yes
2236: hardcode_into_libs=yes
2237: # ldd complains unless libraries are executable
2238: postinstall_cmds='chmod +x $lib'
2239: ;;
2240:
2241: sunos4*)
2242: version_type=sunos
2243: library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2244: finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2245: shlibpath_var=LD_LIBRARY_PATH
2246: shlibpath_overrides_runpath=yes
2247: if test "$with_gnu_ld" = yes; then
2248: need_lib_prefix=no
2249: fi
2250: need_version=yes
2251: ;;
2252:
2253: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2254: version_type=linux
2255: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2256: soname_spec='${libname}${release}.so$major'
2257: shlibpath_var=LD_LIBRARY_PATH
2258: case $host_vendor in
2259: sni)
2260: shlibpath_overrides_runpath=no
2261: need_lib_prefix=no
2262: export_dynamic_flag_spec='${wl}-Blargedynsym'
2263: runpath_var=LD_RUN_PATH
2264: ;;
2265: siemens)
2266: need_lib_prefix=no
2267: ;;
2268: motorola)
2269: need_lib_prefix=no
2270: need_version=no
2271: shlibpath_overrides_runpath=no
2272: sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2273: ;;
2274: esac
2275: ;;
2276:
2277: uts4*)
2278: version_type=linux
2279: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2280: soname_spec='${libname}${release}.so$major'
2281: shlibpath_var=LD_LIBRARY_PATH
2282: ;;
2283:
2284: dgux*)
2285: version_type=linux
2286: need_lib_prefix=no
2287: need_version=no
2288: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2289: soname_spec='${libname}${release}.so$major'
2290: shlibpath_var=LD_LIBRARY_PATH
2291: ;;
2292:
2293: sysv4*MP*)
2294: if test -d /usr/nec ;then
2295: version_type=linux
2296: library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2297: soname_spec='$libname.so.$major'
2298: shlibpath_var=LD_LIBRARY_PATH
2299: fi
2300: ;;
2301:
2302: *)
2303: dynamic_linker=no
2304: ;;
2305: esac
2306: AC_MSG_RESULT([$dynamic_linker])
2307: test "$dynamic_linker" = no && can_build_shared=no
2308:
2309: # Report the final consequences.
2310: AC_MSG_CHECKING([if libtool supports shared libraries])
2311: AC_MSG_RESULT([$can_build_shared])
2312:
2313: AC_MSG_CHECKING([whether to build shared libraries])
2314: test "$can_build_shared" = "no" && enable_shared=no
2315:
2316: # On AIX, shared libraries and static libraries use the same namespace, and
2317: # are all built from PIC.
2318: case "$host_os" in
2319: aix3*)
2320: test "$enable_shared" = yes && enable_static=no
2321: if test -n "$RANLIB"; then
2322: archive_cmds="$archive_cmds~\$RANLIB \$lib"
2323: postinstall_cmds='$RANLIB $lib'
2324: fi
2325: ;;
2326:
2327: aix4*)
2328: if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2329: test "$enable_shared" = yes && enable_static=no
2330: fi
2331: ;;
2332: esac
2333: AC_MSG_RESULT([$enable_shared])
2334:
2335: AC_MSG_CHECKING([whether to build static libraries])
2336: # Make sure either enable_shared or enable_static is yes.
2337: test "$enable_shared" = yes || enable_static=yes
2338: AC_MSG_RESULT([$enable_static])
2339:
2340: if test "$hardcode_action" = relink; then
2341: # Fast installation is not supported
2342: enable_fast_install=no
2343: elif test "$shlibpath_overrides_runpath" = yes ||
2344: test "$enable_shared" = no; then
2345: # Fast installation is not necessary
2346: enable_fast_install=needless
2347: fi
2348:
2349: variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2350: if test "$GCC" = yes; then
2351: variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2352: fi
2353:
2354: AC_LIBTOOL_DLOPEN_SELF
2355:
2356: if test "$enable_shared" = yes && test "$GCC" = yes; then
2357: case $archive_cmds in
2358: *'~'*)
2359: # FIXME: we may have to deal with multi-command sequences.
2360: ;;
2361: '$CC '*)
2362: # Test whether the compiler implicitly links with -lc since on some
2363: # systems, -lgcc has to come before -lc. If gcc already passes -lc
2364: # to ld, don't add -lc before -lgcc.
2365: AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2366: AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2367: [$rm conftest*
2368: echo 'static int dummy;' > conftest.$ac_ext
2369:
2370: if AC_TRY_EVAL(ac_compile); then
2371: soname=conftest
2372: lib=conftest
2373: libobjs=conftest.$ac_objext
2374: deplibs=
2375: wl=$lt_cv_prog_cc_wl
2376: compiler_flags=-v
2377: linker_flags=-v
2378: verstring=
2379: output_objdir=.
2380: libname=conftest
2381: save_allow_undefined_flag=$allow_undefined_flag
2382: allow_undefined_flag=
2383: if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2384: then
2385: lt_cv_archive_cmds_need_lc=no
2386: else
2387: lt_cv_archive_cmds_need_lc=yes
2388: fi
2389: allow_undefined_flag=$save_allow_undefined_flag
2390: else
2391: cat conftest.err 1>&5
2392: fi])
2393: AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2394: ;;
2395: esac
2396: fi
2397: need_lc=${lt_cv_archive_cmds_need_lc-yes}
2398:
2399: # The second clause should only fire when bootstrapping the
2400: # libtool distribution, otherwise you forgot to ship ltmain.sh
2401: # with your package, and you will get complaints that there are
2402: # no rules to generate ltmain.sh.
2403: if test -f "$ltmain"; then
2404: :
2405: else
2406: # If there is no Makefile yet, we rely on a make rule to execute
2407: # `config.status --recheck' to rerun these tests and create the
2408: # libtool script then.
2409: test -f Makefile && make "$ltmain"
2410: fi
2411:
2412: if test -f "$ltmain"; then
2413: trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2414: $rm -f "${ofile}T"
2415:
2416: echo creating $ofile
2417:
2418: # Now quote all the things that may contain metacharacters while being
2419: # careful not to overquote the AC_SUBSTed values. We take copies of the
2420: # variables and quote the copies for generation of the libtool script.
2421: for var in echo old_CC old_CFLAGS SED \
2422: AR AR_FLAGS CC LD LN_S NM SHELL \
2423: reload_flag reload_cmds wl \
2424: pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2425: thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2426: library_names_spec soname_spec \
2427: RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2428: old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2429: postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2430: old_striplib striplib file_magic_cmd export_symbols_cmds \
2431: deplibs_check_method allow_undefined_flag no_undefined_flag \
2432: finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2433: global_symbol_to_c_name_address \
2434: hardcode_libdir_flag_spec hardcode_libdir_separator \
2435: sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2436: compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2437:
2438: case $var in
2439: reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2440: old_postinstall_cmds | old_postuninstall_cmds | \
2441: export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2442: extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2443: postinstall_cmds | postuninstall_cmds | \
2444: finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2445: # Double-quote double-evaled strings.
2446: eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2447: ;;
2448: *)
2449: eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2450: ;;
2451: esac
2452: done
2453:
2454: cat <<__EOF__ > "${ofile}T"
2455: #! $SHELL
2456:
2457: # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2458: # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2459: # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2460: #
2461: # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2462: # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2463: #
2464: # This program is free software; you can redistribute it and/or modify
2465: # it under the terms of the GNU General Public License as published by
2466: # the Free Software Foundation; either version 2 of the License, or
2467: # (at your option) any later version.
2468: #
2469: # This program is distributed in the hope that it will be useful, but
2470: # WITHOUT ANY WARRANTY; without even the implied warranty of
2471: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2472: # General Public License for more details.
2473: #
2474: # You should have received a copy of the GNU General Public License
2475: # along with this program; if not, write to the Free Software
2476: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2477: #
2478: # As a special exception to the GNU General Public License, if you
2479: # distribute this file as part of a program that contains a
2480: # configuration script generated by Autoconf, you may include it under
2481: # the same distribution terms that you use for the rest of that program.
2482:
2483: # A sed that does not truncate output.
2484: SED=$lt_SED
2485:
2486: # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2487: Xsed="${SED} -e s/^X//"
2488:
2489: # The HP-UX ksh and POSIX shell print the target directory to stdout
2490: # if CDPATH is set.
2491: if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2492:
2493: # ### BEGIN LIBTOOL CONFIG
2494:
2495: # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2496:
2497: # Shell to use when invoking shell scripts.
2498: SHELL=$lt_SHELL
2499:
2500: # Whether or not to build shared libraries.
2501: build_libtool_libs=$enable_shared
2502:
2503: # Whether or not to build static libraries.
2504: build_old_libs=$enable_static
2505:
2506: # Whether or not to add -lc for building shared libraries.
2507: build_libtool_need_lc=$need_lc
2508:
2509: # Whether or not to optimize for fast installation.
2510: fast_install=$enable_fast_install
2511:
2512: # The host system.
2513: host_alias=$host_alias
2514: host=$host
2515:
2516: # An echo program that does not interpret backslashes.
2517: echo=$lt_echo
2518:
2519: # The archiver.
2520: AR=$lt_AR
2521: AR_FLAGS=$lt_AR_FLAGS
2522:
2523: # The default C compiler.
2524: CC=$lt_CC
2525:
2526: # Is the compiler the GNU C compiler?
2527: with_gcc=$GCC
2528:
2529: # The linker used to build libraries.
2530: LD=$lt_LD
2531:
2532: # Whether we need hard or soft links.
2533: LN_S=$lt_LN_S
2534:
2535: # A BSD-compatible nm program.
2536: NM=$lt_NM
2537:
2538: # A symbol stripping program
2539: STRIP=$STRIP
2540:
2541: # Used to examine libraries when file_magic_cmd begins "file"
2542: MAGIC_CMD=$MAGIC_CMD
2543:
2544: # Used on cygwin: DLL creation program.
2545: DLLTOOL="$DLLTOOL"
2546:
2547: # Used on cygwin: object dumper.
2548: OBJDUMP="$OBJDUMP"
2549:
2550: # Used on cygwin: assembler.
2551: AS="$AS"
2552:
2553: # The name of the directory that contains temporary libtool files.
2554: objdir=$objdir
2555:
2556: # How to create reloadable object files.
2557: reload_flag=$lt_reload_flag
2558: reload_cmds=$lt_reload_cmds
2559:
2560: # How to pass a linker flag through the compiler.
2561: wl=$lt_wl
2562:
2563: # Object file suffix (normally "o").
2564: objext="$ac_objext"
2565:
2566: # Old archive suffix (normally "a").
2567: libext="$libext"
2568:
2569: # Executable file suffix (normally "").
2570: exeext="$exeext"
2571:
2572: # Additional compiler flags for building library objects.
2573: pic_flag=$lt_pic_flag
2574: pic_mode=$pic_mode
2575:
2576: # Does compiler simultaneously support -c and -o options?
2577: compiler_c_o=$lt_compiler_c_o
2578:
2579: # Can we write directly to a .lo ?
2580: compiler_o_lo=$lt_compiler_o_lo
2581:
2582: # Must we lock files when doing compilation ?
2583: need_locks=$lt_need_locks
2584:
2585: # Do we need the lib prefix for modules?
2586: need_lib_prefix=$need_lib_prefix
2587:
2588: # Do we need a version for libraries?
2589: need_version=$need_version
2590:
2591: # Whether dlopen is supported.
2592: dlopen_support=$enable_dlopen
2593:
2594: # Whether dlopen of programs is supported.
2595: dlopen_self=$enable_dlopen_self
2596:
2597: # Whether dlopen of statically linked programs is supported.
2598: dlopen_self_static=$enable_dlopen_self_static
2599:
2600: # Compiler flag to prevent dynamic linking.
2601: link_static_flag=$lt_link_static_flag
2602:
2603: # Compiler flag to turn off builtin functions.
2604: no_builtin_flag=$lt_no_builtin_flag
2605:
2606: # Compiler flag to allow reflexive dlopens.
2607: export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
2608:
2609: # Compiler flag to generate shared objects directly from archives.
2610: whole_archive_flag_spec=$lt_whole_archive_flag_spec
2611:
2612: # Compiler flag to generate thread-safe objects.
2613: thread_safe_flag_spec=$lt_thread_safe_flag_spec
2614:
2615: # Library versioning type.
2616: version_type=$version_type
2617:
2618: # Format of library name prefix.
2619: libname_spec=$lt_libname_spec
2620:
2621: # List of archive names. First name is the real one, the rest are links.
2622: # The last name is the one that the linker finds with -lNAME.
2623: library_names_spec=$lt_library_names_spec
2624:
2625: # The coded name of the library, if different from the real name.
2626: soname_spec=$lt_soname_spec
2627:
2628: # Commands used to build and install an old-style archive.
2629: RANLIB=$lt_RANLIB
2630: old_archive_cmds=$lt_old_archive_cmds
2631: old_postinstall_cmds=$lt_old_postinstall_cmds
2632: old_postuninstall_cmds=$lt_old_postuninstall_cmds
2633:
2634: # Create an old-style archive from a shared archive.
2635: old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
2636:
2637: # Create a temporary old-style archive to link instead of a shared archive.
2638: old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
2639:
2640: # Commands used to build and install a shared archive.
2641: archive_cmds=$lt_archive_cmds
2642: archive_expsym_cmds=$lt_archive_expsym_cmds
2643: postinstall_cmds=$lt_postinstall_cmds
2644: postuninstall_cmds=$lt_postuninstall_cmds
2645:
2646: # Commands to strip libraries.
2647: old_striplib=$lt_old_striplib
2648: striplib=$lt_striplib
2649:
2650: # Method to check whether dependent libraries are shared objects.
2651: deplibs_check_method=$lt_deplibs_check_method
2652:
2653: # Command to use when deplibs_check_method == file_magic.
2654: file_magic_cmd=$lt_file_magic_cmd
2655:
2656: # Flag that allows shared libraries with undefined symbols to be built.
2657: allow_undefined_flag=$lt_allow_undefined_flag
2658:
2659: # Flag that forces no undefined symbols.
2660: no_undefined_flag=$lt_no_undefined_flag
2661:
2662: # Commands used to finish a libtool library installation in a directory.
2663: finish_cmds=$lt_finish_cmds
2664:
2665: # Same as above, but a single script fragment to be evaled but not shown.
2666: finish_eval=$lt_finish_eval
2667:
2668: # Take the output of nm and produce a listing of raw symbols and C names.
2669: global_symbol_pipe=$lt_global_symbol_pipe
2670:
2671: # Transform the output of nm in a proper C declaration
2672: global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
2673:
2674: # Transform the output of nm in a C name address pair
2675: global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
2676:
2677: # This is the shared library runtime path variable.
2678: runpath_var=$runpath_var
2679:
2680: # This is the shared library path variable.
2681: shlibpath_var=$shlibpath_var
2682:
2683: # Is shlibpath searched before the hard-coded library search path?
2684: shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2685:
2686: # How to hardcode a shared library path into an executable.
2687: hardcode_action=$hardcode_action
2688:
2689: # Whether we should hardcode library paths into libraries.
2690: hardcode_into_libs=$hardcode_into_libs
2691:
2692: # Flag to hardcode \$libdir into a binary during linking.
2693: # This must work even if \$libdir does not exist.
2694: hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
2695:
2696: # Whether we need a single -rpath flag with a separated argument.
2697: hardcode_libdir_separator=$lt_hardcode_libdir_separator
2698:
2699: # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2700: # resulting binary.
2701: hardcode_direct=$hardcode_direct
2702:
2703: # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2704: # resulting binary.
2705: hardcode_minus_L=$hardcode_minus_L
2706:
2707: # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2708: # the resulting binary.
2709: hardcode_shlibpath_var=$hardcode_shlibpath_var
2710:
2711: # Variables whose values should be saved in libtool wrapper scripts and
2712: # restored at relink time.
2713: variables_saved_for_relink="$variables_saved_for_relink"
2714:
2715: # Whether libtool must link a program against all its dependency libraries.
2716: link_all_deplibs=$link_all_deplibs
2717:
2718: # Compile-time system search path for libraries
2719: sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
2720:
2721: # Run-time system search path for libraries
2722: sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
2723:
2724: # Fix the shell variable \$srcfile for the compiler.
2725: fix_srcfile_path="$fix_srcfile_path"
2726:
2727: # Set to yes if exported symbols are required.
2728: always_export_symbols=$always_export_symbols
2729:
2730: # The commands to list exported symbols.
2731: export_symbols_cmds=$lt_export_symbols_cmds
2732:
2733: # The commands to extract the exported symbol list from a shared archive.
2734: extract_expsyms_cmds=$lt_extract_expsyms_cmds
2735:
2736: # Symbols that should not be listed in the preloaded symbols.
2737: exclude_expsyms=$lt_exclude_expsyms
2738:
2739: # Symbols that must always be exported.
2740: include_expsyms=$lt_include_expsyms
2741:
2742: # ### END LIBTOOL CONFIG
2743:
2744: __EOF__
2745:
2746: case $host_os in
2747: aix3*)
2748: cat <<\EOF >> "${ofile}T"
2749:
2750: # AIX sometimes has problems with the GCC collect2 program. For some
2751: # reason, if we set the COLLECT_NAMES environment variable, the problems
2752: # vanish in a puff of smoke.
2753: if test "X${COLLECT_NAMES+set}" != Xset; then
2754: COLLECT_NAMES=
2755: export COLLECT_NAMES
2756: fi
2757: EOF
2758: ;;
2759: esac
2760:
2761: case $host_os in
2762: cygwin* | mingw* | pw32* | os2*)
2763: cat <<'EOF' >> "${ofile}T"
2764: # This is a source program that is used to create dlls on Windows
2765: # Don't remove nor modify the starting and closing comments
2766: # /* ltdll.c starts here */
2767: # #define WIN32_LEAN_AND_MEAN
2768: # #include <windows.h>
2769: # #undef WIN32_LEAN_AND_MEAN
2770: # #include <stdio.h>
2771: #
2772: # #ifndef __CYGWIN__
2773: # # ifdef __CYGWIN32__
2774: # # define __CYGWIN__ __CYGWIN32__
2775: # # endif
2776: # #endif
2777: #
2778: # #ifdef __cplusplus
2779: # extern "C" {
2780: # #endif
2781: # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2782: # #ifdef __cplusplus
2783: # }
2784: # #endif
2785: #
2786: # #ifdef __CYGWIN__
2787: # #include <cygwin/cygwin_dll.h>
2788: # DECLARE_CYGWIN_DLL( DllMain );
2789: # #endif
2790: # HINSTANCE __hDllInstance_base;
2791: #
2792: # BOOL APIENTRY
2793: # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2794: # {
2795: # __hDllInstance_base = hInst;
2796: # return TRUE;
2797: # }
2798: # /* ltdll.c ends here */
2799: # This is a source program that is used to create import libraries
2800: # on Windows for dlls which lack them. Don't remove nor modify the
2801: # starting and closing comments
2802: # /* impgen.c starts here */
2803: # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2804: #
2805: # This file is part of GNU libtool.
2806: #
2807: # This program is free software; you can redistribute it and/or modify
2808: # it under the terms of the GNU General Public License as published by
2809: # the Free Software Foundation; either version 2 of the License, or
2810: # (at your option) any later version.
2811: #
2812: # This program is distributed in the hope that it will be useful,
2813: # but WITHOUT ANY WARRANTY; without even the implied warranty of
2814: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2815: # GNU General Public License for more details.
2816: #
2817: # You should have received a copy of the GNU General Public License
2818: # along with this program; if not, write to the Free Software
2819: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2820: # */
2821: #
2822: # #include <stdio.h> /* for printf() */
2823: # #include <unistd.h> /* for open(), lseek(), read() */
2824: # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2825: # #include <string.h> /* for strdup() */
2826: #
2827: # /* O_BINARY isn't required (or even defined sometimes) under Unix */
2828: # #ifndef O_BINARY
2829: # #define O_BINARY 0
2830: # #endif
2831: #
2832: # static unsigned int
2833: # pe_get16 (fd, offset)
2834: # int fd;
2835: # int offset;
2836: # {
2837: # unsigned char b[2];
2838: # lseek (fd, offset, SEEK_SET);
2839: # read (fd, b, 2);
2840: # return b[0] + (b[1]<<8);
2841: # }
2842: #
2843: # static unsigned int
2844: # pe_get32 (fd, offset)
2845: # int fd;
2846: # int offset;
2847: # {
2848: # unsigned char b[4];
2849: # lseek (fd, offset, SEEK_SET);
2850: # read (fd, b, 4);
2851: # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2852: # }
2853: #
2854: # static unsigned int
2855: # pe_as32 (ptr)
2856: # void *ptr;
2857: # {
2858: # unsigned char *b = ptr;
2859: # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2860: # }
2861: #
2862: # int
2863: # main (argc, argv)
2864: # int argc;
2865: # char *argv[];
2866: # {
2867: # int dll;
2868: # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2869: # unsigned long export_rva, export_size, nsections, secptr, expptr;
2870: # unsigned long name_rvas, nexp;
2871: # unsigned char *expdata, *erva;
2872: # char *filename, *dll_name;
2873: #
2874: # filename = argv[1];
2875: #
2876: # dll = open(filename, O_RDONLY|O_BINARY);
2877: # if (dll < 1)
2878: # return 1;
2879: #
2880: # dll_name = filename;
2881: #
2882: # for (i=0; filename[i]; i++)
2883: # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
2884: # dll_name = filename + i +1;
2885: #
2886: # pe_header_offset = pe_get32 (dll, 0x3c);
2887: # opthdr_ofs = pe_header_offset + 4 + 20;
2888: # num_entries = pe_get32 (dll, opthdr_ofs + 92);
2889: #
2890: # if (num_entries < 1) /* no exports */
2891: # return 1;
2892: #
2893: # export_rva = pe_get32 (dll, opthdr_ofs + 96);
2894: # export_size = pe_get32 (dll, opthdr_ofs + 100);
2895: # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
2896: # secptr = (pe_header_offset + 4 + 20 +
2897: # pe_get16 (dll, pe_header_offset + 4 + 16));
2898: #
2899: # expptr = 0;
2900: # for (i = 0; i < nsections; i++)
2901: # {
2902: # char sname[8];
2903: # unsigned long secptr1 = secptr + 40 * i;
2904: # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
2905: # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
2906: # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
2907: # lseek(dll, secptr1, SEEK_SET);
2908: # read(dll, sname, 8);
2909: # if (vaddr <= export_rva && vaddr+vsize > export_rva)
2910: # {
2911: # expptr = fptr + (export_rva - vaddr);
2912: # if (export_rva + export_size > vaddr + vsize)
2913: # export_size = vsize - (export_rva - vaddr);
2914: # break;
2915: # }
2916: # }
2917: #
2918: # expdata = (unsigned char*)malloc(export_size);
2919: # lseek (dll, expptr, SEEK_SET);
2920: # read (dll, expdata, export_size);
2921: # erva = expdata - export_rva;
2922: #
2923: # nexp = pe_as32 (expdata+24);
2924: # name_rvas = pe_as32 (expdata+32);
2925: #
2926: # printf ("EXPORTS\n");
2927: # for (i = 0; i<nexp; i++)
2928: # {
2929: # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
2930: # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
2931: # }
2932: #
2933: # return 0;
2934: # }
2935: # /* impgen.c ends here */
1.15 paf 2936:
1.25 paf 2937: EOF
2938: ;;
2939: esac
2940:
2941: # We use sed instead of cat because bash on DJGPP gets confused if
2942: # if finds mixed CR/LF and LF-only lines. Since sed operates in
2943: # text mode, it properly converts lines to CR/LF. This bash problem
2944: # is reportedly fixed, but why not run on old versions too?
2945: sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
2946:
2947: mv -f "${ofile}T" "$ofile" || \
2948: (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
2949: chmod +x "$ofile"
2950: fi
2951:
2952: ])# _LT_AC_LTCONFIG_HACK
2953:
2954: # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
2955: AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
2956:
2957: # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
2958: AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
2959:
2960: # AC_ENABLE_SHARED - implement the --enable-shared flag
2961: # Usage: AC_ENABLE_SHARED[(DEFAULT)]
2962: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2963: # `yes'.
2964: AC_DEFUN([AC_ENABLE_SHARED],
2965: [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2966: AC_ARG_ENABLE(shared,
2967: changequote(<<, >>)dnl
2968: << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2969: changequote([, ])dnl
2970: [p=${PACKAGE-default}
2971: case $enableval in
2972: yes) enable_shared=yes ;;
2973: no) enable_shared=no ;;
2974: *)
2975: enable_shared=no
2976: # Look at the argument we got. We use all the common list separators.
2977: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2978: for pkg in $enableval; do
2979: if test "X$pkg" = "X$p"; then
2980: enable_shared=yes
2981: fi
2982: done
2983: IFS="$ac_save_ifs"
2984: ;;
2985: esac],
2986: enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
2987: ])
2988:
2989: # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
2990: AC_DEFUN([AC_DISABLE_SHARED],
2991: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2992: AC_ENABLE_SHARED(no)])
2993:
2994: # AC_ENABLE_STATIC - implement the --enable-static flag
2995: # Usage: AC_ENABLE_STATIC[(DEFAULT)]
2996: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2997: # `yes'.
2998: AC_DEFUN([AC_ENABLE_STATIC],
2999: [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3000: AC_ARG_ENABLE(static,
3001: changequote(<<, >>)dnl
3002: << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3003: changequote([, ])dnl
3004: [p=${PACKAGE-default}
3005: case $enableval in
3006: yes) enable_static=yes ;;
3007: no) enable_static=no ;;
3008: *)
3009: enable_static=no
3010: # Look at the argument we got. We use all the common list separators.
3011: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3012: for pkg in $enableval; do
3013: if test "X$pkg" = "X$p"; then
3014: enable_static=yes
3015: fi
3016: done
3017: IFS="$ac_save_ifs"
3018: ;;
3019: esac],
3020: enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3021: ])
3022:
3023: # AC_DISABLE_STATIC - set the default static flag to --disable-static
3024: AC_DEFUN([AC_DISABLE_STATIC],
3025: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3026: AC_ENABLE_STATIC(no)])
3027:
3028:
3029: # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3030: # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3031: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3032: # `yes'.
3033: AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3034: [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3035: AC_ARG_ENABLE(fast-install,
3036: changequote(<<, >>)dnl
3037: << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3038: changequote([, ])dnl
3039: [p=${PACKAGE-default}
3040: case $enableval in
3041: yes) enable_fast_install=yes ;;
3042: no) enable_fast_install=no ;;
3043: *)
3044: enable_fast_install=no
3045: # Look at the argument we got. We use all the common list separators.
3046: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3047: for pkg in $enableval; do
3048: if test "X$pkg" = "X$p"; then
3049: enable_fast_install=yes
3050: fi
3051: done
3052: IFS="$ac_save_ifs"
3053: ;;
3054: esac],
3055: enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3056: ])
3057:
3058: # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3059: AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3060: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3061: AC_ENABLE_FAST_INSTALL(no)])
3062:
3063: # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3064: # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3065: # Where MODE is either `yes' or `no'. If omitted, it defaults to
3066: # `both'.
3067: AC_DEFUN([AC_LIBTOOL_PICMODE],
3068: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3069: pic_mode=ifelse($#,1,$1,default)])
3070:
3071:
3072: # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3073: AC_DEFUN([AC_PATH_TOOL_PREFIX],
3074: [AC_MSG_CHECKING([for $1])
3075: AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3076: [case $MAGIC_CMD in
3077: /*)
3078: lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3079: ;;
3080: ?:/*)
3081: lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3082: ;;
3083: *)
3084: ac_save_MAGIC_CMD="$MAGIC_CMD"
3085: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3086: dnl $ac_dummy forces splitting on constant user-supplied paths.
3087: dnl POSIX.2 word splitting is done only on the output of word expansions,
3088: dnl not every word. This closes a longstanding sh security hole.
3089: ac_dummy="ifelse([$2], , $PATH, [$2])"
3090: for ac_dir in $ac_dummy; do
3091: test -z "$ac_dir" && ac_dir=.
3092: if test -f $ac_dir/$1; then
3093: lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3094: if test -n "$file_magic_test_file"; then
3095: case $deplibs_check_method in
3096: "file_magic "*)
3097: file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3098: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3099: if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3100: egrep "$file_magic_regex" > /dev/null; then
3101: :
3102: else
3103: cat <<EOF 1>&2
3104:
3105: *** Warning: the command libtool uses to detect shared libraries,
3106: *** $file_magic_cmd, produces output that libtool cannot recognize.
3107: *** The result is that libtool may fail to recognize shared libraries
3108: *** as such. This will affect the creation of libtool libraries that
3109: *** depend on shared libraries, but programs linked with such libtool
3110: *** libraries will work regardless of this problem. Nevertheless, you
3111: *** may want to report the problem to your system manager and/or to
3112: *** bug-libtool@gnu.org
3113:
3114: EOF
3115: fi ;;
3116: esac
3117: fi
3118: break
3119: fi
3120: done
3121: IFS="$ac_save_ifs"
3122: MAGIC_CMD="$ac_save_MAGIC_CMD"
3123: ;;
3124: esac])
3125: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3126: if test -n "$MAGIC_CMD"; then
3127: AC_MSG_RESULT($MAGIC_CMD)
3128: else
3129: AC_MSG_RESULT(no)
3130: fi
3131: ])
3132:
3133:
3134: # AC_PATH_MAGIC - find a file program which can recognise a shared library
3135: AC_DEFUN([AC_PATH_MAGIC],
3136: [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3137: AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3138: if test -z "$lt_cv_path_MAGIC_CMD"; then
3139: if test -n "$ac_tool_prefix"; then
3140: AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3141: else
3142: MAGIC_CMD=:
3143: fi
3144: fi
3145: ])
3146:
3147:
3148: # AC_PROG_LD - find the path to the GNU or non-GNU linker
3149: AC_DEFUN([AC_PROG_LD],
3150: [AC_ARG_WITH(gnu-ld,
3151: [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3152: test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3153: AC_REQUIRE([AC_PROG_CC])dnl
3154: AC_REQUIRE([AC_CANONICAL_HOST])dnl
3155: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3156: AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3157: ac_prog=ld
3158: if test "$GCC" = yes; then
3159: # Check if gcc -print-prog-name=ld gives a path.
3160: AC_MSG_CHECKING([for ld used by GCC])
3161: case $host in
3162: *-*-mingw*)
3163: # gcc leaves a trailing carriage return which upsets mingw
3164: ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3165: *)
3166: ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3167: esac
3168: case $ac_prog in
3169: # Accept absolute paths.
3170: [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3171: re_direlt='/[[^/]][[^/]]*/\.\./'
3172: # Canonicalize the path of ld
3173: ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3174: while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3175: ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3176: done
3177: test -z "$LD" && LD="$ac_prog"
3178: ;;
3179: "")
3180: # If it fails, then pretend we aren't using GCC.
3181: ac_prog=ld
3182: ;;
3183: *)
3184: # If it is relative, then search for the first ld in PATH.
3185: with_gnu_ld=unknown
3186: ;;
3187: esac
3188: elif test "$with_gnu_ld" = yes; then
3189: AC_MSG_CHECKING([for GNU ld])
3190: else
3191: AC_MSG_CHECKING([for non-GNU ld])
3192: fi
3193: AC_CACHE_VAL(lt_cv_path_LD,
3194: [if test -z "$LD"; then
3195: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3196: for ac_dir in $PATH; do
3197: test -z "$ac_dir" && ac_dir=.
3198: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3199: lt_cv_path_LD="$ac_dir/$ac_prog"
3200: # Check to see if the program is GNU ld. I'd rather use --version,
3201: # but apparently some GNU ld's only accept -v.
3202: # Break only if it was the GNU/non-GNU ld that we prefer.
3203: if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3204: test "$with_gnu_ld" != no && break
3205: else
3206: test "$with_gnu_ld" != yes && break
3207: fi
3208: fi
3209: done
3210: IFS="$ac_save_ifs"
3211: else
3212: lt_cv_path_LD="$LD" # Let the user override the test with a path.
3213: fi])
3214: LD="$lt_cv_path_LD"
3215: if test -n "$LD"; then
3216: AC_MSG_RESULT($LD)
3217: else
3218: AC_MSG_RESULT(no)
3219: fi
3220: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3221: AC_PROG_LD_GNU
3222: ])
3223:
3224: # AC_PROG_LD_GNU -
3225: AC_DEFUN([AC_PROG_LD_GNU],
3226: [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3227: [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3228: if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3229: lt_cv_prog_gnu_ld=yes
3230: else
3231: lt_cv_prog_gnu_ld=no
3232: fi])
3233: with_gnu_ld=$lt_cv_prog_gnu_ld
3234: ])
3235:
3236: # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3237: # -- PORTME Some linkers may need a different reload flag.
3238: AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3239: [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3240: [lt_cv_ld_reload_flag='-r'])
3241: reload_flag=$lt_cv_ld_reload_flag
3242: test -n "$reload_flag" && reload_flag=" $reload_flag"
3243: ])
3244:
3245: # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3246: # -- PORTME fill in with the dynamic library characteristics
3247: AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3248: [AC_CACHE_CHECK([how to recognise dependent libraries],
3249: lt_cv_deplibs_check_method,
3250: [lt_cv_file_magic_cmd='$MAGIC_CMD'
3251: lt_cv_file_magic_test_file=
3252: lt_cv_deplibs_check_method='unknown'
3253: # Need to set the preceding variable on all platforms that support
3254: # interlibrary dependencies.
3255: # 'none' -- dependencies not supported.
3256: # `unknown' -- same as none, but documents that we really don't know.
3257: # 'pass_all' -- all dependencies passed with no checks.
3258: # 'test_compile' -- check by making test program.
3259: # 'file_magic [[regex]]' -- check by looking for files in library path
3260: # which responds to the $file_magic_cmd with a given egrep regex.
3261: # If you have `file' or equivalent on your system and you're not sure
3262: # whether `pass_all' will *always* work, you probably want this one.
3263:
3264: case $host_os in
3265: aix4* | aix5*)
3266: lt_cv_deplibs_check_method=pass_all
3267: ;;
3268:
3269: beos*)
3270: lt_cv_deplibs_check_method=pass_all
3271: ;;
3272:
3273: bsdi4*)
3274: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3275: lt_cv_file_magic_cmd='/usr/bin/file -L'
3276: lt_cv_file_magic_test_file=/shlib/libc.so
3277: ;;
3278:
3279: cygwin* | mingw* | pw32*)
3280: lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3281: lt_cv_file_magic_cmd='$OBJDUMP -f'
3282: ;;
3283:
3284: darwin* | rhapsody*)
3285: lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3286: lt_cv_file_magic_cmd='/usr/bin/file -L'
3287: case "$host_os" in
3288: rhapsody* | darwin1.[[012]])
3289: lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3290: ;;
3291: *) # Darwin 1.3 on
3292: lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3293: ;;
3294: esac
3295: ;;
3296:
3297: freebsd*)
3298: if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3299: case $host_cpu in
3300: i*86 )
3301: # Not sure whether the presence of OpenBSD here was a mistake.
3302: # Let's accept both of them until this is cleared up.
3303: lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3304: lt_cv_file_magic_cmd=/usr/bin/file
3305: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3306: ;;
3307: esac
3308: else
3309: lt_cv_deplibs_check_method=pass_all
3310: fi
3311: ;;
3312:
3313: gnu*)
3314: lt_cv_deplibs_check_method=pass_all
3315: ;;
3316:
3317: hpux10.20*|hpux11*)
3318: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3319: lt_cv_file_magic_cmd=/usr/bin/file
3320: lt_cv_file_magic_test_file=/usr/lib/libc.sl
3321: ;;
3322:
3323: irix5* | irix6* | nonstopux*)
3324: case $host_os in
3325: irix5* | nonstopux*)
3326: # this will be overridden with pass_all, but let us keep it just in case
3327: lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3328: ;;
3329: *)
3330: case $LD in
3331: *-32|*"-32 ") libmagic=32-bit;;
3332: *-n32|*"-n32 ") libmagic=N32;;
3333: *-64|*"-64 ") libmagic=64-bit;;
3334: *) libmagic=never-match;;
3335: esac
3336: # this will be overridden with pass_all, but let us keep it just in case
3337: lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3338: ;;
3339: esac
3340: lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3341: lt_cv_deplibs_check_method=pass_all
3342: ;;
3343:
3344: # This must be Linux ELF.
3345: linux-gnu*)
3346: case $host_cpu in
3347: alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3348: lt_cv_deplibs_check_method=pass_all ;;
3349: *)
3350: # glibc up to 2.1.1 does not perform some relocations on ARM
3351: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3352: esac
3353: lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3354: ;;
3355:
3356: netbsd*)
3357: if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3358: lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3359: else
3360: lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3361: fi
3362: ;;
3363:
3364: newos6*)
3365: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3366: lt_cv_file_magic_cmd=/usr/bin/file
3367: lt_cv_file_magic_test_file=/usr/lib/libnls.so
3368: ;;
3369:
3370: openbsd*)
3371: lt_cv_file_magic_cmd=/usr/bin/file
3372: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3373: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3374: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3375: else
3376: lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3377: fi
3378: ;;
3379:
3380: osf3* | osf4* | osf5*)
3381: # this will be overridden with pass_all, but let us keep it just in case
3382: lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3383: lt_cv_file_magic_test_file=/shlib/libc.so
3384: lt_cv_deplibs_check_method=pass_all
3385: ;;
3386:
3387: sco3.2v5*)
3388: lt_cv_deplibs_check_method=pass_all
3389: ;;
3390:
3391: solaris*)
3392: lt_cv_deplibs_check_method=pass_all
3393: lt_cv_file_magic_test_file=/lib/libc.so
3394: ;;
3395:
3396: sysv5uw[[78]]* | sysv4*uw2*)
3397: lt_cv_deplibs_check_method=pass_all
3398: ;;
3399:
3400: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3401: case $host_vendor in
3402: motorola)
3403: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3404: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3405: ;;
3406: ncr)
3407: lt_cv_deplibs_check_method=pass_all
3408: ;;
3409: sequent)
3410: lt_cv_file_magic_cmd='/bin/file'
3411: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3412: ;;
3413: sni)
3414: lt_cv_file_magic_cmd='/bin/file'
3415: lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3416: lt_cv_file_magic_test_file=/lib/libc.so
3417: ;;
3418: siemens)
3419: lt_cv_deplibs_check_method=pass_all
3420: ;;
3421: esac
3422: ;;
3423: esac
3424: ])
3425: file_magic_cmd=$lt_cv_file_magic_cmd
3426: deplibs_check_method=$lt_cv_deplibs_check_method
3427: ])
3428:
3429:
3430: # AC_PROG_NM - find the path to a BSD-compatible name lister
3431: AC_DEFUN([AC_PROG_NM],
3432: [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3433: AC_MSG_CHECKING([for BSD-compatible nm])
3434: AC_CACHE_VAL(lt_cv_path_NM,
3435: [if test -n "$NM"; then
3436: # Let the user override the test.
3437: lt_cv_path_NM="$NM"
3438: else
3439: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3440: for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3441: test -z "$ac_dir" && ac_dir=.
3442: tmp_nm=$ac_dir/${ac_tool_prefix}nm
3443: if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3444: # Check to see if the nm accepts a BSD-compat flag.
3445: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3446: # nm: unknown option "B" ignored
3447: # Tru64's nm complains that /dev/null is an invalid object file
3448: if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3449: lt_cv_path_NM="$tmp_nm -B"
3450: break
3451: elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3452: lt_cv_path_NM="$tmp_nm -p"
3453: break
3454: else
3455: lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3456: continue # so that we can try to find one that supports BSD flags
3457: fi
3458: fi
3459: done
3460: IFS="$ac_save_ifs"
3461: test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3462: fi])
3463: NM="$lt_cv_path_NM"
3464: AC_MSG_RESULT([$NM])
3465: ])
3466:
3467: # AC_CHECK_LIBM - check for math library
3468: AC_DEFUN([AC_CHECK_LIBM],
3469: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3470: LIBM=
3471: case $host in
3472: *-*-beos* | *-*-cygwin* | *-*-pw32*)
3473: # These system don't have libm
3474: ;;
3475: *-ncr-sysv4.3*)
3476: AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3477: AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3478: ;;
3479: *)
3480: AC_CHECK_LIB(m, main, LIBM="-lm")
3481: ;;
3482: esac
3483: ])
3484:
3485: # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3486: # the libltdl installable library and LTDLINCL to the include flags for
3487: # the libltdl header and adds --enable-ltdl-install to the configure
3488: # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3489: # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3490: # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3491: # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3492: # with '${top_srcdir}/' (note the single quotes!). If your package is
3493: # not flat and you're not using automake, define top_builddir and
1.1 paf 3494: # top_srcdir appropriately in the Makefiles.
1.25 paf 3495: # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3496: AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3497: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3498: AC_CHECK_LIB(ltdl, main,
3499: [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3500: [if test x"$enable_ltdl_install" = xno; then
3501: AC_MSG_WARN([libltdl not installed, but installation disabled])
3502: else
3503: enable_ltdl_install=yes
3504: fi
3505: ])
3506: if test x"$enable_ltdl_install" = x"yes"; then
3507: ac_configure_args="$ac_configure_args --enable-ltdl-install"
3508: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3509: LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3510: else
3511: ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3512: LIBLTDL="-lltdl"
3513: LTDLINCL=
3514: fi
3515: # For backwards non-gettext consistent compatibility...
3516: INCLTDL="$LTDLINCL"
3517: ])
3518:
3519: # old names
3520: AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3521: AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3522: AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3523: AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3524: AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3525: AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3526: AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3527:
3528: # This is just to silence aclocal about the macro not being used
3529: ifelse([AC_DISABLE_FAST_INSTALL])
3530:
3531: # NOTE: This macro has been submitted for inclusion into #
3532: # GNU Autoconf as AC_PROG_SED. When it is available in #
3533: # a released version of Autoconf we should remove this #
3534: # macro and use it instead. #
3535: # LT_AC_PROG_SED
3536: # --------------
3537: # Check for a fully-functional sed program, that truncates
3538: # as few characters as possible. Prefer GNU sed if found.
3539: AC_DEFUN([LT_AC_PROG_SED],
3540: [AC_MSG_CHECKING([for a sed that does not truncate output])
3541: AC_CACHE_VAL(lt_cv_path_SED,
3542: [# Loop through the user's path and test for sed and gsed.
3543: # Then use that list of sed's as ones to test for truncation.
3544: as_executable_p="test -f"
3545: as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546: for as_dir in $PATH
3547: do
3548: IFS=$as_save_IFS
3549: test -z "$as_dir" && as_dir=.
3550: for ac_prog in sed gsed; do
3551: for ac_exec_ext in '' $ac_executable_extensions; do
3552: if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3553: _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3554: fi
3555: done
3556: done
3557: done
3558:
3559: # Create a temporary directory, and hook for its removal unless debugging.
3560: $debug ||
3561: {
3562: trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3563: trap '{ (exit 1); exit 1; }' 1 2 13 15
3564: }
3565:
3566: # Create a (secure) tmp directory for tmp files.
3567: : ${TMPDIR=/tmp}
3568: {
3569: tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3570: test -n "$tmp" && test -d "$tmp"
3571: } ||
3572: {
3573: tmp=$TMPDIR/sed$$-$RANDOM
3574: (umask 077 && mkdir $tmp)
3575: } ||
3576: {
3577: echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3578: { (exit 1); exit 1; }
3579: }
3580: _max=0
3581: _count=0
3582: # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3583: # along with /bin/sed that truncates output.
3584: for _sed in $_sed_list /usr/xpg4/bin/sed; do
3585: test ! -f ${_sed} && break
3586: cat /dev/null > "$tmp/sed.in"
3587: _count=0
3588: echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3589: # Check for GNU sed and select it if it is found.
3590: if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3591: lt_cv_path_SED=${_sed}
3592: break
3593: fi
3594: while true; do
3595: cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3596: mv "$tmp/sed.tmp" "$tmp/sed.in"
3597: cp "$tmp/sed.in" "$tmp/sed.nl"
3598: echo >>"$tmp/sed.nl"
3599: ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3600: cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3601: # 40000 chars as input seems more than enough
3602: test $_count -gt 10 && break
3603: _count=`expr $_count + 1`
3604: if test $_count -gt $_max; then
3605: _max=$_count
3606: lt_cv_path_SED=$_sed
3607: fi
3608: done
3609: done
3610: rm -rf "$tmp"
3611: ])
3612: if test "X$SED" != "X"; then
3613: lt_cv_path_SED=$SED
3614: else
3615: SED=$lt_cv_path_SED
3616: fi
3617: AC_MSG_RESULT([$SED])
3618: ])
3619:
3620: # serial 5 AC_LIB_LTDL
3621:
3622: # AC_WITH_LTDL
3623: # ------------
3624: # Clients of libltdl can use this macro to allow the installer to
3625: # choose between a shipped copy of the ltdl sources or a preinstalled
3626: # version of the library.
3627: AC_DEFUN([AC_WITH_LTDL],
3628: [AC_REQUIRE([AC_LIB_LTDL])
3629: AC_SUBST([LIBLTDL])
3630: AC_SUBST([INCLTDL])
3631:
3632: # Unless the user asks us to check, assume no installed ltdl exists.
3633: use_installed_libltdl=no
3634:
3635: AC_ARG_WITH([included_ltdl],
3636: [ --with-included-ltdl use the GNU ltdl sources included here])
3637:
3638: if test "x$with_included_ltdl" != xyes; then
3639: # We are not being forced to use the included libltdl sources, so
3640: # decide whether there is a useful installed version we can use.
3641: AC_CHECK_HEADER([ltdl.h],
3642: [AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
3643: [with_included_ltdl=no],
3644: [with_included_ltdl=yes])
3645: ])
3646: fi
3647:
3648: if test "x$enable_ltdl_install" != xyes; then
3649: # If the user did not specify an installable libltdl, then default
3650: # to a convenience lib.
3651: AC_LIBLTDL_CONVENIENCE
3652: fi
3653:
3654: if test "x$with_included_ltdl" = xno; then
3655: # If the included ltdl is not to be used. then Use the
3656: # preinstalled libltdl we found.
3657: AC_DEFINE([HAVE_LTDL], 1,
3658: [Define this if a modern libltdl is already installed])
3659: LIBLTDL=-lltdl
3660: fi
3661:
3662: # Report our decision...
3663: AC_MSG_CHECKING([whether to use included libltdl])
3664: AC_MSG_RESULT([$with_included_ltdl])
3665:
3666: AC_CONFIG_SUBDIRS([libltdl])
3667: ])# AC_WITH_LTDL
3668:
3669:
3670: # AC_LIB_LTDL
3671: # -----------
3672: # Perform all the checks necessary for compilation of the ltdl objects
3673: # -- including compiler checks and header checks.
3674: AC_DEFUN([AC_LIB_LTDL],
3675: [AC_PREREQ(2.13)
3676: AC_REQUIRE([AC_PROG_CC])
3677: AC_REQUIRE([AC_C_CONST])
3678: AC_REQUIRE([AC_HEADER_STDC])
3679: AC_REQUIRE([AC_HEADER_DIRENT])
3680: AC_REQUIRE([AC_LIBTOOL_HEADER_ASSERT])
3681: AC_REQUIRE([_LT_AC_CHECK_DLFCN])
3682: AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
3683: AC_REQUIRE([AC_LTDL_SHLIBEXT])
3684: AC_REQUIRE([AC_LTDL_SHLIBPATH])
3685: AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
3686: AC_REQUIRE([AC_LTDL_OBJDIR])
3687: AC_REQUIRE([AC_LTDL_DLPREOPEN])
3688: AC_REQUIRE([AC_LTDL_DLLIB])
3689: AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
3690: AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
3691: AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
3692: AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
3693:
3694: AC_CHECK_HEADERS([errno.h malloc.h memory.h stdlib.h stdio.h ctype.h unistd.h])
3695: AC_CHECK_HEADERS([dl.h sys/dl.h dld.h])
3696: AC_CHECK_HEADERS([string.h strings.h], break)
3697:
3698: AC_CHECK_FUNCS([strchr index], break)
3699: AC_CHECK_FUNCS([strrchr rindex], break)
3700: AC_CHECK_FUNCS([memcpy bcopy], break)
3701: AC_CHECK_FUNCS([memmove strcmp])
3702:
3703: ])# AC_LIB_LTDL
3704:
3705: # AC_LTDL_ENABLE_INSTALL
3706: # ----------------------
3707: AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
3708: [AC_ARG_ENABLE(ltdl-install,
3709: [ --enable-ltdl-install install libltdl])
3710:
3711: AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
3712: AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
3713: ])])# AC_LTDL_ENABLE_INSTALL
3714:
3715: # AC_LTDL_SYS_DLOPEN_DEPLIBS
3716: # --------------------------
3717: AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
3718: [AC_REQUIRE([AC_CANONICAL_HOST])
3719: AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
3720: libltdl_cv_sys_dlopen_deplibs, [dnl
3721: # PORTME does your system automatically load deplibs for dlopen()?
3722: libltdl_cv_sys_dlopen_deplibs=unknown
3723: case "$host_os" in
3724: hpux10*|hpux11*)
3725: libltdl_cv_sys_dlopen_deplibs=yes
3726: ;;
3727: linux*)
3728: libltdl_cv_sys_dlopen_deplibs=yes
3729: ;;
3730: netbsd*)
3731: libltdl_cv_sys_dlopen_deplibs=yes
3732: ;;
3733: openbsd*)
3734: libltdl_cv_sys_dlopen_deplibs=yes
3735: ;;
3736: solaris*)
3737: libltdl_cv_sys_dlopen_deplibs=yes
3738: ;;
3739: esac
3740: ])
3741: if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
3742: AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1,
3743: [Define if the OS needs help to load dependent libraries for dlopen(). ])
3744: fi
3745: ])# AC_LTDL_SYS_DLOPEN_DEPLIBS
3746:
3747: # AC_LTDL_SHLIBEXT
3748: # ----------------
3749: AC_DEFUN([AC_LTDL_SHLIBEXT],
3750: [AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
3751: AC_CACHE_CHECK([which extension is used for shared libraries],
3752: libltdl_cv_shlibext,
3753: [ac_last=
3754: for ac_spec in $library_names_spec; do
3755: ac_last="$ac_spec"
3756: done
3757: echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
3758: libltdl_cv_shlibext=`cat conftest`
3759: rm -f conftest
3760: ])
3761: if test -n "$libltdl_cv_shlibext"; then
3762: AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
3763: [Define to the extension used for shared libraries, say, ".so". ])
3764: fi
3765: ])# AC_LTDL_SHLIBEXT
3766:
3767: # AC_LTDL_SHLIBPATH
3768: # -----------------
3769: AC_DEFUN([AC_LTDL_SHLIBPATH],
3770: [AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
3771: AC_CACHE_CHECK([which variable specifies run-time library path],
3772: libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
3773: if test -n "$libltdl_cv_shlibpath_var"; then
3774: AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
3775: [Define to the name of the environment variable that determines the dynamic library search path. ])
3776: fi
3777: ])# AC_LTDL_SHLIBPATH
3778:
3779: # AC_LTDL_SYSSEARCHPATH
3780: # ---------------------
3781: AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
3782: [AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
3783: AC_CACHE_CHECK([for the default library search path],
3784: libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
3785: if test -n "$libltdl_cv_sys_search_path"; then
3786: case "$host" in
3787: *-*-mingw*) pathsep=";" ;;
3788: *) pathsep=":" ;;
1.15 paf 3789: esac
1.25 paf 3790: sys_search_path=
3791: for dir in $libltdl_cv_sys_search_path; do
3792: if test -z "$sys_search_path"; then
3793: sys_search_path="$dir"
3794: else
3795: sys_search_path="$sys_search_path$pathsep$dir"
3796: fi
3797: done
3798: AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
3799: [Define to the system default library search path. ])
3800: fi
3801: ])# AC_LTDL_SYSSEARCHPATH
3802:
3803: # AC_LTDL_OBJDIR
3804: # --------------
3805: AC_DEFUN([AC_LTDL_OBJDIR],
3806: [AC_CACHE_CHECK([for objdir],
3807: libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
3808: if test -n "$objdir"; then
3809: :
3810: else
3811: rm -f .libs 2>/dev/null
3812: mkdir .libs 2>/dev/null
3813: if test -d .libs; then
3814: libltdl_cv_objdir=.libs
3815: else
3816: # MS-DOS does not allow filenames that begin with a dot.
3817: libltdl_cv_objdir=_libs
3818: fi
3819: rmdir .libs 2>/dev/null
3820: fi])
3821: AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
3822: [Define to the sub-directory in which libtool stores uninstalled libraries. ])
3823: ])# AC_LTDL_OBJDIR
3824:
3825: # AC_LTDL_DLPREOPEN
3826: # -----------------
3827: AC_DEFUN([AC_LTDL_DLPREOPEN],
3828: [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
3829: AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
3830: libltdl_cv_preloaded_symbols, [dnl
3831: if test -n "$global_symbol_pipe"; then
3832: libltdl_cv_preloaded_symbols=yes
3833: else
3834: libltdl_cv_preloaded_symbols=no
3835: fi
3836: ])
3837: if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
3838: AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
3839: [Define if libtool can extract symbol lists from object files. ])
3840: fi
3841: ])# AC_LTDL_DLPREOPEN
3842:
3843: # AC_LTDL_DLLIB
3844: # -------------
3845: AC_DEFUN([AC_LTDL_DLLIB],
3846: [LIBADD_DL=
3847: AC_SUBST(LIBADD_DL)
3848:
3849: AC_CHECK_FUNC([shl_load],
3850: [AC_DEFINE([HAVE_SHL_LOAD], [1],
3851: [Define if you have the shl_load function.])],
3852: [AC_CHECK_LIB([dld], [shl_load],
3853: [AC_DEFINE([HAVE_SHL_LOAD], [1],
3854: [Define if you have the shl_load function.])
3855: LIBADD_DL="$LIBADD_DL -ldld"],
3856: [AC_CHECK_LIB([dl], [dlopen],
3857: [AC_DEFINE([HAVE_LIBDL], [1],
3858: [Define if you have the libdl library or equivalent.])
3859: LIBADD_DL="-ldl"],
3860: [AC_TRY_LINK([#if HAVE_DLFCN_H
3861: # include <dlfcn.h>
3862: #endif
3863: ],
3864: [dlopen(0, 0);],
3865: [AC_DEFINE([HAVE_LIBDL], [1],
3866: [Define if you have the libdl library or equivalent.])],
3867: [AC_CHECK_LIB([svld], [dlopen],
3868: [AC_DEFINE([HAVE_LIBDL], [1],
3869: [Define if you have the libdl library or equivalent.])
3870: LIBADD_DL="-lsvld"],
3871: [AC_CHECK_LIB([dld], [dld_link],
3872: [AC_DEFINE([HAVE_DLD], [1],
3873: [Define if you have the GNU dld library.])
3874: LIBADD_DL="$LIBADD_DL -ldld"
3875: ])
3876: ])
3877: ])
3878: ])
3879: ])
3880: ])
3881:
3882: if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
3883: LIBS_SAVE="$LIBS"
3884: LIBS="$LIBS $LIBADD_DL"
3885: AC_CHECK_FUNCS(dlerror)
3886: LIBS="$LIBS_SAVE"
3887: fi
3888: ])# AC_LTDL_DLLIB
3889:
3890: # AC_LTDL_SYMBOL_USCORE
3891: # ---------------------
3892: AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
3893: [dnl does the compiler prefix global symbols with an underscore?
3894: AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
3895: AC_MSG_CHECKING([for _ prefix in compiled symbols])
3896: AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
3897: [ac_cv_sys_symbol_underscore=no
3898: cat > conftest.$ac_ext <<EOF
3899: void nm_test_func(){}
3900: int main(){nm_test_func;return 0;}
3901: EOF
3902: if AC_TRY_EVAL(ac_compile); then
3903: # Now try to grab the symbols.
3904: ac_nlist=conftest.nm
3905: if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
3906: # See whether the symbols have a leading underscore.
3907: if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
3908: ac_cv_sys_symbol_underscore=yes
3909: else
3910: if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
3911: :
3912: else
3913: echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
3914: fi
3915: fi
3916: else
3917: echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC
3918: fi
3919: else
3920: echo "configure: failed program was:" >&AC_FD_CC
3921: cat conftest.c >&AC_FD_CC
3922: fi
3923: rm -rf conftest*
1.1 paf 3924: ])
1.25 paf 3925: AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
3926: ])# AC_LTDL_SYMBOL_USCORE
3927:
3928:
3929: # AC_LTDL_DLSYM_USCORE
3930: # --------------------
3931: AC_DEFUN([AC_LTDL_DLSYM_USCORE],
3932: [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
3933: if test x"$ac_cv_sys_symbol_underscore" = xyes; then
3934: if test x"$ac_cv_func_dlopen" = xyes ||
3935: test x"$ac_cv_lib_dl_dlopen" = xyes ; then
3936: AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
3937: libltdl_cv_need_uscore, [dnl
3938: libltdl_cv_need_uscore=unknown
3939: save_LIBS="$LIBS"
3940: LIBS="$LIBS $LIBADD_DL"
3941: _LT_AC_TRY_DLOPEN_SELF(
3942: libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
3943: [], libltdl_cv_need_uscore=cross)
3944: LIBS="$save_LIBS"
3945: ])
3946: fi
3947: fi
3948:
3949: if test x"$libltdl_cv_need_uscore" = xyes; then
3950: AC_DEFINE(NEED_USCORE, 1,
3951: [Define if dlsym() requires a leading underscore in symbol names. ])
3952: fi
3953: ])# AC_LTDL_DLSYM_USCORE
3954:
3955:
3956: # AC_CHECK_TYPES(TYPES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
3957: # [INCLUDES])
3958: # ---------------------------------------------------------------
3959: # This macro did not exist in Autoconf 2.13, which we do still support
3960: ifdef([AC_CHECK_TYPES], [],
3961: [define([AC_CHECK_TYPES],
3962: [AC_CACHE_CHECK([for $1], ac_Type,
3963: [AC_TRY_LINK([$4],
3964: [if (($1 *) 0)
3965: return 0;
3966: if (sizeof ($1))
3967: return 0;],
3968: [ac_Type=yes],
3969: [ac_Type=no])])
3970: if test "x$ac_Type" = xyes; then
3971: ifelse([$2], [], [:], [$2])
3972: else
3973: ifelse([$3], [], [:], [$3])
3974: fi])
3975: ])# AC_CHECK_TYPES
3976:
3977:
3978: # AC_LTDL_FUNC_ARGZ
3979: # -----------------
3980: AC_DEFUN([AC_LTDL_FUNC_ARGZ],
3981: [AC_CHECK_HEADERS([argz.h])
3982:
3983: AC_CHECK_TYPES([error_t],
3984: [],
3985: [AC_DEFINE([error_t], [int],
3986: [Define to a type to use for \`error_t' if it is not otherwise available.])],
3987: [#if HAVE_ARGZ_H
3988: # include <argz.h>
3989: #endif])
3990:
3991: AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
3992: ])# AC_LTDL_FUNC_ARGZ
3993:
3994: # AM_CONDITIONAL -*- Autoconf -*-
3995:
3996: # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
3997:
3998: # This program is free software; you can redistribute it and/or modify
3999: # it under the terms of the GNU General Public License as published by
4000: # the Free Software Foundation; either version 2, or (at your option)
4001: # any later version.
4002:
4003: # This program is distributed in the hope that it will be useful,
4004: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4005: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4006: # GNU General Public License for more details.
4007:
4008: # You should have received a copy of the GNU General Public License
4009: # along with this program; if not, write to the Free Software
4010: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4011: # 02111-1307, USA.
4012:
4013: # serial 5
4014:
4015: AC_PREREQ(2.52)
4016:
4017: # AM_CONDITIONAL(NAME, SHELL-CONDITION)
4018: # -------------------------------------
4019: # Define a conditional.
4020: AC_DEFUN([AM_CONDITIONAL],
4021: [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
4022: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
4023: AC_SUBST([$1_TRUE])
4024: AC_SUBST([$1_FALSE])
4025: if $2; then
4026: $1_TRUE=
4027: $1_FALSE='#'
4028: else
4029: $1_TRUE='#'
4030: $1_FALSE=
4031: fi
4032: AC_CONFIG_COMMANDS_PRE(
4033: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
4034: AC_MSG_ERROR([conditional "$1" was never defined.
4035: Usually this means the macro was only invoked conditionally.])
4036: fi])])
1.1 paf 4037:
1.23 paf 4038: # Do all the work for Automake. -*- Autoconf -*-
4039:
4040: # This macro actually does too much some checks are only needed if
4041: # your package does certain things. But this isn't really a big deal.
4042:
4043: # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4044: # Free Software Foundation, Inc.
4045:
4046: # This program is free software; you can redistribute it and/or modify
4047: # it under the terms of the GNU General Public License as published by
4048: # the Free Software Foundation; either version 2, or (at your option)
4049: # any later version.
4050:
4051: # This program is distributed in the hope that it will be useful,
4052: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4053: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4054: # GNU General Public License for more details.
4055:
4056: # You should have received a copy of the GNU General Public License
4057: # along with this program; if not, write to the Free Software
4058: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4059: # 02111-1307, USA.
4060:
4061: # serial 8
4062:
4063: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
4064: # written in clear, in which case automake, when reading aclocal.m4,
4065: # will think it sees a *use*, and therefore will trigger all it's
4066: # C support machinery. Also note that it means that autoscan, seeing
4067: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
4068:
4069:
4070: AC_PREREQ([2.54])
4071:
4072: # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
4073: # the ones we care about.
4074: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4075:
4076: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4077: # AM_INIT_AUTOMAKE([OPTIONS])
4078: # -----------------------------------------------
4079: # The call with PACKAGE and VERSION arguments is the old style
4080: # call (pre autoconf-2.50), which is being phased out. PACKAGE
4081: # and VERSION should now be passed to AC_INIT and removed from
4082: # the call to AM_INIT_AUTOMAKE.
4083: # We support both call styles for the transition. After
4084: # the next Automake release, Autoconf can make the AC_INIT
4085: # arguments mandatory, and then we can depend on a new Autoconf
4086: # release and drop the old call support.
4087: AC_DEFUN([AM_INIT_AUTOMAKE],
4088: [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4089: AC_REQUIRE([AC_PROG_INSTALL])dnl
4090: # test to see if srcdir already configured
4091: if test "`cd $srcdir && pwd`" != "`pwd`" &&
4092: test -f $srcdir/config.status; then
1.1 paf 4093: AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4094: fi
1.23 paf 4095:
4096: # test whether we have cygpath
4097: if test -z "$CYGPATH_W"; then
4098: if (cygpath --version) >/dev/null 2>/dev/null; then
4099: CYGPATH_W='cygpath -w'
4100: else
4101: CYGPATH_W=echo
4102: fi
4103: fi
4104: AC_SUBST([CYGPATH_W])
4105:
4106: # Define the identity of the package.
4107: dnl Distinguish between old-style and new-style calls.
4108: m4_ifval([$2],
4109: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4110: AC_SUBST([PACKAGE], [$1])dnl
4111: AC_SUBST([VERSION], [$2])],
4112: [_AM_SET_OPTIONS([$1])dnl
4113: AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
4114: AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
4115:
4116: _AM_IF_OPTION([no-define],,
4117: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4118: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4119:
4120: # Some tools Automake needs.
4121: AC_REQUIRE([AM_SANITY_CHECK])dnl
4122: AC_REQUIRE([AC_ARG_PROGRAM])dnl
4123: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
4124: AM_MISSING_PROG(AUTOCONF, autoconf)
4125: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
4126: AM_MISSING_PROG(AUTOHEADER, autoheader)
4127: AM_MISSING_PROG(MAKEINFO, makeinfo)
4128: AM_MISSING_PROG(AMTAR, tar)
4129: AM_PROG_INSTALL_SH
4130: AM_PROG_INSTALL_STRIP
4131: # We need awk for the "check" target. The system "awk" is bad on
4132: # some platforms.
4133: AC_REQUIRE([AC_PROG_AWK])dnl
4134: AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4135:
4136: _AM_IF_OPTION([no-dependencies],,
4137: [AC_PROVIDE_IFELSE([AC_PROG_CC],
4138: [_AM_DEPENDENCIES(CC)],
4139: [define([AC_PROG_CC],
4140: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
4141: AC_PROVIDE_IFELSE([AC_PROG_CXX],
4142: [_AM_DEPENDENCIES(CXX)],
4143: [define([AC_PROG_CXX],
4144: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
4145: ])
4146: ])
4147:
4148:
4149: # When config.status generates a header, we must update the stamp-h file.
4150: # This file resides in the same directory as the config header
4151: # that is generated. The stamp files are numbered to have different names.
4152:
4153: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
4154: # loop where config.status creates the headers, so we can generate
4155: # our stamp files there.
4156: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
4157: [_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
4158: echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
4159:
4160: # Copyright 2002 Free Software Foundation, Inc.
4161:
4162: # This program is free software; you can redistribute it and/or modify
4163: # it under the terms of the GNU General Public License as published by
4164: # the Free Software Foundation; either version 2, or (at your option)
4165: # any later version.
4166:
4167: # This program is distributed in the hope that it will be useful,
4168: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4169: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4170: # GNU General Public License for more details.
4171:
4172: # You should have received a copy of the GNU General Public License
4173: # along with this program; if not, write to the Free Software
4174: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4175:
4176: # AM_AUTOMAKE_VERSION(VERSION)
4177: # ----------------------------
4178: # Automake X.Y traces this macro to ensure aclocal.m4 has been
4179: # generated from the m4 files accompanying Automake X.Y.
4180: AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
4181:
4182: # AM_SET_CURRENT_AUTOMAKE_VERSION
4183: # -------------------------------
4184: # Call AM_AUTOMAKE_VERSION so it can be traced.
4185: # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
4186: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
4187: [AM_AUTOMAKE_VERSION([1.7.2])])
4188:
4189: # Helper functions for option handling. -*- Autoconf -*-
4190:
4191: # Copyright 2001, 2002 Free Software Foundation, Inc.
4192:
4193: # This program is free software; you can redistribute it and/or modify
4194: # it under the terms of the GNU General Public License as published by
4195: # the Free Software Foundation; either version 2, or (at your option)
4196: # any later version.
4197:
4198: # This program is distributed in the hope that it will be useful,
4199: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4200: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4201: # GNU General Public License for more details.
4202:
4203: # You should have received a copy of the GNU General Public License
4204: # along with this program; if not, write to the Free Software
4205: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4206: # 02111-1307, USA.
4207:
4208: # serial 2
4209:
4210: # _AM_MANGLE_OPTION(NAME)
4211: # -----------------------
4212: AC_DEFUN([_AM_MANGLE_OPTION],
4213: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
4214:
4215: # _AM_SET_OPTION(NAME)
4216: # ------------------------------
4217: # Set option NAME. Presently that only means defining a flag for this option.
4218: AC_DEFUN([_AM_SET_OPTION],
4219: [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
4220:
4221: # _AM_SET_OPTIONS(OPTIONS)
4222: # ----------------------------------
4223: # OPTIONS is a space-separated list of Automake options.
4224: AC_DEFUN([_AM_SET_OPTIONS],
4225: [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
4226:
4227: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
4228: # -------------------------------------------
4229: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
4230: AC_DEFUN([_AM_IF_OPTION],
4231: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1.1 paf 4232:
4233: #
4234: # Check to make sure that the build environment is sane.
4235: #
4236:
1.23 paf 4237: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
4238:
4239: # This program is free software; you can redistribute it and/or modify
4240: # it under the terms of the GNU General Public License as published by
4241: # the Free Software Foundation; either version 2, or (at your option)
4242: # any later version.
4243:
4244: # This program is distributed in the hope that it will be useful,
4245: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4246: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4247: # GNU General Public License for more details.
4248:
4249: # You should have received a copy of the GNU General Public License
4250: # along with this program; if not, write to the Free Software
4251: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4252: # 02111-1307, USA.
4253:
4254: # serial 3
4255:
4256: # AM_SANITY_CHECK
4257: # ---------------
4258: AC_DEFUN([AM_SANITY_CHECK],
1.1 paf 4259: [AC_MSG_CHECKING([whether build environment is sane])
4260: # Just in case
4261: sleep 1
1.23 paf 4262: echo timestamp > conftest.file
1.1 paf 4263: # Do `set' in a subshell so we don't clobber the current shell's
4264: # arguments. Must try -L first in case configure is actually a
4265: # symlink; some systems play weird games with the mod time of symlinks
4266: # (eg FreeBSD returns the mod time of the symlink's containing
4267: # directory).
4268: if (
1.23 paf 4269: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
4270: if test "$[*]" = "X"; then
1.1 paf 4271: # -L didn't work.
1.23 paf 4272: set X `ls -t $srcdir/configure conftest.file`
1.1 paf 4273: fi
1.23 paf 4274: rm -f conftest.file
4275: if test "$[*]" != "X $srcdir/configure conftest.file" \
4276: && test "$[*]" != "X conftest.file $srcdir/configure"; then
1.1 paf 4277:
4278: # If neither matched, then we have a broken ls. This can happen
4279: # if, for instance, CONFIG_SHELL is bash and it inherits a
4280: # broken ls alias from the environment. This has actually
4281: # happened. Such a system could not be considered "sane".
4282: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
4283: alias in your environment])
4284: fi
4285:
1.23 paf 4286: test "$[2]" = conftest.file
1.1 paf 4287: )
4288: then
4289: # Ok.
4290: :
4291: else
4292: AC_MSG_ERROR([newly created file is older than distributed files!
4293: Check your system clock])
4294: fi
4295: AC_MSG_RESULT(yes)])
4296:
1.23 paf 4297: # -*- Autoconf -*-
4298:
4299:
4300: # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
4301:
4302: # This program is free software; you can redistribute it and/or modify
4303: # it under the terms of the GNU General Public License as published by
4304: # the Free Software Foundation; either version 2, or (at your option)
4305: # any later version.
4306:
4307: # This program is distributed in the hope that it will be useful,
4308: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4309: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4310: # GNU General Public License for more details.
4311:
4312: # You should have received a copy of the GNU General Public License
4313: # along with this program; if not, write to the Free Software
4314: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4315: # 02111-1307, USA.
4316:
4317: # serial 3
4318:
4319: # AM_MISSING_PROG(NAME, PROGRAM)
4320: # ------------------------------
4321: AC_DEFUN([AM_MISSING_PROG],
4322: [AC_REQUIRE([AM_MISSING_HAS_RUN])
4323: $1=${$1-"${am_missing_run}$2"}
4324: AC_SUBST($1)])
4325:
4326:
4327: # AM_MISSING_HAS_RUN
4328: # ------------------
4329: # Define MISSING if not defined so far and test if it supports --run.
4330: # If it does, set am_missing_run to use it, otherwise, to nothing.
4331: AC_DEFUN([AM_MISSING_HAS_RUN],
4332: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4333: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
4334: # Use eval to expand $SHELL
4335: if eval "$MISSING --run true"; then
4336: am_missing_run="$MISSING --run "
1.1 paf 4337: else
1.23 paf 4338: am_missing_run=
4339: AC_MSG_WARN([`missing' script is too old or missing])
4340: fi
4341: ])
4342:
4343: # AM_AUX_DIR_EXPAND
4344:
4345: # Copyright 2001 Free Software Foundation, Inc.
4346:
4347: # This program is free software; you can redistribute it and/or modify
4348: # it under the terms of the GNU General Public License as published by
4349: # the Free Software Foundation; either version 2, or (at your option)
4350: # any later version.
4351:
4352: # This program is distributed in the hope that it will be useful,
4353: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4354: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4355: # GNU General Public License for more details.
4356:
4357: # You should have received a copy of the GNU General Public License
4358: # along with this program; if not, write to the Free Software
4359: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4360: # 02111-1307, USA.
4361:
4362: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
4363: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
4364: # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
4365: #
4366: # Of course, Automake must honor this variable whenever it calls a
4367: # tool from the auxiliary directory. The problem is that $srcdir (and
4368: # therefore $ac_aux_dir as well) can be either absolute or relative,
4369: # depending on how configure is run. This is pretty annoying, since
4370: # it makes $ac_aux_dir quite unusable in subdirectories: in the top
4371: # source directory, any form will work fine, but in subdirectories a
4372: # relative path needs to be adjusted first.
4373: #
4374: # $ac_aux_dir/missing
4375: # fails when called from a subdirectory if $ac_aux_dir is relative
4376: # $top_srcdir/$ac_aux_dir/missing
4377: # fails if $ac_aux_dir is absolute,
4378: # fails when called from a subdirectory in a VPATH build with
4379: # a relative $ac_aux_dir
4380: #
4381: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
4382: # are both prefixed by $srcdir. In an in-source build this is usually
4383: # harmless because $srcdir is `.', but things will broke when you
4384: # start a VPATH build or use an absolute $srcdir.
4385: #
4386: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
4387: # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
4388: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
4389: # and then we would define $MISSING as
4390: # MISSING="\${SHELL} $am_aux_dir/missing"
4391: # This will work as long as MISSING is not called from configure, because
4392: # unfortunately $(top_srcdir) has no meaning in configure.
4393: # However there are other variables, like CC, which are often used in
4394: # configure, and could therefore not use this "fixed" $ac_aux_dir.
4395: #
4396: # Another solution, used here, is to always expand $ac_aux_dir to an
4397: # absolute PATH. The drawback is that using absolute paths prevent a
4398: # configured tree to be moved without reconfiguration.
4399:
4400: # Rely on autoconf to set up CDPATH properly.
4401: AC_PREREQ([2.50])
4402:
4403: AC_DEFUN([AM_AUX_DIR_EXPAND], [
4404: # expand $ac_aux_dir to an absolute path
4405: am_aux_dir=`cd $ac_aux_dir && pwd`
4406: ])
4407:
4408: # AM_PROG_INSTALL_SH
4409: # ------------------
4410: # Define $install_sh.
4411:
4412: # Copyright 2001 Free Software Foundation, Inc.
4413:
4414: # This program is free software; you can redistribute it and/or modify
4415: # it under the terms of the GNU General Public License as published by
4416: # the Free Software Foundation; either version 2, or (at your option)
4417: # any later version.
4418:
4419: # This program is distributed in the hope that it will be useful,
4420: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4421: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4422: # GNU General Public License for more details.
4423:
4424: # You should have received a copy of the GNU General Public License
4425: # along with this program; if not, write to the Free Software
4426: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4427: # 02111-1307, USA.
4428:
4429: AC_DEFUN([AM_PROG_INSTALL_SH],
4430: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4431: install_sh=${install_sh-"$am_aux_dir/install-sh"}
4432: AC_SUBST(install_sh)])
4433:
4434: # AM_PROG_INSTALL_STRIP
4435:
4436: # Copyright 2001 Free Software Foundation, Inc.
4437:
4438: # This program is free software; you can redistribute it and/or modify
4439: # it under the terms of the GNU General Public License as published by
4440: # the Free Software Foundation; either version 2, or (at your option)
4441: # any later version.
4442:
4443: # This program is distributed in the hope that it will be useful,
4444: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4445: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4446: # GNU General Public License for more details.
4447:
4448: # You should have received a copy of the GNU General Public License
4449: # along with this program; if not, write to the Free Software
4450: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4451: # 02111-1307, USA.
4452:
4453: # One issue with vendor `install' (even GNU) is that you can't
4454: # specify the program used to strip binaries. This is especially
4455: # annoying in cross-compiling environments, where the build's strip
4456: # is unlikely to handle the host's binaries.
4457: # Fortunately install-sh will honor a STRIPPROG variable, so we
4458: # always use install-sh in `make install-strip', and initialize
4459: # STRIPPROG with the value of the STRIP variable (set by the user).
4460: AC_DEFUN([AM_PROG_INSTALL_STRIP],
4461: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4462: # Installed binaries are usually stripped using `strip' when the user
4463: # run `make install-strip'. However `strip' might not be the right
4464: # tool to use in cross-compilation environments, therefore Automake
4465: # will honor the `STRIP' environment variable to overrule this program.
4466: dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4467: if test "$cross_compiling" != no; then
4468: AC_CHECK_TOOL([STRIP], [strip], :)
1.1 paf 4469: fi
1.23 paf 4470: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
4471: AC_SUBST([INSTALL_STRIP_PROGRAM])])
4472:
4473: # serial 4 -*- Autoconf -*-
4474:
4475: # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
4476:
4477: # This program is free software; you can redistribute it and/or modify
4478: # it under the terms of the GNU General Public License as published by
4479: # the Free Software Foundation; either version 2, or (at your option)
4480: # any later version.
4481:
4482: # This program is distributed in the hope that it will be useful,
4483: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4484: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4485: # GNU General Public License for more details.
4486:
4487: # You should have received a copy of the GNU General Public License
4488: # along with this program; if not, write to the Free Software
4489: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4490: # 02111-1307, USA.
4491:
4492:
4493: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
4494: # written in clear, in which case automake, when reading aclocal.m4,
4495: # will think it sees a *use*, and therefore will trigger all it's
4496: # C support machinery. Also note that it means that autoscan, seeing
4497: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
4498:
4499:
4500:
4501: # _AM_DEPENDENCIES(NAME)
4502: # ----------------------
4503: # See how the compiler implements dependency checking.
4504: # NAME is "CC", "CXX", "GCJ", or "OBJC".
4505: # We try a few techniques and use that to set a single cache variable.
4506: #
4507: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
4508: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
4509: # dependency, and given that the user is not expected to run this macro,
4510: # just rely on AC_PROG_CC.
4511: AC_DEFUN([_AM_DEPENDENCIES],
4512: [AC_REQUIRE([AM_SET_DEPDIR])dnl
4513: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
4514: AC_REQUIRE([AM_MAKE_INCLUDE])dnl
4515: AC_REQUIRE([AM_DEP_TRACK])dnl
4516:
4517: ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
4518: [$1], CXX, [depcc="$CXX" am_compiler_list=],
4519: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
4520: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
4521: [depcc="$$1" am_compiler_list=])
4522:
4523: AC_CACHE_CHECK([dependency style of $depcc],
4524: [am_cv_$1_dependencies_compiler_type],
4525: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4526: # We make a subdir and do the tests there. Otherwise we can end up
4527: # making bogus files that we don't know about and never remove. For
4528: # instance it was reported that on HP-UX the gcc test will end up
4529: # making a dummy file named `D' -- because `-MD' means `put the output
4530: # in D'.
4531: mkdir conftest.dir
4532: # Copy depcomp to subdir because otherwise we won't find it if we're
4533: # using a relative directory.
4534: cp "$am_depcomp" conftest.dir
4535: cd conftest.dir
4536:
4537: am_cv_$1_dependencies_compiler_type=none
4538: if test "$am_compiler_list" = ""; then
4539: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
4540: fi
4541: for depmode in $am_compiler_list; do
4542: # We need to recreate these files for each test, as the compiler may
4543: # overwrite some of them when testing with obscure command lines.
4544: # This happens at least with the AIX C compiler.
4545: echo '#include "conftest.h"' > conftest.c
4546: echo 'int i;' > conftest.h
4547: echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
4548:
4549: case $depmode in
4550: nosideeffect)
4551: # after this tag, mechanisms are not by side-effect, so they'll
4552: # only be used when explicitly requested
4553: if test "x$enable_dependency_tracking" = xyes; then
4554: continue
4555: else
4556: break
4557: fi
4558: ;;
4559: none) break ;;
4560: esac
4561: # We check with `-c' and `-o' for the sake of the "dashmstdout"
4562: # mode. It turns out that the SunPro C++ compiler does not properly
4563: # handle `-M -o', and we need to detect this.
4564: if depmode=$depmode \
4565: source=conftest.c object=conftest.o \
4566: depfile=conftest.Po tmpdepfile=conftest.TPo \
4567: $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
4568: grep conftest.h conftest.Po > /dev/null 2>&1 &&
4569: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4570: am_cv_$1_dependencies_compiler_type=$depmode
4571: break
4572: fi
4573: done
4574:
4575: cd ..
4576: rm -rf conftest.dir
4577: else
4578: am_cv_$1_dependencies_compiler_type=none
4579: fi
4580: ])
4581: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
4582: AM_CONDITIONAL([am__fastdep$1], [
4583: test "x$enable_dependency_tracking" != xno \
4584: && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
4585: ])
4586:
4587:
4588: # AM_SET_DEPDIR
4589: # -------------
4590: # Choose a directory name for dependency files.
4591: # This macro is AC_REQUIREd in _AM_DEPENDENCIES
4592: AC_DEFUN([AM_SET_DEPDIR],
4593: [rm -f .deps 2>/dev/null
4594: mkdir .deps 2>/dev/null
4595: if test -d .deps; then
4596: DEPDIR=.deps
4597: else
4598: # MS-DOS does not allow filenames that begin with a dot.
4599: DEPDIR=_deps
4600: fi
4601: rmdir .deps 2>/dev/null
4602: AC_SUBST([DEPDIR])
4603: ])
4604:
4605:
4606: # AM_DEP_TRACK
4607: # ------------
4608: AC_DEFUN([AM_DEP_TRACK],
4609: [AC_ARG_ENABLE(dependency-tracking,
4610: [ --disable-dependency-tracking Speeds up one-time builds
4611: --enable-dependency-tracking Do not reject slow dependency extractors])
4612: if test "x$enable_dependency_tracking" != xno; then
4613: am_depcomp="$ac_aux_dir/depcomp"
4614: AMDEPBACKSLASH='\'
4615: fi
4616: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
4617: AC_SUBST([AMDEPBACKSLASH])
4618: ])
4619:
4620: # Generate code to set up dependency tracking. -*- Autoconf -*-
4621:
4622: # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4623:
4624: # This program is free software; you can redistribute it and/or modify
4625: # it under the terms of the GNU General Public License as published by
4626: # the Free Software Foundation; either version 2, or (at your option)
4627: # any later version.
4628:
4629: # This program is distributed in the hope that it will be useful,
4630: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4631: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4632: # GNU General Public License for more details.
4633:
4634: # You should have received a copy of the GNU General Public License
4635: # along with this program; if not, write to the Free Software
4636: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4637: # 02111-1307, USA.
4638:
4639: #serial 2
4640:
4641: # _AM_OUTPUT_DEPENDENCY_COMMANDS
4642: # ------------------------------
4643: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
4644: [for mf in $CONFIG_FILES; do
4645: # Strip MF so we end up with the name of the file.
4646: mf=`echo "$mf" | sed -e 's/:.*$//'`
4647: # Check whether this is an Automake generated Makefile or not.
4648: # We used to match only the files named `Makefile.in', but
4649: # some people rename them; so instead we look at the file content.
4650: # Grep'ing the first line is not enough: some people post-process
4651: # each Makefile.in and add a new line on top of each file to say so.
4652: # So let's grep whole file.
4653: if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
4654: dirpart=`AS_DIRNAME("$mf")`
4655: else
4656: continue
4657: fi
4658: grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
4659: # Extract the definition of DEP_FILES from the Makefile without
4660: # running `make'.
4661: DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
4662: test -z "$DEPDIR" && continue
4663: # When using ansi2knr, U may be empty or an underscore; expand it
4664: U=`sed -n -e '/^U = / s///p' < "$mf"`
4665: test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
4666: # We invoke sed twice because it is the simplest approach to
4667: # changing $(DEPDIR) to its actual value in the expansion.
4668: for file in `sed -n -e '
4669: /^DEP_FILES = .*\\\\$/ {
4670: s/^DEP_FILES = //
4671: :loop
4672: s/\\\\$//
4673: p
4674: n
4675: /\\\\$/ b loop
4676: p
4677: }
4678: /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
4679: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
4680: # Make sure the directory exists.
4681: test -f "$dirpart/$file" && continue
4682: fdir=`AS_DIRNAME(["$file"])`
4683: AS_MKDIR_P([$dirpart/$fdir])
4684: # echo "creating $dirpart/$file"
4685: echo '# dummy' > "$dirpart/$file"
4686: done
4687: done
4688: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
4689:
4690:
4691: # AM_OUTPUT_DEPENDENCY_COMMANDS
4692: # -----------------------------
4693: # This macro should only be invoked once -- use via AC_REQUIRE.
4694: #
4695: # This code is only required when automatic dependency tracking
4696: # is enabled. FIXME. This creates each `.P' file that we will
4697: # need in order to bootstrap the dependency handling code.
4698: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4699: [AC_CONFIG_COMMANDS([depfiles],
4700: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4701: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4702: ])
4703:
4704: # Check to see how 'make' treats includes. -*- Autoconf -*-
4705:
4706: # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4707:
4708: # This program is free software; you can redistribute it and/or modify
4709: # it under the terms of the GNU General Public License as published by
4710: # the Free Software Foundation; either version 2, or (at your option)
4711: # any later version.
4712:
4713: # This program is distributed in the hope that it will be useful,
4714: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4715: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4716: # GNU General Public License for more details.
4717:
4718: # You should have received a copy of the GNU General Public License
4719: # along with this program; if not, write to the Free Software
4720: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4721: # 02111-1307, USA.
4722:
4723: # serial 2
4724:
4725: # AM_MAKE_INCLUDE()
4726: # -----------------
4727: # Check to see how make treats includes.
4728: AC_DEFUN([AM_MAKE_INCLUDE],
4729: [am_make=${MAKE-make}
4730: cat > confinc << 'END'
4731: doit:
4732: @echo done
4733: END
4734: # If we don't find an include directive, just comment out the code.
4735: AC_MSG_CHECKING([for style of include used by $am_make])
4736: am__include="#"
4737: am__quote=
4738: _am_result=none
4739: # First try GNU make style include.
4740: echo "include confinc" > confmf
4741: # We grep out `Entering directory' and `Leaving directory'
4742: # messages which can occur if `w' ends up in MAKEFLAGS.
4743: # In particular we don't look at `^make:' because GNU make might
4744: # be invoked under some other name (usually "gmake"), in which
4745: # case it prints its new name instead of `make'.
4746: if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4747: am__include=include
4748: am__quote=
4749: _am_result=GNU
4750: fi
4751: # Now try BSD make style include.
4752: if test "$am__include" = "#"; then
4753: echo '.include "confinc"' > confmf
4754: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4755: am__include=.include
4756: am__quote="\""
4757: _am_result=BSD
4758: fi
4759: fi
4760: AC_SUBST(am__include)
4761: AC_SUBST(am__quote)
4762: AC_MSG_RESULT($_am_result)
4763: rm -f confinc confmf
4764: ])
4765:
4766: # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
4767:
4768: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1.1 paf 4769:
1.23 paf 4770: # This program is free software; you can redistribute it and/or modify
4771: # it under the terms of the GNU General Public License as published by
4772: # the Free Software Foundation; either version 2, or (at your option)
4773: # any later version.
1.1 paf 4774:
1.23 paf 4775: # This program is distributed in the hope that it will be useful,
4776: # but WITHOUT ANY WARRANTY; without even the implied warranty of
4777: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4778: # GNU General Public License for more details.
4779:
4780: # You should have received a copy of the GNU General Public License
4781: # along with this program; if not, write to the Free Software
4782: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4783: # 02111-1307, USA.
4784:
4785: AC_PREREQ([2.52])
4786:
4787: # serial 6
4788:
4789: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
4790: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1.1 paf 4791:
E-mail: