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