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