acinclude.m4: Restore the situation that we don't build modules on darwin.
[gcc.git] / libjava / libltdl / acinclude.m4
1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3 ## Free Software Foundation, Inc.
4 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 ##
6 ## This file is free software; the Free Software Foundation gives
7 ## unlimited permission to copy and/or distribute it, with or without
8 ## modifications, as long as this notice is preserved.
9
10 # serial 47 AC_PROG_LIBTOOL
11
12
13 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
14 # -----------------------------------------------------------
15 # If this macro is not defined by Autoconf, define it here.
16 m4_ifdef([AC_PROVIDE_IFELSE],
17 [],
18 [m4_define([AC_PROVIDE_IFELSE],
19 [m4_ifdef([AC_PROVIDE_$1],
20 [$2], [$3])])])
21
22
23 # AC_PROG_LIBTOOL
24 # ---------------
25 AC_DEFUN([AC_PROG_LIBTOOL],
26 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
27 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
28 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
29 AC_PROVIDE_IFELSE([AC_PROG_CXX],
30 [AC_LIBTOOL_CXX],
31 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
32 ])])
33 dnl And a similar setup for Fortran 77 support
34 AC_PROVIDE_IFELSE([AC_PROG_F77],
35 [AC_LIBTOOL_F77],
36 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
37 ])])
38
39 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
40 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
41 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
42 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
43 [AC_LIBTOOL_GCJ],
44 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
45 [AC_LIBTOOL_GCJ],
46 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
47 [AC_LIBTOOL_GCJ],
48 [ifdef([AC_PROG_GCJ],
49 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
50 ifdef([A][M_PROG_GCJ],
51 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
52 ifdef([LT_AC_PROG_GCJ],
53 [define([LT_AC_PROG_GCJ],
54 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
55 ])])# AC_PROG_LIBTOOL
56
57
58 # _AC_PROG_LIBTOOL
59 # ----------------
60 AC_DEFUN([_AC_PROG_LIBTOOL],
61 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
62 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
63 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
64 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
65
66 # This can be used to rebuild libtool when needed
67 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
68
69 # Always use our own libtool.
70 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
71 AC_SUBST(LIBTOOL)dnl
72
73 # Prevent multiple expansion
74 define([AC_PROG_LIBTOOL], [])
75 ])# _AC_PROG_LIBTOOL
76
77
78 # AC_LIBTOOL_SETUP
79 # ----------------
80 AC_DEFUN([AC_LIBTOOL_SETUP],
81 [AC_PREREQ(2.50)dnl
82 AC_REQUIRE([AC_ENABLE_SHARED])dnl
83 AC_REQUIRE([AC_ENABLE_STATIC])dnl
84 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
85 AC_REQUIRE([AC_CANONICAL_HOST])dnl
86 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
87 AC_REQUIRE([AC_PROG_CC])dnl
88 AC_REQUIRE([AC_PROG_LD])dnl
89 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
90 AC_REQUIRE([AC_PROG_NM])dnl
91
92 AC_REQUIRE([AC_PROG_LN_S])dnl
93 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
94 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
95 AC_REQUIRE([AC_OBJEXT])dnl
96 AC_REQUIRE([AC_EXEEXT])dnl
97 dnl
98
99 AC_LIBTOOL_SYS_MAX_CMD_LEN
100 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
101 AC_LIBTOOL_OBJDIR
102
103 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
104 _LT_AC_PROG_ECHO_BACKSLASH
105
106 case $host_os in
107 aix3*)
108 # AIX sometimes has problems with the GCC collect2 program. For some
109 # reason, if we set the COLLECT_NAMES environment variable, the problems
110 # vanish in a puff of smoke.
111 if test "X${COLLECT_NAMES+set}" != Xset; then
112 COLLECT_NAMES=
113 export COLLECT_NAMES
114 fi
115 ;;
116 esac
117
118 # Sed substitution that helps us do robust quoting. It backslashifies
119 # metacharacters that are still active within double-quoted strings.
120 Xsed='sed -e 1s/^X//'
121 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
122
123 # Same as above, but do not quote variable references.
124 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
125
126 # Sed substitution to delay expansion of an escaped shell variable in a
127 # double_quote_subst'ed string.
128 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
129
130 # Sed substitution to avoid accidental globbing in evaled expressions
131 no_glob_subst='s/\*/\\\*/g'
132
133 # Constants:
134 rm="rm -f"
135
136 # Global variables:
137 default_ofile=libtool
138 can_build_shared=yes
139
140 # All known linkers require a `.a' archive for static linking (except M$VC,
141 # which needs '.lib').
142 libext=a
143 ltmain="$ac_aux_dir/ltmain.sh"
144 ofile="$default_ofile"
145 with_gnu_ld="$lt_cv_prog_gnu_ld"
146
147 AC_CHECK_TOOL(AR, ar, false)
148 AC_CHECK_TOOL(RANLIB, ranlib, :)
149 AC_CHECK_TOOL(STRIP, strip, :)
150
151 old_CC="$CC"
152 old_CFLAGS="$CFLAGS"
153
154 # Set sane defaults for various variables
155 test -z "$AR" && AR=ar
156 test -z "$AR_FLAGS" && AR_FLAGS=cru
157 test -z "$AS" && AS=as
158 test -z "$CC" && CC=cc
159 test -z "$LTCC" && LTCC=$CC
160 test -z "$DLLTOOL" && DLLTOOL=dlltool
161 test -z "$LD" && LD=ld
162 test -z "$LN_S" && LN_S="ln -s"
163 test -z "$MAGIC_CMD" && MAGIC_CMD=file
164 test -z "$NM" && NM=nm
165 test -z "$SED" && SED=sed
166 test -z "$OBJDUMP" && OBJDUMP=objdump
167 test -z "$RANLIB" && RANLIB=:
168 test -z "$STRIP" && STRIP=:
169 test -z "$ac_objext" && ac_objext=o
170
171 # Determine commands to create old-style static archives.
172 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
173 old_postinstall_cmds='chmod 644 $oldlib'
174 old_postuninstall_cmds=
175
176 if test -n "$RANLIB"; then
177 case $host_os in
178 openbsd*)
179 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
180 ;;
181 *)
182 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
183 ;;
184 esac
185 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
186 fi
187
188 _LT_CC_BASENAME([$compiler])
189
190 # Only perform the check for file, if the check method requires it
191 case $deplibs_check_method in
192 file_magic*)
193 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
194 AC_PATH_MAGIC
195 fi
196 ;;
197 esac
198
199 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
200 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
201 enable_win32_dll=yes, enable_win32_dll=no)
202
203 AC_ARG_ENABLE([libtool-lock],
204 [AC_HELP_STRING([--disable-libtool-lock],
205 [avoid locking (might break parallel builds)])])
206 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
207
208 AC_ARG_WITH([pic],
209 [AC_HELP_STRING([--with-pic],
210 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
211 [pic_mode="$withval"],
212 [pic_mode=default])
213 test -z "$pic_mode" && pic_mode=default
214
215 # Use C for the default configuration in the libtool script
216 tagname=
217 AC_LIBTOOL_LANG_C_CONFIG
218 _LT_AC_TAGCONFIG
219 ])# AC_LIBTOOL_SETUP
220
221
222 # _LT_AC_SYS_COMPILER
223 # -------------------
224 AC_DEFUN([_LT_AC_SYS_COMPILER],
225 [AC_REQUIRE([AC_PROG_CC])dnl
226
227 # If no C compiler was specified, use CC.
228 LTCC=${LTCC-"$CC"}
229
230 # Allow CC to be a program name with arguments.
231 compiler=$CC
232 ])# _LT_AC_SYS_COMPILER
233
234
235 # _LT_CC_BASENAME(CC)
236 # -------------------
237 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
238 AC_DEFUN([_LT_CC_BASENAME],
239 [for cc_temp in $1""; do
240 case $cc_temp in
241 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
242 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
243 \-*) ;;
244 *) break;;
245 esac
246 done
247 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
248 ])
249
250
251 # _LT_COMPILER_BOILERPLATE
252 # ------------------------
253 # Check for compiler boilerplate output or warnings with
254 # the simple compiler test code.
255 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
256 [ac_outfile=conftest.$ac_objext
257 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
258 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
259 _lt_compiler_boilerplate=`cat conftest.err`
260 $rm conftest*
261 ])# _LT_COMPILER_BOILERPLATE
262
263
264 # _LT_LINKER_BOILERPLATE
265 # ----------------------
266 # Check for linker boilerplate output or warnings with
267 # the simple link test code.
268 AC_DEFUN([_LT_LINKER_BOILERPLATE],
269 [ac_outfile=conftest.$ac_objext
270 printf "$lt_simple_link_test_code" >conftest.$ac_ext
271 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
272 _lt_linker_boilerplate=`cat conftest.err`
273 $rm conftest*
274 ])# _LT_LINKER_BOILERPLATE
275
276
277 # _LT_AC_SYS_LIBPATH_AIX
278 # ----------------------
279 # Links a minimal program and checks the executable
280 # for the system default hardcoded library path. In most cases,
281 # this is /usr/lib:/lib, but when the MPI compilers are used
282 # the location of the communication and MPI libs are included too.
283 # If we don't find anything, use the default library path according
284 # to the aix ld manual.
285 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
286 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
287 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
288 }'`
289 # Check for a 64-bit object if we didn't find anything.
290 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
291 }'`; fi],[])
292 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
293 ])# _LT_AC_SYS_LIBPATH_AIX
294
295
296 # _LT_AC_SHELL_INIT(ARG)
297 # ----------------------
298 AC_DEFUN([_LT_AC_SHELL_INIT],
299 [ifdef([AC_DIVERSION_NOTICE],
300 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
301 [AC_DIVERT_PUSH(NOTICE)])
302 $1
303 AC_DIVERT_POP
304 ])# _LT_AC_SHELL_INIT
305
306
307 # _LT_AC_PROG_ECHO_BACKSLASH
308 # --------------------------
309 # Add some code to the start of the generated configure script which
310 # will find an echo command which doesn't interpret backslashes.
311 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
312 [_LT_AC_SHELL_INIT([
313 # Check that we are running under the correct shell.
314 SHELL=${CONFIG_SHELL-/bin/sh}
315
316 case X$ECHO in
317 X*--fallback-echo)
318 # Remove one level of quotation (which was required for Make).
319 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
320 ;;
321 esac
322
323 echo=${ECHO-echo}
324 if test "X[$]1" = X--no-reexec; then
325 # Discard the --no-reexec flag, and continue.
326 shift
327 elif test "X[$]1" = X--fallback-echo; then
328 # Avoid inline document here, it may be left over
329 :
330 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
331 # Yippee, $echo works!
332 :
333 else
334 # Restart under the correct shell.
335 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
336 fi
337
338 if test "X[$]1" = X--fallback-echo; then
339 # used as fallback echo
340 shift
341 cat <<EOF
342 [$]*
343 EOF
344 exit 0
345 fi
346
347 # The HP-UX ksh and POSIX shell print the target directory to stdout
348 # if CDPATH is set.
349 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
350
351 if test -z "$ECHO"; then
352 if test "X${echo_test_string+set}" != Xset; then
353 # find a string as large as possible, as long as the shell can cope with it
354 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
355 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
356 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
357 echo_test_string="`eval $cmd`" &&
358 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
359 then
360 break
361 fi
362 done
363 fi
364
365 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
366 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
367 test "X$echo_testing_string" = "X$echo_test_string"; then
368 :
369 else
370 # The Solaris, AIX, and Digital Unix default echo programs unquote
371 # backslashes. This makes it impossible to quote backslashes using
372 # echo "$something" | sed 's/\\/\\\\/g'
373 #
374 # So, first we look for a working echo in the user's PATH.
375
376 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
377 for dir in $PATH /usr/ucb; do
378 IFS="$lt_save_ifs"
379 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
380 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
381 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
382 test "X$echo_testing_string" = "X$echo_test_string"; then
383 echo="$dir/echo"
384 break
385 fi
386 done
387 IFS="$lt_save_ifs"
388
389 if test "X$echo" = Xecho; then
390 # We didn't find a better echo, so look for alternatives.
391 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
392 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
393 test "X$echo_testing_string" = "X$echo_test_string"; then
394 # This shell has a builtin print -r that does the trick.
395 echo='print -r'
396 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
397 test "X$CONFIG_SHELL" != X/bin/ksh; then
398 # If we have ksh, try running configure again with it.
399 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
400 export ORIGINAL_CONFIG_SHELL
401 CONFIG_SHELL=/bin/ksh
402 export CONFIG_SHELL
403 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
404 else
405 # Try using printf.
406 echo='printf %s\n'
407 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
408 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
409 test "X$echo_testing_string" = "X$echo_test_string"; then
410 # Cool, printf works
411 :
412 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
413 test "X$echo_testing_string" = 'X\t' &&
414 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
415 test "X$echo_testing_string" = "X$echo_test_string"; then
416 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
417 export CONFIG_SHELL
418 SHELL="$CONFIG_SHELL"
419 export SHELL
420 echo="$CONFIG_SHELL [$]0 --fallback-echo"
421 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
422 test "X$echo_testing_string" = 'X\t' &&
423 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
424 test "X$echo_testing_string" = "X$echo_test_string"; then
425 echo="$CONFIG_SHELL [$]0 --fallback-echo"
426 else
427 # maybe with a smaller string...
428 prev=:
429
430 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
431 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
432 then
433 break
434 fi
435 prev="$cmd"
436 done
437
438 if test "$prev" != 'sed 50q "[$]0"'; then
439 echo_test_string=`eval $prev`
440 export echo_test_string
441 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
442 else
443 # Oops. We lost completely, so just stick with echo.
444 echo=echo
445 fi
446 fi
447 fi
448 fi
449 fi
450 fi
451
452 # Copy echo and quote the copy suitably for passing to libtool from
453 # the Makefile, instead of quoting the original, which is used later.
454 ECHO=$echo
455 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
456 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
457 fi
458
459 AC_SUBST(ECHO)
460 ])])# _LT_AC_PROG_ECHO_BACKSLASH
461
462
463 # _LT_AC_LOCK
464 # -----------
465 AC_DEFUN([_LT_AC_LOCK],
466 [AC_ARG_ENABLE([libtool-lock],
467 [AC_HELP_STRING([--disable-libtool-lock],
468 [avoid locking (might break parallel builds)])])
469 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
470
471 # Some flags need to be propagated to the compiler or linker for good
472 # libtool support.
473 case $host in
474 ia64-*-hpux*)
475 # Find out which ABI we are using.
476 echo 'int i;' > conftest.$ac_ext
477 if AC_TRY_EVAL(ac_compile); then
478 case `/usr/bin/file conftest.$ac_objext` in
479 *ELF-32*)
480 HPUX_IA64_MODE="32"
481 ;;
482 *ELF-64*)
483 HPUX_IA64_MODE="64"
484 ;;
485 esac
486 fi
487 rm -rf conftest*
488 ;;
489 *-*-irix6*)
490 # Find out which ABI we are using.
491 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
492 if AC_TRY_EVAL(ac_compile); then
493 if test "$lt_cv_prog_gnu_ld" = yes; then
494 case `/usr/bin/file conftest.$ac_objext` in
495 *32-bit*)
496 LD="${LD-ld} -melf32bsmip"
497 ;;
498 *N32*)
499 LD="${LD-ld} -melf32bmipn32"
500 ;;
501 *64-bit*)
502 LD="${LD-ld} -melf64bmip"
503 ;;
504 esac
505 else
506 case `/usr/bin/file conftest.$ac_objext` in
507 *32-bit*)
508 LD="${LD-ld} -32"
509 ;;
510 *N32*)
511 LD="${LD-ld} -n32"
512 ;;
513 *64-bit*)
514 LD="${LD-ld} -64"
515 ;;
516 esac
517 fi
518 fi
519 rm -rf conftest*
520 ;;
521
522 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
523 # Find out which ABI we are using.
524 echo 'int i;' > conftest.$ac_ext
525 if AC_TRY_EVAL(ac_compile); then
526 case "`/usr/bin/file conftest.o`" in
527 *32-bit*)
528 case $host in
529 x86_64-*linux*)
530 LD="${LD-ld} -m elf_i386"
531 ;;
532 ppc64-*linux*|powerpc64-*linux*)
533 LD="${LD-ld} -m elf32ppclinux"
534 ;;
535 s390x-*linux*)
536 LD="${LD-ld} -m elf_s390"
537 ;;
538 sparc64-*linux*)
539 LD="${LD-ld} -m elf32_sparc"
540 ;;
541 esac
542 ;;
543 *64-bit*)
544 case $host in
545 x86_64-*linux*)
546 LD="${LD-ld} -m elf_x86_64"
547 ;;
548 ppc*-*linux*|powerpc*-*linux*)
549 LD="${LD-ld} -m elf64ppc"
550 ;;
551 s390*-*linux*)
552 LD="${LD-ld} -m elf64_s390"
553 ;;
554 sparc*-*linux*)
555 LD="${LD-ld} -m elf64_sparc"
556 ;;
557 esac
558 ;;
559 esac
560 fi
561 rm -rf conftest*
562 ;;
563
564 *-*-sco3.2v5*)
565 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
566 SAVE_CFLAGS="$CFLAGS"
567 CFLAGS="$CFLAGS -belf"
568 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
569 [AC_LANG_PUSH(C)
570 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
571 AC_LANG_POP])
572 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
573 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
574 CFLAGS="$SAVE_CFLAGS"
575 fi
576 ;;
577 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
578 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
579 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
580 AC_CHECK_TOOL(AS, as, false)
581 AC_CHECK_TOOL(OBJDUMP, objdump, false)
582 ;;
583 ])
584 esac
585
586 need_locks="$enable_libtool_lock"
587
588 ])# _LT_AC_LOCK
589
590
591 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
592 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
593 # ----------------------------------------------------------------
594 # Check whether the given compiler option works
595 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
596 [AC_REQUIRE([LT_AC_PROG_SED])
597 AC_CACHE_CHECK([$1], [$2],
598 [$2=no
599 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
600 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
601 lt_compiler_flag="$3"
602 # Insert the option either (1) after the last *FLAGS variable, or
603 # (2) before a word containing "conftest.", or (3) at the end.
604 # Note that $ac_compile itself does not contain backslashes and begins
605 # with a dollar sign (not a hyphen), so the echo should work correctly.
606 # The option is referenced via a variable to avoid confusing sed.
607 lt_compile=`echo "$ac_compile" | $SED \
608 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
609 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
610 -e 's:$: $lt_compiler_flag:'`
611 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
612 (eval "$lt_compile" 2>conftest.err)
613 ac_status=$?
614 cat conftest.err >&AS_MESSAGE_LOG_FD
615 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
616 if (exit $ac_status) && test -s "$ac_outfile"; then
617 # The compiler can only warn and ignore the option if not recognized
618 # So say no if there are warnings other than the usual output.
619 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
620 $SED '/^$/d' conftest.err >conftest.er2
621 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
622 $2=yes
623 fi
624 fi
625 $rm conftest*
626 ])
627
628 if test x"[$]$2" = xyes; then
629 ifelse([$5], , :, [$5])
630 else
631 ifelse([$6], , :, [$6])
632 fi
633 ])# AC_LIBTOOL_COMPILER_OPTION
634
635
636 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
637 # [ACTION-SUCCESS], [ACTION-FAILURE])
638 # ------------------------------------------------------------
639 # Check whether the given compiler option works
640 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
641 [AC_CACHE_CHECK([$1], [$2],
642 [$2=no
643 save_LDFLAGS="$LDFLAGS"
644 LDFLAGS="$LDFLAGS $3"
645 printf "$lt_simple_link_test_code" > conftest.$ac_ext
646 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
647 # The compiler can only warn and ignore the option if not recognized
648 # So say no if there are warnings
649 if test -s conftest.err; then
650 # Append any errors to the config.log.
651 cat conftest.err 1>&AS_MESSAGE_LOG_FD
652 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
653 $SED '/^$/d' conftest.err >conftest.er2
654 if diff conftest.exp conftest.er2 >/dev/null; then
655 $2=yes
656 fi
657 else
658 $2=yes
659 fi
660 fi
661 $rm conftest*
662 LDFLAGS="$save_LDFLAGS"
663 ])
664
665 if test x"[$]$2" = xyes; then
666 ifelse([$4], , :, [$4])
667 else
668 ifelse([$5], , :, [$5])
669 fi
670 ])# AC_LIBTOOL_LINKER_OPTION
671
672
673 # AC_LIBTOOL_SYS_MAX_CMD_LEN
674 # --------------------------
675 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
676 [# find the maximum length of command line arguments
677 AC_MSG_CHECKING([the maximum length of command line arguments])
678 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
679 i=0
680 teststring="ABCD"
681
682 case $build_os in
683 msdosdjgpp*)
684 # On DJGPP, this test can blow up pretty badly due to problems in libc
685 # (any single argument exceeding 2000 bytes causes a buffer overrun
686 # during glob expansion). Even if it were fixed, the result of this
687 # check would be larger than it should be.
688 lt_cv_sys_max_cmd_len=12288; # 12K is about right
689 ;;
690
691 gnu*)
692 # Under GNU Hurd, this test is not required because there is
693 # no limit to the length of command line arguments.
694 # Libtool will interpret -1 as no limit whatsoever
695 lt_cv_sys_max_cmd_len=-1;
696 ;;
697
698 cygwin* | mingw*)
699 # On Win9x/ME, this test blows up -- it succeeds, but takes
700 # about 5 minutes as the teststring grows exponentially.
701 # Worse, since 9x/ME are not pre-emptively multitasking,
702 # you end up with a "frozen" computer, even though with patience
703 # the test eventually succeeds (with a max line length of 256k).
704 # Instead, let's just punt: use the minimum linelength reported by
705 # all of the supported platforms: 8192 (on NT/2K/XP).
706 lt_cv_sys_max_cmd_len=8192;
707 ;;
708
709 amigaos*)
710 # On AmigaOS with pdksh, this test takes hours, literally.
711 # So we just punt and use a minimum line length of 8192.
712 lt_cv_sys_max_cmd_len=8192;
713 ;;
714
715 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
716 # This has been around since 386BSD, at least. Likely further.
717 if test -x /sbin/sysctl; then
718 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
719 elif test -x /usr/sbin/sysctl; then
720 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
721 else
722 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
723 fi
724 # And add a safety zone
725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
727 ;;
728 osf*)
729 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
730 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
731 # nice to cause kernel panics so lets avoid the loop below.
732 # First set a reasonable default.
733 lt_cv_sys_max_cmd_len=16384
734 #
735 if test -x /sbin/sysconfig; then
736 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
737 *1*) lt_cv_sys_max_cmd_len=-1 ;;
738 esac
739 fi
740 ;;
741 *)
742 # If test is not a shell built-in, we'll probably end up computing a
743 # maximum length that is only half of the actual maximum length, but
744 # we can't tell.
745 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
746 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
747 = "XX$teststring") >/dev/null 2>&1 &&
748 new_result=`expr "X$teststring" : ".*" 2>&1` &&
749 lt_cv_sys_max_cmd_len=$new_result &&
750 test $i != 17 # 1/2 MB should be enough
751 do
752 i=`expr $i + 1`
753 teststring=$teststring$teststring
754 done
755 teststring=
756 # Add a significant safety factor because C++ compilers can tack on massive
757 # amounts of additional arguments before passing them to the linker.
758 # It appears as though 1/2 is a usable value.
759 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
760 ;;
761 esac
762 ])
763 if test -n $lt_cv_sys_max_cmd_len ; then
764 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
765 else
766 AC_MSG_RESULT(none)
767 fi
768 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
769
770
771 # _LT_AC_CHECK_DLFCN
772 # --------------------
773 AC_DEFUN([_LT_AC_CHECK_DLFCN],
774 [AC_CHECK_HEADERS(dlfcn.h)dnl
775 ])# _LT_AC_CHECK_DLFCN
776
777
778 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
779 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
780 # ------------------------------------------------------------------
781 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
782 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
783 if test "$cross_compiling" = yes; then :
784 [$4]
785 else
786 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
787 lt_status=$lt_dlunknown
788 cat > conftest.$ac_ext <<EOF
789 [#line __oline__ "configure"
790 #include "confdefs.h"
791
792 #if HAVE_DLFCN_H
793 #include <dlfcn.h>
794 #endif
795
796 #include <stdio.h>
797
798 #ifdef RTLD_GLOBAL
799 # define LT_DLGLOBAL RTLD_GLOBAL
800 #else
801 # ifdef DL_GLOBAL
802 # define LT_DLGLOBAL DL_GLOBAL
803 # else
804 # define LT_DLGLOBAL 0
805 # endif
806 #endif
807
808 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
809 find out it does not work in some platform. */
810 #ifndef LT_DLLAZY_OR_NOW
811 # ifdef RTLD_LAZY
812 # define LT_DLLAZY_OR_NOW RTLD_LAZY
813 # else
814 # ifdef DL_LAZY
815 # define LT_DLLAZY_OR_NOW DL_LAZY
816 # else
817 # ifdef RTLD_NOW
818 # define LT_DLLAZY_OR_NOW RTLD_NOW
819 # else
820 # ifdef DL_NOW
821 # define LT_DLLAZY_OR_NOW DL_NOW
822 # else
823 # define LT_DLLAZY_OR_NOW 0
824 # endif
825 # endif
826 # endif
827 # endif
828 #endif
829
830 #ifdef __cplusplus
831 extern "C" void exit (int);
832 #endif
833
834 void fnord() { int i=42;}
835 int main ()
836 {
837 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
838 int status = $lt_dlunknown;
839
840 if (self)
841 {
842 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
843 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
844 /* dlclose (self); */
845 }
846
847 exit (status);
848 }]
849 EOF
850 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
851 (./conftest; exit; ) 2>/dev/null
852 lt_status=$?
853 case x$lt_status in
854 x$lt_dlno_uscore) $1 ;;
855 x$lt_dlneed_uscore) $2 ;;
856 x$lt_unknown|x*) $3 ;;
857 esac
858 else :
859 # compilation failed
860 $3
861 fi
862 fi
863 rm -fr conftest*
864 ])# _LT_AC_TRY_DLOPEN_SELF
865
866
867 # AC_LIBTOOL_DLOPEN_SELF
868 # -------------------
869 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
870 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
871 if test "x$enable_dlopen" != xyes; then
872 enable_dlopen=unknown
873 enable_dlopen_self=unknown
874 enable_dlopen_self_static=unknown
875 else
876 lt_cv_dlopen=no
877 lt_cv_dlopen_libs=
878
879 case $host_os in
880 beos*)
881 lt_cv_dlopen="load_add_on"
882 lt_cv_dlopen_libs=
883 lt_cv_dlopen_self=yes
884 ;;
885
886 mingw* | pw32*)
887 lt_cv_dlopen="LoadLibrary"
888 lt_cv_dlopen_libs=
889 ;;
890
891 cygwin*)
892 lt_cv_dlopen="dlopen"
893 lt_cv_dlopen_libs=
894 ;;
895
896 darwin*)
897 # if libdl is installed we need to link against it
898 AC_CHECK_LIB([dl], [dlopen],
899 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
900 lt_cv_dlopen="dyld"
901 lt_cv_dlopen_libs=
902 lt_cv_dlopen_self=yes
903 ])
904 ;;
905
906 *)
907 AC_CHECK_FUNC([shl_load],
908 [lt_cv_dlopen="shl_load"],
909 [AC_CHECK_LIB([dld], [shl_load],
910 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
911 [AC_CHECK_FUNC([dlopen],
912 [lt_cv_dlopen="dlopen"],
913 [AC_CHECK_LIB([dl], [dlopen],
914 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
915 [AC_CHECK_LIB([svld], [dlopen],
916 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
917 [AC_CHECK_LIB([dld], [dld_link],
918 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
919 ])
920 ])
921 ])
922 ])
923 ])
924 ;;
925 esac
926
927 if test "x$lt_cv_dlopen" != xno; then
928 enable_dlopen=yes
929 else
930 enable_dlopen=no
931 fi
932
933 case $lt_cv_dlopen in
934 dlopen)
935 save_CPPFLAGS="$CPPFLAGS"
936 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
937
938 save_LDFLAGS="$LDFLAGS"
939 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
940
941 save_LIBS="$LIBS"
942 LIBS="$lt_cv_dlopen_libs $LIBS"
943
944 AC_CACHE_CHECK([whether a program can dlopen itself],
945 lt_cv_dlopen_self, [dnl
946 _LT_AC_TRY_DLOPEN_SELF(
947 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
948 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
949 ])
950
951 if test "x$lt_cv_dlopen_self" = xyes; then
952 LDFLAGS="$LDFLAGS $link_static_flag"
953 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
954 lt_cv_dlopen_self_static, [dnl
955 _LT_AC_TRY_DLOPEN_SELF(
956 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
957 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
958 ])
959 fi
960
961 CPPFLAGS="$save_CPPFLAGS"
962 LDFLAGS="$save_LDFLAGS"
963 LIBS="$save_LIBS"
964 ;;
965 esac
966
967 case $lt_cv_dlopen_self in
968 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
969 *) enable_dlopen_self=unknown ;;
970 esac
971
972 case $lt_cv_dlopen_self_static in
973 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
974 *) enable_dlopen_self_static=unknown ;;
975 esac
976 fi
977 ])# AC_LIBTOOL_DLOPEN_SELF
978
979
980 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
981 # ---------------------------------
982 # Check to see if options -c and -o are simultaneously supported by compiler
983 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
984 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
985 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
986 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
987 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
988 $rm -r conftest 2>/dev/null
989 mkdir conftest
990 cd conftest
991 mkdir out
992 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
993
994 lt_compiler_flag="-o out/conftest2.$ac_objext"
995 # Insert the option either (1) after the last *FLAGS variable, or
996 # (2) before a word containing "conftest.", or (3) at the end.
997 # Note that $ac_compile itself does not contain backslashes and begins
998 # with a dollar sign (not a hyphen), so the echo should work correctly.
999 lt_compile=`echo "$ac_compile" | $SED \
1000 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1001 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1002 -e 's:$: $lt_compiler_flag:'`
1003 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1004 (eval "$lt_compile" 2>out/conftest.err)
1005 ac_status=$?
1006 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1007 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1008 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1009 then
1010 # The compiler can only warn and ignore the option if not recognized
1011 # So say no if there are warnings
1012 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1013 $SED '/^$/d' out/conftest.err >out/conftest.er2
1014 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1015 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1016 fi
1017 fi
1018 chmod u+w .
1019 $rm conftest*
1020 # SGI C++ compiler will create directory out/ii_files/ for
1021 # template instantiation
1022 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1023 $rm out/* && rmdir out
1024 cd ..
1025 rmdir conftest
1026 $rm conftest*
1027 ])
1028 ])# AC_LIBTOOL_PROG_CC_C_O
1029
1030
1031 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1032 # -----------------------------------------
1033 # Check to see if we can do hard links to lock some files if needed
1034 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1035 [AC_REQUIRE([_LT_AC_LOCK])dnl
1036
1037 hard_links="nottested"
1038 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1039 # do not overwrite the value of need_locks provided by the user
1040 AC_MSG_CHECKING([if we can lock with hard links])
1041 hard_links=yes
1042 $rm conftest*
1043 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1044 touch conftest.a
1045 ln conftest.a conftest.b 2>&5 || hard_links=no
1046 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1047 AC_MSG_RESULT([$hard_links])
1048 if test "$hard_links" = no; then
1049 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1050 need_locks=warn
1051 fi
1052 else
1053 need_locks=no
1054 fi
1055 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1056
1057
1058 # AC_LIBTOOL_OBJDIR
1059 # -----------------
1060 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1061 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1062 [rm -f .libs 2>/dev/null
1063 mkdir .libs 2>/dev/null
1064 if test -d .libs; then
1065 lt_cv_objdir=.libs
1066 else
1067 # MS-DOS does not allow filenames that begin with a dot.
1068 lt_cv_objdir=_libs
1069 fi
1070 rmdir .libs 2>/dev/null])
1071 objdir=$lt_cv_objdir
1072 ])# AC_LIBTOOL_OBJDIR
1073
1074
1075 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1076 # ----------------------------------------------
1077 # Check hardcoding attributes.
1078 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1079 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1080 _LT_AC_TAGVAR(hardcode_action, $1)=
1081 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1082 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1083 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1084
1085 # We can hardcode non-existant directories.
1086 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1087 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1088 # have to relink, otherwise we might link with an installed library
1089 # when we should be linking with a yet-to-be-installed one
1090 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1091 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1092 # Linking always hardcodes the temporary library directory.
1093 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1094 else
1095 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1096 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1097 fi
1098 else
1099 # We cannot hardcode anything, or else we can only hardcode existing
1100 # directories.
1101 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1102 fi
1103 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1104
1105 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1106 # Fast installation is not supported
1107 enable_fast_install=no
1108 elif test "$shlibpath_overrides_runpath" = yes ||
1109 test "$enable_shared" = no; then
1110 # Fast installation is not necessary
1111 enable_fast_install=needless
1112 fi
1113 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1114
1115
1116 # AC_LIBTOOL_SYS_LIB_STRIP
1117 # ------------------------
1118 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1119 [striplib=
1120 old_striplib=
1121 AC_MSG_CHECKING([whether stripping libraries is possible])
1122 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1123 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1124 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1125 AC_MSG_RESULT([yes])
1126 else
1127 # FIXME - insert some real tests, host_os isn't really good enough
1128 case $host_os in
1129 darwin*)
1130 if test -n "$STRIP" ; then
1131 striplib="$STRIP -x"
1132 AC_MSG_RESULT([yes])
1133 else
1134 AC_MSG_RESULT([no])
1135 fi
1136 ;;
1137 *)
1138 AC_MSG_RESULT([no])
1139 ;;
1140 esac
1141 fi
1142 ])# AC_LIBTOOL_SYS_LIB_STRIP
1143
1144
1145 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1146 # -----------------------------
1147 # PORTME Fill in your ld.so characteristics
1148 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1149 [AC_MSG_CHECKING([dynamic linker characteristics])
1150 library_names_spec=
1151 libname_spec='lib$name'
1152 soname_spec=
1153 shrext_cmds=".so"
1154 postinstall_cmds=
1155 postuninstall_cmds=
1156 finish_cmds=
1157 finish_eval=
1158 shlibpath_var=
1159 shlibpath_overrides_runpath=unknown
1160 version_type=none
1161 dynamic_linker="$host_os ld.so"
1162 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1163 if test "$GCC" = yes; then
1164 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1165 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1166 # if the path contains ";" then we assume it to be the separator
1167 # otherwise default to the standard path separator (i.e. ":") - it is
1168 # assumed that no part of a normal pathname contains ";" but that should
1169 # okay in the real world where ";" in dirpaths is itself problematic.
1170 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1171 else
1172 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1173 fi
1174 else
1175 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1176 fi
1177 need_lib_prefix=unknown
1178 hardcode_into_libs=no
1179
1180 # when you set need_version to no, make sure it does not cause -set_version
1181 # flags to be left without arguments
1182 need_version=unknown
1183
1184 case $host_os in
1185 aix3*)
1186 version_type=linux
1187 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1188 shlibpath_var=LIBPATH
1189
1190 # AIX 3 has no versioning support, so we append a major version to the name.
1191 soname_spec='${libname}${release}${shared_ext}$major'
1192 ;;
1193
1194 aix4* | aix5*)
1195 version_type=linux
1196 need_lib_prefix=no
1197 need_version=no
1198 hardcode_into_libs=yes
1199 if test "$host_cpu" = ia64; then
1200 # AIX 5 supports IA64
1201 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1202 shlibpath_var=LD_LIBRARY_PATH
1203 else
1204 # With GCC up to 2.95.x, collect2 would create an import file
1205 # for dependence libraries. The import file would start with
1206 # the line `#! .'. This would cause the generated library to
1207 # depend on `.', always an invalid library. This was fixed in
1208 # development snapshots of GCC prior to 3.0.
1209 case $host_os in
1210 aix4 | aix4.[[01]] | aix4.[[01]].*)
1211 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1212 echo ' yes '
1213 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1214 :
1215 else
1216 can_build_shared=no
1217 fi
1218 ;;
1219 esac
1220 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1221 # soname into executable. Probably we can add versioning support to
1222 # collect2, so additional links can be useful in future.
1223 if test "$aix_use_runtimelinking" = yes; then
1224 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1225 # instead of lib<name>.a to let people know that these are not
1226 # typical AIX shared libraries.
1227 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1228 else
1229 # We preserve .a as extension for shared libraries through AIX4.2
1230 # and later when we are not doing run time linking.
1231 library_names_spec='${libname}${release}.a $libname.a'
1232 soname_spec='${libname}${release}${shared_ext}$major'
1233 fi
1234 shlibpath_var=LIBPATH
1235 fi
1236 ;;
1237
1238 amigaos*)
1239 library_names_spec='$libname.ixlibrary $libname.a'
1240 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1241 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'
1242 ;;
1243
1244 beos*)
1245 library_names_spec='${libname}${shared_ext}'
1246 dynamic_linker="$host_os ld.so"
1247 shlibpath_var=LIBRARY_PATH
1248 ;;
1249
1250 bsdi[[45]]*)
1251 version_type=linux
1252 need_version=no
1253 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1254 soname_spec='${libname}${release}${shared_ext}$major'
1255 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1256 shlibpath_var=LD_LIBRARY_PATH
1257 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1258 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1259 # the default ld.so.conf also contains /usr/contrib/lib and
1260 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1261 # libtool to hard-code these into programs
1262 ;;
1263
1264 cygwin* | mingw* | pw32*)
1265 version_type=windows
1266 shrext_cmds=".dll"
1267 need_version=no
1268 need_lib_prefix=no
1269
1270 case $GCC,$host_os in
1271 yes,cygwin* | yes,mingw* | yes,pw32*)
1272 library_names_spec='$libname.dll.a'
1273 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1274 postinstall_cmds='base_file=`basename \${file}`~
1275 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1276 dldir=$destdir/`dirname \$dlpath`~
1277 test -d \$dldir || mkdir -p \$dldir~
1278 $install_prog $dir/$dlname \$dldir/$dlname'
1279 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1280 dlpath=$dir/\$dldll~
1281 $rm \$dlpath'
1282 shlibpath_overrides_runpath=yes
1283
1284 case $host_os in
1285 cygwin*)
1286 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1287 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1288 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1289 ;;
1290 mingw*)
1291 # MinGW DLLs use traditional 'lib' prefix
1292 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1293 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1294 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1295 # It is most probably a Windows format PATH printed by
1296 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1297 # path with ; separators, and with drive letters. We can handle the
1298 # drive letters (cygwin fileutils understands them), so leave them,
1299 # especially as we might pass files found there to a mingw objdump,
1300 # which wouldn't understand a cygwinified path. Ahh.
1301 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1302 else
1303 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1304 fi
1305 ;;
1306 pw32*)
1307 # pw32 DLLs use 'pw' prefix rather than 'lib'
1308 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1309 ;;
1310 esac
1311 ;;
1312
1313 *)
1314 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1315 ;;
1316 esac
1317 dynamic_linker='Win32 ld.exe'
1318 # FIXME: first we should search . and the directory the executable is in
1319 shlibpath_var=PATH
1320 ;;
1321
1322 darwin* | rhapsody*)
1323 dynamic_linker="$host_os dyld"
1324 version_type=darwin
1325 need_lib_prefix=no
1326 need_version=no
1327 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1328 soname_spec='${libname}${release}${major}$shared_ext'
1329 shlibpath_overrides_runpath=yes
1330 shlibpath_var=DYLD_LIBRARY_PATH
1331 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1332 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1333 if test "$GCC" = yes; then
1334 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1335 else
1336 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1337 fi
1338 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1339 ;;
1340
1341 dgux*)
1342 version_type=linux
1343 need_lib_prefix=no
1344 need_version=no
1345 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1346 soname_spec='${libname}${release}${shared_ext}$major'
1347 shlibpath_var=LD_LIBRARY_PATH
1348 ;;
1349
1350 freebsd1*)
1351 dynamic_linker=no
1352 ;;
1353
1354 kfreebsd*-gnu)
1355 version_type=linux
1356 need_lib_prefix=no
1357 need_version=no
1358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1359 soname_spec='${libname}${release}${shared_ext}$major'
1360 shlibpath_var=LD_LIBRARY_PATH
1361 shlibpath_overrides_runpath=no
1362 hardcode_into_libs=yes
1363 dynamic_linker='GNU ld.so'
1364 ;;
1365
1366 freebsd* | dragonfly*)
1367 # DragonFly does not have aout. When/if they implement a new
1368 # versioning mechanism, adjust this.
1369 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1370 version_type=freebsd-$objformat
1371 case $version_type in
1372 freebsd-elf*)
1373 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1374 need_version=no
1375 need_lib_prefix=no
1376 ;;
1377 freebsd-*)
1378 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1379 need_version=yes
1380 ;;
1381 esac
1382 shlibpath_var=LD_LIBRARY_PATH
1383 case $host_os in
1384 freebsd2*)
1385 shlibpath_overrides_runpath=yes
1386 ;;
1387 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1388 shlibpath_overrides_runpath=yes
1389 hardcode_into_libs=yes
1390 ;;
1391 *) # from 3.2 on
1392 shlibpath_overrides_runpath=no
1393 hardcode_into_libs=yes
1394 ;;
1395 esac
1396 ;;
1397
1398 gnu*)
1399 version_type=linux
1400 need_lib_prefix=no
1401 need_version=no
1402 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1403 soname_spec='${libname}${release}${shared_ext}$major'
1404 shlibpath_var=LD_LIBRARY_PATH
1405 hardcode_into_libs=yes
1406 ;;
1407
1408 hpux9* | hpux10* | hpux11*)
1409 # Give a soname corresponding to the major version so that dld.sl refuses to
1410 # link against other versions.
1411 version_type=sunos
1412 need_lib_prefix=no
1413 need_version=no
1414 case "$host_cpu" in
1415 ia64*)
1416 shrext_cmds='.so'
1417 hardcode_into_libs=yes
1418 dynamic_linker="$host_os dld.so"
1419 shlibpath_var=LD_LIBRARY_PATH
1420 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1421 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1422 soname_spec='${libname}${release}${shared_ext}$major'
1423 if test "X$HPUX_IA64_MODE" = X32; then
1424 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1425 else
1426 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1427 fi
1428 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1429 ;;
1430 hppa*64*)
1431 shrext_cmds='.sl'
1432 hardcode_into_libs=yes
1433 dynamic_linker="$host_os dld.sl"
1434 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1435 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1436 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1437 soname_spec='${libname}${release}${shared_ext}$major'
1438 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1439 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1440 ;;
1441 *)
1442 shrext_cmds='.sl'
1443 dynamic_linker="$host_os dld.sl"
1444 shlibpath_var=SHLIB_PATH
1445 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1446 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1447 soname_spec='${libname}${release}${shared_ext}$major'
1448 ;;
1449 esac
1450 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1451 postinstall_cmds='chmod 555 $lib'
1452 ;;
1453
1454 irix5* | irix6* | nonstopux*)
1455 case $host_os in
1456 nonstopux*) version_type=nonstopux ;;
1457 *)
1458 if test "$lt_cv_prog_gnu_ld" = yes; then
1459 version_type=linux
1460 else
1461 version_type=irix
1462 fi ;;
1463 esac
1464 need_lib_prefix=no
1465 need_version=no
1466 soname_spec='${libname}${release}${shared_ext}$major'
1467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1468 case $host_os in
1469 irix5* | nonstopux*)
1470 libsuff= shlibsuff=
1471 ;;
1472 *)
1473 case $LD in # libtool.m4 will add one of these switches to LD
1474 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1475 libsuff= shlibsuff= libmagic=32-bit;;
1476 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1477 libsuff=32 shlibsuff=N32 libmagic=N32;;
1478 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1479 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1480 *) libsuff= shlibsuff= libmagic=never-match;;
1481 esac
1482 ;;
1483 esac
1484 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1485 shlibpath_overrides_runpath=no
1486 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1487 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1488 hardcode_into_libs=yes
1489 ;;
1490
1491 # No shared lib support for Linux oldld, aout, or coff.
1492 linux*oldld* | linux*aout* | linux*coff*)
1493 dynamic_linker=no
1494 ;;
1495
1496 # This must be Linux ELF.
1497 linux*)
1498 version_type=linux
1499 need_lib_prefix=no
1500 need_version=no
1501 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1502 soname_spec='${libname}${release}${shared_ext}$major'
1503 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1504 shlibpath_var=LD_LIBRARY_PATH
1505 shlibpath_overrides_runpath=no
1506 # This implies no fast_install, which is unacceptable.
1507 # Some rework will be needed to allow for fast_install
1508 # before this can be enabled.
1509 hardcode_into_libs=yes
1510
1511 # find out which ABI we are using
1512 libsuff=
1513 case "$host_cpu" in
1514 x86_64*|s390x*|powerpc64*)
1515 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1516 if AC_TRY_EVAL(ac_compile); then
1517 case `/usr/bin/file conftest.$ac_objext` in
1518 *64-bit*)
1519 libsuff=64
1520 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1521 ;;
1522 esac
1523 fi
1524 rm -rf conftest*
1525 ;;
1526 esac
1527
1528 # Append ld.so.conf contents to the search path
1529 if test -f /etc/ld.so.conf; then
1530 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1531 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1532 fi
1533
1534 # We used to test for /lib/ld.so.1 and disable shared libraries on
1535 # powerpc, because MkLinux only supported shared libraries with the
1536 # GNU dynamic linker. Since this was broken with cross compilers,
1537 # most powerpc-linux boxes support dynamic linking these days and
1538 # people can always --disable-shared, the test was removed, and we
1539 # assume the GNU/Linux dynamic linker is in use.
1540 dynamic_linker='GNU/Linux ld.so'
1541 ;;
1542
1543 knetbsd*-gnu)
1544 version_type=linux
1545 need_lib_prefix=no
1546 need_version=no
1547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1548 soname_spec='${libname}${release}${shared_ext}$major'
1549 shlibpath_var=LD_LIBRARY_PATH
1550 shlibpath_overrides_runpath=no
1551 hardcode_into_libs=yes
1552 dynamic_linker='GNU ld.so'
1553 ;;
1554
1555 netbsd*)
1556 version_type=sunos
1557 need_lib_prefix=no
1558 need_version=no
1559 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1560 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1561 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1562 dynamic_linker='NetBSD (a.out) ld.so'
1563 else
1564 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1565 soname_spec='${libname}${release}${shared_ext}$major'
1566 dynamic_linker='NetBSD ld.elf_so'
1567 fi
1568 shlibpath_var=LD_LIBRARY_PATH
1569 shlibpath_overrides_runpath=yes
1570 hardcode_into_libs=yes
1571 ;;
1572
1573 newsos6)
1574 version_type=linux
1575 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1576 shlibpath_var=LD_LIBRARY_PATH
1577 shlibpath_overrides_runpath=yes
1578 ;;
1579
1580 nto-qnx*)
1581 version_type=linux
1582 need_lib_prefix=no
1583 need_version=no
1584 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1585 soname_spec='${libname}${release}${shared_ext}$major'
1586 shlibpath_var=LD_LIBRARY_PATH
1587 shlibpath_overrides_runpath=yes
1588 ;;
1589
1590 openbsd*)
1591 version_type=sunos
1592 need_lib_prefix=no
1593 need_version=no
1594 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1595 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1596 shlibpath_var=LD_LIBRARY_PATH
1597 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1598 case $host_os in
1599 openbsd2.[[89]] | openbsd2.[[89]].*)
1600 shlibpath_overrides_runpath=no
1601 ;;
1602 *)
1603 shlibpath_overrides_runpath=yes
1604 ;;
1605 esac
1606 else
1607 shlibpath_overrides_runpath=yes
1608 fi
1609 ;;
1610
1611 os2*)
1612 libname_spec='$name'
1613 shrext_cmds=".dll"
1614 need_lib_prefix=no
1615 library_names_spec='$libname${shared_ext} $libname.a'
1616 dynamic_linker='OS/2 ld.exe'
1617 shlibpath_var=LIBPATH
1618 ;;
1619
1620 osf3* | osf4* | osf5*)
1621 version_type=osf
1622 need_lib_prefix=no
1623 need_version=no
1624 soname_spec='${libname}${release}${shared_ext}$major'
1625 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1626 shlibpath_var=LD_LIBRARY_PATH
1627 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1628 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1629 ;;
1630
1631 sco3.2v5*)
1632 version_type=osf
1633 soname_spec='${libname}${release}${shared_ext}$major'
1634 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1635 shlibpath_var=LD_LIBRARY_PATH
1636 ;;
1637
1638 solaris*)
1639 version_type=linux
1640 need_lib_prefix=no
1641 need_version=no
1642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1643 soname_spec='${libname}${release}${shared_ext}$major'
1644 shlibpath_var=LD_LIBRARY_PATH
1645 shlibpath_overrides_runpath=yes
1646 hardcode_into_libs=yes
1647 # ldd complains unless libraries are executable
1648 postinstall_cmds='chmod +x $lib'
1649 ;;
1650
1651 sunos4*)
1652 version_type=sunos
1653 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1654 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1655 shlibpath_var=LD_LIBRARY_PATH
1656 shlibpath_overrides_runpath=yes
1657 if test "$with_gnu_ld" = yes; then
1658 need_lib_prefix=no
1659 fi
1660 need_version=yes
1661 ;;
1662
1663 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1664 version_type=linux
1665 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1666 soname_spec='${libname}${release}${shared_ext}$major'
1667 shlibpath_var=LD_LIBRARY_PATH
1668 case $host_vendor in
1669 sni)
1670 shlibpath_overrides_runpath=no
1671 need_lib_prefix=no
1672 export_dynamic_flag_spec='${wl}-Blargedynsym'
1673 runpath_var=LD_RUN_PATH
1674 ;;
1675 siemens)
1676 need_lib_prefix=no
1677 ;;
1678 motorola)
1679 need_lib_prefix=no
1680 need_version=no
1681 shlibpath_overrides_runpath=no
1682 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1683 ;;
1684 esac
1685 ;;
1686
1687 sysv4*MP*)
1688 if test -d /usr/nec ;then
1689 version_type=linux
1690 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1691 soname_spec='$libname${shared_ext}.$major'
1692 shlibpath_var=LD_LIBRARY_PATH
1693 fi
1694 ;;
1695
1696 uts4*)
1697 version_type=linux
1698 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1699 soname_spec='${libname}${release}${shared_ext}$major'
1700 shlibpath_var=LD_LIBRARY_PATH
1701 ;;
1702
1703 *)
1704 dynamic_linker=no
1705 ;;
1706 esac
1707 AC_MSG_RESULT([$dynamic_linker])
1708 test "$dynamic_linker" = no && can_build_shared=no
1709 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1710
1711
1712 # _LT_AC_TAGCONFIG
1713 # ----------------
1714 AC_DEFUN([_LT_AC_TAGCONFIG],
1715 [AC_ARG_WITH([tags],
1716 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1717 [include additional configurations @<:@automatic@:>@])],
1718 [tagnames="$withval"])
1719
1720 if test -f "$ltmain" && test -n "$tagnames"; then
1721 if test ! -f "${ofile}"; then
1722 AC_MSG_WARN([output file `$ofile' does not exist])
1723 fi
1724
1725 if test -z "$LTCC"; then
1726 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1727 if test -z "$LTCC"; then
1728 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1729 else
1730 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1731 fi
1732 fi
1733
1734 # Extract list of available tagged configurations in $ofile.
1735 # Note that this assumes the entire list is on one line.
1736 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1737
1738 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1739 for tagname in $tagnames; do
1740 IFS="$lt_save_ifs"
1741 # Check whether tagname contains only valid characters
1742 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1743 "") ;;
1744 *) AC_MSG_ERROR([invalid tag name: $tagname])
1745 ;;
1746 esac
1747
1748 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1749 then
1750 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1751 fi
1752
1753 # Update the list of available tags.
1754 if test -n "$tagname"; then
1755 echo appending configuration tag \"$tagname\" to $ofile
1756
1757 case $tagname in
1758 CXX)
1759 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1760 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1761 (test "X$CXX" != "Xg++"))) ; then
1762 AC_LIBTOOL_LANG_CXX_CONFIG
1763 else
1764 tagname=""
1765 fi
1766 ;;
1767
1768 F77)
1769 if test -n "$F77" && test "X$F77" != "Xno"; then
1770 AC_LIBTOOL_LANG_F77_CONFIG
1771 else
1772 tagname=""
1773 fi
1774 ;;
1775
1776 GCJ)
1777 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1778 AC_LIBTOOL_LANG_GCJ_CONFIG
1779 else
1780 tagname=""
1781 fi
1782 ;;
1783
1784 RC)
1785 AC_LIBTOOL_LANG_RC_CONFIG
1786 ;;
1787
1788 *)
1789 AC_MSG_ERROR([Unsupported tag name: $tagname])
1790 ;;
1791 esac
1792
1793 # Append the new tag name to the list of available tags.
1794 if test -n "$tagname" ; then
1795 available_tags="$available_tags $tagname"
1796 fi
1797 fi
1798 done
1799 IFS="$lt_save_ifs"
1800
1801 # Now substitute the updated list of available tags.
1802 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1803 mv "${ofile}T" "$ofile"
1804 chmod +x "$ofile"
1805 else
1806 rm -f "${ofile}T"
1807 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1808 fi
1809 fi
1810 ])# _LT_AC_TAGCONFIG
1811
1812
1813 # AC_LIBTOOL_DLOPEN
1814 # -----------------
1815 # enable checks for dlopen support
1816 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1817 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1818 ])# AC_LIBTOOL_DLOPEN
1819
1820
1821 # AC_LIBTOOL_WIN32_DLL
1822 # --------------------
1823 # declare package support for building win32 dll's
1824 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1825 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1826 ])# AC_LIBTOOL_WIN32_DLL
1827
1828
1829 # AC_ENABLE_SHARED([DEFAULT])
1830 # ---------------------------
1831 # implement the --enable-shared flag
1832 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1833 AC_DEFUN([AC_ENABLE_SHARED],
1834 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1835 AC_ARG_ENABLE([shared],
1836 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1837 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1838 [p=${PACKAGE-default}
1839 case $enableval in
1840 yes) enable_shared=yes ;;
1841 no) enable_shared=no ;;
1842 *)
1843 enable_shared=no
1844 # Look at the argument we got. We use all the common list separators.
1845 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1846 for pkg in $enableval; do
1847 IFS="$lt_save_ifs"
1848 if test "X$pkg" = "X$p"; then
1849 enable_shared=yes
1850 fi
1851 done
1852 IFS="$lt_save_ifs"
1853 ;;
1854 esac],
1855 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1856 ])# AC_ENABLE_SHARED
1857
1858
1859 # AC_DISABLE_SHARED
1860 # -----------------
1861 #- set the default shared flag to --disable-shared
1862 AC_DEFUN([AC_DISABLE_SHARED],
1863 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1864 AC_ENABLE_SHARED(no)
1865 ])# AC_DISABLE_SHARED
1866
1867
1868 # AC_ENABLE_STATIC([DEFAULT])
1869 # ---------------------------
1870 # implement the --enable-static flag
1871 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1872 AC_DEFUN([AC_ENABLE_STATIC],
1873 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1874 AC_ARG_ENABLE([static],
1875 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1876 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1877 [p=${PACKAGE-default}
1878 case $enableval in
1879 yes) enable_static=yes ;;
1880 no) enable_static=no ;;
1881 *)
1882 enable_static=no
1883 # Look at the argument we got. We use all the common list separators.
1884 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1885 for pkg in $enableval; do
1886 IFS="$lt_save_ifs"
1887 if test "X$pkg" = "X$p"; then
1888 enable_static=yes
1889 fi
1890 done
1891 IFS="$lt_save_ifs"
1892 ;;
1893 esac],
1894 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1895 ])# AC_ENABLE_STATIC
1896
1897
1898 # AC_DISABLE_STATIC
1899 # -----------------
1900 # set the default static flag to --disable-static
1901 AC_DEFUN([AC_DISABLE_STATIC],
1902 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1903 AC_ENABLE_STATIC(no)
1904 ])# AC_DISABLE_STATIC
1905
1906
1907 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1908 # ---------------------------------
1909 # implement the --enable-fast-install flag
1910 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1911 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1912 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1913 AC_ARG_ENABLE([fast-install],
1914 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1915 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1916 [p=${PACKAGE-default}
1917 case $enableval in
1918 yes) enable_fast_install=yes ;;
1919 no) enable_fast_install=no ;;
1920 *)
1921 enable_fast_install=no
1922 # Look at the argument we got. We use all the common list separators.
1923 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1924 for pkg in $enableval; do
1925 IFS="$lt_save_ifs"
1926 if test "X$pkg" = "X$p"; then
1927 enable_fast_install=yes
1928 fi
1929 done
1930 IFS="$lt_save_ifs"
1931 ;;
1932 esac],
1933 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1934 ])# AC_ENABLE_FAST_INSTALL
1935
1936
1937 # AC_DISABLE_FAST_INSTALL
1938 # -----------------------
1939 # set the default to --disable-fast-install
1940 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1941 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1942 AC_ENABLE_FAST_INSTALL(no)
1943 ])# AC_DISABLE_FAST_INSTALL
1944
1945
1946 # AC_LIBTOOL_PICMODE([MODE])
1947 # --------------------------
1948 # implement the --with-pic flag
1949 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1950 AC_DEFUN([AC_LIBTOOL_PICMODE],
1951 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1952 pic_mode=ifelse($#,1,$1,default)
1953 ])# AC_LIBTOOL_PICMODE
1954
1955
1956 # AC_PROG_EGREP
1957 # -------------
1958 # This is predefined starting with Autoconf 2.54, so this conditional
1959 # definition can be removed once we require Autoconf 2.54 or later.
1960 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
1961 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
1962 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1963 then ac_cv_prog_egrep='grep -E'
1964 else ac_cv_prog_egrep='egrep'
1965 fi])
1966 EGREP=$ac_cv_prog_egrep
1967 AC_SUBST([EGREP])
1968 ])])
1969
1970
1971 # AC_PATH_TOOL_PREFIX
1972 # -------------------
1973 # find a file program which can recognise shared library
1974 AC_DEFUN([AC_PATH_TOOL_PREFIX],
1975 [AC_REQUIRE([AC_PROG_EGREP])dnl
1976 AC_MSG_CHECKING([for $1])
1977 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1978 [case $MAGIC_CMD in
1979 [[\\/*] | ?:[\\/]*])
1980 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1981 ;;
1982 *)
1983 lt_save_MAGIC_CMD="$MAGIC_CMD"
1984 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1985 dnl $ac_dummy forces splitting on constant user-supplied paths.
1986 dnl POSIX.2 word splitting is done only on the output of word expansions,
1987 dnl not every word. This closes a longstanding sh security hole.
1988 ac_dummy="ifelse([$2], , $PATH, [$2])"
1989 for ac_dir in $ac_dummy; do
1990 IFS="$lt_save_ifs"
1991 test -z "$ac_dir" && ac_dir=.
1992 if test -f $ac_dir/$1; then
1993 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1994 if test -n "$file_magic_test_file"; then
1995 case $deplibs_check_method in
1996 "file_magic "*)
1997 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1998 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1999 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2000 $EGREP "$file_magic_regex" > /dev/null; then
2001 :
2002 else
2003 cat <<EOF 1>&2
2004
2005 *** Warning: the command libtool uses to detect shared libraries,
2006 *** $file_magic_cmd, produces output that libtool cannot recognize.
2007 *** The result is that libtool may fail to recognize shared libraries
2008 *** as such. This will affect the creation of libtool libraries that
2009 *** depend on shared libraries, but programs linked with such libtool
2010 *** libraries will work regardless of this problem. Nevertheless, you
2011 *** may want to report the problem to your system manager and/or to
2012 *** bug-libtool@gnu.org
2013
2014 EOF
2015 fi ;;
2016 esac
2017 fi
2018 break
2019 fi
2020 done
2021 IFS="$lt_save_ifs"
2022 MAGIC_CMD="$lt_save_MAGIC_CMD"
2023 ;;
2024 esac])
2025 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2026 if test -n "$MAGIC_CMD"; then
2027 AC_MSG_RESULT($MAGIC_CMD)
2028 else
2029 AC_MSG_RESULT(no)
2030 fi
2031 ])# AC_PATH_TOOL_PREFIX
2032
2033
2034 # AC_PATH_MAGIC
2035 # -------------
2036 # find a file program which can recognise a shared library
2037 AC_DEFUN([AC_PATH_MAGIC],
2038 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2039 if test -z "$lt_cv_path_MAGIC_CMD"; then
2040 if test -n "$ac_tool_prefix"; then
2041 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2042 else
2043 MAGIC_CMD=:
2044 fi
2045 fi
2046 ])# AC_PATH_MAGIC
2047
2048
2049 # AC_PROG_LD
2050 # ----------
2051 # find the pathname to the GNU or non-GNU linker
2052 AC_DEFUN([AC_PROG_LD],
2053 [AC_ARG_WITH([gnu-ld],
2054 [AC_HELP_STRING([--with-gnu-ld],
2055 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2056 [test "$withval" = no || with_gnu_ld=yes],
2057 [with_gnu_ld=no])
2058 AC_REQUIRE([LT_AC_PROG_SED])dnl
2059 AC_REQUIRE([AC_PROG_CC])dnl
2060 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2061 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2062 ac_prog=ld
2063 if test "$GCC" = yes; then
2064 # Check if gcc -print-prog-name=ld gives a path.
2065 AC_MSG_CHECKING([for ld used by $CC])
2066 case $host in
2067 *-*-mingw*)
2068 # gcc leaves a trailing carriage return which upsets mingw
2069 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2070 *)
2071 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2072 esac
2073 case $ac_prog in
2074 # Accept absolute paths.
2075 [[\\/]]* | ?:[[\\/]]*)
2076 re_direlt='/[[^/]][[^/]]*/\.\./'
2077 # Canonicalize the pathname of ld
2078 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2079 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2080 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2081 done
2082 test -z "$LD" && LD="$ac_prog"
2083 ;;
2084 "")
2085 # If it fails, then pretend we aren't using GCC.
2086 ac_prog=ld
2087 ;;
2088 *)
2089 # If it is relative, then search for the first ld in PATH.
2090 with_gnu_ld=unknown
2091 ;;
2092 esac
2093 elif test "$with_gnu_ld" = yes; then
2094 AC_MSG_CHECKING([for GNU ld])
2095 else
2096 AC_MSG_CHECKING([for non-GNU ld])
2097 fi
2098 AC_CACHE_VAL(lt_cv_path_LD,
2099 [if test -z "$LD"; then
2100 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2101 for ac_dir in $PATH; do
2102 IFS="$lt_save_ifs"
2103 test -z "$ac_dir" && ac_dir=.
2104 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2105 lt_cv_path_LD="$ac_dir/$ac_prog"
2106 # Check to see if the program is GNU ld. I'd rather use --version,
2107 # but apparently some GNU ld's only accept -v.
2108 # Break only if it was the GNU/non-GNU ld that we prefer.
2109 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2110 *GNU* | *'with BFD'*)
2111 test "$with_gnu_ld" != no && break
2112 ;;
2113 *)
2114 test "$with_gnu_ld" != yes && break
2115 ;;
2116 esac
2117 fi
2118 done
2119 IFS="$lt_save_ifs"
2120 else
2121 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2122 fi])
2123 LD="$lt_cv_path_LD"
2124 if test -n "$LD"; then
2125 AC_MSG_RESULT($LD)
2126 else
2127 AC_MSG_RESULT(no)
2128 fi
2129 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2130 AC_PROG_LD_GNU
2131 ])# AC_PROG_LD
2132
2133
2134 # AC_PROG_LD_GNU
2135 # --------------
2136 AC_DEFUN([AC_PROG_LD_GNU],
2137 [AC_REQUIRE([AC_PROG_EGREP])dnl
2138 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2139 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2140 case `$LD -v 2>&1 </dev/null` in
2141 *GNU* | *'with BFD'*)
2142 lt_cv_prog_gnu_ld=yes
2143 ;;
2144 *)
2145 lt_cv_prog_gnu_ld=no
2146 ;;
2147 esac])
2148 with_gnu_ld=$lt_cv_prog_gnu_ld
2149 ])# AC_PROG_LD_GNU
2150
2151
2152 # AC_PROG_LD_RELOAD_FLAG
2153 # ----------------------
2154 # find reload flag for linker
2155 # -- PORTME Some linkers may need a different reload flag.
2156 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2157 [AC_CACHE_CHECK([for $LD option to reload object files],
2158 lt_cv_ld_reload_flag,
2159 [lt_cv_ld_reload_flag='-r'])
2160 reload_flag=$lt_cv_ld_reload_flag
2161 case $reload_flag in
2162 "" | " "*) ;;
2163 *) reload_flag=" $reload_flag" ;;
2164 esac
2165 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2166 case $host_os in
2167 darwin*)
2168 if test "$GCC" = yes; then
2169 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2170 else
2171 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2172 fi
2173 ;;
2174 esac
2175 ])# AC_PROG_LD_RELOAD_FLAG
2176
2177
2178 # AC_DEPLIBS_CHECK_METHOD
2179 # -----------------------
2180 # how to check for library dependencies
2181 # -- PORTME fill in with the dynamic library characteristics
2182 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2183 [AC_CACHE_CHECK([how to recognise dependent libraries],
2184 lt_cv_deplibs_check_method,
2185 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2186 lt_cv_file_magic_test_file=
2187 lt_cv_deplibs_check_method='unknown'
2188 # Need to set the preceding variable on all platforms that support
2189 # interlibrary dependencies.
2190 # 'none' -- dependencies not supported.
2191 # `unknown' -- same as none, but documents that we really don't know.
2192 # 'pass_all' -- all dependencies passed with no checks.
2193 # 'test_compile' -- check by making test program.
2194 # 'file_magic [[regex]]' -- check by looking for files in library path
2195 # which responds to the $file_magic_cmd with a given extended regex.
2196 # If you have `file' or equivalent on your system and you're not sure
2197 # whether `pass_all' will *always* work, you probably want this one.
2198
2199 case $host_os in
2200 aix4* | aix5*)
2201 lt_cv_deplibs_check_method=pass_all
2202 ;;
2203
2204 beos*)
2205 lt_cv_deplibs_check_method=pass_all
2206 ;;
2207
2208 bsdi[[45]]*)
2209 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2210 lt_cv_file_magic_cmd='/usr/bin/file -L'
2211 lt_cv_file_magic_test_file=/shlib/libc.so
2212 ;;
2213
2214 cygwin*)
2215 # func_win32_libid is a shell function defined in ltmain.sh
2216 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2217 lt_cv_file_magic_cmd='func_win32_libid'
2218 ;;
2219
2220 mingw* | pw32*)
2221 # Base MSYS/MinGW do not provide the 'file' command needed by
2222 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2223 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2224 lt_cv_file_magic_cmd='$OBJDUMP -f'
2225 ;;
2226
2227 darwin* | rhapsody*)
2228 lt_cv_deplibs_check_method=pass_all
2229 ;;
2230
2231 freebsd* | kfreebsd*-gnu | dragonfly*)
2232 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2233 case $host_cpu in
2234 i*86 )
2235 # Not sure whether the presence of OpenBSD here was a mistake.
2236 # Let's accept both of them until this is cleared up.
2237 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2238 lt_cv_file_magic_cmd=/usr/bin/file
2239 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2240 ;;
2241 esac
2242 else
2243 lt_cv_deplibs_check_method=pass_all
2244 fi
2245 ;;
2246
2247 gnu*)
2248 lt_cv_deplibs_check_method=pass_all
2249 ;;
2250
2251 hpux10.20* | hpux11*)
2252 lt_cv_file_magic_cmd=/usr/bin/file
2253 case "$host_cpu" in
2254 ia64*)
2255 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2256 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2257 ;;
2258 hppa*64*)
2259 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2260 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2261 ;;
2262 *)
2263 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2264 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2265 ;;
2266 esac
2267 ;;
2268
2269 irix5* | irix6* | nonstopux*)
2270 case $LD in
2271 *-32|*"-32 ") libmagic=32-bit;;
2272 *-n32|*"-n32 ") libmagic=N32;;
2273 *-64|*"-64 ") libmagic=64-bit;;
2274 *) libmagic=never-match;;
2275 esac
2276 lt_cv_deplibs_check_method=pass_all
2277 ;;
2278
2279 # This must be Linux ELF.
2280 linux*)
2281 lt_cv_deplibs_check_method=pass_all
2282 ;;
2283
2284 netbsd*)
2285 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2286 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2287 else
2288 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2289 fi
2290 ;;
2291
2292 newos6*)
2293 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2294 lt_cv_file_magic_cmd=/usr/bin/file
2295 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2296 ;;
2297
2298 nto-qnx*)
2299 lt_cv_deplibs_check_method=unknown
2300 ;;
2301
2302 openbsd*)
2303 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2304 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2305 else
2306 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2307 fi
2308 ;;
2309
2310 osf3* | osf4* | osf5*)
2311 lt_cv_deplibs_check_method=pass_all
2312 ;;
2313
2314 sco3.2v5*)
2315 lt_cv_deplibs_check_method=pass_all
2316 ;;
2317
2318 solaris*)
2319 lt_cv_deplibs_check_method=pass_all
2320 ;;
2321
2322 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2323 case $host_vendor in
2324 motorola)
2325 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]]'
2326 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2327 ;;
2328 ncr)
2329 lt_cv_deplibs_check_method=pass_all
2330 ;;
2331 sequent)
2332 lt_cv_file_magic_cmd='/bin/file'
2333 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2334 ;;
2335 sni)
2336 lt_cv_file_magic_cmd='/bin/file'
2337 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2338 lt_cv_file_magic_test_file=/lib/libc.so
2339 ;;
2340 siemens)
2341 lt_cv_deplibs_check_method=pass_all
2342 ;;
2343 esac
2344 ;;
2345
2346 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2347 lt_cv_deplibs_check_method=pass_all
2348 ;;
2349 esac
2350 ])
2351 file_magic_cmd=$lt_cv_file_magic_cmd
2352 deplibs_check_method=$lt_cv_deplibs_check_method
2353 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2354 ])# AC_DEPLIBS_CHECK_METHOD
2355
2356
2357 # AC_PROG_NM
2358 # ----------
2359 # find the pathname to a BSD-compatible name lister
2360 AC_DEFUN([AC_PROG_NM],
2361 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2362 [if test -n "$NM"; then
2363 # Let the user override the test.
2364 lt_cv_path_NM="$NM"
2365 else
2366 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2367 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2368 IFS="$lt_save_ifs"
2369 test -z "$ac_dir" && ac_dir=.
2370 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2371 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2372 # Check to see if the nm accepts a BSD-compat flag.
2373 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2374 # nm: unknown option "B" ignored
2375 # Tru64's nm complains that /dev/null is an invalid object file
2376 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2377 */dev/null* | *'Invalid file or object type'*)
2378 lt_cv_path_NM="$tmp_nm -B"
2379 break
2380 ;;
2381 *)
2382 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2383 */dev/null*)
2384 lt_cv_path_NM="$tmp_nm -p"
2385 break
2386 ;;
2387 *)
2388 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2389 continue # so that we can try to find one that supports BSD flags
2390 ;;
2391 esac
2392 esac
2393 fi
2394 done
2395 IFS="$lt_save_ifs"
2396 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2397 fi])
2398 NM="$lt_cv_path_NM"
2399 ])# AC_PROG_NM
2400
2401
2402 # AC_CHECK_LIBM
2403 # -------------
2404 # check for math library
2405 AC_DEFUN([AC_CHECK_LIBM],
2406 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2407 LIBM=
2408 case $host in
2409 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2410 # These system don't have libm, or don't need it
2411 ;;
2412 *-ncr-sysv4.3*)
2413 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2414 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2415 ;;
2416 *)
2417 AC_CHECK_LIB(m, cos, LIBM="-lm")
2418 ;;
2419 esac
2420 ])# AC_CHECK_LIBM
2421
2422
2423 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2424 # -----------------------------------
2425 # sets LIBLTDL to the link flags for the libltdl convenience library and
2426 # LTDLINCL to the include flags for the libltdl header and adds
2427 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2428 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2429 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2430 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2431 # '${top_srcdir}/' (note the single quotes!). If your package is not
2432 # flat and you're not using automake, define top_builddir and
2433 # top_srcdir appropriately in the Makefiles.
2434 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2435 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2436 case $enable_ltdl_convenience in
2437 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2438 "") enable_ltdl_convenience=yes
2439 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2440 esac
2441 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2442 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2443 # For backwards non-gettext consistent compatibility...
2444 INCLTDL="$LTDLINCL"
2445 ])# AC_LIBLTDL_CONVENIENCE
2446
2447
2448 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2449 # -----------------------------------
2450 # sets LIBLTDL to the link flags for the libltdl installable library and
2451 # LTDLINCL to the include flags for the libltdl header and adds
2452 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2453 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2454 # DIRECTORY is not provided and an installed libltdl is not found, it is
2455 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2456 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2457 # quotes!). If your package is not flat and you're not using automake,
2458 # define top_builddir and top_srcdir appropriately in the Makefiles.
2459 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2460 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2461 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2462 AC_CHECK_LIB(ltdl, lt_dlinit,
2463 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2464 [if test x"$enable_ltdl_install" = xno; then
2465 AC_MSG_WARN([libltdl not installed, but installation disabled])
2466 else
2467 enable_ltdl_install=yes
2468 fi
2469 ])
2470 if test x"$enable_ltdl_install" = x"yes"; then
2471 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2472 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2473 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2474 else
2475 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2476 LIBLTDL="-lltdl"
2477 LTDLINCL=
2478 fi
2479 # For backwards non-gettext consistent compatibility...
2480 INCLTDL="$LTDLINCL"
2481 ])# AC_LIBLTDL_INSTALLABLE
2482
2483
2484 # AC_LIBTOOL_CXX
2485 # --------------
2486 # enable support for C++ libraries
2487 AC_DEFUN([AC_LIBTOOL_CXX],
2488 [AC_REQUIRE([_LT_AC_LANG_CXX])
2489 ])# AC_LIBTOOL_CXX
2490
2491
2492 # _LT_AC_LANG_CXX
2493 # ---------------
2494 AC_DEFUN([_LT_AC_LANG_CXX],
2495 [AC_REQUIRE([AC_PROG_CXX])
2496 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2497 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2498 ])# _LT_AC_LANG_CXX
2499
2500 # _LT_AC_PROG_CXXCPP
2501 # ---------------
2502 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2503 [
2504 AC_REQUIRE([AC_PROG_CXX])
2505 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2506 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2507 (test "X$CXX" != "Xg++"))) ; then
2508 AC_PROG_CXXCPP
2509 fi
2510 ])# _LT_AC_PROG_CXXCPP
2511
2512 # AC_LIBTOOL_F77
2513 # --------------
2514 # enable support for Fortran 77 libraries
2515 AC_DEFUN([AC_LIBTOOL_F77],
2516 [AC_REQUIRE([_LT_AC_LANG_F77])
2517 ])# AC_LIBTOOL_F77
2518
2519
2520 # _LT_AC_LANG_F77
2521 # ---------------
2522 AC_DEFUN([_LT_AC_LANG_F77],
2523 [AC_REQUIRE([AC_PROG_F77])
2524 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2525 ])# _LT_AC_LANG_F77
2526
2527
2528 # AC_LIBTOOL_GCJ
2529 # --------------
2530 # enable support for GCJ libraries
2531 AC_DEFUN([AC_LIBTOOL_GCJ],
2532 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2533 ])# AC_LIBTOOL_GCJ
2534
2535
2536 # _LT_AC_LANG_GCJ
2537 # ---------------
2538 AC_DEFUN([_LT_AC_LANG_GCJ],
2539 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2540 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2541 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2542 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2543 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2544 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2545 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2546 ])# _LT_AC_LANG_GCJ
2547
2548
2549 # AC_LIBTOOL_RC
2550 # --------------
2551 # enable support for Windows resource files
2552 AC_DEFUN([AC_LIBTOOL_RC],
2553 [AC_REQUIRE([LT_AC_PROG_RC])
2554 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2555 ])# AC_LIBTOOL_RC
2556
2557
2558 # AC_LIBTOOL_LANG_C_CONFIG
2559 # ------------------------
2560 # Ensure that the configuration vars for the C compiler are
2561 # suitably defined. Those variables are subsequently used by
2562 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2563 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2564 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2565 [lt_save_CC="$CC"
2566 AC_LANG_PUSH(C)
2567
2568 # Source file extension for C test sources.
2569 ac_ext=c
2570
2571 # Object file extension for compiled C test sources.
2572 objext=o
2573 _LT_AC_TAGVAR(objext, $1)=$objext
2574
2575 # Code to be used in simple compile tests
2576 lt_simple_compile_test_code="int some_variable = 0;\n"
2577
2578 # Code to be used in simple link tests
2579 lt_simple_link_test_code='int main(){return(0);}\n'
2580
2581 _LT_AC_SYS_COMPILER
2582
2583 # save warnings/boilerplate of simple test code
2584 _LT_COMPILER_BOILERPLATE
2585 _LT_LINKER_BOILERPLATE
2586
2587 #
2588 # Check for any special shared library compilation flags.
2589 #
2590 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2591 if test "$GCC" = no; then
2592 case $host_os in
2593 sco3.2v5*)
2594 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2595 ;;
2596 esac
2597 fi
2598 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2599 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2600 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2601 else
2602 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2603 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2604 fi
2605 fi
2606
2607
2608 #
2609 # Check to make sure the static flag actually works.
2610 #
2611 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2612 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2613 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2614 [],
2615 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2616
2617
2618 ## CAVEAT EMPTOR:
2619 ## There is no encapsulation within the following macros, do not change
2620 ## the running order or otherwise move them around unless you know exactly
2621 ## what you are doing...
2622 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2623 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2624 AC_LIBTOOL_PROG_CC_C_O($1)
2625 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2626 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2627 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2628 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2629 AC_LIBTOOL_SYS_LIB_STRIP
2630 AC_LIBTOOL_DLOPEN_SELF($1)
2631
2632 # Report which librarie types wil actually be built
2633 AC_MSG_CHECKING([if libtool supports shared libraries])
2634 AC_MSG_RESULT([$can_build_shared])
2635
2636 AC_MSG_CHECKING([whether to build shared libraries])
2637 test "$can_build_shared" = "no" && enable_shared=no
2638
2639 # On AIX, shared libraries and static libraries use the same namespace, and
2640 # are all built from PIC.
2641 case "$host_os" in
2642 aix3*)
2643 test "$enable_shared" = yes && enable_static=no
2644 if test -n "$RANLIB"; then
2645 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2646 postinstall_cmds='$RANLIB $lib'
2647 fi
2648 ;;
2649
2650 aix4* | aix5*)
2651 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2652 test "$enable_shared" = yes && enable_static=no
2653 fi
2654 ;;
2655 esac
2656 AC_MSG_RESULT([$enable_shared])
2657
2658 AC_MSG_CHECKING([whether to build static libraries])
2659 # Make sure either enable_shared or enable_static is yes.
2660 test "$enable_shared" = yes || enable_static=yes
2661 AC_MSG_RESULT([$enable_static])
2662
2663 AC_LIBTOOL_CONFIG($1)
2664
2665 AC_LANG_POP
2666 CC="$lt_save_CC"
2667 ])# AC_LIBTOOL_LANG_C_CONFIG
2668
2669
2670 # AC_LIBTOOL_LANG_CXX_CONFIG
2671 # --------------------------
2672 # Ensure that the configuration vars for the C compiler are
2673 # suitably defined. Those variables are subsequently used by
2674 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2675 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2676 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2677 [AC_LANG_PUSH(C++)
2678 AC_REQUIRE([AC_PROG_CXX])
2679 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2680
2681 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2682 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2683 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2684 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2685 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2686 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2687 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2688 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2689 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2690 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2691 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2692 _LT_AC_TAGVAR(module_cmds, $1)=
2693 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2694 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2695 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2696 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2697 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2698 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2699
2700 # Dependencies to place before and after the object being linked:
2701 _LT_AC_TAGVAR(predep_objects, $1)=
2702 _LT_AC_TAGVAR(postdep_objects, $1)=
2703 _LT_AC_TAGVAR(predeps, $1)=
2704 _LT_AC_TAGVAR(postdeps, $1)=
2705 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2706
2707 # Source file extension for C++ test sources.
2708 ac_ext=cc
2709
2710 # Object file extension for compiled C++ test sources.
2711 objext=o
2712 _LT_AC_TAGVAR(objext, $1)=$objext
2713
2714 # Code to be used in simple compile tests
2715 lt_simple_compile_test_code="int some_variable = 0;\n"
2716
2717 # Code to be used in simple link tests
2718 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2719
2720 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2721 _LT_AC_SYS_COMPILER
2722
2723 # save warnings/boilerplate of simple test code
2724 _LT_COMPILER_BOILERPLATE
2725 _LT_LINKER_BOILERPLATE
2726
2727 # Allow CC to be a program name with arguments.
2728 lt_save_CC=$CC
2729 lt_save_LD=$LD
2730 lt_save_GCC=$GCC
2731 GCC=$GXX
2732 lt_save_with_gnu_ld=$with_gnu_ld
2733 lt_save_path_LD=$lt_cv_path_LD
2734 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2735 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2736 else
2737 unset lt_cv_prog_gnu_ld
2738 fi
2739 if test -n "${lt_cv_path_LDCXX+set}"; then
2740 lt_cv_path_LD=$lt_cv_path_LDCXX
2741 else
2742 unset lt_cv_path_LD
2743 fi
2744 test -z "${LDCXX+set}" || LD=$LDCXX
2745 CC=${CXX-"c++"}
2746 compiler=$CC
2747 _LT_AC_TAGVAR(compiler, $1)=$CC
2748 _LT_CC_BASENAME([$compiler])
2749
2750 # We don't want -fno-exception wen compiling C++ code, so set the
2751 # no_builtin_flag separately
2752 if test "$GXX" = yes; then
2753 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2754 else
2755 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2756 fi
2757
2758 if test "$GXX" = yes; then
2759 # Set up default GNU C++ configuration
2760
2761 AC_PROG_LD
2762
2763 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2764 # archiving commands below assume that GNU ld is being used.
2765 if test "$with_gnu_ld" = yes; then
2766 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2767 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2768
2769 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2770 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2771
2772 # If archive_cmds runs LD, not CC, wlarc should be empty
2773 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2774 # investigate it a little bit more. (MM)
2775 wlarc='${wl}'
2776
2777 # ancient GNU ld didn't support --whole-archive et. al.
2778 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2779 grep 'no-whole-archive' > /dev/null; then
2780 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2781 else
2782 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2783 fi
2784 else
2785 with_gnu_ld=no
2786 wlarc=
2787
2788 # A generic and very simple default shared library creation
2789 # command for GNU C++ for the case where it uses the native
2790 # linker, instead of GNU ld. If possible, this setting should
2791 # overridden to take advantage of the native linker features on
2792 # the platform it is being used on.
2793 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2794 fi
2795
2796 # Commands to make compiler produce verbose output that lists
2797 # what "hidden" libraries, object files and flags are used when
2798 # linking a shared library.
2799 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2800
2801 else
2802 GXX=no
2803 with_gnu_ld=no
2804 wlarc=
2805 fi
2806
2807 # PORTME: fill in a description of your system's C++ link characteristics
2808 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2809 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2810 case $host_os in
2811 aix3*)
2812 # FIXME: insert proper C++ library support
2813 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2814 ;;
2815 aix4* | aix5*)
2816 if test "$host_cpu" = ia64; then
2817 # On IA64, the linker does run time linking by default, so we don't
2818 # have to do anything special.
2819 aix_use_runtimelinking=no
2820 exp_sym_flag='-Bexport'
2821 no_entry_flag=""
2822 else
2823 aix_use_runtimelinking=no
2824
2825 # Test if we are trying to use run time linking or normal
2826 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2827 # need to do runtime linking.
2828 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2829 for ld_flag in $LDFLAGS; do
2830 case $ld_flag in
2831 *-brtl*)
2832 aix_use_runtimelinking=yes
2833 break
2834 ;;
2835 esac
2836 done
2837 esac
2838
2839 exp_sym_flag='-bexport'
2840 no_entry_flag='-bnoentry'
2841 fi
2842
2843 # When large executables or shared objects are built, AIX ld can
2844 # have problems creating the table of contents. If linking a library
2845 # or program results in "error TOC overflow" add -mminimal-toc to
2846 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2847 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2848
2849 _LT_AC_TAGVAR(archive_cmds, $1)=''
2850 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2851 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2852 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2853
2854 if test "$GXX" = yes; then
2855 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2856 # We only want to do this on AIX 4.2 and lower, the check
2857 # below for broken collect2 doesn't work under 4.3+
2858 collect2name=`${CC} -print-prog-name=collect2`
2859 if test -f "$collect2name" && \
2860 strings "$collect2name" | grep resolve_lib_name >/dev/null
2861 then
2862 # We have reworked collect2
2863 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2864 else
2865 # We have old collect2
2866 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2867 # It fails to find uninstalled libraries when the uninstalled
2868 # path is not listed in the libpath. Setting hardcode_minus_L
2869 # to unsupported forces relinking
2870 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2871 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2872 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2873 fi
2874 esac
2875 shared_flag='-shared'
2876 if test "$aix_use_runtimelinking" = yes; then
2877 shared_flag="$shared_flag "'${wl}-G'
2878 fi
2879 else
2880 # not using gcc
2881 if test "$host_cpu" = ia64; then
2882 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2883 # chokes on -Wl,-G. The following line is correct:
2884 shared_flag='-G'
2885 else
2886 if test "$aix_use_runtimelinking" = yes; then
2887 shared_flag='${wl}-G'
2888 else
2889 shared_flag='${wl}-bM:SRE'
2890 fi
2891 fi
2892 fi
2893
2894 # It seems that -bexpall does not export symbols beginning with
2895 # underscore (_), so it is better to generate a list of symbols to export.
2896 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2897 if test "$aix_use_runtimelinking" = yes; then
2898 # Warning - without using the other runtime loading flags (-brtl),
2899 # -berok will link without error, but may produce a broken library.
2900 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2901 # Determine the default libpath from the value encoded in an empty executable.
2902 _LT_AC_SYS_LIBPATH_AIX
2903 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2904
2905 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
2906 else
2907 if test "$host_cpu" = ia64; then
2908 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2909 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2910 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2911 else
2912 # Determine the default libpath from the value encoded in an empty executable.
2913 _LT_AC_SYS_LIBPATH_AIX
2914 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2915 # Warning - without using the other run time loading flags,
2916 # -berok will link without error, but may produce a broken library.
2917 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2918 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2919 # -bexpall does not export symbols beginning with underscore (_)
2920 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2921 # Exported symbols can be pulled into shared objects from archives
2922 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2923 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2924 # This is similar to how AIX traditionally builds it's shared libraries.
2925 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2926 fi
2927 fi
2928 ;;
2929 chorus*)
2930 case $cc_basename in
2931 *)
2932 # FIXME: insert proper C++ library support
2933 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2934 ;;
2935 esac
2936 ;;
2937
2938
2939 cygwin* | mingw* | pw32*)
2940 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2941 # as there is no search path for DLLs.
2942 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2943 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2944 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2945 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2946
2947 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2948 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2949 # If the export-symbols file already is a .def file (1st line
2950 # is EXPORTS), use it as is; otherwise, prepend...
2951 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2952 cp $export_symbols $output_objdir/$soname.def;
2953 else
2954 echo EXPORTS > $output_objdir/$soname.def;
2955 cat $export_symbols >> $output_objdir/$soname.def;
2956 fi~
2957 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2958 else
2959 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2960 fi
2961 ;;
2962 darwin* | rhapsody*)
2963 case "$host_os" in
2964 rhapsody* | darwin1.[[012]])
2965 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
2966 ;;
2967 *) # Darwin 1.3 on
2968 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2969 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2970 else
2971 case ${MACOSX_DEPLOYMENT_TARGET} in
2972 10.[[012]])
2973 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2974 ;;
2975 10.*)
2976 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
2977 ;;
2978 esac
2979 fi
2980 ;;
2981 esac
2982 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2983 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2984 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2985 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2986 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
2987 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2988
2989 if test "$GXX" = yes ; then
2990 lt_int_apple_cc_single_mod=no
2991 output_verbose_link_cmd='echo'
2992 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
2993 lt_int_apple_cc_single_mod=yes
2994 fi
2995 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2996 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2997 else
2998 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2999 fi
3000 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3001 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3002 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3003 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3004 else
3005 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3006 fi
3007 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3008 else
3009 case $cc_basename in
3010 xlc*)
3011 output_verbose_link_cmd='echo'
3012 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3013 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3014 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3015 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3016 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3017 ;;
3018 *)
3019 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3020 ;;
3021 esac
3022 fi
3023 ;;
3024
3025 dgux*)
3026 case $cc_basename in
3027 ec++*)
3028 # FIXME: insert proper C++ library support
3029 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3030 ;;
3031 ghcx*)
3032 # Green Hills C++ Compiler
3033 # FIXME: insert proper C++ library support
3034 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3035 ;;
3036 *)
3037 # FIXME: insert proper C++ library support
3038 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3039 ;;
3040 esac
3041 ;;
3042 freebsd[[12]]*)
3043 # C++ shared libraries reported to be fairly broken before switch to ELF
3044 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3045 ;;
3046 freebsd-elf*)
3047 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3048 ;;
3049 freebsd* | kfreebsd*-gnu | dragonfly*)
3050 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3051 # conventions
3052 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3053 ;;
3054 gnu*)
3055 ;;
3056 hpux9*)
3057 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3058 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3059 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3060 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3061 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3062 # but as the default
3063 # location of the library.
3064
3065 case $cc_basename in
3066 CC*)
3067 # FIXME: insert proper C++ library support
3068 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3069 ;;
3070 aCC*)
3071 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3072 # Commands to make compiler produce verbose output that lists
3073 # what "hidden" libraries, object files and flags are used when
3074 # linking a shared library.
3075 #
3076 # There doesn't appear to be a way to prevent this compiler from
3077 # explicitly linking system object files so we need to strip them
3078 # from the output so that they don't get included in the library
3079 # dependencies.
3080 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3081 ;;
3082 *)
3083 if test "$GXX" = yes; then
3084 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3085 else
3086 # FIXME: insert proper C++ library support
3087 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3088 fi
3089 ;;
3090 esac
3091 ;;
3092 hpux10*|hpux11*)
3093 if test $with_gnu_ld = no; then
3094 case "$host_cpu" in
3095 hppa*64*)
3096 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3097 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3098 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3099 ;;
3100 ia64*)
3101 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3102 ;;
3103 *)
3104 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3105 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3106 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3107 ;;
3108 esac
3109 fi
3110 case "$host_cpu" in
3111 hppa*64*)
3112 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3113 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3114 ;;
3115 ia64*)
3116 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3117 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3118 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3119 # but as the default
3120 # location of the library.
3121 ;;
3122 *)
3123 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3124 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3125 # but as the default
3126 # location of the library.
3127 ;;
3128 esac
3129
3130 case $cc_basename in
3131 CC*)
3132 # FIXME: insert proper C++ library support
3133 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3134 ;;
3135 aCC*)
3136 case "$host_cpu" in
3137 hppa*64*|ia64*)
3138 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3139 ;;
3140 *)
3141 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3142 ;;
3143 esac
3144 # Commands to make compiler produce verbose output that lists
3145 # what "hidden" libraries, object files and flags are used when
3146 # linking a shared library.
3147 #
3148 # There doesn't appear to be a way to prevent this compiler from
3149 # explicitly linking system object files so we need to strip them
3150 # from the output so that they don't get included in the library
3151 # dependencies.
3152 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3153 ;;
3154 *)
3155 if test "$GXX" = yes; then
3156 if test $with_gnu_ld = no; then
3157 case "$host_cpu" in
3158 ia64*|hppa*64*)
3159 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3160 ;;
3161 *)
3162 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3163 ;;
3164 esac
3165 fi
3166 else
3167 # FIXME: insert proper C++ library support
3168 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3169 fi
3170 ;;
3171 esac
3172 ;;
3173 irix5* | irix6*)
3174 case $cc_basename in
3175 CC*)
3176 # SGI C++
3177 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3178
3179 # Archives containing C++ object files must be created using
3180 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3181 # necessary to make sure instantiated templates are included
3182 # in the archive.
3183 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3184 ;;
3185 *)
3186 if test "$GXX" = yes; then
3187 if test "$with_gnu_ld" = no; then
3188 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
3189 else
3190 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3191 fi
3192 fi
3193 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3194 ;;
3195 esac
3196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3197 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3198 ;;
3199 linux*)
3200 case $cc_basename in
3201 KCC*)
3202 # Kuck and Associates, Inc. (KAI) C++ Compiler
3203
3204 # KCC will only create a shared library if the output file
3205 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3206 # to its proper name (with version) after linking.
3207 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3208 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3209 # Commands to make compiler produce verbose output that lists
3210 # what "hidden" libraries, object files and flags are used when
3211 # linking a shared library.
3212 #
3213 # There doesn't appear to be a way to prevent this compiler from
3214 # explicitly linking system object files so we need to strip them
3215 # from the output so that they don't get included in the library
3216 # dependencies.
3217 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3218
3219 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3220 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3221
3222 # Archives containing C++ object files must be created using
3223 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3224 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3225 ;;
3226 icpc*)
3227 # Intel C++
3228 with_gnu_ld=yes
3229 # version 8.0 and above of icpc choke on multiply defined symbols
3230 # if we add $predep_objects and $postdep_objects, however 7.1 and
3231 # earlier do not add the objects themselves.
3232 case `$CC -V 2>&1` in
3233 *"Version 7."*)
3234 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3235 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3236 ;;
3237 *) # Version 8.0 or newer
3238 tmp_idyn=
3239 case $host_cpu in
3240 ia64*) tmp_idyn=' -i_dynamic';;
3241 esac
3242 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3243 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3244 ;;
3245 esac
3246 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3247 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3248 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3249 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3250 ;;
3251 pgCC*)
3252 # Portland Group C++ compiler
3253 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3254 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3255
3256 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3257 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3258 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3259 ;;
3260 cxx*)
3261 # Compaq C++
3262 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3263 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3264
3265 runpath_var=LD_RUN_PATH
3266 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3267 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3268
3269 # Commands to make compiler produce verbose output that lists
3270 # what "hidden" libraries, object files and flags are used when
3271 # linking a shared library.
3272 #
3273 # There doesn't appear to be a way to prevent this compiler from
3274 # explicitly linking system object files so we need to strip them
3275 # from the output so that they don't get included in the library
3276 # dependencies.
3277 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3278 ;;
3279 esac
3280 ;;
3281 lynxos*)
3282 # FIXME: insert proper C++ library support
3283 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3284 ;;
3285 m88k*)
3286 # FIXME: insert proper C++ library support
3287 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3288 ;;
3289 mvs*)
3290 case $cc_basename in
3291 cxx*)
3292 # FIXME: insert proper C++ library support
3293 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3294 ;;
3295 *)
3296 # FIXME: insert proper C++ library support
3297 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3298 ;;
3299 esac
3300 ;;
3301 netbsd*)
3302 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3303 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3304 wlarc=
3305 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3306 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3307 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3308 fi
3309 # Workaround some broken pre-1.5 toolchains
3310 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3311 ;;
3312 openbsd2*)
3313 # C++ shared libraries are fairly broken
3314 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3315 ;;
3316 openbsd*)
3317 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3318 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3319 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3320 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3321 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3322 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3323 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3324 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3325 fi
3326 output_verbose_link_cmd='echo'
3327 ;;
3328 osf3*)
3329 case $cc_basename in
3330 KCC*)
3331 # Kuck and Associates, Inc. (KAI) C++ Compiler
3332
3333 # KCC will only create a shared library if the output file
3334 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3335 # to its proper name (with version) after linking.
3336 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3337
3338 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3339 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3340
3341 # Archives containing C++ object files must be created using
3342 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3343 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3344
3345 ;;
3346 RCC*)
3347 # Rational C++ 2.4.1
3348 # FIXME: insert proper C++ library support
3349 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3350 ;;
3351 cxx*)
3352 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3353 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3354
3355 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3356 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3357
3358 # Commands to make compiler produce verbose output that lists
3359 # what "hidden" libraries, object files and flags are used when
3360 # linking a shared library.
3361 #
3362 # There doesn't appear to be a way to prevent this compiler from
3363 # explicitly linking system object files so we need to strip them
3364 # from the output so that they don't get included in the library
3365 # dependencies.
3366 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3367 ;;
3368 *)
3369 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3370 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3371 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
3372
3373 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3374 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3375
3376 # Commands to make compiler produce verbose output that lists
3377 # what "hidden" libraries, object files and flags are used when
3378 # linking a shared library.
3379 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3380
3381 else
3382 # FIXME: insert proper C++ library support
3383 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3384 fi
3385 ;;
3386 esac
3387 ;;
3388 osf4* | osf5*)
3389 case $cc_basename in
3390 KCC*)
3391 # Kuck and Associates, Inc. (KAI) C++ Compiler
3392
3393 # KCC will only create a shared library if the output file
3394 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3395 # to its proper name (with version) after linking.
3396 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3397
3398 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3399 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3400
3401 # Archives containing C++ object files must be created using
3402 # the KAI C++ compiler.
3403 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3404 ;;
3405 RCC*)
3406 # Rational C++ 2.4.1
3407 # FIXME: insert proper C++ library support
3408 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3409 ;;
3410 cxx*)
3411 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3412 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3413 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3414 echo "-hidden">> $lib.exp~
3415 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3416 $rm $lib.exp'
3417
3418 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3419 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3420
3421 # Commands to make compiler produce verbose output that lists
3422 # what "hidden" libraries, object files and flags are used when
3423 # linking a shared library.
3424 #
3425 # There doesn't appear to be a way to prevent this compiler from
3426 # explicitly linking system object files so we need to strip them
3427 # from the output so that they don't get included in the library
3428 # dependencies.
3429 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3430 ;;
3431 *)
3432 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3433 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3434 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
3435
3436 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3437 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3438
3439 # Commands to make compiler produce verbose output that lists
3440 # what "hidden" libraries, object files and flags are used when
3441 # linking a shared library.
3442 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3443
3444 else
3445 # FIXME: insert proper C++ library support
3446 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3447 fi
3448 ;;
3449 esac
3450 ;;
3451 psos*)
3452 # FIXME: insert proper C++ library support
3453 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3454 ;;
3455 sco*)
3456 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3457 case $cc_basename in
3458 CC*)
3459 # FIXME: insert proper C++ library support
3460 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3461 ;;
3462 *)
3463 # FIXME: insert proper C++ library support
3464 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3465 ;;
3466 esac
3467 ;;
3468 sunos4*)
3469 case $cc_basename in
3470 CC*)
3471 # Sun C++ 4.x
3472 # FIXME: insert proper C++ library support
3473 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3474 ;;
3475 lcc*)
3476 # Lucid
3477 # FIXME: insert proper C++ library support
3478 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3479 ;;
3480 *)
3481 # FIXME: insert proper C++ library support
3482 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3483 ;;
3484 esac
3485 ;;
3486 solaris*)
3487 case $cc_basename in
3488 CC*)
3489 # Sun C++ 4.2, 5.x and Centerline C++
3490 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3491 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3492 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3493 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3494
3495 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3496 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3497 case $host_os in
3498 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3499 *)
3500 # The C++ compiler is used as linker so we must use $wl
3501 # flag to pass the commands to the underlying system
3502 # linker. We must also pass each convience library through
3503 # to the system linker between allextract/defaultextract.
3504 # The C++ compiler will combine linker options so we
3505 # cannot just pass the convience library names through
3506 # without $wl.
3507 # Supported since Solaris 2.6 (maybe 2.5.1?)
3508 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3509 ;;
3510 esac
3511 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3512
3513 # Commands to make compiler produce verbose output that lists
3514 # what "hidden" libraries, object files and flags are used when
3515 # linking a shared library.
3516 #
3517 # There doesn't appear to be a way to prevent this compiler from
3518 # explicitly linking system object files so we need to strip them
3519 # from the output so that they don't get included in the library
3520 # dependencies.
3521 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3522
3523 # Archives containing C++ object files must be created using
3524 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3525 # necessary to make sure instantiated templates are included
3526 # in the archive.
3527 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3528 ;;
3529 gcx*)
3530 # Green Hills C++ Compiler
3531 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3532
3533 # The C++ compiler must be used to create the archive.
3534 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3535 ;;
3536 *)
3537 # GNU C++ compiler with Solaris linker
3538 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3539 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3540 if $CC --version | grep -v '^2\.7' > /dev/null; then
3541 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3542 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3543 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3544
3545 # Commands to make compiler produce verbose output that lists
3546 # what "hidden" libraries, object files and flags are used when
3547 # linking a shared library.
3548 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3549 else
3550 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3551 # platform.
3552 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3553 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3554 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3555
3556 # Commands to make compiler produce verbose output that lists
3557 # what "hidden" libraries, object files and flags are used when
3558 # linking a shared library.
3559 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3560 fi
3561
3562 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3563 fi
3564 ;;
3565 esac
3566 ;;
3567 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3568 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3569 ;;
3570 tandem*)
3571 case $cc_basename in
3572 NCC*)
3573 # NonStop-UX NCC 3.20
3574 # FIXME: insert proper C++ library support
3575 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3576 ;;
3577 *)
3578 # FIXME: insert proper C++ library support
3579 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3580 ;;
3581 esac
3582 ;;
3583 vxworks*)
3584 # FIXME: insert proper C++ library support
3585 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3586 ;;
3587 *)
3588 # FIXME: insert proper C++ library support
3589 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3590 ;;
3591 esac
3592 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3593 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3594
3595 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3596 _LT_AC_TAGVAR(LD, $1)="$LD"
3597
3598 ## CAVEAT EMPTOR:
3599 ## There is no encapsulation within the following macros, do not change
3600 ## the running order or otherwise move them around unless you know exactly
3601 ## what you are doing...
3602 AC_LIBTOOL_POSTDEP_PREDEP($1)
3603 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3604 AC_LIBTOOL_PROG_CC_C_O($1)
3605 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3606 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3607 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3608 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3609 AC_LIBTOOL_SYS_LIB_STRIP
3610 AC_LIBTOOL_DLOPEN_SELF($1)
3611
3612 AC_LIBTOOL_CONFIG($1)
3613
3614 AC_LANG_POP
3615 CC=$lt_save_CC
3616 LDCXX=$LD
3617 LD=$lt_save_LD
3618 GCC=$lt_save_GCC
3619 with_gnu_ldcxx=$with_gnu_ld
3620 with_gnu_ld=$lt_save_with_gnu_ld
3621 lt_cv_path_LDCXX=$lt_cv_path_LD
3622 lt_cv_path_LD=$lt_save_path_LD
3623 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3624 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3625 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3626
3627 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3628 # ------------------------
3629 # Figure out "hidden" library dependencies from verbose
3630 # compiler output when linking a shared library.
3631 # Parse the compiler output and extract the necessary
3632 # objects, libraries and library flags.
3633 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3634 dnl we can't use the lt_simple_compile_test_code here,
3635 dnl because it contains code intended for an executable,
3636 dnl not a library. It's possible we should let each
3637 dnl tag define a new lt_????_link_test_code variable,
3638 dnl but it's only used here...
3639 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3640 int a;
3641 void foo (void) { a = 0; }
3642 EOF
3643 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3644 class Foo
3645 {
3646 public:
3647 Foo (void) { a = 0; }
3648 private:
3649 int a;
3650 };
3651 EOF
3652 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3653 subroutine foo
3654 implicit none
3655 integer*4 a
3656 a=0
3657 return
3658 end
3659 EOF
3660 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3661 public class foo {
3662 private int a;
3663 public void bar (void) {
3664 a = 0;
3665 }
3666 };
3667 EOF
3668 ])
3669 dnl Parse the compiler output and extract the necessary
3670 dnl objects, libraries and library flags.
3671 if AC_TRY_EVAL(ac_compile); then
3672 # Parse the compiler output and extract the necessary
3673 # objects, libraries and library flags.
3674
3675 # Sentinel used to keep track of whether or not we are before
3676 # the conftest object file.
3677 pre_test_object_deps_done=no
3678
3679 # The `*' in the case matches for architectures that use `case' in
3680 # $output_verbose_cmd can trigger glob expansion during the loop
3681 # eval without this substitution.
3682 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3683
3684 for p in `eval $output_verbose_link_cmd`; do
3685 case $p in
3686
3687 -L* | -R* | -l*)
3688 # Some compilers place space between "-{L,R}" and the path.
3689 # Remove the space.
3690 if test $p = "-L" \
3691 || test $p = "-R"; then
3692 prev=$p
3693 continue
3694 else
3695 prev=
3696 fi
3697
3698 if test "$pre_test_object_deps_done" = no; then
3699 case $p in
3700 -L* | -R*)
3701 # Internal compiler library paths should come after those
3702 # provided the user. The postdeps already come after the
3703 # user supplied libs so there is no need to process them.
3704 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3705 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3706 else
3707 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3708 fi
3709 ;;
3710 # The "-l" case would never come before the object being
3711 # linked, so don't bother handling this case.
3712 esac
3713 else
3714 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3715 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3716 else
3717 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3718 fi
3719 fi
3720 ;;
3721
3722 *.$objext)
3723 # This assumes that the test object file only shows up
3724 # once in the compiler output.
3725 if test "$p" = "conftest.$objext"; then
3726 pre_test_object_deps_done=yes
3727 continue
3728 fi
3729
3730 if test "$pre_test_object_deps_done" = no; then
3731 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3732 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3733 else
3734 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3735 fi
3736 else
3737 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3738 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3739 else
3740 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3741 fi
3742 fi
3743 ;;
3744
3745 *) ;; # Ignore the rest.
3746
3747 esac
3748 done
3749
3750 # Clean up.
3751 rm -f a.out a.exe
3752 else
3753 echo "libtool.m4: error: problem compiling $1 test program"
3754 fi
3755
3756 $rm -f confest.$objext
3757
3758 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3759 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3760 esac
3761 ])# AC_LIBTOOL_POSTDEP_PREDEP
3762
3763 # AC_LIBTOOL_LANG_F77_CONFIG
3764 # ------------------------
3765 # Ensure that the configuration vars for the C compiler are
3766 # suitably defined. Those variables are subsequently used by
3767 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3768 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3769 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3770 [AC_REQUIRE([AC_PROG_F77])
3771 AC_LANG_PUSH(Fortran 77)
3772
3773 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3774 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3775 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3776 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3777 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3778 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3779 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3781 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3782 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3783 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3784 _LT_AC_TAGVAR(module_cmds, $1)=
3785 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3786 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3787 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3788 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3789 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3790 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3791
3792 # Source file extension for f77 test sources.
3793 ac_ext=f
3794
3795 # Object file extension for compiled f77 test sources.
3796 objext=o
3797 _LT_AC_TAGVAR(objext, $1)=$objext
3798
3799 # Code to be used in simple compile tests
3800 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3801
3802 # Code to be used in simple link tests
3803 lt_simple_link_test_code=" program t\n end\n"
3804
3805 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3806 _LT_AC_SYS_COMPILER
3807
3808 # save warnings/boilerplate of simple test code
3809 _LT_COMPILER_BOILERPLATE
3810 _LT_LINKER_BOILERPLATE
3811
3812 # Allow CC to be a program name with arguments.
3813 lt_save_CC="$CC"
3814 CC=${F77-"f77"}
3815 compiler=$CC
3816 _LT_AC_TAGVAR(compiler, $1)=$CC
3817 _LT_CC_BASENAME([$compiler])
3818
3819 AC_MSG_CHECKING([if libtool supports shared libraries])
3820 AC_MSG_RESULT([$can_build_shared])
3821
3822 AC_MSG_CHECKING([whether to build shared libraries])
3823 test "$can_build_shared" = "no" && enable_shared=no
3824
3825 # On AIX, shared libraries and static libraries use the same namespace, and
3826 # are all built from PIC.
3827 case "$host_os" in
3828 aix3*)
3829 test "$enable_shared" = yes && enable_static=no
3830 if test -n "$RANLIB"; then
3831 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3832 postinstall_cmds='$RANLIB $lib'
3833 fi
3834 ;;
3835 aix4* | aix5*)
3836 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3837 test "$enable_shared" = yes && enable_static=no
3838 fi
3839 ;;
3840 esac
3841 AC_MSG_RESULT([$enable_shared])
3842
3843 AC_MSG_CHECKING([whether to build static libraries])
3844 # Make sure either enable_shared or enable_static is yes.
3845 test "$enable_shared" = yes || enable_static=yes
3846 AC_MSG_RESULT([$enable_static])
3847
3848 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3849
3850 _LT_AC_TAGVAR(GCC, $1)="$G77"
3851 _LT_AC_TAGVAR(LD, $1)="$LD"
3852
3853 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3854 AC_LIBTOOL_PROG_CC_C_O($1)
3855 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3856 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3857 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3858 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3859 AC_LIBTOOL_SYS_LIB_STRIP
3860
3861
3862 AC_LIBTOOL_CONFIG($1)
3863
3864 AC_LANG_POP
3865 CC="$lt_save_CC"
3866 ])# AC_LIBTOOL_LANG_F77_CONFIG
3867
3868
3869 # AC_LIBTOOL_LANG_GCJ_CONFIG
3870 # --------------------------
3871 # Ensure that the configuration vars for the C compiler are
3872 # suitably defined. Those variables are subsequently used by
3873 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3874 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3875 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3876 [AC_LANG_SAVE
3877
3878 # Source file extension for Java test sources.
3879 ac_ext=java
3880
3881 # Object file extension for compiled Java test sources.
3882 objext=o
3883 _LT_AC_TAGVAR(objext, $1)=$objext
3884
3885 # Code to be used in simple compile tests
3886 lt_simple_compile_test_code="class foo {}\n"
3887
3888 # Code to be used in simple link tests
3889 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
3890
3891 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3892 _LT_AC_SYS_COMPILER
3893
3894 # save warnings/boilerplate of simple test code
3895 _LT_COMPILER_BOILERPLATE
3896 _LT_LINKER_BOILERPLATE
3897
3898 # Allow CC to be a program name with arguments.
3899 lt_save_CC="$CC"
3900 CC=${GCJ-"gcj"}
3901 compiler=$CC
3902 _LT_AC_TAGVAR(compiler, $1)=$CC
3903 _LT_CC_BASENAME([$compiler])
3904
3905 # GCJ did not exist at the time GCC didn't implicitly link libc in.
3906 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3907
3908 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3909
3910 ## CAVEAT EMPTOR:
3911 ## There is no encapsulation within the following macros, do not change
3912 ## the running order or otherwise move them around unless you know exactly
3913 ## what you are doing...
3914 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3915 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3916 AC_LIBTOOL_PROG_CC_C_O($1)
3917 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3918 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3919 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3920 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3921 AC_LIBTOOL_SYS_LIB_STRIP
3922 AC_LIBTOOL_DLOPEN_SELF($1)
3923
3924 AC_LIBTOOL_CONFIG($1)
3925
3926 AC_LANG_RESTORE
3927 CC="$lt_save_CC"
3928 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
3929
3930
3931 # AC_LIBTOOL_LANG_RC_CONFIG
3932 # --------------------------
3933 # Ensure that the configuration vars for the Windows resource compiler are
3934 # suitably defined. Those variables are subsequently used by
3935 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3936 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3937 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3938 [AC_LANG_SAVE
3939
3940 # Source file extension for RC test sources.
3941 ac_ext=rc
3942
3943 # Object file extension for compiled RC test sources.
3944 objext=o
3945 _LT_AC_TAGVAR(objext, $1)=$objext
3946
3947 # Code to be used in simple compile tests
3948 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3949
3950 # Code to be used in simple link tests
3951 lt_simple_link_test_code="$lt_simple_compile_test_code"
3952
3953 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3954 _LT_AC_SYS_COMPILER
3955
3956 # save warnings/boilerplate of simple test code
3957 _LT_COMPILER_BOILERPLATE
3958 _LT_LINKER_BOILERPLATE
3959
3960 # Allow CC to be a program name with arguments.
3961 lt_save_CC="$CC"
3962 CC=${RC-"windres"}
3963 compiler=$CC
3964 _LT_AC_TAGVAR(compiler, $1)=$CC
3965 _LT_CC_BASENAME([$compiler])
3966 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3967
3968 AC_LIBTOOL_CONFIG($1)
3969
3970 AC_LANG_RESTORE
3971 CC="$lt_save_CC"
3972 ])# AC_LIBTOOL_LANG_RC_CONFIG
3973
3974
3975 # AC_LIBTOOL_CONFIG([TAGNAME])
3976 # ----------------------------
3977 # If TAGNAME is not passed, then create an initial libtool script
3978 # with a default configuration from the untagged config vars. Otherwise
3979 # add code to config.status for appending the configuration named by
3980 # TAGNAME from the matching tagged config vars.
3981 AC_DEFUN([AC_LIBTOOL_CONFIG],
3982 [# The else clause should only fire when bootstrapping the
3983 # libtool distribution, otherwise you forgot to ship ltmain.sh
3984 # with your package, and you will get complaints that there are
3985 # no rules to generate ltmain.sh.
3986 if test -f "$ltmain"; then
3987 # See if we are running on zsh, and set the options which allow our commands through
3988 # without removal of \ escapes.
3989 if test -n "${ZSH_VERSION+set}" ; then
3990 setopt NO_GLOB_SUBST
3991 fi
3992 # Now quote all the things that may contain metacharacters while being
3993 # careful not to overquote the AC_SUBSTed values. We take copies of the
3994 # variables and quote the copies for generation of the libtool script.
3995 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
3996 SED SHELL STRIP \
3997 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3998 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3999 deplibs_check_method reload_flag reload_cmds need_locks \
4000 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4001 lt_cv_sys_global_symbol_to_c_name_address \
4002 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4003 old_postinstall_cmds old_postuninstall_cmds \
4004 _LT_AC_TAGVAR(compiler, $1) \
4005 _LT_AC_TAGVAR(CC, $1) \
4006 _LT_AC_TAGVAR(LD, $1) \
4007 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4008 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4009 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4010 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4011 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4012 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4013 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4014 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4015 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4016 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4017 _LT_AC_TAGVAR(predep_objects, $1) \
4018 _LT_AC_TAGVAR(postdep_objects, $1) \
4019 _LT_AC_TAGVAR(predeps, $1) \
4020 _LT_AC_TAGVAR(postdeps, $1) \
4021 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4022 _LT_AC_TAGVAR(archive_cmds, $1) \
4023 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4024 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4025 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4026 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4027 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4028 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4029 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4030 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4031 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4032 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4033 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4034 _LT_AC_TAGVAR(module_cmds, $1) \
4035 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4036 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4037 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4038 _LT_AC_TAGVAR(include_expsyms, $1); do
4039
4040 case $var in
4041 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4042 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4043 _LT_AC_TAGVAR(archive_cmds, $1) | \
4044 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4045 _LT_AC_TAGVAR(module_cmds, $1) | \
4046 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4047 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4048 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4049 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4050 postinstall_cmds | postuninstall_cmds | \
4051 old_postinstall_cmds | old_postuninstall_cmds | \
4052 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4053 # Double-quote double-evaled strings.
4054 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4055 ;;
4056 *)
4057 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4058 ;;
4059 esac
4060 done
4061
4062 case $lt_echo in
4063 *'\[$]0 --fallback-echo"')
4064 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4065 ;;
4066 esac
4067
4068 ifelse([$1], [],
4069 [cfgfile="${ofile}T"
4070 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4071 $rm -f "$cfgfile"
4072 AC_MSG_NOTICE([creating $ofile])],
4073 [cfgfile="$ofile"])
4074
4075 cat <<__EOF__ >> "$cfgfile"
4076 ifelse([$1], [],
4077 [#! $SHELL
4078
4079 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4080 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4081 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4082 #
4083 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4084 # Free Software Foundation, Inc.
4085 #
4086 # This file is part of GNU Libtool:
4087 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4088 #
4089 # This program is free software; you can redistribute it and/or modify
4090 # it under the terms of the GNU General Public License as published by
4091 # the Free Software Foundation; either version 2 of the License, or
4092 # (at your option) any later version.
4093 #
4094 # This program is distributed in the hope that it will be useful, but
4095 # WITHOUT ANY WARRANTY; without even the implied warranty of
4096 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4097 # General Public License for more details.
4098 #
4099 # You should have received a copy of the GNU General Public License
4100 # along with this program; if not, write to the Free Software
4101 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4102 #
4103 # As a special exception to the GNU General Public License, if you
4104 # distribute this file as part of a program that contains a
4105 # configuration script generated by Autoconf, you may include it under
4106 # the same distribution terms that you use for the rest of that program.
4107
4108 # A sed program that does not truncate output.
4109 SED=$lt_SED
4110
4111 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4112 Xsed="$SED -e 1s/^X//"
4113
4114 # The HP-UX ksh and POSIX shell print the target directory to stdout
4115 # if CDPATH is set.
4116 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4117
4118 # The names of the tagged configurations supported by this script.
4119 available_tags=
4120
4121 # ### BEGIN LIBTOOL CONFIG],
4122 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4123
4124 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4125
4126 # Shell to use when invoking shell scripts.
4127 SHELL=$lt_SHELL
4128
4129 # Whether or not to build shared libraries.
4130 build_libtool_libs=$enable_shared
4131
4132 # Whether or not to build static libraries.
4133 build_old_libs=$enable_static
4134
4135 # Whether or not to add -lc for building shared libraries.
4136 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4137
4138 # Whether or not to disallow shared libs when runtime libs are static
4139 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4140
4141 # Whether or not to optimize for fast installation.
4142 fast_install=$enable_fast_install
4143
4144 # The host system.
4145 host_alias=$host_alias
4146 host=$host
4147 host_os=$host_os
4148
4149 # The build system.
4150 build_alias=$build_alias
4151 build=$build
4152 build_os=$build_os
4153
4154 # An echo program that does not interpret backslashes.
4155 echo=$lt_echo
4156
4157 # The archiver.
4158 AR=$lt_AR
4159 AR_FLAGS=$lt_AR_FLAGS
4160
4161 # A C compiler.
4162 LTCC=$lt_LTCC
4163
4164 # A language-specific compiler.
4165 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4166
4167 # Is the compiler the GNU C compiler?
4168 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4169
4170 # An ERE matcher.
4171 EGREP=$lt_EGREP
4172
4173 # The linker used to build libraries.
4174 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4175
4176 # Whether we need hard or soft links.
4177 LN_S=$lt_LN_S
4178
4179 # A BSD-compatible nm program.
4180 NM=$lt_NM
4181
4182 # A symbol stripping program
4183 STRIP=$lt_STRIP
4184
4185 # Used to examine libraries when file_magic_cmd begins "file"
4186 MAGIC_CMD=$MAGIC_CMD
4187
4188 # Used on cygwin: DLL creation program.
4189 DLLTOOL="$DLLTOOL"
4190
4191 # Used on cygwin: object dumper.
4192 OBJDUMP="$OBJDUMP"
4193
4194 # Used on cygwin: assembler.
4195 AS="$AS"
4196
4197 # The name of the directory that contains temporary libtool files.
4198 objdir=$objdir
4199
4200 # How to create reloadable object files.
4201 reload_flag=$lt_reload_flag
4202 reload_cmds=$lt_reload_cmds
4203
4204 # How to pass a linker flag through the compiler.
4205 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4206
4207 # Object file suffix (normally "o").
4208 objext="$ac_objext"
4209
4210 # Old archive suffix (normally "a").
4211 libext="$libext"
4212
4213 # Shared library suffix (normally ".so").
4214 shrext_cmds='$shrext_cmds'
4215
4216 # Executable file suffix (normally "").
4217 exeext="$exeext"
4218
4219 # Additional compiler flags for building library objects.
4220 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4221 pic_mode=$pic_mode
4222
4223 # What is the maximum length of a command?
4224 max_cmd_len=$lt_cv_sys_max_cmd_len
4225
4226 # Does compiler simultaneously support -c and -o options?
4227 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4228
4229 # Must we lock files when doing compilation?
4230 need_locks=$lt_need_locks
4231
4232 # Do we need the lib prefix for modules?
4233 need_lib_prefix=$need_lib_prefix
4234
4235 # Do we need a version for libraries?
4236 need_version=$need_version
4237
4238 # Whether dlopen is supported.
4239 dlopen_support=$enable_dlopen
4240
4241 # Whether dlopen of programs is supported.
4242 dlopen_self=$enable_dlopen_self
4243
4244 # Whether dlopen of statically linked programs is supported.
4245 dlopen_self_static=$enable_dlopen_self_static
4246
4247 # Compiler flag to prevent dynamic linking.
4248 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4249
4250 # Compiler flag to turn off builtin functions.
4251 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4252
4253 # Compiler flag to allow reflexive dlopens.
4254 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4255
4256 # Compiler flag to generate shared objects directly from archives.
4257 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4258
4259 # Compiler flag to generate thread-safe objects.
4260 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4261
4262 # Library versioning type.
4263 version_type=$version_type
4264
4265 # Format of library name prefix.
4266 libname_spec=$lt_libname_spec
4267
4268 # List of archive names. First name is the real one, the rest are links.
4269 # The last name is the one that the linker finds with -lNAME.
4270 library_names_spec=$lt_library_names_spec
4271
4272 # The coded name of the library, if different from the real name.
4273 soname_spec=$lt_soname_spec
4274
4275 # Commands used to build and install an old-style archive.
4276 RANLIB=$lt_RANLIB
4277 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4278 old_postinstall_cmds=$lt_old_postinstall_cmds
4279 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4280
4281 # Create an old-style archive from a shared archive.
4282 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4283
4284 # Create a temporary old-style archive to link instead of a shared archive.
4285 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4286
4287 # Commands used to build and install a shared archive.
4288 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4289 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4290 postinstall_cmds=$lt_postinstall_cmds
4291 postuninstall_cmds=$lt_postuninstall_cmds
4292
4293 # Commands used to build a loadable module (assumed same as above if empty)
4294 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4295 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4296
4297 # Commands to strip libraries.
4298 old_striplib=$lt_old_striplib
4299 striplib=$lt_striplib
4300
4301 # Dependencies to place before the objects being linked to create a
4302 # shared library.
4303 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4304
4305 # Dependencies to place after the objects being linked to create a
4306 # shared library.
4307 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4308
4309 # Dependencies to place before the objects being linked to create a
4310 # shared library.
4311 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4312
4313 # Dependencies to place after the objects being linked to create a
4314 # shared library.
4315 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4316
4317 # The library search path used internally by the compiler when linking
4318 # a shared library.
4319 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4320
4321 # Method to check whether dependent libraries are shared objects.
4322 deplibs_check_method=$lt_deplibs_check_method
4323
4324 # Command to use when deplibs_check_method == file_magic.
4325 file_magic_cmd=$lt_file_magic_cmd
4326
4327 # Flag that allows shared libraries with undefined symbols to be built.
4328 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4329
4330 # Flag that forces no undefined symbols.
4331 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4332
4333 # Commands used to finish a libtool library installation in a directory.
4334 finish_cmds=$lt_finish_cmds
4335
4336 # Same as above, but a single script fragment to be evaled but not shown.
4337 finish_eval=$lt_finish_eval
4338
4339 # Take the output of nm and produce a listing of raw symbols and C names.
4340 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4341
4342 # Transform the output of nm in a proper C declaration
4343 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4344
4345 # Transform the output of nm in a C name address pair
4346 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4347
4348 # This is the shared library runtime path variable.
4349 runpath_var=$runpath_var
4350
4351 # This is the shared library path variable.
4352 shlibpath_var=$shlibpath_var
4353
4354 # Is shlibpath searched before the hard-coded library search path?
4355 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4356
4357 # How to hardcode a shared library path into an executable.
4358 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4359
4360 # Whether we should hardcode library paths into libraries.
4361 hardcode_into_libs=$hardcode_into_libs
4362
4363 # Flag to hardcode \$libdir into a binary during linking.
4364 # This must work even if \$libdir does not exist.
4365 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4366
4367 # If ld is used when linking, flag to hardcode \$libdir into
4368 # a binary during linking. This must work even if \$libdir does
4369 # not exist.
4370 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4371
4372 # Whether we need a single -rpath flag with a separated argument.
4373 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4374
4375 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4376 # resulting binary.
4377 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4378
4379 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4380 # resulting binary.
4381 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4382
4383 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4384 # the resulting binary.
4385 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4386
4387 # Set to yes if building a shared library automatically hardcodes DIR into the library
4388 # and all subsequent libraries and executables linked against it.
4389 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4390
4391 # Variables whose values should be saved in libtool wrapper scripts and
4392 # restored at relink time.
4393 variables_saved_for_relink="$variables_saved_for_relink"
4394
4395 # Whether libtool must link a program against all its dependency libraries.
4396 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4397
4398 # Compile-time system search path for libraries
4399 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4400
4401 # Run-time system search path for libraries
4402 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4403
4404 # Fix the shell variable \$srcfile for the compiler.
4405 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4406
4407 # Set to yes if exported symbols are required.
4408 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4409
4410 # The commands to list exported symbols.
4411 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4412
4413 # The commands to extract the exported symbol list from a shared archive.
4414 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4415
4416 # Symbols that should not be listed in the preloaded symbols.
4417 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4418
4419 # Symbols that must always be exported.
4420 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4421
4422 ifelse([$1],[],
4423 [# ### END LIBTOOL CONFIG],
4424 [# ### END LIBTOOL TAG CONFIG: $tagname])
4425
4426 __EOF__
4427
4428 ifelse([$1],[], [
4429 case $host_os in
4430 aix3*)
4431 cat <<\EOF >> "$cfgfile"
4432
4433 # AIX sometimes has problems with the GCC collect2 program. For some
4434 # reason, if we set the COLLECT_NAMES environment variable, the problems
4435 # vanish in a puff of smoke.
4436 if test "X${COLLECT_NAMES+set}" != Xset; then
4437 COLLECT_NAMES=
4438 export COLLECT_NAMES
4439 fi
4440 EOF
4441 ;;
4442 esac
4443
4444 # We use sed instead of cat because bash on DJGPP gets confused if
4445 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4446 # text mode, it properly converts lines to CR/LF. This bash problem
4447 # is reportedly fixed, but why not run on old versions too?
4448 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4449
4450 mv -f "$cfgfile" "$ofile" || \
4451 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4452 chmod +x "$ofile"
4453 ])
4454 else
4455 # If there is no Makefile yet, we rely on a make rule to execute
4456 # `config.status --recheck' to rerun these tests and create the
4457 # libtool script then.
4458 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4459 if test -f "$ltmain_in"; then
4460 test -f Makefile && make "$ltmain"
4461 fi
4462 fi
4463 ])# AC_LIBTOOL_CONFIG
4464
4465
4466 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4467 # -------------------------------------------
4468 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4469 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4470
4471 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4472
4473 if test "$GCC" = yes; then
4474 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4475
4476 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4477 lt_cv_prog_compiler_rtti_exceptions,
4478 [-fno-rtti -fno-exceptions], [],
4479 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4480 fi
4481 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4482
4483
4484 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4485 # ---------------------------------
4486 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4487 [AC_REQUIRE([AC_CANONICAL_HOST])
4488 AC_REQUIRE([AC_PROG_NM])
4489 AC_REQUIRE([AC_OBJEXT])
4490 # Check for command to grab the raw symbol name followed by C symbol from nm.
4491 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4492 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4493 [
4494 # These are sane defaults that work on at least a few old systems.
4495 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4496
4497 # Character class describing NM global symbol codes.
4498 symcode='[[BCDEGRST]]'
4499
4500 # Regexp to match symbols that can be accessed directly from C.
4501 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4502
4503 # Transform an extracted symbol line into a proper C declaration
4504 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4505
4506 # Transform an extracted symbol line into symbol name and symbol address
4507 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4508
4509 # Define system-specific variables.
4510 case $host_os in
4511 aix*)
4512 symcode='[[BCDT]]'
4513 ;;
4514 cygwin* | mingw* | pw32*)
4515 symcode='[[ABCDGISTW]]'
4516 ;;
4517 hpux*) # Its linker distinguishes data from code symbols
4518 if test "$host_cpu" = ia64; then
4519 symcode='[[ABCDEGRST]]'
4520 fi
4521 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4522 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4523 ;;
4524 linux*)
4525 if test "$host_cpu" = ia64; then
4526 symcode='[[ABCDGIRSTW]]'
4527 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4528 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4529 fi
4530 ;;
4531 irix* | nonstopux*)
4532 symcode='[[BCDEGRST]]'
4533 ;;
4534 osf*)
4535 symcode='[[BCDEGQRST]]'
4536 ;;
4537 solaris* | sysv5*)
4538 symcode='[[BDRT]]'
4539 ;;
4540 sysv4)
4541 symcode='[[DFNSTU]]'
4542 ;;
4543 esac
4544
4545 # Handle CRLF in mingw tool chain
4546 opt_cr=
4547 case $build_os in
4548 mingw*)
4549 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4550 ;;
4551 esac
4552
4553 # If we're using GNU nm, then use its standard symbol codes.
4554 case `$NM -V 2>&1` in
4555 *GNU* | *'with BFD'*)
4556 symcode='[[ABCDGIRSTW]]' ;;
4557 esac
4558
4559 # Try without a prefix undercore, then with it.
4560 for ac_symprfx in "" "_"; do
4561
4562 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4563 symxfrm="\\1 $ac_symprfx\\2 \\2"
4564
4565 # Write the raw and C identifiers.
4566 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4567
4568 # Check to see that the pipe works correctly.
4569 pipe_works=no
4570
4571 rm -f conftest*
4572 cat > conftest.$ac_ext <<EOF
4573 #ifdef __cplusplus
4574 extern "C" {
4575 #endif
4576 char nm_test_var;
4577 void nm_test_func(){}
4578 #ifdef __cplusplus
4579 }
4580 #endif
4581 int main(){nm_test_var='a';nm_test_func();return(0);}
4582 EOF
4583
4584 if AC_TRY_EVAL(ac_compile); then
4585 # Now try to grab the symbols.
4586 nlist=conftest.nm
4587 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4588 # Try sorting and uniquifying the output.
4589 if sort "$nlist" | uniq > "$nlist"T; then
4590 mv -f "$nlist"T "$nlist"
4591 else
4592 rm -f "$nlist"T
4593 fi
4594
4595 # Make sure that we snagged all the symbols we need.
4596 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4597 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4598 cat <<EOF > conftest.$ac_ext
4599 #ifdef __cplusplus
4600 extern "C" {
4601 #endif
4602
4603 EOF
4604 # Now generate the symbol file.
4605 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4606
4607 cat <<EOF >> conftest.$ac_ext
4608 #if defined (__STDC__) && __STDC__
4609 # define lt_ptr_t void *
4610 #else
4611 # define lt_ptr_t char *
4612 # define const
4613 #endif
4614
4615 /* The mapping between symbol names and symbols. */
4616 const struct {
4617 const char *name;
4618 lt_ptr_t address;
4619 }
4620 lt_preloaded_symbols[[]] =
4621 {
4622 EOF
4623 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4624 cat <<\EOF >> conftest.$ac_ext
4625 {0, (lt_ptr_t) 0}
4626 };
4627
4628 #ifdef __cplusplus
4629 }
4630 #endif
4631 EOF
4632 # Now try linking the two files.
4633 mv conftest.$ac_objext conftstm.$ac_objext
4634 lt_save_LIBS="$LIBS"
4635 lt_save_CFLAGS="$CFLAGS"
4636 LIBS="conftstm.$ac_objext"
4637 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4638 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4639 pipe_works=yes
4640 fi
4641 LIBS="$lt_save_LIBS"
4642 CFLAGS="$lt_save_CFLAGS"
4643 else
4644 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4645 fi
4646 else
4647 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4648 fi
4649 else
4650 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4651 fi
4652 else
4653 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4654 cat conftest.$ac_ext >&5
4655 fi
4656 rm -f conftest* conftst*
4657
4658 # Do not use the global_symbol_pipe unless it works.
4659 if test "$pipe_works" = yes; then
4660 break
4661 else
4662 lt_cv_sys_global_symbol_pipe=
4663 fi
4664 done
4665 ])
4666 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4667 lt_cv_sys_global_symbol_to_cdecl=
4668 fi
4669 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4670 AC_MSG_RESULT(failed)
4671 else
4672 AC_MSG_RESULT(ok)
4673 fi
4674 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4675
4676
4677 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4678 # ---------------------------------------
4679 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4680 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4681 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4682 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4683
4684 AC_MSG_CHECKING([for $compiler option to produce PIC])
4685 ifelse([$1],[CXX],[
4686 # C++ specific cases for pic, static, wl, etc.
4687 if test "$GXX" = yes; then
4688 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4689 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4690
4691 case $host_os in
4692 aix*)
4693 # All AIX code is PIC.
4694 if test "$host_cpu" = ia64; then
4695 # AIX 5 now supports IA64 processor
4696 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4697 fi
4698 ;;
4699 amigaos*)
4700 # FIXME: we need at least 68020 code to build shared libraries, but
4701 # adding the `-m68020' flag to GCC prevents building anything better,
4702 # like `-m68040'.
4703 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4704 ;;
4705 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4706 # PIC is the default for these OSes.
4707 ;;
4708 mingw* | os2* | pw32*)
4709 # This hack is so that the source file can tell whether it is being
4710 # built for inclusion in a dll (and should export symbols for example).
4711 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4712 ;;
4713 darwin* | rhapsody*)
4714 # PIC is the default on this platform
4715 # Common symbols not allowed in MH_DYLIB files
4716 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4717 ;;
4718 *djgpp*)
4719 # DJGPP does not support shared libraries at all
4720 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4721 ;;
4722 sysv4*MP*)
4723 if test -d /usr/nec; then
4724 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4725 fi
4726 ;;
4727 hpux*)
4728 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4729 # not for PA HP-UX.
4730 case "$host_cpu" in
4731 hppa*64*|ia64*)
4732 ;;
4733 *)
4734 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4735 ;;
4736 esac
4737 ;;
4738 *)
4739 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4740 ;;
4741 esac
4742 else
4743 case $host_os in
4744 aix4* | aix5*)
4745 # All AIX code is PIC.
4746 if test "$host_cpu" = ia64; then
4747 # AIX 5 now supports IA64 processor
4748 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4749 else
4750 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4751 fi
4752 ;;
4753 chorus*)
4754 case $cc_basename in
4755 cxch68*)
4756 # Green Hills C++ Compiler
4757 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4758 ;;
4759 esac
4760 ;;
4761 darwin*)
4762 # PIC is the default on this platform
4763 # Common symbols not allowed in MH_DYLIB files
4764 case $cc_basename in
4765 xlc*)
4766 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4767 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4768 ;;
4769 esac
4770 ;;
4771 dgux*)
4772 case $cc_basename in
4773 ec++*)
4774 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4775 ;;
4776 ghcx*)
4777 # Green Hills C++ Compiler
4778 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4779 ;;
4780 *)
4781 ;;
4782 esac
4783 ;;
4784 freebsd* | kfreebsd*-gnu | dragonfly*)
4785 # FreeBSD uses GNU C++
4786 ;;
4787 hpux9* | hpux10* | hpux11*)
4788 case $cc_basename in
4789 CC*)
4790 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4791 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4792 if test "$host_cpu" != ia64; then
4793 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4794 fi
4795 ;;
4796 aCC*)
4797 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4798 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4799 case "$host_cpu" in
4800 hppa*64*|ia64*)
4801 # +Z the default
4802 ;;
4803 *)
4804 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4805 ;;
4806 esac
4807 ;;
4808 *)
4809 ;;
4810 esac
4811 ;;
4812 irix5* | irix6* | nonstopux*)
4813 case $cc_basename in
4814 CC*)
4815 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4816 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4817 # CC pic flag -KPIC is the default.
4818 ;;
4819 *)
4820 ;;
4821 esac
4822 ;;
4823 linux*)
4824 case $cc_basename in
4825 KCC*)
4826 # KAI C++ Compiler
4827 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4828 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4829 ;;
4830 icpc* | ecpc*)
4831 # Intel C++
4832 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4833 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4834 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4835 ;;
4836 pgCC*)
4837 # Portland Group C++ compiler.
4838 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4839 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4840 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4841 ;;
4842 cxx*)
4843 # Compaq C++
4844 # Make sure the PIC flag is empty. It appears that all Alpha
4845 # Linux and Compaq Tru64 Unix objects are PIC.
4846 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4847 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4848 ;;
4849 *)
4850 ;;
4851 esac
4852 ;;
4853 lynxos*)
4854 ;;
4855 m88k*)
4856 ;;
4857 mvs*)
4858 case $cc_basename in
4859 cxx*)
4860 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4861 ;;
4862 *)
4863 ;;
4864 esac
4865 ;;
4866 netbsd*)
4867 ;;
4868 osf3* | osf4* | osf5*)
4869 case $cc_basename in
4870 KCC*)
4871 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4872 ;;
4873 RCC*)
4874 # Rational C++ 2.4.1
4875 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4876 ;;
4877 cxx*)
4878 # Digital/Compaq C++
4879 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4880 # Make sure the PIC flag is empty. It appears that all Alpha
4881 # Linux and Compaq Tru64 Unix objects are PIC.
4882 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4883 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4884 ;;
4885 *)
4886 ;;
4887 esac
4888 ;;
4889 psos*)
4890 ;;
4891 sco*)
4892 case $cc_basename in
4893 CC*)
4894 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4895 ;;
4896 *)
4897 ;;
4898 esac
4899 ;;
4900 solaris*)
4901 case $cc_basename in
4902 CC*)
4903 # Sun C++ 4.2, 5.x and Centerline C++
4904 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4905 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4906 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4907 ;;
4908 gcx*)
4909 # Green Hills C++ Compiler
4910 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4911 ;;
4912 *)
4913 ;;
4914 esac
4915 ;;
4916 sunos4*)
4917 case $cc_basename in
4918 CC*)
4919 # Sun C++ 4.x
4920 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4921 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4922 ;;
4923 lcc*)
4924 # Lucid
4925 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4926 ;;
4927 *)
4928 ;;
4929 esac
4930 ;;
4931 tandem*)
4932 case $cc_basename in
4933 NCC*)
4934 # NonStop-UX NCC 3.20
4935 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4936 ;;
4937 *)
4938 ;;
4939 esac
4940 ;;
4941 unixware*)
4942 ;;
4943 vxworks*)
4944 ;;
4945 *)
4946 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4947 ;;
4948 esac
4949 fi
4950 ],
4951 [
4952 if test "$GCC" = yes; then
4953 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4954 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4955
4956 case $host_os in
4957 aix*)
4958 # All AIX code is PIC.
4959 if test "$host_cpu" = ia64; then
4960 # AIX 5 now supports IA64 processor
4961 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4962 fi
4963 ;;
4964
4965 amigaos*)
4966 # FIXME: we need at least 68020 code to build shared libraries, but
4967 # adding the `-m68020' flag to GCC prevents building anything better,
4968 # like `-m68040'.
4969 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4970 ;;
4971
4972 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4973 # PIC is the default for these OSes.
4974 ;;
4975
4976 mingw* | pw32* | os2*)
4977 # This hack is so that the source file can tell whether it is being
4978 # built for inclusion in a dll (and should export symbols for example).
4979 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4980 ;;
4981
4982 darwin* | rhapsody*)
4983 # PIC is the default on this platform
4984 # Common symbols not allowed in MH_DYLIB files
4985 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4986 ;;
4987
4988 msdosdjgpp*)
4989 # Just because we use GCC doesn't mean we suddenly get shared libraries
4990 # on systems that don't support them.
4991 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4992 enable_shared=no
4993 ;;
4994
4995 sysv4*MP*)
4996 if test -d /usr/nec; then
4997 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4998 fi
4999 ;;
5000
5001 hpux*)
5002 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5003 # not for PA HP-UX.
5004 case "$host_cpu" in
5005 hppa*64*|ia64*)
5006 # +Z the default
5007 ;;
5008 *)
5009 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5010 ;;
5011 esac
5012 ;;
5013
5014 *)
5015 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5016 ;;
5017 esac
5018 else
5019 # PORTME Check for flag to pass linker flags through the system compiler.
5020 case $host_os in
5021 aix*)
5022 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5023 if test "$host_cpu" = ia64; then
5024 # AIX 5 now supports IA64 processor
5025 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5026 else
5027 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5028 fi
5029 ;;
5030 darwin*)
5031 # PIC is the default on this platform
5032 # Common symbols not allowed in MH_DYLIB files
5033 case $cc_basename in
5034 xlc*)
5035 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5036 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5037 ;;
5038 esac
5039 ;;
5040
5041 mingw* | pw32* | os2*)
5042 # This hack is so that the source file can tell whether it is being
5043 # built for inclusion in a dll (and should export symbols for example).
5044 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5045 ;;
5046
5047 hpux9* | hpux10* | hpux11*)
5048 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5049 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5050 # not for PA HP-UX.
5051 case "$host_cpu" in
5052 hppa*64*|ia64*)
5053 # +Z the default
5054 ;;
5055 *)
5056 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5057 ;;
5058 esac
5059 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5060 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5061 ;;
5062
5063 irix5* | irix6* | nonstopux*)
5064 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5065 # PIC (with -KPIC) is the default.
5066 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5067 ;;
5068
5069 newsos6)
5070 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5071 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5072 ;;
5073
5074 linux*)
5075 case $cc_basename in
5076 icc* | ecc*)
5077 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5078 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5079 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5080 ;;
5081 pgcc* | pgf77* | pgf90*)
5082 # Portland Group compilers (*not* the Pentium gcc compiler,
5083 # which looks to be a dead project)
5084 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5086 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5087 ;;
5088 ccc*)
5089 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5090 # All Alpha code is PIC.
5091 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5092 ;;
5093 esac
5094 ;;
5095
5096 osf3* | osf4* | osf5*)
5097 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5098 # All OSF/1 code is PIC.
5099 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5100 ;;
5101
5102 sco3.2v5*)
5103 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5104 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5105 ;;
5106
5107 solaris*)
5108 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5109 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5110 case $cc_basename in
5111 f77* | f90* | f95*)
5112 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5113 *)
5114 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5115 esac
5116 ;;
5117
5118 sunos4*)
5119 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5120 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5121 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5122 ;;
5123
5124 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5125 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5126 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5127 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5128 ;;
5129
5130 sysv4*MP*)
5131 if test -d /usr/nec ;then
5132 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5133 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5134 fi
5135 ;;
5136
5137 unicos*)
5138 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5139 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5140 ;;
5141
5142 uts4*)
5143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5144 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5145 ;;
5146
5147 *)
5148 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5149 ;;
5150 esac
5151 fi
5152 ])
5153 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5154
5155 #
5156 # Check to make sure the PIC flag actually works.
5157 #
5158 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5159 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5160 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5161 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5162 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5163 "" | " "*) ;;
5164 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5165 esac],
5166 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5167 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5168 fi
5169 case "$host_os" in
5170 # For platforms which do not support PIC, -DPIC is meaningless:
5171 *djgpp*)
5172 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5173 ;;
5174 *)
5175 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5176 ;;
5177 esac
5178 ])
5179
5180
5181 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5182 # ------------------------------------
5183 # See if the linker supports building shared libraries.
5184 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5185 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5186 ifelse([$1],[CXX],[
5187 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5188 case $host_os in
5189 aix4* | aix5*)
5190 # If we're using GNU nm, then we don't want the "-C" option.
5191 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5192 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5193 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5194 else
5195 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5196 fi
5197 ;;
5198 pw32*)
5199 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5200 ;;
5201 cygwin* | mingw*)
5202 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5203 ;;
5204 *)
5205 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5206 ;;
5207 esac
5208 ],[
5209 runpath_var=
5210 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5211 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5212 _LT_AC_TAGVAR(archive_cmds, $1)=
5213 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5214 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5215 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5216 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5217 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5218 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5219 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5220 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5221 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5222 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5223 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5224 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5225 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5226 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5227 _LT_AC_TAGVAR(module_cmds, $1)=
5228 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5229 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5230 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5231 # include_expsyms should be a list of space-separated symbols to be *always*
5232 # included in the symbol list
5233 _LT_AC_TAGVAR(include_expsyms, $1)=
5234 # exclude_expsyms can be an extended regexp of symbols to exclude
5235 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5236 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5237 # as well as any symbol that contains `d'.
5238 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5239 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5240 # platforms (ab)use it in PIC code, but their linkers get confused if
5241 # the symbol is explicitly referenced. Since portable code cannot
5242 # rely on this symbol name, it's probably fine to never include it in
5243 # preloaded symbol tables.
5244 extract_expsyms_cmds=
5245 # Just being paranoid about ensuring that cc_basename is set.
5246 _LT_CC_BASENAME([$compiler])
5247 case $host_os in
5248 cygwin* | mingw* | pw32*)
5249 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5250 # When not using gcc, we currently assume that we are using
5251 # Microsoft Visual C++.
5252 if test "$GCC" != yes; then
5253 with_gnu_ld=no
5254 fi
5255 ;;
5256 openbsd*)
5257 with_gnu_ld=no
5258 ;;
5259 esac
5260
5261 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5262 if test "$with_gnu_ld" = yes; then
5263 # If archive_cmds runs LD, not CC, wlarc should be empty
5264 wlarc='${wl}'
5265
5266 # Set some defaults for GNU ld with shared library support. These
5267 # are reset later if shared libraries are not supported. Putting them
5268 # here allows them to be overridden if necessary.
5269 runpath_var=LD_RUN_PATH
5270 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5271 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5272 # ancient GNU ld didn't support --whole-archive et. al.
5273 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5274 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5275 else
5276 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5277 fi
5278 supports_anon_versioning=no
5279 case `$LD -v 2>/dev/null` in
5280 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5281 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5282 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5283 *\ 2.11.*) ;; # other 2.11 versions
5284 *) supports_anon_versioning=yes ;;
5285 esac
5286
5287 # See if GNU ld supports shared libraries.
5288 case $host_os in
5289 aix3* | aix4* | aix5*)
5290 # On AIX/PPC, the GNU linker is very broken
5291 if test "$host_cpu" != ia64; then
5292 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5293 cat <<EOF 1>&2
5294
5295 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5296 *** to be unable to reliably create shared libraries on AIX.
5297 *** Therefore, libtool is disabling shared libraries support. If you
5298 *** really care for shared libraries, you may want to modify your PATH
5299 *** so that a non-GNU linker is found, and then restart.
5300
5301 EOF
5302 fi
5303 ;;
5304
5305 amigaos*)
5306 _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
5307 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5308 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5309
5310 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5311 # that the semantics of dynamic libraries on AmigaOS, at least up
5312 # to version 4, is to share data among multiple programs linked
5313 # with the same dynamic library. Since this doesn't match the
5314 # behavior of shared libraries on other platforms, we can't use
5315 # them.
5316 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5317 ;;
5318
5319 beos*)
5320 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5321 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5322 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5323 # support --undefined. This deserves some investigation. FIXME
5324 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5325 else
5326 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5327 fi
5328 ;;
5329
5330 cygwin* | mingw* | pw32*)
5331 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5332 # as there is no search path for DLLs.
5333 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5334 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5335 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5336 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5337 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5338
5339 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5341 # If the export-symbols file already is a .def file (1st line
5342 # is EXPORTS), use it as is; otherwise, prepend...
5343 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5344 cp $export_symbols $output_objdir/$soname.def;
5345 else
5346 echo EXPORTS > $output_objdir/$soname.def;
5347 cat $export_symbols >> $output_objdir/$soname.def;
5348 fi~
5349 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5350 else
5351 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5352 fi
5353 ;;
5354
5355 linux*)
5356 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5357 tmp_addflag=
5358 case $cc_basename,$host_cpu in
5359 pgcc*) # Portland Group C compiler
5360 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5361 ;;
5362 pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
5363 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5364 tmp_addflag=' -fpic -Mnomain' ;;
5365 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5366 tmp_addflag=' -i_dynamic' ;;
5367 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5368 tmp_addflag=' -i_dynamic -nofor_main' ;;
5369 ifc* | ifort*) # Intel Fortran compiler
5370 tmp_addflag=' -nofor_main' ;;
5371 esac
5372 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5373
5374 if test $supports_anon_versioning = yes; then
5375 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5376 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5377 $echo "local: *; };" >> $output_objdir/$libname.ver~
5378 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5379 fi
5380 else
5381 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5382 fi
5383 ;;
5384
5385 netbsd*)
5386 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5387 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5388 wlarc=
5389 else
5390 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5391 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5392 fi
5393 ;;
5394
5395 solaris* | sysv5*)
5396 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5397 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5398 cat <<EOF 1>&2
5399
5400 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5401 *** create shared libraries on Solaris systems. Therefore, libtool
5402 *** is disabling shared libraries support. We urge you to upgrade GNU
5403 *** binutils to release 2.9.1 or newer. Another option is to modify
5404 *** your PATH or compiler configuration so that the native linker is
5405 *** used, and then restart.
5406
5407 EOF
5408 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5409 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5410 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5411 else
5412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5413 fi
5414 ;;
5415
5416 sunos4*)
5417 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5418 wlarc=
5419 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5420 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5421 ;;
5422
5423 *)
5424 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5425 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5426 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5427 else
5428 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5429 fi
5430 ;;
5431 esac
5432
5433 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5434 runpath_var=
5435 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5436 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5437 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5438 fi
5439 else
5440 # PORTME fill in a description of your system's linker (not GNU ld)
5441 case $host_os in
5442 aix3*)
5443 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5444 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5445 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5446 # Note: this linker hardcodes the directories in LIBPATH if there
5447 # are no directories specified by -L.
5448 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5449 if test "$GCC" = yes && test -z "$link_static_flag"; then
5450 # Neither direct hardcoding nor static linking is supported with a
5451 # broken collect2.
5452 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5453 fi
5454 ;;
5455
5456 aix4* | aix5*)
5457 if test "$host_cpu" = ia64; then
5458 # On IA64, the linker does run time linking by default, so we don't
5459 # have to do anything special.
5460 aix_use_runtimelinking=no
5461 exp_sym_flag='-Bexport'
5462 no_entry_flag=""
5463 else
5464 # If we're using GNU nm, then we don't want the "-C" option.
5465 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5466 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5467 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5468 else
5469 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5470 fi
5471 aix_use_runtimelinking=no
5472
5473 # Test if we are trying to use run time linking or normal
5474 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5475 # need to do runtime linking.
5476 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5477 for ld_flag in $LDFLAGS; do
5478 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5479 aix_use_runtimelinking=yes
5480 break
5481 fi
5482 done
5483 esac
5484
5485 exp_sym_flag='-bexport'
5486 no_entry_flag='-bnoentry'
5487 fi
5488
5489 # When large executables or shared objects are built, AIX ld can
5490 # have problems creating the table of contents. If linking a library
5491 # or program results in "error TOC overflow" add -mminimal-toc to
5492 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5493 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5494
5495 _LT_AC_TAGVAR(archive_cmds, $1)=''
5496 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5497 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5498 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5499
5500 if test "$GCC" = yes; then
5501 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5502 # We only want to do this on AIX 4.2 and lower, the check
5503 # below for broken collect2 doesn't work under 4.3+
5504 collect2name=`${CC} -print-prog-name=collect2`
5505 if test -f "$collect2name" && \
5506 strings "$collect2name" | grep resolve_lib_name >/dev/null
5507 then
5508 # We have reworked collect2
5509 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5510 else
5511 # We have old collect2
5512 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5513 # It fails to find uninstalled libraries when the uninstalled
5514 # path is not listed in the libpath. Setting hardcode_minus_L
5515 # to unsupported forces relinking
5516 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5517 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5518 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5519 fi
5520 esac
5521 shared_flag='-shared'
5522 if test "$aix_use_runtimelinking" = yes; then
5523 shared_flag="$shared_flag "'${wl}-G'
5524 fi
5525 else
5526 # not using gcc
5527 if test "$host_cpu" = ia64; then
5528 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5529 # chokes on -Wl,-G. The following line is correct:
5530 shared_flag='-G'
5531 else
5532 if test "$aix_use_runtimelinking" = yes; then
5533 shared_flag='${wl}-G'
5534 else
5535 shared_flag='${wl}-bM:SRE'
5536 fi
5537 fi
5538 fi
5539
5540 # It seems that -bexpall does not export symbols beginning with
5541 # underscore (_), so it is better to generate a list of symbols to export.
5542 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5543 if test "$aix_use_runtimelinking" = yes; then
5544 # Warning - without using the other runtime loading flags (-brtl),
5545 # -berok will link without error, but may produce a broken library.
5546 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5547 # Determine the default libpath from the value encoded in an empty executable.
5548 _LT_AC_SYS_LIBPATH_AIX
5549 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5550 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
5551 else
5552 if test "$host_cpu" = ia64; then
5553 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5554 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5555 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5556 else
5557 # Determine the default libpath from the value encoded in an empty executable.
5558 _LT_AC_SYS_LIBPATH_AIX
5559 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5560 # Warning - without using the other run time loading flags,
5561 # -berok will link without error, but may produce a broken library.
5562 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5563 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5564 # -bexpall does not export symbols beginning with underscore (_)
5565 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5566 # Exported symbols can be pulled into shared objects from archives
5567 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5568 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5569 # This is similar to how AIX traditionally builds it's shared libraries.
5570 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5571 fi
5572 fi
5573 ;;
5574
5575 amigaos*)
5576 _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
5577 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5578 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5579 # see comment about different semantics on the GNU ld section
5580 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5581 ;;
5582
5583 bsdi[[45]]*)
5584 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5585 ;;
5586
5587 cygwin* | mingw* | pw32*)
5588 # When not using gcc, we currently assume that we are using
5589 # Microsoft Visual C++.
5590 # hardcode_libdir_flag_spec is actually meaningless, as there is
5591 # no search path for DLLs.
5592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5593 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5594 # Tell ltmain to make .lib files, not .a files.
5595 libext=lib
5596 # Tell ltmain to make .dll files, not .so files.
5597 shrext_cmds=".dll"
5598 # FIXME: Setting linknames here is a bad hack.
5599 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5600 # The linker will automatically build a .lib file if we build a DLL.
5601 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5602 # FIXME: Should let the user specify the lib program.
5603 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5604 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5605 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5606 ;;
5607
5608 darwin* | rhapsody*)
5609 case "$host_os" in
5610 rhapsody* | darwin1.[[012]])
5611 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5612 ;;
5613 *) # Darwin 1.3 on
5614 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5615 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5616 else
5617 case ${MACOSX_DEPLOYMENT_TARGET} in
5618 10.[[012]])
5619 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5620 ;;
5621 10.*)
5622 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5623 ;;
5624 esac
5625 fi
5626 ;;
5627 esac
5628 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5629 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5630 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5631 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5632 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5633 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5634 if test "$GCC" = yes ; then
5635 output_verbose_link_cmd='echo'
5636 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5637 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5638 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5639 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5640 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5641 else
5642 case $cc_basename in
5643 xlc*)
5644 output_verbose_link_cmd='echo'
5645 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5646 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5647 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5648 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5649 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5650 ;;
5651 *)
5652 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5653 ;;
5654 esac
5655 fi
5656 ;;
5657
5658 dgux*)
5659 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5660 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5661 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5662 ;;
5663
5664 freebsd1*)
5665 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5666 ;;
5667
5668 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5669 # support. Future versions do this automatically, but an explicit c++rt0.o
5670 # does not break anything, and helps significantly (at the cost of a little
5671 # extra space).
5672 freebsd2.2*)
5673 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5674 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5675 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5676 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5677 ;;
5678
5679 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5680 freebsd2*)
5681 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5682 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5683 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5684 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5685 ;;
5686
5687 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5688 freebsd* | kfreebsd*-gnu | dragonfly*)
5689 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5690 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5691 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5692 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5693 ;;
5694
5695 hpux9*)
5696 if test "$GCC" = yes; then
5697 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5698 else
5699 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5700 fi
5701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5702 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5703 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5704
5705 # hardcode_minus_L: Not really in the search PATH,
5706 # but as the default location of the library.
5707 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5708 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5709 ;;
5710
5711 hpux10* | hpux11*)
5712 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5713 case "$host_cpu" in
5714 hppa*64*|ia64*)
5715 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5716 ;;
5717 *)
5718 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5719 ;;
5720 esac
5721 else
5722 case "$host_cpu" in
5723 hppa*64*|ia64*)
5724 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5725 ;;
5726 *)
5727 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5728 ;;
5729 esac
5730 fi
5731 if test "$with_gnu_ld" = no; then
5732 case "$host_cpu" in
5733 hppa*64*)
5734 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5735 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5736 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5737 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5738 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5739 ;;
5740 ia64*)
5741 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5742 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5743 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5744
5745 # hardcode_minus_L: Not really in the search PATH,
5746 # but as the default location of the library.
5747 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5748 ;;
5749 *)
5750 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5751 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5752 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5753 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5754
5755 # hardcode_minus_L: Not really in the search PATH,
5756 # but as the default location of the library.
5757 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5758 ;;
5759 esac
5760 fi
5761 ;;
5762
5763 irix5* | irix6* | nonstopux*)
5764 if test "$GCC" = yes; then
5765 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5766 else
5767 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5768 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5769 fi
5770 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5771 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5772 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5773 ;;
5774
5775 netbsd*)
5776 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5777 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5778 else
5779 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5780 fi
5781 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5782 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5783 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5784 ;;
5785
5786 newsos6)
5787 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5788 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5789 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5790 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5791 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5792 ;;
5793
5794 openbsd*)
5795 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5796 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5797 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5798 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5799 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5800 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5801 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5802 else
5803 case $host_os in
5804 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5805 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5806 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5807 ;;
5808 *)
5809 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5811 ;;
5812 esac
5813 fi
5814 ;;
5815
5816 os2*)
5817 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5818 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5819 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5820 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5821 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5822 ;;
5823
5824 osf3*)
5825 if test "$GCC" = yes; then
5826 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5827 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5828 else
5829 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5830 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5831 fi
5832 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5833 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5834 ;;
5835
5836 osf4* | osf5*) # as osf3* with the addition of -msym flag
5837 if test "$GCC" = yes; then
5838 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5839 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5840 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5841 else
5842 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5843 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5844 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5845 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
5846
5847 # Both c and cxx compiler support -rpath directly
5848 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5849 fi
5850 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5851 ;;
5852
5853 sco3.2v5*)
5854 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5855 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5856 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5857 runpath_var=LD_RUN_PATH
5858 hardcode_runpath_var=yes
5859 ;;
5860
5861 solaris*)
5862 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5863 if test "$GCC" = yes; then
5864 wlarc='${wl}'
5865 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5866 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5867 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5868 else
5869 wlarc=''
5870 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5871 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5872 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5873 fi
5874 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5875 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5876 case $host_os in
5877 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5878 *)
5879 # The compiler driver will combine linker options so we
5880 # cannot just pass the convience library names through
5881 # without $wl, iff we do not link with $LD.
5882 # Luckily, gcc supports the same syntax we need for Sun Studio.
5883 # Supported since Solaris 2.6 (maybe 2.5.1?)
5884 case $wlarc in
5885 '')
5886 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5887 *)
5888 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
5889 esac ;;
5890 esac
5891 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5892 ;;
5893
5894 sunos4*)
5895 if test "x$host_vendor" = xsequent; then
5896 # Use $CC to link under sequent, because it throws in some extra .o
5897 # files that make .init and .fini sections work.
5898 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5899 else
5900 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5901 fi
5902 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5903 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5904 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5905 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5906 ;;
5907
5908 sysv4)
5909 case $host_vendor in
5910 sni)
5911 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5912 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5913 ;;
5914 siemens)
5915 ## LD is ld it makes a PLAMLIB
5916 ## CC just makes a GrossModule.
5917 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5918 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5919 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5920 ;;
5921 motorola)
5922 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5923 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5924 ;;
5925 esac
5926 runpath_var='LD_RUN_PATH'
5927 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5928 ;;
5929
5930 sysv4.3*)
5931 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5932 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5933 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5934 ;;
5935
5936 sysv4*MP*)
5937 if test -d /usr/nec; then
5938 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5939 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5940 runpath_var=LD_RUN_PATH
5941 hardcode_runpath_var=yes
5942 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5943 fi
5944 ;;
5945
5946 sysv4.2uw2*)
5947 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5948 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5949 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5950 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5951 hardcode_runpath_var=yes
5952 runpath_var=LD_RUN_PATH
5953 ;;
5954
5955 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5956 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5957 if test "$GCC" = yes; then
5958 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5959 else
5960 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5961 fi
5962 runpath_var='LD_RUN_PATH'
5963 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5964 ;;
5965
5966 sysv5*)
5967 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5968 # $CC -shared without GNU ld will not create a library from C++
5969 # object files and a static libstdc++, better avoid it by now
5970 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5971 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5972 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5973 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5974 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5975 runpath_var='LD_RUN_PATH'
5976 ;;
5977
5978 uts4*)
5979 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5980 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5981 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5982 ;;
5983
5984 *)
5985 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5986 ;;
5987 esac
5988 fi
5989 ])
5990 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5991 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5992
5993 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5994 if test "$GCC" = yes; then
5995 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5996 fi
5997
5998 #
5999 # Do we need to explicitly link libc?
6000 #
6001 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6002 x|xyes)
6003 # Assume -lc should be added
6004 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6005
6006 if test "$enable_shared" = yes && test "$GCC" = yes; then
6007 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6008 *'~'*)
6009 # FIXME: we may have to deal with multi-command sequences.
6010 ;;
6011 '$CC '*)
6012 # Test whether the compiler implicitly links with -lc since on some
6013 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6014 # to ld, don't add -lc before -lgcc.
6015 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6016 $rm conftest*
6017 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6018
6019 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6020 soname=conftest
6021 lib=conftest
6022 libobjs=conftest.$ac_objext
6023 deplibs=
6024 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6025 compiler_flags=-v
6026 linker_flags=-v
6027 verstring=
6028 output_objdir=.
6029 libname=conftest
6030 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6031 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6032 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6033 then
6034 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6035 else
6036 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6037 fi
6038 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6039 else
6040 cat conftest.err 1>&5
6041 fi
6042 $rm conftest*
6043 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6044 ;;
6045 esac
6046 fi
6047 ;;
6048 esac
6049 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6050
6051
6052 # _LT_AC_FILE_LTDLL_C
6053 # -------------------
6054 # Be careful that the start marker always follows a newline.
6055 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6056 # /* ltdll.c starts here */
6057 # #define WIN32_LEAN_AND_MEAN
6058 # #include <windows.h>
6059 # #undef WIN32_LEAN_AND_MEAN
6060 # #include <stdio.h>
6061 #
6062 # #ifndef __CYGWIN__
6063 # # ifdef __CYGWIN32__
6064 # # define __CYGWIN__ __CYGWIN32__
6065 # # endif
6066 # #endif
6067 #
6068 # #ifdef __cplusplus
6069 # extern "C" {
6070 # #endif
6071 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6072 # #ifdef __cplusplus
6073 # }
6074 # #endif
6075 #
6076 # #ifdef __CYGWIN__
6077 # #include <cygwin/cygwin_dll.h>
6078 # DECLARE_CYGWIN_DLL( DllMain );
6079 # #endif
6080 # HINSTANCE __hDllInstance_base;
6081 #
6082 # BOOL APIENTRY
6083 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6084 # {
6085 # __hDllInstance_base = hInst;
6086 # return TRUE;
6087 # }
6088 # /* ltdll.c ends here */
6089 ])# _LT_AC_FILE_LTDLL_C
6090
6091
6092 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6093 # ---------------------------------
6094 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6095
6096
6097 # old names
6098 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6099 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6100 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6101 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6102 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6103 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6104 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6105
6106 # This is just to silence aclocal about the macro not being used
6107 ifelse([AC_DISABLE_FAST_INSTALL])
6108
6109 AC_DEFUN([LT_AC_PROG_GCJ],
6110 [AC_CHECK_TOOL(GCJ, gcj, no)
6111 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6112 AC_SUBST(GCJFLAGS)
6113 ])
6114
6115 AC_DEFUN([LT_AC_PROG_RC],
6116 [AC_CHECK_TOOL(RC, windres, no)
6117 ])
6118
6119 ############################################################
6120 # NOTE: This macro has been submitted for inclusion into #
6121 # GNU Autoconf as AC_PROG_SED. When it is available in #
6122 # a released version of Autoconf we should remove this #
6123 # macro and use it instead. #
6124 ############################################################
6125 # LT_AC_PROG_SED
6126 # --------------
6127 # Check for a fully-functional sed program, that truncates
6128 # as few characters as possible. Prefer GNU sed if found.
6129 AC_DEFUN([LT_AC_PROG_SED],
6130 [AC_MSG_CHECKING([for a sed that does not truncate output])
6131 AC_CACHE_VAL(lt_cv_path_SED,
6132 [# Loop through the user's path and test for sed and gsed.
6133 # Then use that list of sed's as ones to test for truncation.
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135 for as_dir in $PATH
6136 do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
6139 for lt_ac_prog in sed gsed; do
6140 for ac_exec_ext in '' $ac_executable_extensions; do
6141 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6142 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6143 fi
6144 done
6145 done
6146 done
6147 lt_ac_max=0
6148 lt_ac_count=0
6149 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6150 # along with /bin/sed that truncates output.
6151 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6152 test ! -f $lt_ac_sed && continue
6153 cat /dev/null > conftest.in
6154 lt_ac_count=0
6155 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6156 # Check for GNU sed and select it if it is found.
6157 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6158 lt_cv_path_SED=$lt_ac_sed
6159 break
6160 fi
6161 while true; do
6162 cat conftest.in conftest.in >conftest.tmp
6163 mv conftest.tmp conftest.in
6164 cp conftest.in conftest.nl
6165 echo >>conftest.nl
6166 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6167 cmp -s conftest.out conftest.nl || break
6168 # 10000 chars as input seems more than enough
6169 test $lt_ac_count -gt 10 && break
6170 lt_ac_count=`expr $lt_ac_count + 1`
6171 if test $lt_ac_count -gt $lt_ac_max; then
6172 lt_ac_max=$lt_ac_count
6173 lt_cv_path_SED=$lt_ac_sed
6174 fi
6175 done
6176 done
6177 ])
6178 SED=$lt_cv_path_SED
6179 AC_MSG_RESULT([$SED])
6180 ])
6181 ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
6182 ## Copyright (C) 1999-2000 Free Software Foundation, Inc.
6183 ##
6184 ## This file is free software; the Free Software Foundation gives
6185 ## unlimited permission to copy and/or distribute it, with or without
6186 ## modifications, as long as this notice is preserved.
6187
6188 # serial 6 AC_LIB_LTDL
6189
6190 # AC_WITH_LTDL
6191 # ------------
6192 # Clients of libltdl can use this macro to allow the installer to
6193 # choose between a shipped copy of the ltdl sources or a preinstalled
6194 # version of the library.
6195 AC_DEFUN([AC_WITH_LTDL],
6196 [AC_REQUIRE([AC_LIB_LTDL])
6197 AC_SUBST([LIBLTDL])
6198 AC_SUBST([INCLTDL])
6199
6200 # Unless the user asks us to check, assume no installed ltdl exists.
6201 use_installed_libltdl=no
6202
6203 AC_ARG_WITH([included_ltdl],
6204 [ --with-included-ltdl use the GNU ltdl sources included here])
6205
6206 if test "x$with_included_ltdl" != xyes; then
6207 # We are not being forced to use the included libltdl sources, so
6208 # decide whether there is a useful installed version we can use.
6209 AC_CHECK_HEADER([ltdl.h],
6210 [AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
6211 [with_included_ltdl=no],
6212 [with_included_ltdl=yes])
6213 ])
6214 fi
6215
6216 if test "x$enable_ltdl_install" != xyes; then
6217 # If the user did not specify an installable libltdl, then default
6218 # to a convenience lib.
6219 AC_LIBLTDL_CONVENIENCE
6220 fi
6221
6222 if test "x$with_included_ltdl" = xno; then
6223 # If the included ltdl is not to be used. then Use the
6224 # preinstalled libltdl we found.
6225 AC_DEFINE([HAVE_LTDL], 1,
6226 [Define this if a modern libltdl is already installed])
6227 LIBLTDL=-lltdl
6228 fi
6229
6230 # Report our decision...
6231 AC_MSG_CHECKING([whether to use included libltdl])
6232 AC_MSG_RESULT([$with_included_ltdl])
6233
6234 AC_CONFIG_SUBDIRS([libltdl])
6235 ])# AC_WITH_LTDL
6236
6237
6238 # AC_LIB_LTDL
6239 # -----------
6240 # Perform all the checks necessary for compilation of the ltdl objects
6241 # -- including compiler checks and header checks.
6242 AC_DEFUN([AC_LIB_LTDL],
6243 [AC_PREREQ(2.50)
6244 AC_REQUIRE([AC_PROG_CC])
6245 AC_REQUIRE([AC_C_CONST])
6246 AC_REQUIRE([AC_HEADER_STDC])
6247 AC_REQUIRE([AC_HEADER_DIRENT])
6248 AC_REQUIRE([_LT_AC_CHECK_DLFCN])
6249 AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
6250 AC_REQUIRE([AC_LTDL_SHLIBEXT])
6251 AC_REQUIRE([AC_LTDL_SHLIBPATH])
6252 AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
6253 AC_REQUIRE([AC_LTDL_OBJDIR])
6254 AC_REQUIRE([AC_LTDL_DLPREOPEN])
6255 AC_REQUIRE([AC_LTDL_DLLIB])
6256 AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
6257 AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
6258 AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
6259 AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
6260
6261 AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
6262 stdio.h unistd.h])
6263 AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h])
6264 AC_CHECK_HEADERS([string.h strings.h], [break])
6265
6266 AC_CHECK_FUNCS([strchr index], [break])
6267 AC_CHECK_FUNCS([strrchr rindex], [break])
6268 AC_CHECK_FUNCS([memcpy bcopy], [break])
6269 AC_CHECK_FUNCS([memmove strcmp])
6270 AC_CHECK_FUNCS([closedir opendir readdir])
6271 ])# AC_LIB_LTDL
6272
6273
6274 # AC_LTDL_ENABLE_INSTALL
6275 # ----------------------
6276 AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
6277 [AC_ARG_ENABLE([ltdl-install],
6278 [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])])
6279
6280 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
6281 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
6282 ])])# AC_LTDL_ENABLE_INSTALL
6283
6284
6285 # AC_LTDL_SYS_DLOPEN_DEPLIBS
6286 # --------------------------
6287 AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
6288 [AC_REQUIRE([AC_CANONICAL_HOST])
6289 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
6290 [libltdl_cv_sys_dlopen_deplibs],
6291 [# PORTME does your system automatically load deplibs for dlopen?
6292 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
6293 # For now, we just catch OSes we know something about -- in the
6294 # future, we'll try test this programmatically.
6295 libltdl_cv_sys_dlopen_deplibs=unknown
6296 case "$host_os" in
6297 aix3*|aix4.1.*|aix4.2.*)
6298 # Unknown whether this is true for these versions of AIX, but
6299 # we want this `case' here to explicitly catch those versions.
6300 libltdl_cv_sys_dlopen_deplibs=unknown
6301 ;;
6302 aix[[45]]*)
6303 libltdl_cv_sys_dlopen_deplibs=yes
6304 ;;
6305 darwin*)
6306 # Assuming the user has installed a libdl from somewhere, this is true
6307 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
6308 libltdl_cv_sys_dlopen_deplibs=yes
6309 ;;
6310 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
6311 # GNU and its variants, using gnu ld.so (Glibc)
6312 libltdl_cv_sys_dlopen_deplibs=yes
6313 ;;
6314 hpux10*|hpux11*)
6315 libltdl_cv_sys_dlopen_deplibs=yes
6316 ;;
6317 irix[[12345]]*|irix6.[[01]]*)
6318 # Catch all versions of IRIX before 6.2, and indicate that we don't
6319 # know how it worked for any of those versions.
6320 libltdl_cv_sys_dlopen_deplibs=unknown
6321 ;;
6322 irix*)
6323 # The case above catches anything before 6.2, and it's known that
6324 # at 6.2 and later dlopen does load deplibs.
6325 libltdl_cv_sys_dlopen_deplibs=yes
6326 ;;
6327 netbsd*)
6328 libltdl_cv_sys_dlopen_deplibs=yes
6329 ;;
6330 openbsd*)
6331 libltdl_cv_sys_dlopen_deplibs=yes
6332 ;;
6333 osf[[1234]]*)
6334 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
6335 # it did *not* use an RPATH in a shared library to find objects the
6336 # library depends on, so we explictly say `no'.
6337 libltdl_cv_sys_dlopen_deplibs=no
6338 ;;
6339 osf5.0|osf5.0a|osf5.1)
6340 # dlopen *does* load deplibs and with the right loader patch applied
6341 # it even uses RPATH in a shared library to search for shared objects
6342 # that the library depends on, but there's no easy way to know if that
6343 # patch is installed. Since this is the case, all we can really
6344 # say is unknown -- it depends on the patch being installed. If
6345 # it is, this changes to `yes'. Without it, it would be `no'.
6346 libltdl_cv_sys_dlopen_deplibs=unknown
6347 ;;
6348 osf*)
6349 # the two cases above should catch all versions of osf <= 5.1. Read
6350 # the comments above for what we know about them.
6351 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
6352 # is used to find them so we can finally say `yes'.
6353 libltdl_cv_sys_dlopen_deplibs=yes
6354 ;;
6355 solaris*)
6356 libltdl_cv_sys_dlopen_deplibs=yes
6357 ;;
6358 esac
6359 ])
6360 if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
6361 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
6362 [Define if the OS needs help to load dependent libraries for dlopen().])
6363 fi
6364 ])# AC_LTDL_SYS_DLOPEN_DEPLIBS
6365
6366
6367 # AC_LTDL_SHLIBEXT
6368 # ----------------
6369 AC_DEFUN([AC_LTDL_SHLIBEXT],
6370 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
6371 AC_CACHE_CHECK([which extension is used for loadable modules],
6372 [libltdl_cv_shlibext],
6373 [
6374 # Here in libltdl for libgcj we don't build modules for darwin.
6375 # So we say no. Then the extension gets .dylib which is the right
6376 # thing for shared libraries on darwin. Please keep me next time you
6377 # import libltdl.
6378 case "$host_os" in
6379 darwin*)
6380 module=no
6381 ;;
6382 *)
6383 module=yes
6384 ;;
6385 esac
6386 eval libltdl_cv_shlibext=$shrext_cmds
6387 ])
6388 if test -n "$libltdl_cv_shlibext"; then
6389 AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
6390 [Define to the extension used for shared libraries, say, ".so".])
6391 fi
6392 ])# AC_LTDL_SHLIBEXT
6393
6394
6395 # AC_LTDL_SHLIBPATH
6396 # -----------------
6397 AC_DEFUN([AC_LTDL_SHLIBPATH],
6398 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
6399 AC_CACHE_CHECK([which variable specifies run-time library path],
6400 [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
6401 if test -n "$libltdl_cv_shlibpath_var"; then
6402 AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
6403 [Define to the name of the environment variable that determines the dynamic library search path.])
6404 fi
6405 ])# AC_LTDL_SHLIBPATH
6406
6407
6408 # AC_LTDL_SYSSEARCHPATH
6409 # ---------------------
6410 AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
6411 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
6412 AC_CACHE_CHECK([for the default library search path],
6413 [libltdl_cv_sys_search_path],
6414 [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
6415 if test -n "$libltdl_cv_sys_search_path"; then
6416 sys_search_path=
6417 for dir in $libltdl_cv_sys_search_path; do
6418 if test -z "$sys_search_path"; then
6419 sys_search_path="$dir"
6420 else
6421 sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
6422 fi
6423 done
6424 AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
6425 [Define to the system default library search path.])
6426 fi
6427 ])# AC_LTDL_SYSSEARCHPATH
6428
6429
6430 # AC_LTDL_OBJDIR
6431 # --------------
6432 AC_DEFUN([AC_LTDL_OBJDIR],
6433 [AC_CACHE_CHECK([for objdir],
6434 [libltdl_cv_objdir],
6435 [libltdl_cv_objdir="$objdir"
6436 if test -n "$objdir"; then
6437 :
6438 else
6439 rm -f .libs 2>/dev/null
6440 mkdir .libs 2>/dev/null
6441 if test -d .libs; then
6442 libltdl_cv_objdir=.libs
6443 else
6444 # MS-DOS does not allow filenames that begin with a dot.
6445 libltdl_cv_objdir=_libs
6446 fi
6447 rmdir .libs 2>/dev/null
6448 fi
6449 ])
6450 AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
6451 [Define to the sub-directory in which libtool stores uninstalled libraries.])
6452 ])# AC_LTDL_OBJDIR
6453
6454
6455 # AC_LTDL_DLPREOPEN
6456 # -----------------
6457 AC_DEFUN([AC_LTDL_DLPREOPEN],
6458 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
6459 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
6460 [libltdl_cv_preloaded_symbols],
6461 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
6462 libltdl_cv_preloaded_symbols=yes
6463 else
6464 libltdl_cv_preloaded_symbols=no
6465 fi
6466 ])
6467 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
6468 AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
6469 [Define if libtool can extract symbol lists from object files.])
6470 fi
6471 ])# AC_LTDL_DLPREOPEN
6472
6473
6474 # AC_LTDL_DLLIB
6475 # -------------
6476 AC_DEFUN([AC_LTDL_DLLIB],
6477 [LIBADD_DL=
6478 AC_SUBST(LIBADD_DL)
6479 AC_LANG_PUSH([C])
6480
6481 AC_CHECK_FUNC([shl_load],
6482 [AC_DEFINE([HAVE_SHL_LOAD], [1],
6483 [Define if you have the shl_load function.])],
6484 [AC_CHECK_LIB([dld], [shl_load],
6485 [AC_DEFINE([HAVE_SHL_LOAD], [1],
6486 [Define if you have the shl_load function.])
6487 LIBADD_DL="$LIBADD_DL -ldld"],
6488 [AC_CHECK_LIB([dl], [dlopen],
6489 [AC_DEFINE([HAVE_LIBDL], [1],
6490 [Define if you have the libdl library or equivalent.])
6491 LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"],
6492 [AC_TRY_LINK([#if HAVE_DLFCN_H
6493 # include <dlfcn.h>
6494 #endif
6495 ],
6496 [dlopen(0, 0);],
6497 [AC_DEFINE([HAVE_LIBDL], [1],
6498 [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],
6499 [AC_CHECK_LIB([svld], [dlopen],
6500 [AC_DEFINE([HAVE_LIBDL], [1],
6501 [Define if you have the libdl library or equivalent.])
6502 LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"],
6503 [AC_CHECK_LIB([dld], [dld_link],
6504 [AC_DEFINE([HAVE_DLD], [1],
6505 [Define if you have the GNU dld library.])
6506 LIBADD_DL="$LIBADD_DL -ldld"],
6507 [AC_CHECK_FUNC([_dyld_func_lookup],
6508 [AC_DEFINE([HAVE_DYLD], [1],
6509 [Define if you have the _dyld_func_lookup function.])])
6510 ])
6511 ])
6512 ])
6513 ])
6514 ])
6515 ])
6516
6517 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
6518 then
6519 lt_save_LIBS="$LIBS"
6520 LIBS="$LIBS $LIBADD_DL"
6521 AC_CHECK_FUNCS([dlerror])
6522 LIBS="$lt_save_LIBS"
6523 fi
6524 AC_LANG_POP
6525 ])# AC_LTDL_DLLIB
6526
6527
6528 # AC_LTDL_SYMBOL_USCORE
6529 # ---------------------
6530 # does the compiler prefix global symbols with an underscore?
6531 AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
6532 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
6533 AC_CACHE_CHECK([for _ prefix in compiled symbols],
6534 [ac_cv_sys_symbol_underscore],
6535 [ac_cv_sys_symbol_underscore=no
6536 cat > conftest.$ac_ext <<EOF
6537 void nm_test_func(){}
6538 int main(){nm_test_func;return 0;}
6539 EOF
6540 if AC_TRY_EVAL(ac_compile); then
6541 # Now try to grab the symbols.
6542 ac_nlist=conftest.nm
6543 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
6544 # See whether the symbols have a leading underscore.
6545 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
6546 ac_cv_sys_symbol_underscore=yes
6547 else
6548 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
6549 :
6550 else
6551 echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
6552 fi
6553 fi
6554 else
6555 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
6556 fi
6557 else
6558 echo "configure: failed program was:" >&AC_FD_CC
6559 cat conftest.c >&AC_FD_CC
6560 fi
6561 rm -rf conftest*
6562 ])
6563 ])# AC_LTDL_SYMBOL_USCORE
6564
6565
6566 # AC_LTDL_DLSYM_USCORE
6567 # --------------------
6568 AC_DEFUN([AC_LTDL_DLSYM_USCORE],
6569 [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
6570 if test x"$ac_cv_sys_symbol_underscore" = xyes; then
6571 if test x"$libltdl_cv_func_dlopen" = xyes ||
6572 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
6573 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
6574 [libltdl_cv_need_uscore],
6575 [libltdl_cv_need_uscore=unknown
6576 save_LIBS="$LIBS"
6577 LIBS="$LIBS $LIBADD_DL"
6578 _LT_AC_TRY_DLOPEN_SELF(
6579 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
6580 [], [libltdl_cv_need_uscore=cross])
6581 LIBS="$save_LIBS"
6582 ])
6583 fi
6584 fi
6585
6586 if test x"$libltdl_cv_need_uscore" = xyes; then
6587 AC_DEFINE(NEED_USCORE, 1,
6588 [Define if dlsym() requires a leading underscore in symbol names.])
6589 fi
6590 ])# AC_LTDL_DLSYM_USCORE
6591
6592 # AC_LTDL_FUNC_ARGZ
6593 # -----------------
6594 AC_DEFUN([AC_LTDL_FUNC_ARGZ],
6595 [AC_CHECK_HEADERS([argz.h])
6596
6597 AC_CHECK_TYPES([error_t],
6598 [],
6599 [AC_DEFINE([error_t], [int],
6600 [Define to a type to use for `error_t' if it is not otherwise available.])],
6601 [#if HAVE_ARGZ_H
6602 # include <argz.h>
6603 #endif])
6604
6605 AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
6606 ])# AC_LTDL_FUNC_ARGZ