Merge from debian.
[hcoop/debian/courier-authlib.git] / liblock / aclocal.m4
CommitLineData
0fde1ce3 1# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
d9898ee8 2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
0fde1ce3 4# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
d9898ee8 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
0fde1ce3 14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(AC_AUTOCONF_VERSION, [2.61],,
17[m4_warning([this file was generated for autoconf 2.61.
18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
64ff59ba 21
d9898ee8 22# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23
0fde1ce3 24# serial 51 AC_PROG_LIBTOOL
d9898ee8 25
26
27# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28# -----------------------------------------------------------
29# If this macro is not defined by Autoconf, define it here.
30m4_ifdef([AC_PROVIDE_IFELSE],
31 [],
32 [m4_define([AC_PROVIDE_IFELSE],
33 [m4_ifdef([AC_PROVIDE_$1],
34 [$2], [$3])])])
35
36
37# AC_PROG_LIBTOOL
38# ---------------
39AC_DEFUN([AC_PROG_LIBTOOL],
40[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43 AC_PROVIDE_IFELSE([AC_PROG_CXX],
44 [AC_LIBTOOL_CXX],
45 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46 ])])
47dnl And a similar setup for Fortran 77 support
48 AC_PROVIDE_IFELSE([AC_PROG_F77],
49 [AC_LIBTOOL_F77],
50 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
51])])
52
53dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
57 [AC_LIBTOOL_GCJ],
58 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
59 [AC_LIBTOOL_GCJ],
60 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
61 [AC_LIBTOOL_GCJ],
62 [ifdef([AC_PROG_GCJ],
63 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64 ifdef([A][M_PROG_GCJ],
65 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66 ifdef([LT_AC_PROG_GCJ],
67 [define([LT_AC_PROG_GCJ],
68 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
69])])# AC_PROG_LIBTOOL
70
71
72# _AC_PROG_LIBTOOL
73# ----------------
74AC_DEFUN([_AC_PROG_LIBTOOL],
75[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79
80# This can be used to rebuild libtool when needed
81LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
82
83# Always use our own libtool.
84LIBTOOL='$(SHELL) $(top_builddir)/libtool'
85AC_SUBST(LIBTOOL)dnl
86
87# Prevent multiple expansion
88define([AC_PROG_LIBTOOL], [])
89])# _AC_PROG_LIBTOOL
90
91
92# AC_LIBTOOL_SETUP
93# ----------------
94AC_DEFUN([AC_LIBTOOL_SETUP],
95[AC_PREREQ(2.50)dnl
96AC_REQUIRE([AC_ENABLE_SHARED])dnl
97AC_REQUIRE([AC_ENABLE_STATIC])dnl
98AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99AC_REQUIRE([AC_CANONICAL_HOST])dnl
100AC_REQUIRE([AC_CANONICAL_BUILD])dnl
101AC_REQUIRE([AC_PROG_CC])dnl
102AC_REQUIRE([AC_PROG_LD])dnl
103AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104AC_REQUIRE([AC_PROG_NM])dnl
105
106AC_REQUIRE([AC_PROG_LN_S])dnl
107AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109AC_REQUIRE([AC_OBJEXT])dnl
110AC_REQUIRE([AC_EXEEXT])dnl
111dnl
112
113AC_LIBTOOL_SYS_MAX_CMD_LEN
114AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
115AC_LIBTOOL_OBJDIR
116
117AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
118_LT_AC_PROG_ECHO_BACKSLASH
119
120case $host_os in
121aix3*)
122 # AIX sometimes has problems with the GCC collect2 program. For some
123 # reason, if we set the COLLECT_NAMES environment variable, the problems
124 # vanish in a puff of smoke.
125 if test "X${COLLECT_NAMES+set}" != Xset; then
126 COLLECT_NAMES=
127 export COLLECT_NAMES
128 fi
129 ;;
130esac
131
132# Sed substitution that helps us do robust quoting. It backslashifies
133# metacharacters that are still active within double-quoted strings.
134Xsed='sed -e 1s/^X//'
135[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
136
137# Same as above, but do not quote variable references.
138[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
139
140# Sed substitution to delay expansion of an escaped shell variable in a
141# double_quote_subst'ed string.
142delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
143
144# Sed substitution to avoid accidental globbing in evaled expressions
145no_glob_subst='s/\*/\\\*/g'
146
147# Constants:
148rm="rm -f"
149
150# Global variables:
151default_ofile=libtool
152can_build_shared=yes
153
154# All known linkers require a `.a' archive for static linking (except MSVC,
155# which needs '.lib').
156libext=a
157ltmain="$ac_aux_dir/ltmain.sh"
158ofile="$default_ofile"
159with_gnu_ld="$lt_cv_prog_gnu_ld"
160
161AC_CHECK_TOOL(AR, ar, false)
162AC_CHECK_TOOL(RANLIB, ranlib, :)
163AC_CHECK_TOOL(STRIP, strip, :)
164
165old_CC="$CC"
166old_CFLAGS="$CFLAGS"
167
168# Set sane defaults for various variables
169test -z "$AR" && AR=ar
170test -z "$AR_FLAGS" && AR_FLAGS=cru
171test -z "$AS" && AS=as
172test -z "$CC" && CC=cc
173test -z "$LTCC" && LTCC=$CC
174test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
175test -z "$DLLTOOL" && DLLTOOL=dlltool
176test -z "$LD" && LD=ld
177test -z "$LN_S" && LN_S="ln -s"
178test -z "$MAGIC_CMD" && MAGIC_CMD=file
179test -z "$NM" && NM=nm
180test -z "$SED" && SED=sed
181test -z "$OBJDUMP" && OBJDUMP=objdump
182test -z "$RANLIB" && RANLIB=:
183test -z "$STRIP" && STRIP=:
184test -z "$ac_objext" && ac_objext=o
185
186# Determine commands to create old-style static archives.
0fde1ce3 187old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
d9898ee8 188old_postinstall_cmds='chmod 644 $oldlib'
189old_postuninstall_cmds=
190
191if test -n "$RANLIB"; then
192 case $host_os in
193 openbsd*)
194 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
195 ;;
196 *)
197 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
198 ;;
199 esac
200 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
201fi
202
203_LT_CC_BASENAME([$compiler])
204
205# Only perform the check for file, if the check method requires it
206case $deplibs_check_method in
207file_magic*)
208 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
209 AC_PATH_MAGIC
210 fi
211 ;;
212esac
213
214AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
215AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
216enable_win32_dll=yes, enable_win32_dll=no)
217
218AC_ARG_ENABLE([libtool-lock],
219 [AC_HELP_STRING([--disable-libtool-lock],
220 [avoid locking (might break parallel builds)])])
221test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
222
223AC_ARG_WITH([pic],
224 [AC_HELP_STRING([--with-pic],
225 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
226 [pic_mode="$withval"],
227 [pic_mode=default])
228test -z "$pic_mode" && pic_mode=default
229
230# Use C for the default configuration in the libtool script
231tagname=
232AC_LIBTOOL_LANG_C_CONFIG
233_LT_AC_TAGCONFIG
234])# AC_LIBTOOL_SETUP
235
236
237# _LT_AC_SYS_COMPILER
238# -------------------
239AC_DEFUN([_LT_AC_SYS_COMPILER],
240[AC_REQUIRE([AC_PROG_CC])dnl
241
242# If no C compiler was specified, use CC.
243LTCC=${LTCC-"$CC"}
244
245# If no C compiler flags were specified, use CFLAGS.
246LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
247
248# Allow CC to be a program name with arguments.
249compiler=$CC
250])# _LT_AC_SYS_COMPILER
251
252
253# _LT_CC_BASENAME(CC)
254# -------------------
255# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
256AC_DEFUN([_LT_CC_BASENAME],
257[for cc_temp in $1""; do
258 case $cc_temp in
259 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
260 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
261 \-*) ;;
262 *) break;;
263 esac
264done
265cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
266])
267
268
269# _LT_COMPILER_BOILERPLATE
270# ------------------------
271# Check for compiler boilerplate output or warnings with
272# the simple compiler test code.
273AC_DEFUN([_LT_COMPILER_BOILERPLATE],
0fde1ce3 274[AC_REQUIRE([LT_AC_PROG_SED])dnl
275ac_outfile=conftest.$ac_objext
276echo "$lt_simple_compile_test_code" >conftest.$ac_ext
d9898ee8 277eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
278_lt_compiler_boilerplate=`cat conftest.err`
279$rm conftest*
280])# _LT_COMPILER_BOILERPLATE
281
282
283# _LT_LINKER_BOILERPLATE
284# ----------------------
285# Check for linker boilerplate output or warnings with
286# the simple link test code.
287AC_DEFUN([_LT_LINKER_BOILERPLATE],
0fde1ce3 288[AC_REQUIRE([LT_AC_PROG_SED])dnl
289ac_outfile=conftest.$ac_objext
290echo "$lt_simple_link_test_code" >conftest.$ac_ext
d9898ee8 291eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
292_lt_linker_boilerplate=`cat conftest.err`
293$rm conftest*
294])# _LT_LINKER_BOILERPLATE
295
296
297# _LT_AC_SYS_LIBPATH_AIX
298# ----------------------
299# Links a minimal program and checks the executable
300# for the system default hardcoded library path. In most cases,
301# this is /usr/lib:/lib, but when the MPI compilers are used
302# the location of the communication and MPI libs are included too.
303# If we don't find anything, use the default library path according
304# to the aix ld manual.
305AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
0fde1ce3 306[AC_REQUIRE([LT_AC_PROG_SED])dnl
307AC_LINK_IFELSE(AC_LANG_PROGRAM,[
308lt_aix_libpath_sed='
309 /Import File Strings/,/^$/ {
310 /^0/ {
311 s/^0 *\(.*\)$/\1/
312 p
313 }
314 }'
315aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
d9898ee8 316# Check for a 64-bit object if we didn't find anything.
0fde1ce3 317if test -z "$aix_libpath"; then
318 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
319fi],[])
d9898ee8 320if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
321])# _LT_AC_SYS_LIBPATH_AIX
322
323
324# _LT_AC_SHELL_INIT(ARG)
325# ----------------------
326AC_DEFUN([_LT_AC_SHELL_INIT],
327[ifdef([AC_DIVERSION_NOTICE],
328 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
329 [AC_DIVERT_PUSH(NOTICE)])
330$1
331AC_DIVERT_POP
332])# _LT_AC_SHELL_INIT
333
334
335# _LT_AC_PROG_ECHO_BACKSLASH
336# --------------------------
337# Add some code to the start of the generated configure script which
338# will find an echo command which doesn't interpret backslashes.
339AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
340[_LT_AC_SHELL_INIT([
341# Check that we are running under the correct shell.
342SHELL=${CONFIG_SHELL-/bin/sh}
343
344case X$ECHO in
345X*--fallback-echo)
346 # Remove one level of quotation (which was required for Make).
347 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
348 ;;
349esac
350
351echo=${ECHO-echo}
352if test "X[$]1" = X--no-reexec; then
353 # Discard the --no-reexec flag, and continue.
354 shift
355elif test "X[$]1" = X--fallback-echo; then
356 # Avoid inline document here, it may be left over
357 :
358elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
359 # Yippee, $echo works!
360 :
361else
362 # Restart under the correct shell.
363 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
364fi
365
366if test "X[$]1" = X--fallback-echo; then
367 # used as fallback echo
368 shift
369 cat <<EOF
370[$]*
371EOF
372 exit 0
373fi
374
375# The HP-UX ksh and POSIX shell print the target directory to stdout
376# if CDPATH is set.
377(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
378
379if test -z "$ECHO"; then
380if test "X${echo_test_string+set}" != Xset; then
381# find a string as large as possible, as long as the shell can cope with it
382 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
383 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
384 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
385 echo_test_string=`eval $cmd` &&
386 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
387 then
388 break
389 fi
390 done
391fi
392
393if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
394 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
395 test "X$echo_testing_string" = "X$echo_test_string"; then
396 :
397else
398 # The Solaris, AIX, and Digital Unix default echo programs unquote
399 # backslashes. This makes it impossible to quote backslashes using
400 # echo "$something" | sed 's/\\/\\\\/g'
401 #
402 # So, first we look for a working echo in the user's PATH.
403
404 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
405 for dir in $PATH /usr/ucb; do
406 IFS="$lt_save_ifs"
407 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
408 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
409 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
410 test "X$echo_testing_string" = "X$echo_test_string"; then
411 echo="$dir/echo"
412 break
413 fi
414 done
415 IFS="$lt_save_ifs"
416
417 if test "X$echo" = Xecho; then
418 # We didn't find a better echo, so look for alternatives.
419 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
420 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
421 test "X$echo_testing_string" = "X$echo_test_string"; then
422 # This shell has a builtin print -r that does the trick.
423 echo='print -r'
424 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
425 test "X$CONFIG_SHELL" != X/bin/ksh; then
426 # If we have ksh, try running configure again with it.
427 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
428 export ORIGINAL_CONFIG_SHELL
429 CONFIG_SHELL=/bin/ksh
430 export CONFIG_SHELL
431 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
432 else
433 # Try using printf.
434 echo='printf %s\n'
435 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
436 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
437 test "X$echo_testing_string" = "X$echo_test_string"; then
438 # Cool, printf works
439 :
440 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
441 test "X$echo_testing_string" = 'X\t' &&
442 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
443 test "X$echo_testing_string" = "X$echo_test_string"; then
444 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
445 export CONFIG_SHELL
446 SHELL="$CONFIG_SHELL"
447 export SHELL
448 echo="$CONFIG_SHELL [$]0 --fallback-echo"
449 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
450 test "X$echo_testing_string" = 'X\t' &&
451 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
452 test "X$echo_testing_string" = "X$echo_test_string"; then
453 echo="$CONFIG_SHELL [$]0 --fallback-echo"
454 else
455 # maybe with a smaller string...
456 prev=:
457
458 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
459 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
460 then
461 break
462 fi
463 prev="$cmd"
464 done
465
466 if test "$prev" != 'sed 50q "[$]0"'; then
467 echo_test_string=`eval $prev`
468 export echo_test_string
469 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
470 else
471 # Oops. We lost completely, so just stick with echo.
472 echo=echo
473 fi
474 fi
475 fi
476 fi
477fi
478fi
479
480# Copy echo and quote the copy suitably for passing to libtool from
481# the Makefile, instead of quoting the original, which is used later.
482ECHO=$echo
483if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
484 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
485fi
486
487AC_SUBST(ECHO)
488])])# _LT_AC_PROG_ECHO_BACKSLASH
489
490
491# _LT_AC_LOCK
492# -----------
493AC_DEFUN([_LT_AC_LOCK],
494[AC_ARG_ENABLE([libtool-lock],
495 [AC_HELP_STRING([--disable-libtool-lock],
496 [avoid locking (might break parallel builds)])])
497test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
498
499# Some flags need to be propagated to the compiler or linker for good
500# libtool support.
501case $host in
502ia64-*-hpux*)
503 # Find out which ABI we are using.
504 echo 'int i;' > conftest.$ac_ext
505 if AC_TRY_EVAL(ac_compile); then
506 case `/usr/bin/file conftest.$ac_objext` in
507 *ELF-32*)
508 HPUX_IA64_MODE="32"
509 ;;
510 *ELF-64*)
511 HPUX_IA64_MODE="64"
512 ;;
513 esac
514 fi
515 rm -rf conftest*
516 ;;
517*-*-irix6*)
518 # Find out which ABI we are using.
519 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
520 if AC_TRY_EVAL(ac_compile); then
521 if test "$lt_cv_prog_gnu_ld" = yes; then
522 case `/usr/bin/file conftest.$ac_objext` in
523 *32-bit*)
524 LD="${LD-ld} -melf32bsmip"
525 ;;
526 *N32*)
527 LD="${LD-ld} -melf32bmipn32"
528 ;;
529 *64-bit*)
530 LD="${LD-ld} -melf64bmip"
531 ;;
532 esac
533 else
534 case `/usr/bin/file conftest.$ac_objext` in
535 *32-bit*)
536 LD="${LD-ld} -32"
537 ;;
538 *N32*)
539 LD="${LD-ld} -n32"
540 ;;
541 *64-bit*)
542 LD="${LD-ld} -64"
543 ;;
544 esac
545 fi
546 fi
547 rm -rf conftest*
548 ;;
549
0fde1ce3 550x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
551s390*-*linux*|sparc*-*linux*)
d9898ee8 552 # Find out which ABI we are using.
553 echo 'int i;' > conftest.$ac_ext
554 if AC_TRY_EVAL(ac_compile); then
555 case `/usr/bin/file conftest.o` in
556 *32-bit*)
557 case $host in
0fde1ce3 558 x86_64-*kfreebsd*-gnu)
559 LD="${LD-ld} -m elf_i386_fbsd"
560 ;;
d9898ee8 561 x86_64-*linux*)
562 LD="${LD-ld} -m elf_i386"
563 ;;
564 ppc64-*linux*|powerpc64-*linux*)
565 LD="${LD-ld} -m elf32ppclinux"
566 ;;
567 s390x-*linux*)
568 LD="${LD-ld} -m elf_s390"
569 ;;
570 sparc64-*linux*)
571 LD="${LD-ld} -m elf32_sparc"
572 ;;
573 esac
574 ;;
575 *64-bit*)
0fde1ce3 576 libsuff=64
d9898ee8 577 case $host in
0fde1ce3 578 x86_64-*kfreebsd*-gnu)
579 LD="${LD-ld} -m elf_x86_64_fbsd"
580 ;;
d9898ee8 581 x86_64-*linux*)
582 LD="${LD-ld} -m elf_x86_64"
583 ;;
584 ppc*-*linux*|powerpc*-*linux*)
585 LD="${LD-ld} -m elf64ppc"
586 ;;
587 s390*-*linux*)
588 LD="${LD-ld} -m elf64_s390"
589 ;;
590 sparc*-*linux*)
591 LD="${LD-ld} -m elf64_sparc"
592 ;;
593 esac
594 ;;
595 esac
596 fi
597 rm -rf conftest*
598 ;;
599
600*-*-sco3.2v5*)
601 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
602 SAVE_CFLAGS="$CFLAGS"
603 CFLAGS="$CFLAGS -belf"
604 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
605 [AC_LANG_PUSH(C)
606 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
607 AC_LANG_POP])
608 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
609 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
610 CFLAGS="$SAVE_CFLAGS"
611 fi
612 ;;
613sparc*-*solaris*)
614 # Find out which ABI we are using.
615 echo 'int i;' > conftest.$ac_ext
616 if AC_TRY_EVAL(ac_compile); then
617 case `/usr/bin/file conftest.o` in
618 *64-bit*)
619 case $lt_cv_prog_gnu_ld in
620 yes*) LD="${LD-ld} -m elf64_sparc" ;;
621 *) LD="${LD-ld} -64" ;;
622 esac
623 ;;
624 esac
625 fi
626 rm -rf conftest*
627 ;;
628
629AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
630[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
631 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
632 AC_CHECK_TOOL(AS, as, false)
633 AC_CHECK_TOOL(OBJDUMP, objdump, false)
634 ;;
635 ])
636esac
637
638need_locks="$enable_libtool_lock"
639
640])# _LT_AC_LOCK
641
642
643# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
644# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
645# ----------------------------------------------------------------
646# Check whether the given compiler option works
647AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
648[AC_REQUIRE([LT_AC_PROG_SED])
649AC_CACHE_CHECK([$1], [$2],
650 [$2=no
651 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
0fde1ce3 652 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
d9898ee8 653 lt_compiler_flag="$3"
654 # Insert the option either (1) after the last *FLAGS variable, or
655 # (2) before a word containing "conftest.", or (3) at the end.
656 # Note that $ac_compile itself does not contain backslashes and begins
657 # with a dollar sign (not a hyphen), so the echo should work correctly.
658 # The option is referenced via a variable to avoid confusing sed.
659 lt_compile=`echo "$ac_compile" | $SED \
660 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
661 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
662 -e 's:$: $lt_compiler_flag:'`
663 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
664 (eval "$lt_compile" 2>conftest.err)
665 ac_status=$?
666 cat conftest.err >&AS_MESSAGE_LOG_FD
667 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
668 if (exit $ac_status) && test -s "$ac_outfile"; then
669 # The compiler can only warn and ignore the option if not recognized
670 # So say no if there are warnings other than the usual output.
671 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
672 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
673 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
674 $2=yes
675 fi
676 fi
677 $rm conftest*
678])
679
680if test x"[$]$2" = xyes; then
681 ifelse([$5], , :, [$5])
682else
683 ifelse([$6], , :, [$6])
684fi
685])# AC_LIBTOOL_COMPILER_OPTION
686
687
688# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
689# [ACTION-SUCCESS], [ACTION-FAILURE])
690# ------------------------------------------------------------
691# Check whether the given compiler option works
692AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
0fde1ce3 693[AC_REQUIRE([LT_AC_PROG_SED])dnl
694AC_CACHE_CHECK([$1], [$2],
d9898ee8 695 [$2=no
696 save_LDFLAGS="$LDFLAGS"
697 LDFLAGS="$LDFLAGS $3"
0fde1ce3 698 echo "$lt_simple_link_test_code" > conftest.$ac_ext
d9898ee8 699 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
700 # The linker can only warn and ignore the option if not recognized
701 # So say no if there are warnings
702 if test -s conftest.err; then
703 # Append any errors to the config.log.
704 cat conftest.err 1>&AS_MESSAGE_LOG_FD
705 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
706 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
707 if diff conftest.exp conftest.er2 >/dev/null; then
708 $2=yes
709 fi
710 else
711 $2=yes
712 fi
713 fi
714 $rm conftest*
715 LDFLAGS="$save_LDFLAGS"
716])
717
718if test x"[$]$2" = xyes; then
719 ifelse([$4], , :, [$4])
720else
721 ifelse([$5], , :, [$5])
722fi
723])# AC_LIBTOOL_LINKER_OPTION
724
725
726# AC_LIBTOOL_SYS_MAX_CMD_LEN
727# --------------------------
728AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
729[# find the maximum length of command line arguments
730AC_MSG_CHECKING([the maximum length of command line arguments])
731AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
732 i=0
733 teststring="ABCD"
734
735 case $build_os in
736 msdosdjgpp*)
737 # On DJGPP, this test can blow up pretty badly due to problems in libc
738 # (any single argument exceeding 2000 bytes causes a buffer overrun
739 # during glob expansion). Even if it were fixed, the result of this
740 # check would be larger than it should be.
741 lt_cv_sys_max_cmd_len=12288; # 12K is about right
742 ;;
743
744 gnu*)
745 # Under GNU Hurd, this test is not required because there is
746 # no limit to the length of command line arguments.
747 # Libtool will interpret -1 as no limit whatsoever
748 lt_cv_sys_max_cmd_len=-1;
749 ;;
750
751 cygwin* | mingw*)
752 # On Win9x/ME, this test blows up -- it succeeds, but takes
753 # about 5 minutes as the teststring grows exponentially.
754 # Worse, since 9x/ME are not pre-emptively multitasking,
755 # you end up with a "frozen" computer, even though with patience
756 # the test eventually succeeds (with a max line length of 256k).
757 # Instead, let's just punt: use the minimum linelength reported by
758 # all of the supported platforms: 8192 (on NT/2K/XP).
759 lt_cv_sys_max_cmd_len=8192;
760 ;;
761
762 amigaos*)
763 # On AmigaOS with pdksh, this test takes hours, literally.
764 # So we just punt and use a minimum line length of 8192.
765 lt_cv_sys_max_cmd_len=8192;
766 ;;
767
768 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
769 # This has been around since 386BSD, at least. Likely further.
770 if test -x /sbin/sysctl; then
771 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
772 elif test -x /usr/sbin/sysctl; then
773 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
774 else
775 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
776 fi
777 # And add a safety zone
778 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
779 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
780 ;;
781
782 interix*)
783 # We know the value 262144 and hardcode it with a safety zone (like BSD)
784 lt_cv_sys_max_cmd_len=196608
785 ;;
786
787 osf*)
788 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
789 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
790 # nice to cause kernel panics so lets avoid the loop below.
791 # First set a reasonable default.
792 lt_cv_sys_max_cmd_len=16384
793 #
794 if test -x /sbin/sysconfig; then
795 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
796 *1*) lt_cv_sys_max_cmd_len=-1 ;;
797 esac
798 fi
799 ;;
800 sco3.2v5*)
801 lt_cv_sys_max_cmd_len=102400
802 ;;
803 sysv5* | sco5v6* | sysv4.2uw2*)
804 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
805 if test -n "$kargmax"; then
806 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
807 else
808 lt_cv_sys_max_cmd_len=32768
809 fi
810 ;;
811 *)
0fde1ce3 812 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
813 if test -n "$lt_cv_sys_max_cmd_len"; then
814 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
815 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
816 else
817 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
818 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
d9898ee8 819 = "XX$teststring") >/dev/null 2>&1 &&
0fde1ce3 820 new_result=`expr "X$teststring" : ".*" 2>&1` &&
821 lt_cv_sys_max_cmd_len=$new_result &&
822 test $i != 17 # 1/2 MB should be enough
823 do
824 i=`expr $i + 1`
825 teststring=$teststring$teststring
826 done
827 teststring=
828 # Add a significant safety factor because C++ compilers can tack on massive
829 # amounts of additional arguments before passing them to the linker.
830 # It appears as though 1/2 is a usable value.
831 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
832 fi
d9898ee8 833 ;;
834 esac
835])
836if test -n $lt_cv_sys_max_cmd_len ; then
837 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
838else
839 AC_MSG_RESULT(none)
840fi
841])# AC_LIBTOOL_SYS_MAX_CMD_LEN
842
843
844# _LT_AC_CHECK_DLFCN
845# ------------------
846AC_DEFUN([_LT_AC_CHECK_DLFCN],
847[AC_CHECK_HEADERS(dlfcn.h)dnl
848])# _LT_AC_CHECK_DLFCN
849
850
851# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
852# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
853# ---------------------------------------------------------------------
854AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
855[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
856if test "$cross_compiling" = yes; then :
857 [$4]
858else
859 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
860 lt_status=$lt_dlunknown
861 cat > conftest.$ac_ext <<EOF
862[#line __oline__ "configure"
863#include "confdefs.h"
864
865#if HAVE_DLFCN_H
866#include <dlfcn.h>
867#endif
868
869#include <stdio.h>
870
871#ifdef RTLD_GLOBAL
872# define LT_DLGLOBAL RTLD_GLOBAL
873#else
874# ifdef DL_GLOBAL
875# define LT_DLGLOBAL DL_GLOBAL
876# else
877# define LT_DLGLOBAL 0
878# endif
879#endif
880
881/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
882 find out it does not work in some platform. */
883#ifndef LT_DLLAZY_OR_NOW
884# ifdef RTLD_LAZY
885# define LT_DLLAZY_OR_NOW RTLD_LAZY
886# else
887# ifdef DL_LAZY
888# define LT_DLLAZY_OR_NOW DL_LAZY
889# else
890# ifdef RTLD_NOW
891# define LT_DLLAZY_OR_NOW RTLD_NOW
892# else
893# ifdef DL_NOW
894# define LT_DLLAZY_OR_NOW DL_NOW
895# else
896# define LT_DLLAZY_OR_NOW 0
897# endif
898# endif
899# endif
900# endif
901#endif
902
903#ifdef __cplusplus
904extern "C" void exit (int);
905#endif
906
907void fnord() { int i=42;}
908int main ()
909{
910 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
911 int status = $lt_dlunknown;
912
913 if (self)
914 {
915 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
916 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
917 /* dlclose (self); */
918 }
919 else
920 puts (dlerror ());
921
922 exit (status);
923}]
924EOF
925 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
926 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
927 lt_status=$?
928 case x$lt_status in
929 x$lt_dlno_uscore) $1 ;;
930 x$lt_dlneed_uscore) $2 ;;
931 x$lt_dlunknown|x*) $3 ;;
932 esac
933 else :
934 # compilation failed
935 $3
936 fi
937fi
938rm -fr conftest*
939])# _LT_AC_TRY_DLOPEN_SELF
940
941
942# AC_LIBTOOL_DLOPEN_SELF
943# ----------------------
944AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
945[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
946if test "x$enable_dlopen" != xyes; then
947 enable_dlopen=unknown
948 enable_dlopen_self=unknown
949 enable_dlopen_self_static=unknown
950else
951 lt_cv_dlopen=no
952 lt_cv_dlopen_libs=
953
954 case $host_os in
955 beos*)
956 lt_cv_dlopen="load_add_on"
957 lt_cv_dlopen_libs=
958 lt_cv_dlopen_self=yes
959 ;;
960
961 mingw* | pw32*)
962 lt_cv_dlopen="LoadLibrary"
963 lt_cv_dlopen_libs=
964 ;;
965
966 cygwin*)
967 lt_cv_dlopen="dlopen"
968 lt_cv_dlopen_libs=
969 ;;
970
971 darwin*)
972 # if libdl is installed we need to link against it
973 AC_CHECK_LIB([dl], [dlopen],
974 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
975 lt_cv_dlopen="dyld"
976 lt_cv_dlopen_libs=
977 lt_cv_dlopen_self=yes
978 ])
979 ;;
980
981 *)
982 AC_CHECK_FUNC([shl_load],
983 [lt_cv_dlopen="shl_load"],
984 [AC_CHECK_LIB([dld], [shl_load],
985 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
986 [AC_CHECK_FUNC([dlopen],
987 [lt_cv_dlopen="dlopen"],
988 [AC_CHECK_LIB([dl], [dlopen],
989 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
990 [AC_CHECK_LIB([svld], [dlopen],
991 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
992 [AC_CHECK_LIB([dld], [dld_link],
993 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
994 ])
995 ])
996 ])
997 ])
998 ])
999 ;;
1000 esac
1001
1002 if test "x$lt_cv_dlopen" != xno; then
1003 enable_dlopen=yes
1004 else
1005 enable_dlopen=no
1006 fi
1007
1008 case $lt_cv_dlopen in
1009 dlopen)
1010 save_CPPFLAGS="$CPPFLAGS"
1011 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1012
1013 save_LDFLAGS="$LDFLAGS"
1014 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1015
1016 save_LIBS="$LIBS"
1017 LIBS="$lt_cv_dlopen_libs $LIBS"
1018
1019 AC_CACHE_CHECK([whether a program can dlopen itself],
1020 lt_cv_dlopen_self, [dnl
1021 _LT_AC_TRY_DLOPEN_SELF(
1022 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1023 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1024 ])
1025
1026 if test "x$lt_cv_dlopen_self" = xyes; then
1027 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1028 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1029 lt_cv_dlopen_self_static, [dnl
1030 _LT_AC_TRY_DLOPEN_SELF(
1031 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1032 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1033 ])
1034 fi
1035
1036 CPPFLAGS="$save_CPPFLAGS"
1037 LDFLAGS="$save_LDFLAGS"
1038 LIBS="$save_LIBS"
1039 ;;
1040 esac
1041
1042 case $lt_cv_dlopen_self in
1043 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1044 *) enable_dlopen_self=unknown ;;
1045 esac
1046
1047 case $lt_cv_dlopen_self_static in
1048 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1049 *) enable_dlopen_self_static=unknown ;;
1050 esac
1051fi
1052])# AC_LIBTOOL_DLOPEN_SELF
1053
1054
1055# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1056# ---------------------------------
1057# Check to see if options -c and -o are simultaneously supported by compiler
1058AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
0fde1ce3 1059[AC_REQUIRE([LT_AC_PROG_SED])dnl
1060AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
d9898ee8 1061AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1062 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1063 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1064 $rm -r conftest 2>/dev/null
1065 mkdir conftest
1066 cd conftest
1067 mkdir out
0fde1ce3 1068 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
d9898ee8 1069
1070 lt_compiler_flag="-o out/conftest2.$ac_objext"
1071 # Insert the option either (1) after the last *FLAGS variable, or
1072 # (2) before a word containing "conftest.", or (3) at the end.
1073 # Note that $ac_compile itself does not contain backslashes and begins
1074 # with a dollar sign (not a hyphen), so the echo should work correctly.
1075 lt_compile=`echo "$ac_compile" | $SED \
1076 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1077 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1078 -e 's:$: $lt_compiler_flag:'`
1079 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1080 (eval "$lt_compile" 2>out/conftest.err)
1081 ac_status=$?
1082 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1083 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1084 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1085 then
1086 # The compiler can only warn and ignore the option if not recognized
1087 # So say no if there are warnings
1088 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1089 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1090 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1091 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1092 fi
1093 fi
1094 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1095 $rm conftest*
1096 # SGI C++ compiler will create directory out/ii_files/ for
1097 # template instantiation
1098 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1099 $rm out/* && rmdir out
1100 cd ..
1101 rmdir conftest
1102 $rm conftest*
1103])
1104])# AC_LIBTOOL_PROG_CC_C_O
1105
1106
1107# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1108# -----------------------------------------
1109# Check to see if we can do hard links to lock some files if needed
1110AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1111[AC_REQUIRE([_LT_AC_LOCK])dnl
1112
1113hard_links="nottested"
1114if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1115 # do not overwrite the value of need_locks provided by the user
1116 AC_MSG_CHECKING([if we can lock with hard links])
1117 hard_links=yes
1118 $rm conftest*
1119 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1120 touch conftest.a
1121 ln conftest.a conftest.b 2>&5 || hard_links=no
1122 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1123 AC_MSG_RESULT([$hard_links])
1124 if test "$hard_links" = no; then
1125 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1126 need_locks=warn
1127 fi
1128else
1129 need_locks=no
1130fi
1131])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1132
1133
1134# AC_LIBTOOL_OBJDIR
1135# -----------------
1136AC_DEFUN([AC_LIBTOOL_OBJDIR],
1137[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1138[rm -f .libs 2>/dev/null
1139mkdir .libs 2>/dev/null
1140if test -d .libs; then
1141 lt_cv_objdir=.libs
1142else
1143 # MS-DOS does not allow filenames that begin with a dot.
1144 lt_cv_objdir=_libs
1145fi
1146rmdir .libs 2>/dev/null])
1147objdir=$lt_cv_objdir
1148])# AC_LIBTOOL_OBJDIR
1149
1150
1151# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1152# ----------------------------------------------
1153# Check hardcoding attributes.
1154AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1155[AC_MSG_CHECKING([how to hardcode library paths into programs])
1156_LT_AC_TAGVAR(hardcode_action, $1)=
1157if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1158 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1159 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1160
1161 # We can hardcode non-existant directories.
1162 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1163 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1164 # have to relink, otherwise we might link with an installed library
1165 # when we should be linking with a yet-to-be-installed one
1166 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1167 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1168 # Linking always hardcodes the temporary library directory.
1169 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1170 else
1171 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1172 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1173 fi
1174else
1175 # We cannot hardcode anything, or else we can only hardcode existing
1176 # directories.
1177 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1178fi
1179AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1180
1181if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1182 # Fast installation is not supported
1183 enable_fast_install=no
1184elif test "$shlibpath_overrides_runpath" = yes ||
1185 test "$enable_shared" = no; then
1186 # Fast installation is not necessary
1187 enable_fast_install=needless
1188fi
1189])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1190
1191
1192# AC_LIBTOOL_SYS_LIB_STRIP
1193# ------------------------
1194AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1195[striplib=
1196old_striplib=
1197AC_MSG_CHECKING([whether stripping libraries is possible])
1198if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1199 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1200 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1201 AC_MSG_RESULT([yes])
1202else
1203# FIXME - insert some real tests, host_os isn't really good enough
1204 case $host_os in
1205 darwin*)
1206 if test -n "$STRIP" ; then
1207 striplib="$STRIP -x"
0fde1ce3 1208 old_striplib="$STRIP -S"
d9898ee8 1209 AC_MSG_RESULT([yes])
1210 else
1211 AC_MSG_RESULT([no])
1212fi
1213 ;;
1214 *)
1215 AC_MSG_RESULT([no])
1216 ;;
1217 esac
1218fi
1219])# AC_LIBTOOL_SYS_LIB_STRIP
1220
1221
1222# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1223# -----------------------------
1224# PORTME Fill in your ld.so characteristics
1225AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
0fde1ce3 1226[AC_REQUIRE([LT_AC_PROG_SED])dnl
1227AC_MSG_CHECKING([dynamic linker characteristics])
d9898ee8 1228library_names_spec=
1229libname_spec='lib$name'
1230soname_spec=
1231shrext_cmds=".so"
1232postinstall_cmds=
1233postuninstall_cmds=
1234finish_cmds=
1235finish_eval=
1236shlibpath_var=
1237shlibpath_overrides_runpath=unknown
1238version_type=none
1239dynamic_linker="$host_os ld.so"
1240sys_lib_dlsearch_path_spec="/lib /usr/lib"
0fde1ce3 1241m4_if($1,[],[
d9898ee8 1242if test "$GCC" = yes; then
0fde1ce3 1243 case $host_os in
1244 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1245 *) lt_awk_arg="/^libraries:/" ;;
1246 esac
1247 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1248 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
d9898ee8 1249 # if the path contains ";" then we assume it to be the separator
1250 # otherwise default to the standard path separator (i.e. ":") - it is
1251 # assumed that no part of a normal pathname contains ";" but that should
1252 # okay in the real world where ";" in dirpaths is itself problematic.
0fde1ce3 1253 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
d9898ee8 1254 else
0fde1ce3 1255 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
d9898ee8 1256 fi
0fde1ce3 1257 # Ok, now we have the path, separated by spaces, we can step through it
1258 # and add multilib dir if necessary.
1259 lt_tmp_lt_search_path_spec=
1260 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1261 for lt_sys_path in $lt_search_path_spec; do
1262 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1263 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1264 else
1265 test -d "$lt_sys_path" && \
1266 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1267 fi
1268 done
1269 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1270BEGIN {RS=" "; FS="/|\n";} {
1271 lt_foo="";
1272 lt_count=0;
1273 for (lt_i = NF; lt_i > 0; lt_i--) {
1274 if ($lt_i != "" && $lt_i != ".") {
1275 if ($lt_i == "..") {
1276 lt_count++;
1277 } else {
1278 if (lt_count == 0) {
1279 lt_foo="/" $lt_i lt_foo;
1280 } else {
1281 lt_count--;
1282 }
1283 }
1284 }
1285 }
1286 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1287 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1288}'`
1289 sys_lib_search_path_spec=`echo $lt_search_path_spec`
d9898ee8 1290else
1291 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
0fde1ce3 1292fi])
d9898ee8 1293need_lib_prefix=unknown
1294hardcode_into_libs=no
1295
1296# when you set need_version to no, make sure it does not cause -set_version
1297# flags to be left without arguments
1298need_version=unknown
1299
1300case $host_os in
1301aix3*)
1302 version_type=linux
1303 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1304 shlibpath_var=LIBPATH
1305
1306 # AIX 3 has no versioning support, so we append a major version to the name.
1307 soname_spec='${libname}${release}${shared_ext}$major'
1308 ;;
1309
1310aix4* | aix5*)
1311 version_type=linux
1312 need_lib_prefix=no
1313 need_version=no
1314 hardcode_into_libs=yes
1315 if test "$host_cpu" = ia64; then
1316 # AIX 5 supports IA64
1317 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1318 shlibpath_var=LD_LIBRARY_PATH
1319 else
1320 # With GCC up to 2.95.x, collect2 would create an import file
1321 # for dependence libraries. The import file would start with
1322 # the line `#! .'. This would cause the generated library to
1323 # depend on `.', always an invalid library. This was fixed in
1324 # development snapshots of GCC prior to 3.0.
1325 case $host_os in
1326 aix4 | aix4.[[01]] | aix4.[[01]].*)
1327 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1328 echo ' yes '
1329 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1330 :
1331 else
1332 can_build_shared=no
1333 fi
1334 ;;
1335 esac
1336 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1337 # soname into executable. Probably we can add versioning support to
1338 # collect2, so additional links can be useful in future.
1339 if test "$aix_use_runtimelinking" = yes; then
1340 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1341 # instead of lib<name>.a to let people know that these are not
1342 # typical AIX shared libraries.
1343 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1344 else
1345 # We preserve .a as extension for shared libraries through AIX4.2
1346 # and later when we are not doing run time linking.
1347 library_names_spec='${libname}${release}.a $libname.a'
1348 soname_spec='${libname}${release}${shared_ext}$major'
1349 fi
1350 shlibpath_var=LIBPATH
1351 fi
1352 ;;
1353
1354amigaos*)
1355 library_names_spec='$libname.ixlibrary $libname.a'
1356 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1357 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'
1358 ;;
1359
1360beos*)
1361 library_names_spec='${libname}${shared_ext}'
1362 dynamic_linker="$host_os ld.so"
1363 shlibpath_var=LIBRARY_PATH
1364 ;;
1365
1366bsdi[[45]]*)
1367 version_type=linux
1368 need_version=no
1369 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1370 soname_spec='${libname}${release}${shared_ext}$major'
1371 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1372 shlibpath_var=LD_LIBRARY_PATH
1373 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1374 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1375 # the default ld.so.conf also contains /usr/contrib/lib and
1376 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1377 # libtool to hard-code these into programs
1378 ;;
1379
1380cygwin* | mingw* | pw32*)
1381 version_type=windows
1382 shrext_cmds=".dll"
1383 need_version=no
1384 need_lib_prefix=no
1385
1386 case $GCC,$host_os in
1387 yes,cygwin* | yes,mingw* | yes,pw32*)
1388 library_names_spec='$libname.dll.a'
1389 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1390 postinstall_cmds='base_file=`basename \${file}`~
1391 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1392 dldir=$destdir/`dirname \$dlpath`~
1393 test -d \$dldir || mkdir -p \$dldir~
1394 $install_prog $dir/$dlname \$dldir/$dlname~
1395 chmod a+x \$dldir/$dlname'
1396 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1397 dlpath=$dir/\$dldll~
1398 $rm \$dlpath'
1399 shlibpath_overrides_runpath=yes
1400
1401 case $host_os in
1402 cygwin*)
1403 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1404 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1405 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1406 ;;
1407 mingw*)
1408 # MinGW DLLs use traditional 'lib' prefix
1409 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1410 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1411 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1412 # It is most probably a Windows format PATH printed by
1413 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1414 # path with ; separators, and with drive letters. We can handle the
1415 # drive letters (cygwin fileutils understands them), so leave them,
1416 # especially as we might pass files found there to a mingw objdump,
1417 # which wouldn't understand a cygwinified path. Ahh.
1418 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1419 else
1420 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1421 fi
1422 ;;
1423 pw32*)
1424 # pw32 DLLs use 'pw' prefix rather than 'lib'
1425 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1426 ;;
1427 esac
1428 ;;
1429
1430 *)
1431 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1432 ;;
1433 esac
1434 dynamic_linker='Win32 ld.exe'
1435 # FIXME: first we should search . and the directory the executable is in
1436 shlibpath_var=PATH
1437 ;;
1438
1439darwin* | rhapsody*)
1440 dynamic_linker="$host_os dyld"
1441 version_type=darwin
1442 need_lib_prefix=no
1443 need_version=no
1444 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1445 soname_spec='${libname}${release}${major}$shared_ext'
1446 shlibpath_overrides_runpath=yes
1447 shlibpath_var=DYLD_LIBRARY_PATH
1448 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
0fde1ce3 1449 m4_if([$1], [],[
1450 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
d9898ee8 1451 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1452 ;;
1453
1454dgux*)
1455 version_type=linux
1456 need_lib_prefix=no
1457 need_version=no
1458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1459 soname_spec='${libname}${release}${shared_ext}$major'
1460 shlibpath_var=LD_LIBRARY_PATH
1461 ;;
1462
1463freebsd1*)
1464 dynamic_linker=no
1465 ;;
1466
d9898ee8 1467freebsd* | dragonfly*)
1468 # DragonFly does not have aout. When/if they implement a new
1469 # versioning mechanism, adjust this.
1470 if test -x /usr/bin/objformat; then
1471 objformat=`/usr/bin/objformat`
1472 else
1473 case $host_os in
1474 freebsd[[123]]*) objformat=aout ;;
1475 *) objformat=elf ;;
1476 esac
1477 fi
1478 version_type=freebsd-$objformat
1479 case $version_type in
1480 freebsd-elf*)
1481 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1482 need_version=no
1483 need_lib_prefix=no
1484 ;;
1485 freebsd-*)
1486 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1487 need_version=yes
1488 ;;
1489 esac
1490 shlibpath_var=LD_LIBRARY_PATH
1491 case $host_os in
1492 freebsd2*)
1493 shlibpath_overrides_runpath=yes
1494 ;;
1495 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1496 shlibpath_overrides_runpath=yes
1497 hardcode_into_libs=yes
1498 ;;
1499 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1500 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1501 shlibpath_overrides_runpath=no
1502 hardcode_into_libs=yes
1503 ;;
0fde1ce3 1504 *) # from 4.6 on, and DragonFly
d9898ee8 1505 shlibpath_overrides_runpath=yes
1506 hardcode_into_libs=yes
1507 ;;
1508 esac
1509 ;;
1510
1511gnu*)
1512 version_type=linux
1513 need_lib_prefix=no
1514 need_version=no
1515 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1516 soname_spec='${libname}${release}${shared_ext}$major'
1517 shlibpath_var=LD_LIBRARY_PATH
1518 hardcode_into_libs=yes
1519 ;;
1520
1521hpux9* | hpux10* | hpux11*)
1522 # Give a soname corresponding to the major version so that dld.sl refuses to
1523 # link against other versions.
1524 version_type=sunos
1525 need_lib_prefix=no
1526 need_version=no
1527 case $host_cpu in
1528 ia64*)
1529 shrext_cmds='.so'
1530 hardcode_into_libs=yes
1531 dynamic_linker="$host_os dld.so"
1532 shlibpath_var=LD_LIBRARY_PATH
1533 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1535 soname_spec='${libname}${release}${shared_ext}$major'
1536 if test "X$HPUX_IA64_MODE" = X32; then
1537 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1538 else
1539 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1540 fi
1541 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1542 ;;
1543 hppa*64*)
1544 shrext_cmds='.sl'
1545 hardcode_into_libs=yes
1546 dynamic_linker="$host_os dld.sl"
1547 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1548 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1550 soname_spec='${libname}${release}${shared_ext}$major'
1551 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1552 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1553 ;;
1554 *)
1555 shrext_cmds='.sl'
1556 dynamic_linker="$host_os dld.sl"
1557 shlibpath_var=SHLIB_PATH
1558 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1559 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1560 soname_spec='${libname}${release}${shared_ext}$major'
1561 ;;
1562 esac
1563 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1564 postinstall_cmds='chmod 555 $lib'
1565 ;;
1566
0fde1ce3 1567interix[[3-9]]*)
d9898ee8 1568 version_type=linux
1569 need_lib_prefix=no
1570 need_version=no
1571 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1572 soname_spec='${libname}${release}${shared_ext}$major'
1573 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1574 shlibpath_var=LD_LIBRARY_PATH
1575 shlibpath_overrides_runpath=no
1576 hardcode_into_libs=yes
1577 ;;
1578
1579irix5* | irix6* | nonstopux*)
1580 case $host_os in
1581 nonstopux*) version_type=nonstopux ;;
1582 *)
1583 if test "$lt_cv_prog_gnu_ld" = yes; then
1584 version_type=linux
1585 else
1586 version_type=irix
1587 fi ;;
1588 esac
1589 need_lib_prefix=no
1590 need_version=no
1591 soname_spec='${libname}${release}${shared_ext}$major'
1592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1593 case $host_os in
1594 irix5* | nonstopux*)
1595 libsuff= shlibsuff=
1596 ;;
1597 *)
1598 case $LD in # libtool.m4 will add one of these switches to LD
1599 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1600 libsuff= shlibsuff= libmagic=32-bit;;
1601 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1602 libsuff=32 shlibsuff=N32 libmagic=N32;;
1603 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1604 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1605 *) libsuff= shlibsuff= libmagic=never-match;;
1606 esac
1607 ;;
1608 esac
1609 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1610 shlibpath_overrides_runpath=no
1611 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1612 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1613 hardcode_into_libs=yes
1614 ;;
1615
1616# No shared lib support for Linux oldld, aout, or coff.
1617linux*oldld* | linux*aout* | linux*coff*)
1618 dynamic_linker=no
1619 ;;
1620
1621# This must be Linux ELF.
0fde1ce3 1622linux* | k*bsd*-gnu)
d9898ee8 1623 version_type=linux
1624 need_lib_prefix=no
1625 need_version=no
1626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1627 soname_spec='${libname}${release}${shared_ext}$major'
1628 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1629 shlibpath_var=LD_LIBRARY_PATH
1630 shlibpath_overrides_runpath=no
1631 # This implies no fast_install, which is unacceptable.
1632 # Some rework will be needed to allow for fast_install
1633 # before this can be enabled.
1634 hardcode_into_libs=yes
0fde1ce3 1635 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1636 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
d9898ee8 1637
1638 # Append ld.so.conf contents to the search path
1639 if test -f /etc/ld.so.conf; then
0fde1ce3 1640 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1641 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
d9898ee8 1642 fi
1643
1644 # We used to test for /lib/ld.so.1 and disable shared libraries on
1645 # powerpc, because MkLinux only supported shared libraries with the
1646 # GNU dynamic linker. Since this was broken with cross compilers,
1647 # most powerpc-linux boxes support dynamic linking these days and
1648 # people can always --disable-shared, the test was removed, and we
1649 # assume the GNU/Linux dynamic linker is in use.
1650 dynamic_linker='GNU/Linux ld.so'
1651 ;;
1652
d9898ee8 1653netbsd*)
1654 version_type=sunos
1655 need_lib_prefix=no
1656 need_version=no
1657 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1658 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1659 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1660 dynamic_linker='NetBSD (a.out) ld.so'
1661 else
1662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1663 soname_spec='${libname}${release}${shared_ext}$major'
1664 dynamic_linker='NetBSD ld.elf_so'
1665 fi
1666 shlibpath_var=LD_LIBRARY_PATH
1667 shlibpath_overrides_runpath=yes
1668 hardcode_into_libs=yes
1669 ;;
1670
1671newsos6)
1672 version_type=linux
1673 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1674 shlibpath_var=LD_LIBRARY_PATH
1675 shlibpath_overrides_runpath=yes
1676 ;;
1677
1678nto-qnx*)
1679 version_type=linux
1680 need_lib_prefix=no
1681 need_version=no
1682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1683 soname_spec='${libname}${release}${shared_ext}$major'
1684 shlibpath_var=LD_LIBRARY_PATH
1685 shlibpath_overrides_runpath=yes
1686 ;;
1687
1688openbsd*)
1689 version_type=sunos
1690 sys_lib_dlsearch_path_spec="/usr/lib"
1691 need_lib_prefix=no
1692 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1693 case $host_os in
1694 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1695 *) need_version=no ;;
1696 esac
1697 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1698 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1699 shlibpath_var=LD_LIBRARY_PATH
1700 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1701 case $host_os in
1702 openbsd2.[[89]] | openbsd2.[[89]].*)
1703 shlibpath_overrides_runpath=no
1704 ;;
1705 *)
1706 shlibpath_overrides_runpath=yes
1707 ;;
1708 esac
1709 else
1710 shlibpath_overrides_runpath=yes
1711 fi
1712 ;;
1713
1714os2*)
1715 libname_spec='$name'
1716 shrext_cmds=".dll"
1717 need_lib_prefix=no
1718 library_names_spec='$libname${shared_ext} $libname.a'
1719 dynamic_linker='OS/2 ld.exe'
1720 shlibpath_var=LIBPATH
1721 ;;
1722
1723osf3* | osf4* | osf5*)
1724 version_type=osf
1725 need_lib_prefix=no
1726 need_version=no
1727 soname_spec='${libname}${release}${shared_ext}$major'
1728 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1729 shlibpath_var=LD_LIBRARY_PATH
1730 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1731 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1732 ;;
1733
0fde1ce3 1734rdos*)
1735 dynamic_linker=no
1736 ;;
1737
d9898ee8 1738solaris*)
1739 version_type=linux
1740 need_lib_prefix=no
1741 need_version=no
1742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1743 soname_spec='${libname}${release}${shared_ext}$major'
1744 shlibpath_var=LD_LIBRARY_PATH
1745 shlibpath_overrides_runpath=yes
1746 hardcode_into_libs=yes
1747 # ldd complains unless libraries are executable
1748 postinstall_cmds='chmod +x $lib'
1749 ;;
1750
1751sunos4*)
1752 version_type=sunos
1753 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1754 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1755 shlibpath_var=LD_LIBRARY_PATH
1756 shlibpath_overrides_runpath=yes
1757 if test "$with_gnu_ld" = yes; then
1758 need_lib_prefix=no
1759 fi
1760 need_version=yes
1761 ;;
1762
1763sysv4 | sysv4.3*)
1764 version_type=linux
1765 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1766 soname_spec='${libname}${release}${shared_ext}$major'
1767 shlibpath_var=LD_LIBRARY_PATH
1768 case $host_vendor in
1769 sni)
1770 shlibpath_overrides_runpath=no
1771 need_lib_prefix=no
1772 export_dynamic_flag_spec='${wl}-Blargedynsym'
1773 runpath_var=LD_RUN_PATH
1774 ;;
1775 siemens)
1776 need_lib_prefix=no
1777 ;;
1778 motorola)
1779 need_lib_prefix=no
1780 need_version=no
1781 shlibpath_overrides_runpath=no
1782 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1783 ;;
1784 esac
1785 ;;
1786
1787sysv4*MP*)
1788 if test -d /usr/nec ;then
1789 version_type=linux
1790 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1791 soname_spec='$libname${shared_ext}.$major'
1792 shlibpath_var=LD_LIBRARY_PATH
1793 fi
1794 ;;
1795
1796sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1797 version_type=freebsd-elf
1798 need_lib_prefix=no
1799 need_version=no
1800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1801 soname_spec='${libname}${release}${shared_ext}$major'
1802 shlibpath_var=LD_LIBRARY_PATH
1803 hardcode_into_libs=yes
1804 if test "$with_gnu_ld" = yes; then
1805 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1806 shlibpath_overrides_runpath=no
1807 else
1808 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1809 shlibpath_overrides_runpath=yes
1810 case $host_os in
1811 sco3.2v5*)
1812 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1813 ;;
1814 esac
1815 fi
1816 sys_lib_dlsearch_path_spec='/usr/lib'
1817 ;;
1818
1819uts4*)
1820 version_type=linux
1821 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1822 soname_spec='${libname}${release}${shared_ext}$major'
1823 shlibpath_var=LD_LIBRARY_PATH
1824 ;;
1825
1826*)
1827 dynamic_linker=no
1828 ;;
1829esac
1830AC_MSG_RESULT([$dynamic_linker])
1831test "$dynamic_linker" = no && can_build_shared=no
1832
1833variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1834if test "$GCC" = yes; then
1835 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1836fi
1837])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1838
1839
1840# _LT_AC_TAGCONFIG
1841# ----------------
1842AC_DEFUN([_LT_AC_TAGCONFIG],
0fde1ce3 1843[AC_REQUIRE([LT_AC_PROG_SED])dnl
1844AC_ARG_WITH([tags],
d9898ee8 1845 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1846 [include additional configurations @<:@automatic@:>@])],
1847 [tagnames="$withval"])
1848
1849if test -f "$ltmain" && test -n "$tagnames"; then
1850 if test ! -f "${ofile}"; then
1851 AC_MSG_WARN([output file `$ofile' does not exist])
1852 fi
1853
1854 if test -z "$LTCC"; then
1855 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1856 if test -z "$LTCC"; then
1857 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1858 else
1859 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1860 fi
1861 fi
1862 if test -z "$LTCFLAGS"; then
1863 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1864 fi
1865
1866 # Extract list of available tagged configurations in $ofile.
1867 # Note that this assumes the entire list is on one line.
1868 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1869
1870 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1871 for tagname in $tagnames; do
1872 IFS="$lt_save_ifs"
1873 # Check whether tagname contains only valid characters
1874 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1875 "") ;;
1876 *) AC_MSG_ERROR([invalid tag name: $tagname])
1877 ;;
1878 esac
1879
1880 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1881 then
1882 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1883 fi
1884
1885 # Update the list of available tags.
1886 if test -n "$tagname"; then
1887 echo appending configuration tag \"$tagname\" to $ofile
1888
1889 case $tagname in
1890 CXX)
1891 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1892 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1893 (test "X$CXX" != "Xg++"))) ; then
1894 AC_LIBTOOL_LANG_CXX_CONFIG
1895 else
1896 tagname=""
1897 fi
1898 ;;
1899
1900 F77)
1901 if test -n "$F77" && test "X$F77" != "Xno"; then
1902 AC_LIBTOOL_LANG_F77_CONFIG
1903 else
1904 tagname=""
1905 fi
1906 ;;
1907
1908 GCJ)
1909 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1910 AC_LIBTOOL_LANG_GCJ_CONFIG
1911 else
1912 tagname=""
1913 fi
1914 ;;
1915
1916 RC)
1917 AC_LIBTOOL_LANG_RC_CONFIG
1918 ;;
1919
1920 *)
1921 AC_MSG_ERROR([Unsupported tag name: $tagname])
1922 ;;
1923 esac
1924
1925 # Append the new tag name to the list of available tags.
1926 if test -n "$tagname" ; then
1927 available_tags="$available_tags $tagname"
1928 fi
1929 fi
1930 done
1931 IFS="$lt_save_ifs"
1932
1933 # Now substitute the updated list of available tags.
1934 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1935 mv "${ofile}T" "$ofile"
1936 chmod +x "$ofile"
1937 else
1938 rm -f "${ofile}T"
1939 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1940 fi
1941fi
1942])# _LT_AC_TAGCONFIG
1943
1944
1945# AC_LIBTOOL_DLOPEN
1946# -----------------
1947# enable checks for dlopen support
1948AC_DEFUN([AC_LIBTOOL_DLOPEN],
1949 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1950])# AC_LIBTOOL_DLOPEN
1951
1952
1953# AC_LIBTOOL_WIN32_DLL
1954# --------------------
1955# declare package support for building win32 DLLs
1956AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1957[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1958])# AC_LIBTOOL_WIN32_DLL
1959
1960
1961# AC_ENABLE_SHARED([DEFAULT])
1962# ---------------------------
1963# implement the --enable-shared flag
1964# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1965AC_DEFUN([AC_ENABLE_SHARED],
1966[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1967AC_ARG_ENABLE([shared],
1968 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1969 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1970 [p=${PACKAGE-default}
1971 case $enableval in
1972 yes) enable_shared=yes ;;
1973 no) enable_shared=no ;;
1974 *)
1975 enable_shared=no
1976 # Look at the argument we got. We use all the common list separators.
1977 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1978 for pkg in $enableval; do
1979 IFS="$lt_save_ifs"
1980 if test "X$pkg" = "X$p"; then
1981 enable_shared=yes
1982 fi
1983 done
1984 IFS="$lt_save_ifs"
1985 ;;
1986 esac],
1987 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1988])# AC_ENABLE_SHARED
1989
1990
1991# AC_DISABLE_SHARED
1992# -----------------
1993# set the default shared flag to --disable-shared
1994AC_DEFUN([AC_DISABLE_SHARED],
1995[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1996AC_ENABLE_SHARED(no)
1997])# AC_DISABLE_SHARED
1998
1999
2000# AC_ENABLE_STATIC([DEFAULT])
2001# ---------------------------
2002# implement the --enable-static flag
2003# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2004AC_DEFUN([AC_ENABLE_STATIC],
2005[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2006AC_ARG_ENABLE([static],
2007 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2008 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2009 [p=${PACKAGE-default}
2010 case $enableval in
2011 yes) enable_static=yes ;;
2012 no) enable_static=no ;;
2013 *)
2014 enable_static=no
2015 # Look at the argument we got. We use all the common list separators.
2016 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2017 for pkg in $enableval; do
2018 IFS="$lt_save_ifs"
2019 if test "X$pkg" = "X$p"; then
2020 enable_static=yes
2021 fi
2022 done
2023 IFS="$lt_save_ifs"
2024 ;;
2025 esac],
2026 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2027])# AC_ENABLE_STATIC
2028
2029
2030# AC_DISABLE_STATIC
2031# -----------------
2032# set the default static flag to --disable-static
2033AC_DEFUN([AC_DISABLE_STATIC],
2034[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2035AC_ENABLE_STATIC(no)
2036])# AC_DISABLE_STATIC
2037
2038
2039# AC_ENABLE_FAST_INSTALL([DEFAULT])
2040# ---------------------------------
2041# implement the --enable-fast-install flag
2042# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2043AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2044[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2045AC_ARG_ENABLE([fast-install],
2046 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2047 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2048 [p=${PACKAGE-default}
2049 case $enableval in
2050 yes) enable_fast_install=yes ;;
2051 no) enable_fast_install=no ;;
2052 *)
2053 enable_fast_install=no
2054 # Look at the argument we got. We use all the common list separators.
2055 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2056 for pkg in $enableval; do
2057 IFS="$lt_save_ifs"
2058 if test "X$pkg" = "X$p"; then
2059 enable_fast_install=yes
2060 fi
2061 done
2062 IFS="$lt_save_ifs"
2063 ;;
2064 esac],
2065 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2066])# AC_ENABLE_FAST_INSTALL
2067
2068
2069# AC_DISABLE_FAST_INSTALL
2070# -----------------------
2071# set the default to --disable-fast-install
2072AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2073[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2074AC_ENABLE_FAST_INSTALL(no)
2075])# AC_DISABLE_FAST_INSTALL
2076
2077
2078# AC_LIBTOOL_PICMODE([MODE])
2079# --------------------------
2080# implement the --with-pic flag
2081# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2082AC_DEFUN([AC_LIBTOOL_PICMODE],
2083[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2084pic_mode=ifelse($#,1,$1,default)
2085])# AC_LIBTOOL_PICMODE
2086
2087
2088# AC_PROG_EGREP
2089# -------------
2090# This is predefined starting with Autoconf 2.54, so this conditional
2091# definition can be removed once we require Autoconf 2.54 or later.
2092m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2093[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2094 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2095 then ac_cv_prog_egrep='grep -E'
2096 else ac_cv_prog_egrep='egrep'
2097 fi])
2098 EGREP=$ac_cv_prog_egrep
2099 AC_SUBST([EGREP])
2100])])
2101
2102
2103# AC_PATH_TOOL_PREFIX
2104# -------------------
0fde1ce3 2105# find a file program which can recognize shared library
d9898ee8 2106AC_DEFUN([AC_PATH_TOOL_PREFIX],
2107[AC_REQUIRE([AC_PROG_EGREP])dnl
2108AC_MSG_CHECKING([for $1])
2109AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2110[case $MAGIC_CMD in
2111[[\\/*] | ?:[\\/]*])
2112 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2113 ;;
2114*)
2115 lt_save_MAGIC_CMD="$MAGIC_CMD"
2116 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2117dnl $ac_dummy forces splitting on constant user-supplied paths.
2118dnl POSIX.2 word splitting is done only on the output of word expansions,
2119dnl not every word. This closes a longstanding sh security hole.
2120 ac_dummy="ifelse([$2], , $PATH, [$2])"
2121 for ac_dir in $ac_dummy; do
2122 IFS="$lt_save_ifs"
2123 test -z "$ac_dir" && ac_dir=.
2124 if test -f $ac_dir/$1; then
2125 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2126 if test -n "$file_magic_test_file"; then
2127 case $deplibs_check_method in
2128 "file_magic "*)
2129 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2130 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2131 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2132 $EGREP "$file_magic_regex" > /dev/null; then
2133 :
2134 else
2135 cat <<EOF 1>&2
2136
2137*** Warning: the command libtool uses to detect shared libraries,
2138*** $file_magic_cmd, produces output that libtool cannot recognize.
2139*** The result is that libtool may fail to recognize shared libraries
2140*** as such. This will affect the creation of libtool libraries that
2141*** depend on shared libraries, but programs linked with such libtool
2142*** libraries will work regardless of this problem. Nevertheless, you
2143*** may want to report the problem to your system manager and/or to
2144*** bug-libtool@gnu.org
2145
2146EOF
2147 fi ;;
2148 esac
2149 fi
2150 break
2151 fi
2152 done
2153 IFS="$lt_save_ifs"
2154 MAGIC_CMD="$lt_save_MAGIC_CMD"
2155 ;;
2156esac])
2157MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2158if test -n "$MAGIC_CMD"; then
2159 AC_MSG_RESULT($MAGIC_CMD)
2160else
2161 AC_MSG_RESULT(no)
2162fi
2163])# AC_PATH_TOOL_PREFIX
2164
2165
2166# AC_PATH_MAGIC
2167# -------------
0fde1ce3 2168# find a file program which can recognize a shared library
d9898ee8 2169AC_DEFUN([AC_PATH_MAGIC],
2170[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2171if test -z "$lt_cv_path_MAGIC_CMD"; then
2172 if test -n "$ac_tool_prefix"; then
2173 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2174 else
2175 MAGIC_CMD=:
2176 fi
2177fi
2178])# AC_PATH_MAGIC
2179
2180
2181# AC_PROG_LD
2182# ----------
2183# find the pathname to the GNU or non-GNU linker
2184AC_DEFUN([AC_PROG_LD],
2185[AC_ARG_WITH([gnu-ld],
2186 [AC_HELP_STRING([--with-gnu-ld],
2187 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2188 [test "$withval" = no || with_gnu_ld=yes],
2189 [with_gnu_ld=no])
2190AC_REQUIRE([LT_AC_PROG_SED])dnl
2191AC_REQUIRE([AC_PROG_CC])dnl
2192AC_REQUIRE([AC_CANONICAL_HOST])dnl
2193AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2194ac_prog=ld
2195if test "$GCC" = yes; then
2196 # Check if gcc -print-prog-name=ld gives a path.
2197 AC_MSG_CHECKING([for ld used by $CC])
2198 case $host in
2199 *-*-mingw*)
2200 # gcc leaves a trailing carriage return which upsets mingw
2201 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2202 *)
2203 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2204 esac
2205 case $ac_prog in
2206 # Accept absolute paths.
2207 [[\\/]]* | ?:[[\\/]]*)
2208 re_direlt='/[[^/]][[^/]]*/\.\./'
2209 # Canonicalize the pathname of ld
2210 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2211 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2212 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2213 done
2214 test -z "$LD" && LD="$ac_prog"
2215 ;;
2216 "")
2217 # If it fails, then pretend we aren't using GCC.
2218 ac_prog=ld
2219 ;;
2220 *)
2221 # If it is relative, then search for the first ld in PATH.
2222 with_gnu_ld=unknown
2223 ;;
2224 esac
2225elif test "$with_gnu_ld" = yes; then
2226 AC_MSG_CHECKING([for GNU ld])
2227else
2228 AC_MSG_CHECKING([for non-GNU ld])
2229fi
2230AC_CACHE_VAL(lt_cv_path_LD,
2231[if test -z "$LD"; then
2232 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2233 for ac_dir in $PATH; do
2234 IFS="$lt_save_ifs"
2235 test -z "$ac_dir" && ac_dir=.
2236 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2237 lt_cv_path_LD="$ac_dir/$ac_prog"
2238 # Check to see if the program is GNU ld. I'd rather use --version,
2239 # but apparently some variants of GNU ld only accept -v.
2240 # Break only if it was the GNU/non-GNU ld that we prefer.
2241 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2242 *GNU* | *'with BFD'*)
2243 test "$with_gnu_ld" != no && break
2244 ;;
2245 *)
2246 test "$with_gnu_ld" != yes && break
2247 ;;
2248 esac
2249 fi
2250 done
2251 IFS="$lt_save_ifs"
2252else
2253 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2254fi])
2255LD="$lt_cv_path_LD"
2256if test -n "$LD"; then
2257 AC_MSG_RESULT($LD)
2258else
2259 AC_MSG_RESULT(no)
2260fi
2261test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2262AC_PROG_LD_GNU
2263])# AC_PROG_LD
2264
2265
2266# AC_PROG_LD_GNU
2267# --------------
2268AC_DEFUN([AC_PROG_LD_GNU],
2269[AC_REQUIRE([AC_PROG_EGREP])dnl
2270AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2271[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2272case `$LD -v 2>&1 </dev/null` in
2273*GNU* | *'with BFD'*)
2274 lt_cv_prog_gnu_ld=yes
2275 ;;
2276*)
2277 lt_cv_prog_gnu_ld=no
2278 ;;
2279esac])
2280with_gnu_ld=$lt_cv_prog_gnu_ld
2281])# AC_PROG_LD_GNU
2282
2283
2284# AC_PROG_LD_RELOAD_FLAG
2285# ----------------------
2286# find reload flag for linker
2287# -- PORTME Some linkers may need a different reload flag.
2288AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2289[AC_CACHE_CHECK([for $LD option to reload object files],
2290 lt_cv_ld_reload_flag,
2291 [lt_cv_ld_reload_flag='-r'])
2292reload_flag=$lt_cv_ld_reload_flag
2293case $reload_flag in
2294"" | " "*) ;;
2295*) reload_flag=" $reload_flag" ;;
2296esac
2297reload_cmds='$LD$reload_flag -o $output$reload_objs'
2298case $host_os in
2299 darwin*)
2300 if test "$GCC" = yes; then
2301 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2302 else
2303 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2304 fi
2305 ;;
2306esac
2307])# AC_PROG_LD_RELOAD_FLAG
2308
2309
2310# AC_DEPLIBS_CHECK_METHOD
2311# -----------------------
2312# how to check for library dependencies
2313# -- PORTME fill in with the dynamic library characteristics
2314AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
0fde1ce3 2315[AC_CACHE_CHECK([how to recognize dependent libraries],
d9898ee8 2316lt_cv_deplibs_check_method,
2317[lt_cv_file_magic_cmd='$MAGIC_CMD'
2318lt_cv_file_magic_test_file=
2319lt_cv_deplibs_check_method='unknown'
2320# Need to set the preceding variable on all platforms that support
2321# interlibrary dependencies.
2322# 'none' -- dependencies not supported.
2323# `unknown' -- same as none, but documents that we really don't know.
2324# 'pass_all' -- all dependencies passed with no checks.
2325# 'test_compile' -- check by making test program.
2326# 'file_magic [[regex]]' -- check by looking for files in library path
2327# which responds to the $file_magic_cmd with a given extended regex.
2328# If you have `file' or equivalent on your system and you're not sure
2329# whether `pass_all' will *always* work, you probably want this one.
2330
2331case $host_os in
2332aix4* | aix5*)
2333 lt_cv_deplibs_check_method=pass_all
2334 ;;
2335
2336beos*)
2337 lt_cv_deplibs_check_method=pass_all
2338 ;;
2339
2340bsdi[[45]]*)
2341 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2342 lt_cv_file_magic_cmd='/usr/bin/file -L'
2343 lt_cv_file_magic_test_file=/shlib/libc.so
2344 ;;
2345
2346cygwin*)
2347 # func_win32_libid is a shell function defined in ltmain.sh
2348 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2349 lt_cv_file_magic_cmd='func_win32_libid'
2350 ;;
2351
2352mingw* | pw32*)
2353 # Base MSYS/MinGW do not provide the 'file' command needed by
0fde1ce3 2354 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2355 # unless we find 'file', for example because we are cross-compiling.
2356 if ( file / ) >/dev/null 2>&1; then
2357 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2358 lt_cv_file_magic_cmd='func_win32_libid'
2359 else
2360 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2361 lt_cv_file_magic_cmd='$OBJDUMP -f'
2362 fi
d9898ee8 2363 ;;
2364
2365darwin* | rhapsody*)
2366 lt_cv_deplibs_check_method=pass_all
2367 ;;
2368
0fde1ce3 2369freebsd* | dragonfly*)
d9898ee8 2370 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2371 case $host_cpu in
2372 i*86 )
2373 # Not sure whether the presence of OpenBSD here was a mistake.
2374 # Let's accept both of them until this is cleared up.
2375 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2376 lt_cv_file_magic_cmd=/usr/bin/file
2377 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2378 ;;
2379 esac
2380 else
2381 lt_cv_deplibs_check_method=pass_all
2382 fi
2383 ;;
2384
2385gnu*)
2386 lt_cv_deplibs_check_method=pass_all
2387 ;;
2388
2389hpux10.20* | hpux11*)
2390 lt_cv_file_magic_cmd=/usr/bin/file
2391 case $host_cpu in
2392 ia64*)
2393 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2394 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2395 ;;
2396 hppa*64*)
2397 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2398 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2399 ;;
2400 *)
2401 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2402 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2403 ;;
2404 esac
2405 ;;
2406
0fde1ce3 2407interix[[3-9]]*)
d9898ee8 2408 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2409 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2410 ;;
2411
2412irix5* | irix6* | nonstopux*)
2413 case $LD in
2414 *-32|*"-32 ") libmagic=32-bit;;
2415 *-n32|*"-n32 ") libmagic=N32;;
2416 *-64|*"-64 ") libmagic=64-bit;;
2417 *) libmagic=never-match;;
2418 esac
2419 lt_cv_deplibs_check_method=pass_all
2420 ;;
2421
2422# This must be Linux ELF.
0fde1ce3 2423linux* | k*bsd*-gnu)
d9898ee8 2424 lt_cv_deplibs_check_method=pass_all
2425 ;;
2426
2427netbsd*)
2428 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2429 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2430 else
2431 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2432 fi
2433 ;;
2434
2435newos6*)
2436 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2437 lt_cv_file_magic_cmd=/usr/bin/file
2438 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2439 ;;
2440
2441nto-qnx*)
2442 lt_cv_deplibs_check_method=unknown
2443 ;;
2444
2445openbsd*)
2446 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2447 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2448 else
2449 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2450 fi
2451 ;;
2452
2453osf3* | osf4* | osf5*)
2454 lt_cv_deplibs_check_method=pass_all
2455 ;;
2456
0fde1ce3 2457rdos*)
2458 lt_cv_deplibs_check_method=pass_all
2459 ;;
2460
d9898ee8 2461solaris*)
2462 lt_cv_deplibs_check_method=pass_all
2463 ;;
2464
2465sysv4 | sysv4.3*)
2466 case $host_vendor in
2467 motorola)
2468 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]]'
2469 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2470 ;;
2471 ncr)
2472 lt_cv_deplibs_check_method=pass_all
2473 ;;
2474 sequent)
2475 lt_cv_file_magic_cmd='/bin/file'
2476 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2477 ;;
2478 sni)
2479 lt_cv_file_magic_cmd='/bin/file'
2480 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2481 lt_cv_file_magic_test_file=/lib/libc.so
2482 ;;
2483 siemens)
2484 lt_cv_deplibs_check_method=pass_all
2485 ;;
2486 pc)
2487 lt_cv_deplibs_check_method=pass_all
2488 ;;
2489 esac
2490 ;;
2491
2492sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2493 lt_cv_deplibs_check_method=pass_all
2494 ;;
2495esac
2496])
2497file_magic_cmd=$lt_cv_file_magic_cmd
2498deplibs_check_method=$lt_cv_deplibs_check_method
2499test -z "$deplibs_check_method" && deplibs_check_method=unknown
2500])# AC_DEPLIBS_CHECK_METHOD
2501
2502
2503# AC_PROG_NM
2504# ----------
2505# find the pathname to a BSD-compatible name lister
2506AC_DEFUN([AC_PROG_NM],
2507[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2508[if test -n "$NM"; then
2509 # Let the user override the test.
2510 lt_cv_path_NM="$NM"
2511else
2512 lt_nm_to_check="${ac_tool_prefix}nm"
0fde1ce3 2513 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
d9898ee8 2514 lt_nm_to_check="$lt_nm_to_check nm"
2515 fi
2516 for lt_tmp_nm in $lt_nm_to_check; do
2517 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2518 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2519 IFS="$lt_save_ifs"
2520 test -z "$ac_dir" && ac_dir=.
2521 tmp_nm="$ac_dir/$lt_tmp_nm"
2522 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2523 # Check to see if the nm accepts a BSD-compat flag.
2524 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2525 # nm: unknown option "B" ignored
2526 # Tru64's nm complains that /dev/null is an invalid object file
2527 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2528 */dev/null* | *'Invalid file or object type'*)
2529 lt_cv_path_NM="$tmp_nm -B"
2530 break
2531 ;;
2532 *)
2533 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2534 */dev/null*)
2535 lt_cv_path_NM="$tmp_nm -p"
2536 break
2537 ;;
2538 *)
2539 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2540 continue # so that we can try to find one that supports BSD flags
2541 ;;
2542 esac
2543 ;;
2544 esac
2545 fi
2546 done
2547 IFS="$lt_save_ifs"
2548 done
2549 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2550fi])
2551NM="$lt_cv_path_NM"
2552])# AC_PROG_NM
2553
2554
2555# AC_CHECK_LIBM
2556# -------------
2557# check for math library
2558AC_DEFUN([AC_CHECK_LIBM],
2559[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2560LIBM=
2561case $host in
2562*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2563 # These system don't have libm, or don't need it
2564 ;;
2565*-ncr-sysv4.3*)
2566 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2567 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2568 ;;
2569*)
2570 AC_CHECK_LIB(m, cos, LIBM="-lm")
2571 ;;
2572esac
2573])# AC_CHECK_LIBM
2574
2575
2576# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2577# -----------------------------------
2578# sets LIBLTDL to the link flags for the libltdl convenience library and
2579# LTDLINCL to the include flags for the libltdl header and adds
2580# --enable-ltdl-convenience to the configure arguments. Note that
2581# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2582# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2583# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2584# (note the single quotes!). If your package is not flat and you're not
2585# using automake, define top_builddir and top_srcdir appropriately in
2586# the Makefiles.
2587AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2588[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2589 case $enable_ltdl_convenience in
2590 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2591 "") enable_ltdl_convenience=yes
2592 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2593 esac
2594 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2595 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2596 # For backwards non-gettext consistent compatibility...
2597 INCLTDL="$LTDLINCL"
2598])# AC_LIBLTDL_CONVENIENCE
2599
2600
2601# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2602# -----------------------------------
2603# sets LIBLTDL to the link flags for the libltdl installable library and
2604# LTDLINCL to the include flags for the libltdl header and adds
2605# --enable-ltdl-install to the configure arguments. Note that
2606# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2607# and an installed libltdl is not found, it is assumed to be `libltdl'.
2608# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2609# '${top_srcdir}/' (note the single quotes!). If your package is not
2610# flat and you're not using automake, define top_builddir and top_srcdir
2611# appropriately in the Makefiles.
2612# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2613AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2614[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2615 AC_CHECK_LIB(ltdl, lt_dlinit,
2616 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2617 [if test x"$enable_ltdl_install" = xno; then
2618 AC_MSG_WARN([libltdl not installed, but installation disabled])
2619 else
2620 enable_ltdl_install=yes
2621 fi
2622 ])
2623 if test x"$enable_ltdl_install" = x"yes"; then
2624 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2625 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2626 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2627 else
2628 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2629 LIBLTDL="-lltdl"
2630 LTDLINCL=
2631 fi
2632 # For backwards non-gettext consistent compatibility...
2633 INCLTDL="$LTDLINCL"
2634])# AC_LIBLTDL_INSTALLABLE
2635
2636
2637# AC_LIBTOOL_CXX
2638# --------------
2639# enable support for C++ libraries
2640AC_DEFUN([AC_LIBTOOL_CXX],
2641[AC_REQUIRE([_LT_AC_LANG_CXX])
2642])# AC_LIBTOOL_CXX
2643
2644
2645# _LT_AC_LANG_CXX
2646# ---------------
2647AC_DEFUN([_LT_AC_LANG_CXX],
2648[AC_REQUIRE([AC_PROG_CXX])
2649AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2650_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2651])# _LT_AC_LANG_CXX
2652
2653# _LT_AC_PROG_CXXCPP
2654# ------------------
2655AC_DEFUN([_LT_AC_PROG_CXXCPP],
2656[
2657AC_REQUIRE([AC_PROG_CXX])
2658if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2659 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2660 (test "X$CXX" != "Xg++"))) ; then
2661 AC_PROG_CXXCPP
2662fi
2663])# _LT_AC_PROG_CXXCPP
2664
2665# AC_LIBTOOL_F77
2666# --------------
2667# enable support for Fortran 77 libraries
2668AC_DEFUN([AC_LIBTOOL_F77],
2669[AC_REQUIRE([_LT_AC_LANG_F77])
2670])# AC_LIBTOOL_F77
2671
2672
2673# _LT_AC_LANG_F77
2674# ---------------
2675AC_DEFUN([_LT_AC_LANG_F77],
2676[AC_REQUIRE([AC_PROG_F77])
2677_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2678])# _LT_AC_LANG_F77
2679
2680
2681# AC_LIBTOOL_GCJ
2682# --------------
2683# enable support for GCJ libraries
2684AC_DEFUN([AC_LIBTOOL_GCJ],
2685[AC_REQUIRE([_LT_AC_LANG_GCJ])
2686])# AC_LIBTOOL_GCJ
2687
2688
2689# _LT_AC_LANG_GCJ
2690# ---------------
2691AC_DEFUN([_LT_AC_LANG_GCJ],
2692[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2693 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2694 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2695 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2696 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2697 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2698_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2699])# _LT_AC_LANG_GCJ
2700
2701
2702# AC_LIBTOOL_RC
2703# -------------
2704# enable support for Windows resource files
2705AC_DEFUN([AC_LIBTOOL_RC],
2706[AC_REQUIRE([LT_AC_PROG_RC])
2707_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2708])# AC_LIBTOOL_RC
2709
2710
2711# AC_LIBTOOL_LANG_C_CONFIG
2712# ------------------------
2713# Ensure that the configuration vars for the C compiler are
2714# suitably defined. Those variables are subsequently used by
2715# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2716AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2717AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2718[lt_save_CC="$CC"
2719AC_LANG_PUSH(C)
2720
2721# Source file extension for C test sources.
2722ac_ext=c
2723
2724# Object file extension for compiled C test sources.
2725objext=o
2726_LT_AC_TAGVAR(objext, $1)=$objext
2727
2728# Code to be used in simple compile tests
0fde1ce3 2729lt_simple_compile_test_code="int some_variable = 0;"
d9898ee8 2730
2731# Code to be used in simple link tests
0fde1ce3 2732lt_simple_link_test_code='int main(){return(0);}'
d9898ee8 2733
2734_LT_AC_SYS_COMPILER
2735
2736# save warnings/boilerplate of simple test code
2737_LT_COMPILER_BOILERPLATE
2738_LT_LINKER_BOILERPLATE
2739
2740AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2741AC_LIBTOOL_PROG_COMPILER_PIC($1)
2742AC_LIBTOOL_PROG_CC_C_O($1)
2743AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2744AC_LIBTOOL_PROG_LD_SHLIBS($1)
2745AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2746AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2747AC_LIBTOOL_SYS_LIB_STRIP
2748AC_LIBTOOL_DLOPEN_SELF
2749
2750# Report which library types will actually be built
2751AC_MSG_CHECKING([if libtool supports shared libraries])
2752AC_MSG_RESULT([$can_build_shared])
2753
2754AC_MSG_CHECKING([whether to build shared libraries])
2755test "$can_build_shared" = "no" && enable_shared=no
2756
2757# On AIX, shared libraries and static libraries use the same namespace, and
2758# are all built from PIC.
2759case $host_os in
2760aix3*)
2761 test "$enable_shared" = yes && enable_static=no
2762 if test -n "$RANLIB"; then
2763 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2764 postinstall_cmds='$RANLIB $lib'
2765 fi
2766 ;;
2767
2768aix4* | aix5*)
2769 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2770 test "$enable_shared" = yes && enable_static=no
2771 fi
2772 ;;
2773esac
2774AC_MSG_RESULT([$enable_shared])
2775
2776AC_MSG_CHECKING([whether to build static libraries])
2777# Make sure either enable_shared or enable_static is yes.
2778test "$enable_shared" = yes || enable_static=yes
2779AC_MSG_RESULT([$enable_static])
2780
2781AC_LIBTOOL_CONFIG($1)
2782
2783AC_LANG_POP
2784CC="$lt_save_CC"
2785])# AC_LIBTOOL_LANG_C_CONFIG
2786
2787
2788# AC_LIBTOOL_LANG_CXX_CONFIG
2789# --------------------------
2790# Ensure that the configuration vars for the C compiler are
2791# suitably defined. Those variables are subsequently used by
2792# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2793AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2794AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2795[AC_LANG_PUSH(C++)
2796AC_REQUIRE([AC_PROG_CXX])
2797AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2798
2799_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2800_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2801_LT_AC_TAGVAR(always_export_symbols, $1)=no
2802_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2803_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2804_LT_AC_TAGVAR(hardcode_direct, $1)=no
2805_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2806_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2807_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2808_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2809_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2810_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2811_LT_AC_TAGVAR(module_cmds, $1)=
2812_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2813_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2814_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2815_LT_AC_TAGVAR(no_undefined_flag, $1)=
2816_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2817_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2818
2819# Dependencies to place before and after the object being linked:
2820_LT_AC_TAGVAR(predep_objects, $1)=
2821_LT_AC_TAGVAR(postdep_objects, $1)=
2822_LT_AC_TAGVAR(predeps, $1)=
2823_LT_AC_TAGVAR(postdeps, $1)=
2824_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2825
2826# Source file extension for C++ test sources.
2827ac_ext=cpp
2828
2829# Object file extension for compiled C++ test sources.
2830objext=o
2831_LT_AC_TAGVAR(objext, $1)=$objext
2832
2833# Code to be used in simple compile tests
0fde1ce3 2834lt_simple_compile_test_code="int some_variable = 0;"
d9898ee8 2835
2836# Code to be used in simple link tests
0fde1ce3 2837lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
d9898ee8 2838
2839# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2840_LT_AC_SYS_COMPILER
2841
2842# save warnings/boilerplate of simple test code
2843_LT_COMPILER_BOILERPLATE
2844_LT_LINKER_BOILERPLATE
2845
2846# Allow CC to be a program name with arguments.
2847lt_save_CC=$CC
2848lt_save_LD=$LD
2849lt_save_GCC=$GCC
2850GCC=$GXX
2851lt_save_with_gnu_ld=$with_gnu_ld
2852lt_save_path_LD=$lt_cv_path_LD
2853if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2854 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2855else
2856 $as_unset lt_cv_prog_gnu_ld
2857fi
2858if test -n "${lt_cv_path_LDCXX+set}"; then
2859 lt_cv_path_LD=$lt_cv_path_LDCXX
2860else
2861 $as_unset lt_cv_path_LD
2862fi
2863test -z "${LDCXX+set}" || LD=$LDCXX
2864CC=${CXX-"c++"}
2865compiler=$CC
2866_LT_AC_TAGVAR(compiler, $1)=$CC
2867_LT_CC_BASENAME([$compiler])
2868
2869# We don't want -fno-exception wen compiling C++ code, so set the
2870# no_builtin_flag separately
2871if test "$GXX" = yes; then
2872 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2873else
2874 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2875fi
2876
2877if test "$GXX" = yes; then
2878 # Set up default GNU C++ configuration
2879
2880 AC_PROG_LD
2881
2882 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2883 # archiving commands below assume that GNU ld is being used.
2884 if test "$with_gnu_ld" = yes; then
2885 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2886 _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'
2887
2888 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2889 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2890
2891 # If archive_cmds runs LD, not CC, wlarc should be empty
2892 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2893 # investigate it a little bit more. (MM)
2894 wlarc='${wl}'
2895
2896 # ancient GNU ld didn't support --whole-archive et. al.
2897 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2898 grep 'no-whole-archive' > /dev/null; then
2899 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2900 else
2901 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2902 fi
2903 else
2904 with_gnu_ld=no
2905 wlarc=
2906
2907 # A generic and very simple default shared library creation
2908 # command for GNU C++ for the case where it uses the native
2909 # linker, instead of GNU ld. If possible, this setting should
2910 # overridden to take advantage of the native linker features on
2911 # the platform it is being used on.
2912 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2913 fi
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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2919
2920else
2921 GXX=no
2922 with_gnu_ld=no
2923 wlarc=
2924fi
2925
2926# PORTME: fill in a description of your system's C++ link characteristics
2927AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2928_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2929case $host_os in
2930 aix3*)
2931 # FIXME: insert proper C++ library support
2932 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2933 ;;
2934 aix4* | aix5*)
2935 if test "$host_cpu" = ia64; then
2936 # On IA64, the linker does run time linking by default, so we don't
2937 # have to do anything special.
2938 aix_use_runtimelinking=no
2939 exp_sym_flag='-Bexport'
2940 no_entry_flag=""
2941 else
2942 aix_use_runtimelinking=no
2943
2944 # Test if we are trying to use run time linking or normal
2945 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2946 # need to do runtime linking.
2947 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2948 for ld_flag in $LDFLAGS; do
2949 case $ld_flag in
2950 *-brtl*)
2951 aix_use_runtimelinking=yes
2952 break
2953 ;;
2954 esac
2955 done
2956 ;;
2957 esac
2958
2959 exp_sym_flag='-bexport'
2960 no_entry_flag='-bnoentry'
2961 fi
2962
2963 # When large executables or shared objects are built, AIX ld can
2964 # have problems creating the table of contents. If linking a library
2965 # or program results in "error TOC overflow" add -mminimal-toc to
2966 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2967 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2968
2969 _LT_AC_TAGVAR(archive_cmds, $1)=''
2970 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2971 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2972 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2973
2974 if test "$GXX" = yes; then
2975 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2976 # We only want to do this on AIX 4.2 and lower, the check
2977 # below for broken collect2 doesn't work under 4.3+
2978 collect2name=`${CC} -print-prog-name=collect2`
2979 if test -f "$collect2name" && \
2980 strings "$collect2name" | grep resolve_lib_name >/dev/null
2981 then
2982 # We have reworked collect2
0fde1ce3 2983 :
d9898ee8 2984 else
2985 # We have old collect2
2986 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2987 # It fails to find uninstalled libraries when the uninstalled
2988 # path is not listed in the libpath. Setting hardcode_minus_L
2989 # to unsupported forces relinking
2990 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2991 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2992 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2993 fi
2994 ;;
2995 esac
2996 shared_flag='-shared'
2997 if test "$aix_use_runtimelinking" = yes; then
2998 shared_flag="$shared_flag "'${wl}-G'
2999 fi
3000 else
3001 # not using gcc
3002 if test "$host_cpu" = ia64; then
3003 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3004 # chokes on -Wl,-G. The following line is correct:
3005 shared_flag='-G'
3006 else
3007 if test "$aix_use_runtimelinking" = yes; then
3008 shared_flag='${wl}-G'
3009 else
3010 shared_flag='${wl}-bM:SRE'
3011 fi
3012 fi
3013 fi
3014
3015 # It seems that -bexpall does not export symbols beginning with
3016 # underscore (_), so it is better to generate a list of symbols to export.
3017 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3018 if test "$aix_use_runtimelinking" = yes; then
3019 # Warning - without using the other runtime loading flags (-brtl),
3020 # -berok will link without error, but may produce a broken library.
3021 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3022 # Determine the default libpath from the value encoded in an empty executable.
3023 _LT_AC_SYS_LIBPATH_AIX
3024 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3025
3026 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3027 else
3028 if test "$host_cpu" = ia64; then
3029 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3030 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3031 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3032 else
3033 # Determine the default libpath from the value encoded in an empty executable.
3034 _LT_AC_SYS_LIBPATH_AIX
3035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3036 # Warning - without using the other run time loading flags,
3037 # -berok will link without error, but may produce a broken library.
3038 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3039 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3040 # Exported symbols can be pulled into shared objects from archives
3041 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3042 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3043 # This is similar to how AIX traditionally builds its shared libraries.
3044 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3045 fi
3046 fi
3047 ;;
3048
3049 beos*)
3050 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3051 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3052 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3053 # support --undefined. This deserves some investigation. FIXME
3054 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3055 else
3056 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3057 fi
3058 ;;
3059
3060 chorus*)
3061 case $cc_basename in
3062 *)
3063 # FIXME: insert proper C++ library support
3064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3065 ;;
3066 esac
3067 ;;
3068
3069 cygwin* | mingw* | pw32*)
3070 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3071 # as there is no search path for DLLs.
3072 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3073 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3074 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3075 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3076
3077 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3078 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3079 # If the export-symbols file already is a .def file (1st line
3080 # is EXPORTS), use it as is; otherwise, prepend...
3081 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3082 cp $export_symbols $output_objdir/$soname.def;
3083 else
3084 echo EXPORTS > $output_objdir/$soname.def;
3085 cat $export_symbols >> $output_objdir/$soname.def;
3086 fi~
3087 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3088 else
3089 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3090 fi
3091 ;;
3092 darwin* | rhapsody*)
3093 case $host_os in
3094 rhapsody* | darwin1.[[012]])
3095 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3096 ;;
3097 *) # Darwin 1.3 on
3098 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3099 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3100 else
3101 case ${MACOSX_DEPLOYMENT_TARGET} in
3102 10.[[012]])
3103 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3104 ;;
3105 10.*)
3106 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3107 ;;
3108 esac
3109 fi
3110 ;;
3111 esac
3112 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3113 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3114 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3115 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3116 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3117 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3118
3119 if test "$GXX" = yes ; then
3120 lt_int_apple_cc_single_mod=no
3121 output_verbose_link_cmd='echo'
3122 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3123 lt_int_apple_cc_single_mod=yes
3124 fi
3125 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3126 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3127 else
3128 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3129 fi
3130 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3131 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3132 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3133 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3134 else
3135 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3136 fi
3137 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3138 else
3139 case $cc_basename in
3140 xlc*)
3141 output_verbose_link_cmd='echo'
0fde1ce3 3142 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
d9898ee8 3143 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3144 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
0fde1ce3 3145 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
d9898ee8 3146 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3147 ;;
3148 *)
3149 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3150 ;;
3151 esac
3152 fi
3153 ;;
3154
3155 dgux*)
3156 case $cc_basename in
3157 ec++*)
3158 # FIXME: insert proper C++ library support
3159 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3160 ;;
3161 ghcx*)
3162 # Green Hills C++ Compiler
3163 # FIXME: insert proper C++ library support
3164 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3165 ;;
3166 *)
3167 # FIXME: insert proper C++ library support
3168 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3169 ;;
3170 esac
3171 ;;
3172 freebsd[[12]]*)
3173 # C++ shared libraries reported to be fairly broken before switch to ELF
3174 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3175 ;;
3176 freebsd-elf*)
3177 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3178 ;;
0fde1ce3 3179 freebsd* | dragonfly*)
d9898ee8 3180 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3181 # conventions
3182 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3183 ;;
3184 gnu*)
3185 ;;
3186 hpux9*)
3187 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3188 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3189 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3191 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3192 # but as the default
3193 # location of the library.
3194
3195 case $cc_basename in
3196 CC*)
3197 # FIXME: insert proper C++ library support
3198 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3199 ;;
3200 aCC*)
3201 _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'
3202 # Commands to make compiler produce verbose output that lists
3203 # what "hidden" libraries, object files and flags are used when
3204 # linking a shared library.
3205 #
3206 # There doesn't appear to be a way to prevent this compiler from
3207 # explicitly linking system object files so we need to strip them
3208 # from the output so that they don't get included in the library
3209 # dependencies.
3210 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3211 ;;
3212 *)
3213 if test "$GXX" = yes; then
3214 _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'
3215 else
3216 # FIXME: insert proper C++ library support
3217 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3218 fi
3219 ;;
3220 esac
3221 ;;
3222 hpux10*|hpux11*)
3223 if test $with_gnu_ld = no; then
3224 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3225 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3226
3227 case $host_cpu in
0fde1ce3 3228 hppa*64*|ia64*) ;;
d9898ee8 3229 *)
3230 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3231 ;;
3232 esac
3233 fi
3234 case $host_cpu in
3235 hppa*64*|ia64*)
3236 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3237 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3238 ;;
3239 *)
3240 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3241 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3242 # but as the default
3243 # location of the library.
3244 ;;
3245 esac
3246
3247 case $cc_basename in
3248 CC*)
3249 # FIXME: insert proper C++ library support
3250 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3251 ;;
3252 aCC*)
3253 case $host_cpu in
3254 hppa*64*)
3255 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3256 ;;
3257 ia64*)
3258 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3259 ;;
3260 *)
3261 _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'
3262 ;;
3263 esac
3264 # Commands to make compiler produce verbose output that lists
3265 # what "hidden" libraries, object files and flags are used when
3266 # linking a shared library.
3267 #
3268 # There doesn't appear to be a way to prevent this compiler from
3269 # explicitly linking system object files so we need to strip them
3270 # from the output so that they don't get included in the library
3271 # dependencies.
3272 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3273 ;;
3274 *)
3275 if test "$GXX" = yes; then
3276 if test $with_gnu_ld = no; then
3277 case $host_cpu in
3278 hppa*64*)
3279 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3280 ;;
3281 ia64*)
3282 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3283 ;;
3284 *)
3285 _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'
3286 ;;
3287 esac
3288 fi
3289 else
3290 # FIXME: insert proper C++ library support
3291 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3292 fi
3293 ;;
3294 esac
3295 ;;
0fde1ce3 3296 interix[[3-9]]*)
d9898ee8 3297 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3298 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3299 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3300 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3301 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3302 # Instead, shared libraries are loaded at an image base (0x10000000 by
3303 # default) and relocated if they conflict, which is a slow very memory
3304 # consuming and fragmenting process. To avoid this, we pick a random,
3305 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3306 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3307 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3308 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3309 ;;
3310 irix5* | irix6*)
3311 case $cc_basename in
3312 CC*)
3313 # SGI C++
3314 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3315
3316 # Archives containing C++ object files must be created using
3317 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3318 # necessary to make sure instantiated templates are included
3319 # in the archive.
3320 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3321 ;;
3322 *)
3323 if test "$GXX" = yes; then
3324 if test "$with_gnu_ld" = no; then
3325 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3326 else
3327 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3328 fi
3329 fi
3330 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3331 ;;
3332 esac
3333 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3334 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3335 ;;
0fde1ce3 3336 linux* | k*bsd*-gnu)
d9898ee8 3337 case $cc_basename in
3338 KCC*)
3339 # Kuck and Associates, Inc. (KAI) C++ Compiler
3340
3341 # KCC will only create a shared library if the output file
3342 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3343 # to its proper name (with version) after linking.
3344 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3345 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3346 # Commands to make compiler produce verbose output that lists
3347 # what "hidden" libraries, object files and flags are used when
3348 # linking a shared library.
3349 #
3350 # There doesn't appear to be a way to prevent this compiler from
3351 # explicitly linking system object files so we need to strip them
3352 # from the output so that they don't get included in the library
3353 # dependencies.
3354 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3355
3356 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3357 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3358
3359 # Archives containing C++ object files must be created using
3360 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3361 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3362 ;;
3363 icpc*)
3364 # Intel C++
3365 with_gnu_ld=yes
3366 # version 8.0 and above of icpc choke on multiply defined symbols
3367 # if we add $predep_objects and $postdep_objects, however 7.1 and
3368 # earlier do not add the objects themselves.
3369 case `$CC -V 2>&1` in
3370 *"Version 7."*)
3371 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3372 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3373 ;;
3374 *) # Version 8.0 or newer
3375 tmp_idyn=
3376 case $host_cpu in
3377 ia64*) tmp_idyn=' -i_dynamic';;
3378 esac
3379 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3380 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3381 ;;
3382 esac
3383 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3384 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3385 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3386 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3387 ;;
3388 pgCC*)
3389 # Portland Group C++ compiler
3390 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3391 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3392
3393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3394 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3395 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3396 ;;
3397 cxx*)
3398 # Compaq C++
3399 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3400 _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'
3401
3402 runpath_var=LD_RUN_PATH
3403 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3404 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3405
3406 # Commands to make compiler produce verbose output that lists
3407 # what "hidden" libraries, object files and flags are used when
3408 # linking a shared library.
3409 #
3410 # There doesn't appear to be a way to prevent this compiler from
3411 # explicitly linking system object files so we need to strip them
3412 # from the output so that they don't get included in the library
3413 # dependencies.
3414 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'
3415 ;;
0fde1ce3 3416 *)
3417 case `$CC -V 2>&1 | sed 5q` in
3418 *Sun\ C*)
3419 # Sun C++ 5.9
3420 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3421 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3422 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3423 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3424 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3425
3426 # Not sure whether something based on
3427 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3428 # would be better.
3429 output_verbose_link_cmd='echo'
3430
3431 # Archives containing C++ object files must be created using
3432 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3433 # necessary to make sure instantiated templates are included
3434 # in the archive.
3435 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3436 ;;
3437 esac
3438 ;;
d9898ee8 3439 esac
3440 ;;
3441 lynxos*)
3442 # FIXME: insert proper C++ library support
3443 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3444 ;;
3445 m88k*)
3446 # FIXME: insert proper C++ library support
3447 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3448 ;;
3449 mvs*)
3450 case $cc_basename in
3451 cxx*)
3452 # FIXME: insert proper C++ library support
3453 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3454 ;;
3455 *)
3456 # FIXME: insert proper C++ library support
3457 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3458 ;;
3459 esac
3460 ;;
3461 netbsd*)
3462 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3463 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3464 wlarc=
3465 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3466 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3467 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3468 fi
3469 # Workaround some broken pre-1.5 toolchains
3470 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3471 ;;
3472 openbsd2*)
3473 # C++ shared libraries are fairly broken
3474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3475 ;;
3476 openbsd*)
0fde1ce3 3477 if test -f /usr/libexec/ld.so; then
3478 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3479 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3480 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3481 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3482 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3483 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3484 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3485 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3486 fi
3487 output_verbose_link_cmd='echo'
3488 else
3489 _LT_AC_TAGVAR(ld_shlibs, $1)=no
d9898ee8 3490 fi
d9898ee8 3491 ;;
3492 osf3*)
3493 case $cc_basename in
3494 KCC*)
3495 # Kuck and Associates, Inc. (KAI) C++ Compiler
3496
3497 # KCC will only create a shared library if the output file
3498 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3499 # to its proper name (with version) after linking.
3500 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3501
3502 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3503 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3504
3505 # Archives containing C++ object files must be created using
3506 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3507 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3508
3509 ;;
3510 RCC*)
3511 # Rational C++ 2.4.1
3512 # FIXME: insert proper C++ library support
3513 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3514 ;;
3515 cxx*)
3516 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3517 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3518
3519 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3520 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3521
3522 # Commands to make compiler produce verbose output that lists
3523 # what "hidden" libraries, object files and flags are used when
3524 # linking a shared library.
3525 #
3526 # There doesn't appear to be a way to prevent this compiler from
3527 # explicitly linking system object files so we need to strip them
3528 # from the output so that they don't get included in the library
3529 # dependencies.
3530 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'
3531 ;;
3532 *)
3533 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3534 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3535 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3536
3537 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3538 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3539
3540 # Commands to make compiler produce verbose output that lists
3541 # what "hidden" libraries, object files and flags are used when
3542 # linking a shared library.
3543 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3544
3545 else
3546 # FIXME: insert proper C++ library support
3547 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3548 fi
3549 ;;
3550 esac
3551 ;;
3552 osf4* | osf5*)
3553 case $cc_basename in
3554 KCC*)
3555 # Kuck and Associates, Inc. (KAI) C++ Compiler
3556
3557 # KCC will only create a shared library if the output file
3558 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3559 # to its proper name (with version) after linking.
3560 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3561
3562 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3563 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3564
3565 # Archives containing C++ object files must be created using
3566 # the KAI C++ compiler.
3567 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3568 ;;
3569 RCC*)
3570 # Rational C++ 2.4.1
3571 # FIXME: insert proper C++ library support
3572 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3573 ;;
3574 cxx*)
3575 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3576 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3577 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3578 echo "-hidden">> $lib.exp~
3579 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3580 $rm $lib.exp'
3581
3582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3583 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3584
3585 # Commands to make compiler produce verbose output that lists
3586 # what "hidden" libraries, object files and flags are used when
3587 # linking a shared library.
3588 #
3589 # There doesn't appear to be a way to prevent this compiler from
3590 # explicitly linking system object files so we need to strip them
3591 # from the output so that they don't get included in the library
3592 # dependencies.
3593 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'
3594 ;;
3595 *)
3596 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3597 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3598 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3599
3600 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3601 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3602
3603 # Commands to make compiler produce verbose output that lists
3604 # what "hidden" libraries, object files and flags are used when
3605 # linking a shared library.
3606 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3607
3608 else
3609 # FIXME: insert proper C++ library support
3610 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3611 fi
3612 ;;
3613 esac
3614 ;;
3615 psos*)
3616 # FIXME: insert proper C++ library support
3617 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3618 ;;
3619 sunos4*)
3620 case $cc_basename in
3621 CC*)
3622 # Sun C++ 4.x
3623 # FIXME: insert proper C++ library support
3624 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3625 ;;
3626 lcc*)
3627 # Lucid
3628 # FIXME: insert proper C++ library support
3629 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3630 ;;
3631 *)
3632 # FIXME: insert proper C++ library support
3633 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3634 ;;
3635 esac
3636 ;;
3637 solaris*)
3638 case $cc_basename in
3639 CC*)
3640 # Sun C++ 4.2, 5.x and Centerline C++
3641 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3642 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3643 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3644 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3645 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3646
3647 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3648 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3649 case $host_os in
3650 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3651 *)
0fde1ce3 3652 # The compiler driver will combine and reorder linker options,
3653 # but understands `-z linker_flag'.
d9898ee8 3654 # Supported since Solaris 2.6 (maybe 2.5.1?)
0fde1ce3 3655 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
d9898ee8 3656 ;;
3657 esac
3658 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3659
3660 output_verbose_link_cmd='echo'
3661
3662 # Archives containing C++ object files must be created using
3663 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3664 # necessary to make sure instantiated templates are included
3665 # in the archive.
3666 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3667 ;;
3668 gcx*)
3669 # Green Hills C++ Compiler
3670 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3671
3672 # The C++ compiler must be used to create the archive.
3673 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'