blob: 98d9744679783720feedc624d9ee5ee368b80345 [file] [log] [blame]
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
mostang.com!davidm85bd7b82002-02-28 16:24:48 +00002
hp.com!davidme65e1fc2005-05-03 09:13:17 +00003# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005 Free Software Foundation, Inc.
mostang.com!davidm85bd7b82002-02-28 16:24:48 +00005# 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
hp.com!davidm2c9be972003-11-22 06:08:20 +000014# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
mostang.com!davidm0440c532003-01-17 18:12:55 +000015
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -070016# serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL
mostang.com!davidm0440c532003-01-17 18:12:55 +000017
hp.com!davidm2c9be972003-11-22 06:08:20 +000018
19# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20# -----------------------------------------------------------
21# If this macro is not defined by Autoconf, define it here.
22m4_ifdef([AC_PROVIDE_IFELSE],
23 [],
24 [m4_define([AC_PROVIDE_IFELSE],
25 [m4_ifdef([AC_PROVIDE_$1],
26 [$2], [$3])])])
27
28
29# AC_PROG_LIBTOOL
30# ---------------
mostang.com!davidm0440c532003-01-17 18:12:55 +000031AC_DEFUN([AC_PROG_LIBTOOL],
hp.com!davidm2c9be972003-11-22 06:08:20 +000032[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35 AC_PROVIDE_IFELSE([AC_PROG_CXX],
36 [AC_LIBTOOL_CXX],
37 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38 ])])
39dnl And a similar setup for Fortran 77 support
40 AC_PROVIDE_IFELSE([AC_PROG_F77],
41 [AC_LIBTOOL_F77],
42 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
43])])
44
45dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
49 [AC_LIBTOOL_GCJ],
50 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
51 [AC_LIBTOOL_GCJ],
52 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
53 [AC_LIBTOOL_GCJ],
54 [ifdef([AC_PROG_GCJ],
55 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56 ifdef([A][M_PROG_GCJ],
57 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58 ifdef([LT_AC_PROG_GCJ],
59 [define([LT_AC_PROG_GCJ],
60 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
61])])# AC_PROG_LIBTOOL
62
63
64# _AC_PROG_LIBTOOL
65# ----------------
66AC_DEFUN([_AC_PROG_LIBTOOL],
mostang.com!davidm0440c532003-01-17 18:12:55 +000067[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
hp.com!davidm2c9be972003-11-22 06:08:20 +000068AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +000071
72# This can be used to rebuild libtool when needed
73LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
74
75# Always use our own libtool.
76LIBTOOL='$(SHELL) $(top_builddir)/libtool'
77AC_SUBST(LIBTOOL)dnl
78
79# Prevent multiple expansion
80define([AC_PROG_LIBTOOL], [])
hp.com!davidm2c9be972003-11-22 06:08:20 +000081])# _AC_PROG_LIBTOOL
mostang.com!davidm0440c532003-01-17 18:12:55 +000082
hp.com!davidm2c9be972003-11-22 06:08:20 +000083
84# AC_LIBTOOL_SETUP
85# ----------------
mostang.com!davidm0440c532003-01-17 18:12:55 +000086AC_DEFUN([AC_LIBTOOL_SETUP],
hp.com!davidm2c9be972003-11-22 06:08:20 +000087[AC_PREREQ(2.50)dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +000088AC_REQUIRE([AC_ENABLE_SHARED])dnl
89AC_REQUIRE([AC_ENABLE_STATIC])dnl
90AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91AC_REQUIRE([AC_CANONICAL_HOST])dnl
92AC_REQUIRE([AC_CANONICAL_BUILD])dnl
93AC_REQUIRE([AC_PROG_CC])dnl
94AC_REQUIRE([AC_PROG_LD])dnl
95AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96AC_REQUIRE([AC_PROG_NM])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +000097
98AC_REQUIRE([AC_PROG_LN_S])dnl
99AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
hp.com!davidm2c9be972003-11-22 06:08:20 +0000100# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
mostang.com!davidm0440c532003-01-17 18:12:55 +0000101AC_REQUIRE([AC_OBJEXT])dnl
102AC_REQUIRE([AC_EXEEXT])dnl
103dnl
104
hp.com!davidm2c9be972003-11-22 06:08:20 +0000105AC_LIBTOOL_SYS_MAX_CMD_LEN
106AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
107AC_LIBTOOL_OBJDIR
108
109AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000110_LT_AC_PROG_ECHO_BACKSLASH
hp.com!davidm2c9be972003-11-22 06:08:20 +0000111
112case $host_os in
113aix3*)
114 # AIX sometimes has problems with the GCC collect2 program. For some
115 # reason, if we set the COLLECT_NAMES environment variable, the problems
116 # vanish in a puff of smoke.
117 if test "X${COLLECT_NAMES+set}" != Xset; then
118 COLLECT_NAMES=
119 export COLLECT_NAMES
120 fi
121 ;;
122esac
123
124# Sed substitution that helps us do robust quoting. It backslashifies
125# metacharacters that are still active within double-quoted strings.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600126Xsed='sed -e 1s/^X//'
hp.com!davidm2c9be972003-11-22 06:08:20 +0000127[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128
129# Same as above, but do not quote variable references.
130[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131
132# Sed substitution to delay expansion of an escaped shell variable in a
133# double_quote_subst'ed string.
134delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135
136# Sed substitution to avoid accidental globbing in evaled expressions
137no_glob_subst='s/\*/\\\*/g'
138
139# Constants:
140rm="rm -f"
141
142# Global variables:
143default_ofile=libtool
144can_build_shared=yes
145
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600146# All known linkers require a `.a' archive for static linking (except MSVC,
hp.com!davidm2c9be972003-11-22 06:08:20 +0000147# which needs '.lib').
148libext=a
149ltmain="$ac_aux_dir/ltmain.sh"
150ofile="$default_ofile"
151with_gnu_ld="$lt_cv_prog_gnu_ld"
152
153AC_CHECK_TOOL(AR, ar, false)
154AC_CHECK_TOOL(RANLIB, ranlib, :)
155AC_CHECK_TOOL(STRIP, strip, :)
156
157old_CC="$CC"
158old_CFLAGS="$CFLAGS"
159
160# Set sane defaults for various variables
161test -z "$AR" && AR=ar
162test -z "$AR_FLAGS" && AR_FLAGS=cru
163test -z "$AS" && AS=as
164test -z "$CC" && CC=cc
165test -z "$LTCC" && LTCC=$CC
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600166test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
hp.com!davidm2c9be972003-11-22 06:08:20 +0000167test -z "$DLLTOOL" && DLLTOOL=dlltool
168test -z "$LD" && LD=ld
169test -z "$LN_S" && LN_S="ln -s"
170test -z "$MAGIC_CMD" && MAGIC_CMD=file
171test -z "$NM" && NM=nm
172test -z "$SED" && SED=sed
173test -z "$OBJDUMP" && OBJDUMP=objdump
174test -z "$RANLIB" && RANLIB=:
175test -z "$STRIP" && STRIP=:
176test -z "$ac_objext" && ac_objext=o
177
178# Determine commands to create old-style static archives.
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700179old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
hp.com!davidm2c9be972003-11-22 06:08:20 +0000180old_postinstall_cmds='chmod 644 $oldlib'
181old_postuninstall_cmds=
182
183if test -n "$RANLIB"; then
184 case $host_os in
185 openbsd*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600186 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
hp.com!davidm2c9be972003-11-22 06:08:20 +0000187 ;;
188 *)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600189 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
hp.com!davidm2c9be972003-11-22 06:08:20 +0000190 ;;
191 esac
192 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
193fi
194
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600195_LT_CC_BASENAME([$compiler])
196
mostang.com!davidm0440c532003-01-17 18:12:55 +0000197# Only perform the check for file, if the check method requires it
198case $deplibs_check_method in
199file_magic*)
200 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
201 AC_PATH_MAGIC
mostang.com!davidm56c93292002-11-09 07:59:02 +0000202 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +0000203 ;;
204esac
205
hp.com!davidm2c9be972003-11-22 06:08:20 +0000206AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000208enable_win32_dll=yes, enable_win32_dll=no)
209
hp.com!davidm2c9be972003-11-22 06:08:20 +0000210AC_ARG_ENABLE([libtool-lock],
211 [AC_HELP_STRING([--disable-libtool-lock],
212 [avoid locking (might break parallel builds)])])
mostang.com!davidm0440c532003-01-17 18:12:55 +0000213test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
214
hp.com!davidm2c9be972003-11-22 06:08:20 +0000215AC_ARG_WITH([pic],
216 [AC_HELP_STRING([--with-pic],
217 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218 [pic_mode="$withval"],
219 [pic_mode=default])
220test -z "$pic_mode" && pic_mode=default
mostang.com!davidm0440c532003-01-17 18:12:55 +0000221
hp.com!davidm2c9be972003-11-22 06:08:20 +0000222# Use C for the default configuration in the libtool script
223tagname=
224AC_LIBTOOL_LANG_C_CONFIG
225_LT_AC_TAGCONFIG
226])# AC_LIBTOOL_SETUP
mostang.com!davidm0440c532003-01-17 18:12:55 +0000227
mostang.com!davidm0440c532003-01-17 18:12:55 +0000228
hp.com!davidm2c9be972003-11-22 06:08:20 +0000229# _LT_AC_SYS_COMPILER
230# -------------------
231AC_DEFUN([_LT_AC_SYS_COMPILER],
232[AC_REQUIRE([AC_PROG_CC])dnl
mostang.com!davidm0440c532003-01-17 18:12:55 +0000233
hp.com!davidm2c9be972003-11-22 06:08:20 +0000234# If no C compiler was specified, use CC.
235LTCC=${LTCC-"$CC"}
mostang.com!davidm0440c532003-01-17 18:12:55 +0000236
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600237# If no C compiler flags were specified, use CFLAGS.
238LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
239
hp.com!davidm2c9be972003-11-22 06:08:20 +0000240# Allow CC to be a program name with arguments.
241compiler=$CC
242])# _LT_AC_SYS_COMPILER
mostang.com!davidm0440c532003-01-17 18:12:55 +0000243
mostang.com!davidm0440c532003-01-17 18:12:55 +0000244
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600245# _LT_CC_BASENAME(CC)
246# -------------------
247# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
248AC_DEFUN([_LT_CC_BASENAME],
249[for cc_temp in $1""; do
250 case $cc_temp in
251 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
253 \-*) ;;
254 *) break;;
255 esac
256done
257cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
258])
259
260
261# _LT_COMPILER_BOILERPLATE
262# ------------------------
263# Check for compiler boilerplate output or warnings with
264# the simple compiler test code.
265AC_DEFUN([_LT_COMPILER_BOILERPLATE],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700266[AC_REQUIRE([LT_AC_PROG_SED])dnl
267ac_outfile=conftest.$ac_objext
268echo "$lt_simple_compile_test_code" >conftest.$ac_ext
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600269eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
270_lt_compiler_boilerplate=`cat conftest.err`
271$rm conftest*
272])# _LT_COMPILER_BOILERPLATE
273
274
275# _LT_LINKER_BOILERPLATE
276# ----------------------
277# Check for linker boilerplate output or warnings with
278# the simple link test code.
279AC_DEFUN([_LT_LINKER_BOILERPLATE],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700280[AC_REQUIRE([LT_AC_PROG_SED])dnl
281ac_outfile=conftest.$ac_objext
282echo "$lt_simple_link_test_code" >conftest.$ac_ext
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600283eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
284_lt_linker_boilerplate=`cat conftest.err`
285$rm conftest*
286])# _LT_LINKER_BOILERPLATE
287
288
hp.com!davidm2c9be972003-11-22 06:08:20 +0000289# _LT_AC_SYS_LIBPATH_AIX
290# ----------------------
291# Links a minimal program and checks the executable
292# for the system default hardcoded library path. In most cases,
293# this is /usr/lib:/lib, but when the MPI compilers are used
294# the location of the communication and MPI libs are included too.
295# If we don't find anything, use the default library path according
296# to the aix ld manual.
297AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700298[AC_REQUIRE([LT_AC_PROG_SED])dnl
299AC_LINK_IFELSE(AC_LANG_PROGRAM,[
300lt_aix_libpath_sed='
301 /Import File Strings/,/^$/ {
302 /^0/ {
303 s/^0 *\(.*\)$/\1/
304 p
305 }
306 }'
307aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
hp.com!davidm2c9be972003-11-22 06:08:20 +0000308# Check for a 64-bit object if we didn't find anything.
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700309if test -z "$aix_libpath"; then
310 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
311fi],[])
hp.com!davidm2c9be972003-11-22 06:08:20 +0000312if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
313])# _LT_AC_SYS_LIBPATH_AIX
mostang.com!davidm0440c532003-01-17 18:12:55 +0000314
mostang.com!davidm0440c532003-01-17 18:12:55 +0000315
hp.com!davidm2c9be972003-11-22 06:08:20 +0000316# _LT_AC_SHELL_INIT(ARG)
317# ----------------------
318AC_DEFUN([_LT_AC_SHELL_INIT],
319[ifdef([AC_DIVERSION_NOTICE],
320 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
321 [AC_DIVERT_PUSH(NOTICE)])
322$1
323AC_DIVERT_POP
324])# _LT_AC_SHELL_INIT
mostang.com!davidm0440c532003-01-17 18:12:55 +0000325
mostang.com!davidm0440c532003-01-17 18:12:55 +0000326
327# _LT_AC_PROG_ECHO_BACKSLASH
328# --------------------------
329# Add some code to the start of the generated configure script which
330# will find an echo command which doesn't interpret backslashes.
331AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000332[_LT_AC_SHELL_INIT([
mostang.com!davidm0440c532003-01-17 18:12:55 +0000333# Check that we are running under the correct shell.
334SHELL=${CONFIG_SHELL-/bin/sh}
335
336case X$ECHO in
337X*--fallback-echo)
338 # Remove one level of quotation (which was required for Make).
339 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
340 ;;
341esac
342
343echo=${ECHO-echo}
344if test "X[$]1" = X--no-reexec; then
345 # Discard the --no-reexec flag, and continue.
346 shift
347elif test "X[$]1" = X--fallback-echo; then
348 # Avoid inline document here, it may be left over
349 :
hp.com!davidm2c9be972003-11-22 06:08:20 +0000350elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
mostang.com!davidm0440c532003-01-17 18:12:55 +0000351 # Yippee, $echo works!
352 :
353else
354 # Restart under the correct shell.
355 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
356fi
357
358if test "X[$]1" = X--fallback-echo; then
359 # used as fallback echo
360 shift
361 cat <<EOF
hp.com!davidm2c9be972003-11-22 06:08:20 +0000362[$]*
mostang.com!davidm0440c532003-01-17 18:12:55 +0000363EOF
364 exit 0
365fi
366
367# The HP-UX ksh and POSIX shell print the target directory to stdout
368# if CDPATH is set.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600369(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
mostang.com!davidm0440c532003-01-17 18:12:55 +0000370
371if test -z "$ECHO"; then
372if test "X${echo_test_string+set}" != Xset; then
373# find a string as large as possible, as long as the shell can cope with it
374 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
375 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600376 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
377 echo_test_string=`eval $cmd` &&
mostang.com!davidm0440c532003-01-17 18:12:55 +0000378 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
379 then
380 break
381 fi
382 done
383fi
384
385if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
386 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
387 test "X$echo_testing_string" = "X$echo_test_string"; then
388 :
389else
390 # The Solaris, AIX, and Digital Unix default echo programs unquote
391 # backslashes. This makes it impossible to quote backslashes using
392 # echo "$something" | sed 's/\\/\\\\/g'
393 #
394 # So, first we look for a working echo in the user's PATH.
395
hp.com!davidm2c9be972003-11-22 06:08:20 +0000396 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
mostang.com!davidm0440c532003-01-17 18:12:55 +0000397 for dir in $PATH /usr/ucb; do
hp.com!davidm2c9be972003-11-22 06:08:20 +0000398 IFS="$lt_save_ifs"
mostang.com!davidm0440c532003-01-17 18:12:55 +0000399 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
400 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
401 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
402 test "X$echo_testing_string" = "X$echo_test_string"; then
403 echo="$dir/echo"
404 break
405 fi
406 done
hp.com!davidm2c9be972003-11-22 06:08:20 +0000407 IFS="$lt_save_ifs"
mostang.com!davidm0440c532003-01-17 18:12:55 +0000408
409 if test "X$echo" = Xecho; then
410 # We didn't find a better echo, so look for alternatives.
411 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
412 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
413 test "X$echo_testing_string" = "X$echo_test_string"; then
414 # This shell has a builtin print -r that does the trick.
415 echo='print -r'
416 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
417 test "X$CONFIG_SHELL" != X/bin/ksh; then
418 # If we have ksh, try running configure again with it.
419 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
420 export ORIGINAL_CONFIG_SHELL
421 CONFIG_SHELL=/bin/ksh
422 export CONFIG_SHELL
423 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
424 else
425 # Try using printf.
426 echo='printf %s\n'
427 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
428 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
429 test "X$echo_testing_string" = "X$echo_test_string"; then
430 # Cool, printf works
431 :
432 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
433 test "X$echo_testing_string" = 'X\t' &&
434 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
435 test "X$echo_testing_string" = "X$echo_test_string"; then
436 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
437 export CONFIG_SHELL
438 SHELL="$CONFIG_SHELL"
439 export SHELL
440 echo="$CONFIG_SHELL [$]0 --fallback-echo"
441 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
442 test "X$echo_testing_string" = 'X\t' &&
443 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
444 test "X$echo_testing_string" = "X$echo_test_string"; then
445 echo="$CONFIG_SHELL [$]0 --fallback-echo"
446 else
447 # maybe with a smaller string...
448 prev=:
449
450 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
451 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
452 then
453 break
454 fi
455 prev="$cmd"
456 done
457
458 if test "$prev" != 'sed 50q "[$]0"'; then
459 echo_test_string=`eval $prev`
460 export echo_test_string
461 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
462 else
463 # Oops. We lost completely, so just stick with echo.
464 echo=echo
465 fi
466 fi
467 fi
468 fi
469fi
470fi
471
472# Copy echo and quote the copy suitably for passing to libtool from
473# the Makefile, instead of quoting the original, which is used later.
474ECHO=$echo
475if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
476 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
477fi
478
479AC_SUBST(ECHO)
hp.com!davidm2c9be972003-11-22 06:08:20 +0000480])])# _LT_AC_PROG_ECHO_BACKSLASH
481
482
483# _LT_AC_LOCK
484# -----------
485AC_DEFUN([_LT_AC_LOCK],
486[AC_ARG_ENABLE([libtool-lock],
487 [AC_HELP_STRING([--disable-libtool-lock],
488 [avoid locking (might break parallel builds)])])
489test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
490
491# Some flags need to be propagated to the compiler or linker for good
492# libtool support.
493case $host in
494ia64-*-hpux*)
495 # Find out which ABI we are using.
496 echo 'int i;' > conftest.$ac_ext
497 if AC_TRY_EVAL(ac_compile); then
498 case `/usr/bin/file conftest.$ac_objext` in
499 *ELF-32*)
500 HPUX_IA64_MODE="32"
501 ;;
502 *ELF-64*)
503 HPUX_IA64_MODE="64"
504 ;;
505 esac
506 fi
507 rm -rf conftest*
508 ;;
509*-*-irix6*)
510 # Find out which ABI we are using.
511 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
512 if AC_TRY_EVAL(ac_compile); then
513 if test "$lt_cv_prog_gnu_ld" = yes; then
514 case `/usr/bin/file conftest.$ac_objext` in
515 *32-bit*)
516 LD="${LD-ld} -melf32bsmip"
517 ;;
518 *N32*)
519 LD="${LD-ld} -melf32bmipn32"
520 ;;
521 *64-bit*)
522 LD="${LD-ld} -melf64bmip"
523 ;;
524 esac
525 else
526 case `/usr/bin/file conftest.$ac_objext` in
527 *32-bit*)
528 LD="${LD-ld} -32"
529 ;;
530 *N32*)
531 LD="${LD-ld} -n32"
532 ;;
533 *64-bit*)
534 LD="${LD-ld} -64"
535 ;;
536 esac
537 fi
538 fi
539 rm -rf conftest*
540 ;;
541
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700542x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
543s390*-*linux*|sparc*-*linux*)
hp.com!davidm2c9be972003-11-22 06:08:20 +0000544 # Find out which ABI we are using.
545 echo 'int i;' > conftest.$ac_ext
546 if AC_TRY_EVAL(ac_compile); then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600547 case `/usr/bin/file conftest.o` in
hp.com!davidm2c9be972003-11-22 06:08:20 +0000548 *32-bit*)
549 case $host in
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700550 x86_64-*kfreebsd*-gnu)
551 LD="${LD-ld} -m elf_i386_fbsd"
552 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +0000553 x86_64-*linux*)
554 LD="${LD-ld} -m elf_i386"
555 ;;
556 ppc64-*linux*|powerpc64-*linux*)
557 LD="${LD-ld} -m elf32ppclinux"
558 ;;
559 s390x-*linux*)
560 LD="${LD-ld} -m elf_s390"
561 ;;
562 sparc64-*linux*)
563 LD="${LD-ld} -m elf32_sparc"
564 ;;
565 esac
566 ;;
567 *64-bit*)
568 case $host in
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700569 x86_64-*kfreebsd*-gnu)
570 LD="${LD-ld} -m elf_x86_64_fbsd"
571 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +0000572 x86_64-*linux*)
573 LD="${LD-ld} -m elf_x86_64"
574 ;;
575 ppc*-*linux*|powerpc*-*linux*)
576 LD="${LD-ld} -m elf64ppc"
577 ;;
578 s390*-*linux*)
579 LD="${LD-ld} -m elf64_s390"
580 ;;
581 sparc*-*linux*)
582 LD="${LD-ld} -m elf64_sparc"
583 ;;
584 esac
585 ;;
586 esac
587 fi
588 rm -rf conftest*
589 ;;
590
591*-*-sco3.2v5*)
592 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
593 SAVE_CFLAGS="$CFLAGS"
594 CFLAGS="$CFLAGS -belf"
595 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
596 [AC_LANG_PUSH(C)
597 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
598 AC_LANG_POP])
599 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
600 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
601 CFLAGS="$SAVE_CFLAGS"
602 fi
603 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600604sparc*-*solaris*)
605 # Find out which ABI we are using.
606 echo 'int i;' > conftest.$ac_ext
607 if AC_TRY_EVAL(ac_compile); then
608 case `/usr/bin/file conftest.o` in
609 *64-bit*)
610 case $lt_cv_prog_gnu_ld in
611 yes*) LD="${LD-ld} -m elf64_sparc" ;;
612 *) LD="${LD-ld} -64" ;;
613 esac
614 ;;
615 esac
616 fi
617 rm -rf conftest*
618 ;;
619
hp.com!davidm2c9be972003-11-22 06:08:20 +0000620AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
621[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
622 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
623 AC_CHECK_TOOL(AS, as, false)
624 AC_CHECK_TOOL(OBJDUMP, objdump, false)
625 ;;
626 ])
627esac
628
629need_locks="$enable_libtool_lock"
630
631])# _LT_AC_LOCK
632
633
634# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
635# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
636# ----------------------------------------------------------------
637# Check whether the given compiler option works
638AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
639[AC_REQUIRE([LT_AC_PROG_SED])
640AC_CACHE_CHECK([$1], [$2],
641 [$2=no
642 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700643 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
hp.com!davidm2c9be972003-11-22 06:08:20 +0000644 lt_compiler_flag="$3"
645 # Insert the option either (1) after the last *FLAGS variable, or
646 # (2) before a word containing "conftest.", or (3) at the end.
647 # Note that $ac_compile itself does not contain backslashes and begins
648 # with a dollar sign (not a hyphen), so the echo should work correctly.
649 # The option is referenced via a variable to avoid confusing sed.
650 lt_compile=`echo "$ac_compile" | $SED \
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600651 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
hp.com!davidm2c9be972003-11-22 06:08:20 +0000652 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
653 -e 's:$: $lt_compiler_flag:'`
654 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
655 (eval "$lt_compile" 2>conftest.err)
656 ac_status=$?
657 cat conftest.err >&AS_MESSAGE_LOG_FD
658 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
659 if (exit $ac_status) && test -s "$ac_outfile"; then
660 # The compiler can only warn and ignore the option if not recognized
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600661 # So say no if there are warnings other than the usual output.
662 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
663 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
664 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
hp.com!davidm2c9be972003-11-22 06:08:20 +0000665 $2=yes
666 fi
667 fi
668 $rm conftest*
669])
670
671if test x"[$]$2" = xyes; then
672 ifelse([$5], , :, [$5])
673else
674 ifelse([$6], , :, [$6])
675fi
676])# AC_LIBTOOL_COMPILER_OPTION
677
678
679# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
680# [ACTION-SUCCESS], [ACTION-FAILURE])
681# ------------------------------------------------------------
682# Check whether the given compiler option works
683AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700684[AC_REQUIRE([LT_AC_PROG_SED])dnl
685AC_CACHE_CHECK([$1], [$2],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000686 [$2=no
687 save_LDFLAGS="$LDFLAGS"
688 LDFLAGS="$LDFLAGS $3"
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700689 echo "$lt_simple_link_test_code" > conftest.$ac_ext
hp.com!davidm2c9be972003-11-22 06:08:20 +0000690 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600691 # The linker can only warn and ignore the option if not recognized
hp.com!davidm2c9be972003-11-22 06:08:20 +0000692 # So say no if there are warnings
693 if test -s conftest.err; then
694 # Append any errors to the config.log.
695 cat conftest.err 1>&AS_MESSAGE_LOG_FD
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600696 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
697 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
698 if diff conftest.exp conftest.er2 >/dev/null; then
699 $2=yes
700 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +0000701 else
702 $2=yes
703 fi
704 fi
705 $rm conftest*
706 LDFLAGS="$save_LDFLAGS"
707])
708
709if test x"[$]$2" = xyes; then
710 ifelse([$4], , :, [$4])
711else
712 ifelse([$5], , :, [$5])
713fi
714])# AC_LIBTOOL_LINKER_OPTION
715
716
717# AC_LIBTOOL_SYS_MAX_CMD_LEN
718# --------------------------
719AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
720[# find the maximum length of command line arguments
721AC_MSG_CHECKING([the maximum length of command line arguments])
722AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
723 i=0
hp.com!davidm2de17682004-04-20 16:53:44 +0000724 teststring="ABCD"
hp.com!davidm2c9be972003-11-22 06:08:20 +0000725
726 case $build_os in
727 msdosdjgpp*)
728 # On DJGPP, this test can blow up pretty badly due to problems in libc
729 # (any single argument exceeding 2000 bytes causes a buffer overrun
730 # during glob expansion). Even if it were fixed, the result of this
731 # check would be larger than it should be.
732 lt_cv_sys_max_cmd_len=12288; # 12K is about right
733 ;;
734
735 gnu*)
736 # Under GNU Hurd, this test is not required because there is
737 # no limit to the length of command line arguments.
738 # Libtool will interpret -1 as no limit whatsoever
739 lt_cv_sys_max_cmd_len=-1;
740 ;;
741
742 cygwin* | mingw*)
743 # On Win9x/ME, this test blows up -- it succeeds, but takes
744 # about 5 minutes as the teststring grows exponentially.
745 # Worse, since 9x/ME are not pre-emptively multitasking,
746 # you end up with a "frozen" computer, even though with patience
747 # the test eventually succeeds (with a max line length of 256k).
748 # Instead, let's just punt: use the minimum linelength reported by
749 # all of the supported platforms: 8192 (on NT/2K/XP).
750 lt_cv_sys_max_cmd_len=8192;
751 ;;
752
753 amigaos*)
754 # On AmigaOS with pdksh, this test takes hours, literally.
755 # So we just punt and use a minimum line length of 8192.
756 lt_cv_sys_max_cmd_len=8192;
757 ;;
758
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600759 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
760 # This has been around since 386BSD, at least. Likely further.
761 if test -x /sbin/sysctl; then
762 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
763 elif test -x /usr/sbin/sysctl; then
764 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
765 else
766 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
767 fi
768 # And add a safety zone
769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
771 ;;
772
773 interix*)
774 # We know the value 262144 and hardcode it with a safety zone (like BSD)
775 lt_cv_sys_max_cmd_len=196608
776 ;;
777
778 osf*)
779 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
780 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
781 # nice to cause kernel panics so lets avoid the loop below.
782 # First set a reasonable default.
783 lt_cv_sys_max_cmd_len=16384
784 #
785 if test -x /sbin/sysconfig; then
786 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
787 *1*) lt_cv_sys_max_cmd_len=-1 ;;
788 esac
789 fi
790 ;;
791 sco3.2v5*)
792 lt_cv_sys_max_cmd_len=102400
793 ;;
794 sysv5* | sco5v6* | sysv4.2uw2*)
795 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
796 if test -n "$kargmax"; then
797 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
798 else
799 lt_cv_sys_max_cmd_len=32768
800 fi
801 ;;
802 *)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700803 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
804 if test -n "$lt_cv_sys_max_cmd_len"; then
805 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
806 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
807 else
808 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
809 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
hp.com!davidm2de17682004-04-20 16:53:44 +0000810 = "XX$teststring") >/dev/null 2>&1 &&
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700811 new_result=`expr "X$teststring" : ".*" 2>&1` &&
812 lt_cv_sys_max_cmd_len=$new_result &&
813 test $i != 17 # 1/2 MB should be enough
814 do
815 i=`expr $i + 1`
816 teststring=$teststring$teststring
817 done
818 teststring=
819 # Add a significant safety factor because C++ compilers can tack on massive
820 # amounts of additional arguments before passing them to the linker.
821 # It appears as though 1/2 is a usable value.
822 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
823 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +0000824 ;;
825 esac
826])
827if test -n $lt_cv_sys_max_cmd_len ; then
828 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
829else
830 AC_MSG_RESULT(none)
831fi
832])# AC_LIBTOOL_SYS_MAX_CMD_LEN
833
834
835# _LT_AC_CHECK_DLFCN
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600836# ------------------
hp.com!davidm2c9be972003-11-22 06:08:20 +0000837AC_DEFUN([_LT_AC_CHECK_DLFCN],
838[AC_CHECK_HEADERS(dlfcn.h)dnl
839])# _LT_AC_CHECK_DLFCN
840
mostang.com!davidm0440c532003-01-17 18:12:55 +0000841
842# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
843# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600844# ---------------------------------------------------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +0000845AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000846[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
847if test "$cross_compiling" = yes; then :
mostang.com!davidm0440c532003-01-17 18:12:55 +0000848 [$4]
849else
mostang.com!davidm0440c532003-01-17 18:12:55 +0000850 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
851 lt_status=$lt_dlunknown
852 cat > conftest.$ac_ext <<EOF
853[#line __oline__ "configure"
854#include "confdefs.h"
855
856#if HAVE_DLFCN_H
857#include <dlfcn.h>
858#endif
859
860#include <stdio.h>
861
862#ifdef RTLD_GLOBAL
863# define LT_DLGLOBAL RTLD_GLOBAL
864#else
865# ifdef DL_GLOBAL
866# define LT_DLGLOBAL DL_GLOBAL
867# else
868# define LT_DLGLOBAL 0
869# endif
870#endif
871
872/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
873 find out it does not work in some platform. */
874#ifndef LT_DLLAZY_OR_NOW
875# ifdef RTLD_LAZY
876# define LT_DLLAZY_OR_NOW RTLD_LAZY
877# else
878# ifdef DL_LAZY
879# define LT_DLLAZY_OR_NOW DL_LAZY
880# else
881# ifdef RTLD_NOW
882# define LT_DLLAZY_OR_NOW RTLD_NOW
883# else
884# ifdef DL_NOW
885# define LT_DLLAZY_OR_NOW DL_NOW
886# else
887# define LT_DLLAZY_OR_NOW 0
888# endif
889# endif
890# endif
891# endif
892#endif
893
894#ifdef __cplusplus
895extern "C" void exit (int);
896#endif
897
898void fnord() { int i=42;}
899int main ()
900{
901 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
902 int status = $lt_dlunknown;
903
904 if (self)
905 {
906 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
907 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
908 /* dlclose (self); */
909 }
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600910 else
911 puts (dlerror ());
mostang.com!davidm0440c532003-01-17 18:12:55 +0000912
913 exit (status);
914}]
915EOF
916 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600917 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
mostang.com!davidm0440c532003-01-17 18:12:55 +0000918 lt_status=$?
919 case x$lt_status in
920 x$lt_dlno_uscore) $1 ;;
921 x$lt_dlneed_uscore) $2 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600922 x$lt_dlunknown|x*) $3 ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +0000923 esac
924 else :
925 # compilation failed
926 $3
927 fi
928fi
929rm -fr conftest*
930])# _LT_AC_TRY_DLOPEN_SELF
931
hp.com!davidm2c9be972003-11-22 06:08:20 +0000932
mostang.com!davidm0440c532003-01-17 18:12:55 +0000933# AC_LIBTOOL_DLOPEN_SELF
David Mosberger-Tang7923ae32007-04-10 20:35:15 -0600934# ----------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +0000935AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000936[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
937if test "x$enable_dlopen" != xyes; then
mostang.com!davidm0440c532003-01-17 18:12:55 +0000938 enable_dlopen=unknown
939 enable_dlopen_self=unknown
940 enable_dlopen_self_static=unknown
941else
942 lt_cv_dlopen=no
943 lt_cv_dlopen_libs=
944
945 case $host_os in
946 beos*)
947 lt_cv_dlopen="load_add_on"
948 lt_cv_dlopen_libs=
949 lt_cv_dlopen_self=yes
950 ;;
951
hp.com!davidm2c9be972003-11-22 06:08:20 +0000952 mingw* | pw32*)
mostang.com!davidm0440c532003-01-17 18:12:55 +0000953 lt_cv_dlopen="LoadLibrary"
954 lt_cv_dlopen_libs=
955 ;;
956
hp.com!davidm2c9be972003-11-22 06:08:20 +0000957 cygwin*)
958 lt_cv_dlopen="dlopen"
959 lt_cv_dlopen_libs=
960 ;;
961
962 darwin*)
963 # if libdl is installed we need to link against it
964 AC_CHECK_LIB([dl], [dlopen],
965 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
966 lt_cv_dlopen="dyld"
967 lt_cv_dlopen_libs=
968 lt_cv_dlopen_self=yes
969 ])
970 ;;
971
mostang.com!davidm0440c532003-01-17 18:12:55 +0000972 *)
973 AC_CHECK_FUNC([shl_load],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000974 [lt_cv_dlopen="shl_load"],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000975 [AC_CHECK_LIB([dld], [shl_load],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000976 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000977 [AC_CHECK_FUNC([dlopen],
978 [lt_cv_dlopen="dlopen"],
979 [AC_CHECK_LIB([dl], [dlopen],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000980 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000981 [AC_CHECK_LIB([svld], [dlopen],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000982 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
mostang.com!davidm0440c532003-01-17 18:12:55 +0000983 [AC_CHECK_LIB([dld], [dld_link],
hp.com!davidm2c9be972003-11-22 06:08:20 +0000984 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
mostang.com!davidm0440c532003-01-17 18:12:55 +0000985 ])
986 ])
987 ])
988 ])
989 ])
990 ;;
991 esac
992
993 if test "x$lt_cv_dlopen" != xno; then
994 enable_dlopen=yes
995 else
996 enable_dlopen=no
997 fi
998
999 case $lt_cv_dlopen in
1000 dlopen)
1001 save_CPPFLAGS="$CPPFLAGS"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001002 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1003
1004 save_LDFLAGS="$LDFLAGS"
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001005 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001006
1007 save_LIBS="$LIBS"
1008 LIBS="$lt_cv_dlopen_libs $LIBS"
1009
1010 AC_CACHE_CHECK([whether a program can dlopen itself],
1011 lt_cv_dlopen_self, [dnl
1012 _LT_AC_TRY_DLOPEN_SELF(
1013 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1014 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1015 ])
1016
1017 if test "x$lt_cv_dlopen_self" = xyes; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001018 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001019 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1020 lt_cv_dlopen_self_static, [dnl
1021 _LT_AC_TRY_DLOPEN_SELF(
1022 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1023 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1024 ])
1025 fi
1026
1027 CPPFLAGS="$save_CPPFLAGS"
1028 LDFLAGS="$save_LDFLAGS"
1029 LIBS="$save_LIBS"
1030 ;;
1031 esac
1032
1033 case $lt_cv_dlopen_self in
1034 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1035 *) enable_dlopen_self=unknown ;;
1036 esac
1037
1038 case $lt_cv_dlopen_self_static in
1039 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1040 *) enable_dlopen_self_static=unknown ;;
1041 esac
1042fi
1043])# AC_LIBTOOL_DLOPEN_SELF
1044
mostang.com!davidm0440c532003-01-17 18:12:55 +00001045
hp.com!davidm2c9be972003-11-22 06:08:20 +00001046# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1047# ---------------------------------
1048# Check to see if options -c and -o are simultaneously supported by compiler
1049AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001050[AC_REQUIRE([LT_AC_PROG_SED])dnl
1051AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
hp.com!davidm2c9be972003-11-22 06:08:20 +00001052AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1053 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1054 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1055 $rm -r conftest 2>/dev/null
1056 mkdir conftest
1057 cd conftest
1058 mkdir out
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001059 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
mostang.com!davidm0440c532003-01-17 18:12:55 +00001060
hp.com!davidm2c9be972003-11-22 06:08:20 +00001061 lt_compiler_flag="-o out/conftest2.$ac_objext"
1062 # Insert the option either (1) after the last *FLAGS variable, or
1063 # (2) before a word containing "conftest.", or (3) at the end.
1064 # Note that $ac_compile itself does not contain backslashes and begins
1065 # with a dollar sign (not a hyphen), so the echo should work correctly.
1066 lt_compile=`echo "$ac_compile" | $SED \
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001067 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
hp.com!davidm2c9be972003-11-22 06:08:20 +00001068 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1069 -e 's:$: $lt_compiler_flag:'`
1070 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1071 (eval "$lt_compile" 2>out/conftest.err)
1072 ac_status=$?
1073 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1074 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1075 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1076 then
1077 # The compiler can only warn and ignore the option if not recognized
1078 # So say no if there are warnings
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001079 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1080 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1081 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001082 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1083 fi
1084 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001085 chmod u+w . 2>&AS_MESSAGE_LOG_FD
hp.com!davidm2c9be972003-11-22 06:08:20 +00001086 $rm conftest*
1087 # SGI C++ compiler will create directory out/ii_files/ for
1088 # template instantiation
1089 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1090 $rm out/* && rmdir out
1091 cd ..
1092 rmdir conftest
1093 $rm conftest*
mostang.com!davidm0440c532003-01-17 18:12:55 +00001094])
hp.com!davidm2c9be972003-11-22 06:08:20 +00001095])# AC_LIBTOOL_PROG_CC_C_O
mostang.com!davidm0440c532003-01-17 18:12:55 +00001096
1097
hp.com!davidm2c9be972003-11-22 06:08:20 +00001098# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1099# -----------------------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +00001100# Check to see if we can do hard links to lock some files if needed
hp.com!davidm2c9be972003-11-22 06:08:20 +00001101AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1102[AC_REQUIRE([_LT_AC_LOCK])dnl
1103
mostang.com!davidm0440c532003-01-17 18:12:55 +00001104hard_links="nottested"
hp.com!davidm2c9be972003-11-22 06:08:20 +00001105if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001106 # do not overwrite the value of need_locks provided by the user
1107 AC_MSG_CHECKING([if we can lock with hard links])
1108 hard_links=yes
1109 $rm conftest*
1110 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1111 touch conftest.a
1112 ln conftest.a conftest.b 2>&5 || hard_links=no
1113 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1114 AC_MSG_RESULT([$hard_links])
1115 if test "$hard_links" = no; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001116 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001117 need_locks=warn
1118 fi
1119else
1120 need_locks=no
1121fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001122])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
mostang.com!davidm0440c532003-01-17 18:12:55 +00001123
mostang.com!davidm0440c532003-01-17 18:12:55 +00001124
hp.com!davidm2c9be972003-11-22 06:08:20 +00001125# AC_LIBTOOL_OBJDIR
1126# -----------------
1127AC_DEFUN([AC_LIBTOOL_OBJDIR],
1128[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1129[rm -f .libs 2>/dev/null
1130mkdir .libs 2>/dev/null
1131if test -d .libs; then
1132 lt_cv_objdir=.libs
mostang.com!davidm0440c532003-01-17 18:12:55 +00001133else
hp.com!davidm2c9be972003-11-22 06:08:20 +00001134 # MS-DOS does not allow filenames that begin with a dot.
1135 lt_cv_objdir=_libs
mostang.com!davidm0440c532003-01-17 18:12:55 +00001136fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001137rmdir .libs 2>/dev/null])
1138objdir=$lt_cv_objdir
1139])# AC_LIBTOOL_OBJDIR
mostang.com!davidm0440c532003-01-17 18:12:55 +00001140
hp.com!davidm2c9be972003-11-22 06:08:20 +00001141
1142# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1143# ----------------------------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +00001144# Check hardcoding attributes.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001145AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1146[AC_MSG_CHECKING([how to hardcode library paths into programs])
1147_LT_AC_TAGVAR(hardcode_action, $1)=
1148if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001149 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1150 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001151
1152 # We can hardcode non-existant directories.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001153 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
mostang.com!davidm0440c532003-01-17 18:12:55 +00001154 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1155 # have to relink, otherwise we might link with an installed library
1156 # when we should be linking with a yet-to-be-installed one
hp.com!davidm2c9be972003-11-22 06:08:20 +00001157 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1158 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
mostang.com!davidm0440c532003-01-17 18:12:55 +00001159 # Linking always hardcodes the temporary library directory.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001160 _LT_AC_TAGVAR(hardcode_action, $1)=relink
mostang.com!davidm0440c532003-01-17 18:12:55 +00001161 else
1162 # We can link without hardcoding, and we can hardcode nonexisting dirs.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001163 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
mostang.com!davidm0440c532003-01-17 18:12:55 +00001164 fi
1165else
1166 # We cannot hardcode anything, or else we can only hardcode existing
1167 # directories.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001168 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
mostang.com!davidm0440c532003-01-17 18:12:55 +00001169fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001170AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001171
hp.com!davidm2c9be972003-11-22 06:08:20 +00001172if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1173 # Fast installation is not supported
1174 enable_fast_install=no
1175elif test "$shlibpath_overrides_runpath" = yes ||
1176 test "$enable_shared" = no; then
1177 # Fast installation is not necessary
1178 enable_fast_install=needless
1179fi
1180])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1181
1182
1183# AC_LIBTOOL_SYS_LIB_STRIP
1184# ------------------------
1185AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1186[striplib=
mostang.com!davidm0440c532003-01-17 18:12:55 +00001187old_striplib=
1188AC_MSG_CHECKING([whether stripping libraries is possible])
1189if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1190 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1191 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1192 AC_MSG_RESULT([yes])
1193else
hp.com!davidm2c9be972003-11-22 06:08:20 +00001194# FIXME - insert some real tests, host_os isn't really good enough
1195 case $host_os in
1196 darwin*)
1197 if test -n "$STRIP" ; then
1198 striplib="$STRIP -x"
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001199 old_striplib="$STRIP -S"
hp.com!davidm2c9be972003-11-22 06:08:20 +00001200 AC_MSG_RESULT([yes])
1201 else
mostang.com!davidm0440c532003-01-17 18:12:55 +00001202 AC_MSG_RESULT([no])
1203fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001204 ;;
1205 *)
1206 AC_MSG_RESULT([no])
1207 ;;
1208 esac
1209fi
1210])# AC_LIBTOOL_SYS_LIB_STRIP
mostang.com!davidm0440c532003-01-17 18:12:55 +00001211
mostang.com!davidm0440c532003-01-17 18:12:55 +00001212
hp.com!davidm2c9be972003-11-22 06:08:20 +00001213# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1214# -----------------------------
mostang.com!davidm0440c532003-01-17 18:12:55 +00001215# PORTME Fill in your ld.so characteristics
hp.com!davidm2c9be972003-11-22 06:08:20 +00001216AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001217[AC_REQUIRE([LT_AC_PROG_SED])dnl
1218AC_MSG_CHECKING([dynamic linker characteristics])
mostang.com!davidm0440c532003-01-17 18:12:55 +00001219library_names_spec=
1220libname_spec='lib$name'
1221soname_spec=
hp.com!davidm2de17682004-04-20 16:53:44 +00001222shrext_cmds=".so"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001223postinstall_cmds=
1224postuninstall_cmds=
1225finish_cmds=
1226finish_eval=
1227shlibpath_var=
1228shlibpath_overrides_runpath=unknown
1229version_type=none
1230dynamic_linker="$host_os ld.so"
1231sys_lib_dlsearch_path_spec="/lib /usr/lib"
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001232m4_if($1,[],[
hp.com!davidm2c9be972003-11-22 06:08:20 +00001233if test "$GCC" = yes; then
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001234 case $host_os in
1235 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1236 *) lt_awk_arg="/^libraries:/" ;;
1237 esac
1238 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1239 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001240 # if the path contains ";" then we assume it to be the separator
1241 # otherwise default to the standard path separator (i.e. ":") - it is
1242 # assumed that no part of a normal pathname contains ";" but that should
1243 # okay in the real world where ";" in dirpaths is itself problematic.
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001244 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
hp.com!davidm2c9be972003-11-22 06:08:20 +00001245 else
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001246 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
hp.com!davidm2c9be972003-11-22 06:08:20 +00001247 fi
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001248 # Ok, now we have the path, separated by spaces, we can step through it
1249 # and add multilib dir if necessary.
1250 lt_tmp_lt_search_path_spec=
1251 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1252 for lt_sys_path in $lt_search_path_spec; do
1253 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1254 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1255 else
1256 test -d "$lt_sys_path" && \
1257 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1258 fi
1259 done
1260 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1261BEGIN {RS=" "; FS="/|\n";} {
1262 lt_foo="";
1263 lt_count=0;
1264 for (lt_i = NF; lt_i > 0; lt_i--) {
1265 if ($lt_i != "" && $lt_i != ".") {
1266 if ($lt_i == "..") {
1267 lt_count++;
1268 } else {
1269 if (lt_count == 0) {
1270 lt_foo="/" $lt_i lt_foo;
1271 } else {
1272 lt_count--;
1273 }
1274 }
1275 }
1276 }
1277 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1278 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1279}'`
1280 sys_lib_search_path_spec=`echo $lt_search_path_spec`
hp.com!davidm2c9be972003-11-22 06:08:20 +00001281else
1282 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001283fi])
hp.com!davidm2c9be972003-11-22 06:08:20 +00001284need_lib_prefix=unknown
1285hardcode_into_libs=no
1286
1287# when you set need_version to no, make sure it does not cause -set_version
1288# flags to be left without arguments
1289need_version=unknown
mostang.com!davidm0440c532003-01-17 18:12:55 +00001290
1291case $host_os in
1292aix3*)
1293 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00001294 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001295 shlibpath_var=LIBPATH
1296
hp.com!davidm2c9be972003-11-22 06:08:20 +00001297 # AIX 3 has no versioning support, so we append a major version to the name.
1298 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001299 ;;
1300
1301aix4* | aix5*)
1302 version_type=linux
1303 need_lib_prefix=no
1304 need_version=no
1305 hardcode_into_libs=yes
1306 if test "$host_cpu" = ia64; then
1307 # AIX 5 supports IA64
hp.com!davidm2c9be972003-11-22 06:08:20 +00001308 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001309 shlibpath_var=LD_LIBRARY_PATH
1310 else
1311 # With GCC up to 2.95.x, collect2 would create an import file
1312 # for dependence libraries. The import file would start with
1313 # the line `#! .'. This would cause the generated library to
1314 # depend on `.', always an invalid library. This was fixed in
1315 # development snapshots of GCC prior to 3.0.
1316 case $host_os in
1317 aix4 | aix4.[[01]] | aix4.[[01]].*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001318 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1319 echo ' yes '
1320 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1321 :
1322 else
1323 can_build_shared=no
1324 fi
1325 ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00001326 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00001327 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1328 # soname into executable. Probably we can add versioning support to
1329 # collect2, so additional links can be useful in future.
mostang.com!davidm0440c532003-01-17 18:12:55 +00001330 if test "$aix_use_runtimelinking" = yes; then
1331 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1332 # instead of lib<name>.a to let people know that these are not
1333 # typical AIX shared libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001334 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001335 else
1336 # We preserve .a as extension for shared libraries through AIX4.2
1337 # and later when we are not doing run time linking.
1338 library_names_spec='${libname}${release}.a $libname.a'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001339 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001340 fi
1341 shlibpath_var=LIBPATH
1342 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00001343 ;;
1344
1345amigaos*)
1346 library_names_spec='$libname.ixlibrary $libname.a'
1347 # Create ${libname}_ixlibrary.a entries in /sys/libs.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001348 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'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001349 ;;
1350
1351beos*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001352 library_names_spec='${libname}${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001353 dynamic_linker="$host_os ld.so"
1354 shlibpath_var=LIBRARY_PATH
1355 ;;
1356
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001357bsdi[[45]]*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001358 version_type=linux
1359 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001360 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1361 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001362 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1363 shlibpath_var=LD_LIBRARY_PATH
1364 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1365 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001366 # the default ld.so.conf also contains /usr/contrib/lib and
1367 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1368 # libtool to hard-code these into programs
1369 ;;
1370
1371cygwin* | mingw* | pw32*)
1372 version_type=windows
hp.com!davidm2de17682004-04-20 16:53:44 +00001373 shrext_cmds=".dll"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001374 need_version=no
1375 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001376
mostang.com!davidm0440c532003-01-17 18:12:55 +00001377 case $GCC,$host_os in
hp.com!davidm2c9be972003-11-22 06:08:20 +00001378 yes,cygwin* | yes,mingw* | yes,pw32*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001379 library_names_spec='$libname.dll.a'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001380 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1381 postinstall_cmds='base_file=`basename \${file}`~
1382 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
mostang.com!davidm0440c532003-01-17 18:12:55 +00001383 dldir=$destdir/`dirname \$dlpath`~
1384 test -d \$dldir || mkdir -p \$dldir~
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001385 $install_prog $dir/$dlname \$dldir/$dlname~
1386 chmod a+x \$dldir/$dlname'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001387 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
mostang.com!davidm0440c532003-01-17 18:12:55 +00001388 dlpath=$dir/\$dldll~
1389 $rm \$dlpath'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001390 shlibpath_overrides_runpath=yes
1391
1392 case $host_os in
1393 cygwin*)
1394 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1395 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1396 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1397 ;;
1398 mingw*)
1399 # MinGW DLLs use traditional 'lib' prefix
1400 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1401 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1402 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1403 # It is most probably a Windows format PATH printed by
1404 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1405 # path with ; separators, and with drive letters. We can handle the
1406 # drive letters (cygwin fileutils understands them), so leave them,
1407 # especially as we might pass files found there to a mingw objdump,
1408 # which wouldn't understand a cygwinified path. Ahh.
1409 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1410 else
1411 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1412 fi
1413 ;;
1414 pw32*)
1415 # pw32 DLLs use 'pw' prefix rather than 'lib'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001416 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001417 ;;
1418 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00001419 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00001420
mostang.com!davidm0440c532003-01-17 18:12:55 +00001421 *)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001422 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001423 ;;
1424 esac
1425 dynamic_linker='Win32 ld.exe'
1426 # FIXME: first we should search . and the directory the executable is in
1427 shlibpath_var=PATH
1428 ;;
1429
1430darwin* | rhapsody*)
1431 dynamic_linker="$host_os dyld"
1432 version_type=darwin
1433 need_lib_prefix=no
1434 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001435 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1436 soname_spec='${libname}${release}${major}$shared_ext'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001437 shlibpath_overrides_runpath=yes
1438 shlibpath_var=DYLD_LIBRARY_PATH
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001439 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001440 m4_if([$1], [],[
1441 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
hp.com!davidm2c9be972003-11-22 06:08:20 +00001442 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1443 ;;
1444
1445dgux*)
1446 version_type=linux
1447 need_lib_prefix=no
1448 need_version=no
1449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1450 soname_spec='${libname}${release}${shared_ext}$major'
1451 shlibpath_var=LD_LIBRARY_PATH
mostang.com!davidm0440c532003-01-17 18:12:55 +00001452 ;;
1453
1454freebsd1*)
1455 dynamic_linker=no
1456 ;;
1457
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001458freebsd* | dragonfly*)
1459 # DragonFly does not have aout. When/if they implement a new
1460 # versioning mechanism, adjust this.
1461 if test -x /usr/bin/objformat; then
1462 objformat=`/usr/bin/objformat`
1463 else
1464 case $host_os in
1465 freebsd[[123]]*) objformat=aout ;;
1466 *) objformat=elf ;;
1467 esac
1468 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00001469 version_type=freebsd-$objformat
1470 case $version_type in
1471 freebsd-elf*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001472 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001473 need_version=no
1474 need_lib_prefix=no
1475 ;;
1476 freebsd-*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001477 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001478 need_version=yes
1479 ;;
1480 esac
1481 shlibpath_var=LD_LIBRARY_PATH
1482 case $host_os in
1483 freebsd2*)
1484 shlibpath_overrides_runpath=yes
1485 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001486 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00001487 shlibpath_overrides_runpath=yes
1488 hardcode_into_libs=yes
1489 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001490 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1491 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001492 shlibpath_overrides_runpath=no
1493 hardcode_into_libs=yes
1494 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001495 *) # from 4.6 on, and DragonFly
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001496 shlibpath_overrides_runpath=yes
1497 hardcode_into_libs=yes
1498 ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00001499 esac
1500 ;;
1501
1502gnu*)
1503 version_type=linux
1504 need_lib_prefix=no
1505 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1507 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001508 shlibpath_var=LD_LIBRARY_PATH
1509 hardcode_into_libs=yes
1510 ;;
1511
1512hpux9* | hpux10* | hpux11*)
1513 # Give a soname corresponding to the major version so that dld.sl refuses to
1514 # link against other versions.
mostang.com!davidm0440c532003-01-17 18:12:55 +00001515 version_type=sunos
1516 need_lib_prefix=no
1517 need_version=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001518 case $host_cpu in
hp.com!davidm2c9be972003-11-22 06:08:20 +00001519 ia64*)
hp.com!davidm2de17682004-04-20 16:53:44 +00001520 shrext_cmds='.so'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001521 hardcode_into_libs=yes
1522 dynamic_linker="$host_os dld.so"
1523 shlibpath_var=LD_LIBRARY_PATH
1524 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1526 soname_spec='${libname}${release}${shared_ext}$major'
1527 if test "X$HPUX_IA64_MODE" = X32; then
1528 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1529 else
1530 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1531 fi
1532 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1533 ;;
1534 hppa*64*)
hp.com!davidm2de17682004-04-20 16:53:44 +00001535 shrext_cmds='.sl'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001536 hardcode_into_libs=yes
1537 dynamic_linker="$host_os dld.sl"
1538 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1539 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1540 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1541 soname_spec='${libname}${release}${shared_ext}$major'
1542 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1543 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1544 ;;
1545 *)
hp.com!davidm2de17682004-04-20 16:53:44 +00001546 shrext_cmds='.sl'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001547 dynamic_linker="$host_os dld.sl"
1548 shlibpath_var=SHLIB_PATH
1549 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1551 soname_spec='${libname}${release}${shared_ext}$major'
1552 ;;
1553 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00001554 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1555 postinstall_cmds='chmod 555 $lib'
1556 ;;
1557
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001558interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001559 version_type=linux
1560 need_lib_prefix=no
1561 need_version=no
1562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1563 soname_spec='${libname}${release}${shared_ext}$major'
1564 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1565 shlibpath_var=LD_LIBRARY_PATH
1566 shlibpath_overrides_runpath=no
1567 hardcode_into_libs=yes
1568 ;;
1569
mostang.com!davidm0440c532003-01-17 18:12:55 +00001570irix5* | irix6* | nonstopux*)
1571 case $host_os in
1572 nonstopux*) version_type=nonstopux ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00001573 *)
1574 if test "$lt_cv_prog_gnu_ld" = yes; then
1575 version_type=linux
1576 else
1577 version_type=irix
1578 fi ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00001579 esac
1580 need_lib_prefix=no
1581 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001582 soname_spec='${libname}${release}${shared_ext}$major'
1583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001584 case $host_os in
1585 irix5* | nonstopux*)
1586 libsuff= shlibsuff=
1587 ;;
1588 *)
1589 case $LD in # libtool.m4 will add one of these switches to LD
hp.com!davidm2c9be972003-11-22 06:08:20 +00001590 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1591 libsuff= shlibsuff= libmagic=32-bit;;
1592 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1593 libsuff=32 shlibsuff=N32 libmagic=N32;;
1594 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1595 libsuff=64 shlibsuff=64 libmagic=64-bit;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00001596 *) libsuff= shlibsuff= libmagic=never-match;;
1597 esac
1598 ;;
1599 esac
1600 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1601 shlibpath_overrides_runpath=no
1602 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1603 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hp.com!davidm2c9be972003-11-22 06:08:20 +00001604 hardcode_into_libs=yes
mostang.com!davidm0440c532003-01-17 18:12:55 +00001605 ;;
1606
1607# No shared lib support for Linux oldld, aout, or coff.
hp.com!davidm2c9be972003-11-22 06:08:20 +00001608linux*oldld* | linux*aout* | linux*coff*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001609 dynamic_linker=no
1610 ;;
1611
1612# This must be Linux ELF.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001613linux* | k*bsd*-gnu)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001614 version_type=linux
1615 need_lib_prefix=no
1616 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001617 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1618 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001619 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1620 shlibpath_var=LD_LIBRARY_PATH
1621 shlibpath_overrides_runpath=no
1622 # This implies no fast_install, which is unacceptable.
1623 # Some rework will be needed to allow for fast_install
1624 # before this can be enabled.
1625 hardcode_into_libs=yes
1626
mostang.com!davidmc325d9c2004-01-24 06:45:18 +00001627 # Append ld.so.conf contents to the search path
1628 if test -f /etc/ld.so.conf; then
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001629 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' ' '`
hp.com!davidm2de17682004-04-20 16:53:44 +00001630 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
mostang.com!davidmc325d9c2004-01-24 06:45:18 +00001631 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001632
mostang.com!davidm0440c532003-01-17 18:12:55 +00001633 # We used to test for /lib/ld.so.1 and disable shared libraries on
1634 # powerpc, because MkLinux only supported shared libraries with the
1635 # GNU dynamic linker. Since this was broken with cross compilers,
1636 # most powerpc-linux boxes support dynamic linking these days and
1637 # people can always --disable-shared, the test was removed, and we
1638 # assume the GNU/Linux dynamic linker is in use.
1639 dynamic_linker='GNU/Linux ld.so'
1640 ;;
1641
hp.com!davidm16230292004-07-15 17:39:59 +00001642netbsdelf*-gnu)
1643 version_type=linux
1644 need_lib_prefix=no
1645 need_version=no
1646 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1647 soname_spec='${libname}${release}${shared_ext}$major'
1648 shlibpath_var=LD_LIBRARY_PATH
1649 shlibpath_overrides_runpath=no
1650 hardcode_into_libs=yes
1651 dynamic_linker='NetBSD ld.elf_so'
1652 ;;
1653
mostang.com!davidm0440c532003-01-17 18:12:55 +00001654netbsd*)
1655 version_type=sunos
1656 need_lib_prefix=no
1657 need_version=no
1658 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001659 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001660 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1661 dynamic_linker='NetBSD (a.out) ld.so'
1662 else
hp.com!davidm2de17682004-04-20 16:53:44 +00001663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
hp.com!davidm2c9be972003-11-22 06:08:20 +00001664 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001665 dynamic_linker='NetBSD ld.elf_so'
1666 fi
1667 shlibpath_var=LD_LIBRARY_PATH
1668 shlibpath_overrides_runpath=yes
1669 hardcode_into_libs=yes
1670 ;;
1671
1672newsos6)
1673 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00001674 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1675 shlibpath_var=LD_LIBRARY_PATH
1676 shlibpath_overrides_runpath=yes
1677 ;;
1678
1679nto-qnx*)
1680 version_type=linux
1681 need_lib_prefix=no
1682 need_version=no
1683 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1684 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001685 shlibpath_var=LD_LIBRARY_PATH
1686 shlibpath_overrides_runpath=yes
1687 ;;
1688
1689openbsd*)
1690 version_type=sunos
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001691 sys_lib_dlsearch_path_spec="/usr/lib"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001692 need_lib_prefix=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001693 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1694 case $host_os in
1695 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1696 *) need_version=no ;;
1697 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00001698 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1699 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1700 shlibpath_var=LD_LIBRARY_PATH
mostang.com!davidm0440c532003-01-17 18:12:55 +00001701 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001702 case $host_os in
1703 openbsd2.[[89]] | openbsd2.[[89]].*)
1704 shlibpath_overrides_runpath=no
1705 ;;
1706 *)
1707 shlibpath_overrides_runpath=yes
1708 ;;
1709 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00001710 else
1711 shlibpath_overrides_runpath=yes
1712 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00001713 ;;
1714
1715os2*)
1716 libname_spec='$name'
hp.com!davidm2de17682004-04-20 16:53:44 +00001717 shrext_cmds=".dll"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001718 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001719 library_names_spec='$libname${shared_ext} $libname.a'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001720 dynamic_linker='OS/2 ld.exe'
1721 shlibpath_var=LIBPATH
1722 ;;
1723
1724osf3* | osf4* | osf5*)
1725 version_type=osf
mostang.com!davidm0440c532003-01-17 18:12:55 +00001726 need_lib_prefix=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001727 need_version=no
1728 soname_spec='${libname}${release}${shared_ext}$major'
1729 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001730 shlibpath_var=LD_LIBRARY_PATH
1731 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1732 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
mostang.com!davidm0440c532003-01-17 18:12:55 +00001733 ;;
1734
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001735rdos*)
1736 dynamic_linker=no
1737 ;;
1738
mostang.com!davidm0440c532003-01-17 18:12:55 +00001739solaris*)
1740 version_type=linux
1741 need_lib_prefix=no
1742 need_version=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00001743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1744 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001745 shlibpath_var=LD_LIBRARY_PATH
1746 shlibpath_overrides_runpath=yes
1747 hardcode_into_libs=yes
1748 # ldd complains unless libraries are executable
1749 postinstall_cmds='chmod +x $lib'
1750 ;;
1751
1752sunos4*)
1753 version_type=sunos
hp.com!davidm2c9be972003-11-22 06:08:20 +00001754 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001755 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1756 shlibpath_var=LD_LIBRARY_PATH
1757 shlibpath_overrides_runpath=yes
1758 if test "$with_gnu_ld" = yes; then
1759 need_lib_prefix=no
1760 fi
1761 need_version=yes
1762 ;;
1763
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001764sysv4 | sysv4.3*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00001765 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00001766 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1767 soname_spec='${libname}${release}${shared_ext}$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001768 shlibpath_var=LD_LIBRARY_PATH
1769 case $host_vendor in
1770 sni)
1771 shlibpath_overrides_runpath=no
1772 need_lib_prefix=no
1773 export_dynamic_flag_spec='${wl}-Blargedynsym'
1774 runpath_var=LD_RUN_PATH
1775 ;;
1776 siemens)
1777 need_lib_prefix=no
1778 ;;
1779 motorola)
1780 need_lib_prefix=no
1781 need_version=no
1782 shlibpath_overrides_runpath=no
1783 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1784 ;;
1785 esac
1786 ;;
1787
mostang.com!davidm0440c532003-01-17 18:12:55 +00001788sysv4*MP*)
1789 if test -d /usr/nec ;then
1790 version_type=linux
hp.com!davidm2c9be972003-11-22 06:08:20 +00001791 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1792 soname_spec='$libname${shared_ext}.$major'
mostang.com!davidm0440c532003-01-17 18:12:55 +00001793 shlibpath_var=LD_LIBRARY_PATH
1794 fi
1795 ;;
1796
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001797sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1798 version_type=freebsd-elf
1799 need_lib_prefix=no
1800 need_version=no
1801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1802 soname_spec='${libname}${release}${shared_ext}$major'
1803 shlibpath_var=LD_LIBRARY_PATH
1804 hardcode_into_libs=yes
1805 if test "$with_gnu_ld" = yes; then
1806 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1807 shlibpath_overrides_runpath=no
1808 else
1809 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1810 shlibpath_overrides_runpath=yes
1811 case $host_os in
1812 sco3.2v5*)
1813 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1814 ;;
1815 esac
1816 fi
1817 sys_lib_dlsearch_path_spec='/usr/lib'
1818 ;;
1819
hp.com!davidm2c9be972003-11-22 06:08:20 +00001820uts4*)
1821 version_type=linux
1822 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1823 soname_spec='${libname}${release}${shared_ext}$major'
1824 shlibpath_var=LD_LIBRARY_PATH
1825 ;;
1826
mostang.com!davidm0440c532003-01-17 18:12:55 +00001827*)
1828 dynamic_linker=no
1829 ;;
1830esac
1831AC_MSG_RESULT([$dynamic_linker])
1832test "$dynamic_linker" = no && can_build_shared=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001833
1834variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1835if test "$GCC" = yes; then
1836 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1837fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001838])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
mostang.com!davidm0440c532003-01-17 18:12:55 +00001839
hp.com!davidm2c9be972003-11-22 06:08:20 +00001840
1841# _LT_AC_TAGCONFIG
1842# ----------------
1843AC_DEFUN([_LT_AC_TAGCONFIG],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07001844[AC_REQUIRE([LT_AC_PROG_SED])dnl
1845AC_ARG_WITH([tags],
hp.com!davidm2c9be972003-11-22 06:08:20 +00001846 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1847 [include additional configurations @<:@automatic@:>@])],
1848 [tagnames="$withval"])
1849
1850if test -f "$ltmain" && test -n "$tagnames"; then
1851 if test ! -f "${ofile}"; then
1852 AC_MSG_WARN([output file `$ofile' does not exist])
1853 fi
1854
1855 if test -z "$LTCC"; then
1856 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1857 if test -z "$LTCC"; then
1858 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1859 else
1860 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1861 fi
1862 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001863 if test -z "$LTCFLAGS"; then
1864 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1865 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00001866
1867 # Extract list of available tagged configurations in $ofile.
1868 # Note that this assumes the entire list is on one line.
1869 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1870
1871 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1872 for tagname in $tagnames; do
1873 IFS="$lt_save_ifs"
1874 # Check whether tagname contains only valid characters
1875 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1876 "") ;;
1877 *) AC_MSG_ERROR([invalid tag name: $tagname])
1878 ;;
1879 esac
1880
1881 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1882 then
1883 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1884 fi
1885
1886 # Update the list of available tags.
1887 if test -n "$tagname"; then
1888 echo appending configuration tag \"$tagname\" to $ofile
1889
1890 case $tagname in
1891 CXX)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001892 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1893 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1894 (test "X$CXX" != "Xg++"))) ; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00001895 AC_LIBTOOL_LANG_CXX_CONFIG
1896 else
1897 tagname=""
1898 fi
1899 ;;
1900
1901 F77)
1902 if test -n "$F77" && test "X$F77" != "Xno"; then
1903 AC_LIBTOOL_LANG_F77_CONFIG
1904 else
1905 tagname=""
1906 fi
1907 ;;
1908
1909 GCJ)
1910 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1911 AC_LIBTOOL_LANG_GCJ_CONFIG
1912 else
1913 tagname=""
1914 fi
1915 ;;
1916
1917 RC)
1918 AC_LIBTOOL_LANG_RC_CONFIG
1919 ;;
1920
1921 *)
1922 AC_MSG_ERROR([Unsupported tag name: $tagname])
1923 ;;
1924 esac
1925
1926 # Append the new tag name to the list of available tags.
1927 if test -n "$tagname" ; then
1928 available_tags="$available_tags $tagname"
1929 fi
1930 fi
1931 done
1932 IFS="$lt_save_ifs"
1933
1934 # Now substitute the updated list of available tags.
1935 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1936 mv "${ofile}T" "$ofile"
1937 chmod +x "$ofile"
1938 else
1939 rm -f "${ofile}T"
1940 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1941 fi
1942fi
1943])# _LT_AC_TAGCONFIG
1944
1945
1946# AC_LIBTOOL_DLOPEN
1947# -----------------
1948# enable checks for dlopen support
1949AC_DEFUN([AC_LIBTOOL_DLOPEN],
1950 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1951])# AC_LIBTOOL_DLOPEN
1952
1953
1954# AC_LIBTOOL_WIN32_DLL
1955# --------------------
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001956# declare package support for building win32 DLLs
hp.com!davidm2c9be972003-11-22 06:08:20 +00001957AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1958[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1959])# AC_LIBTOOL_WIN32_DLL
1960
1961
1962# AC_ENABLE_SHARED([DEFAULT])
1963# ---------------------------
1964# implement the --enable-shared flag
1965# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1966AC_DEFUN([AC_ENABLE_SHARED],
1967[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1968AC_ARG_ENABLE([shared],
1969 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1970 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1971 [p=${PACKAGE-default}
1972 case $enableval in
1973 yes) enable_shared=yes ;;
1974 no) enable_shared=no ;;
1975 *)
1976 enable_shared=no
1977 # Look at the argument we got. We use all the common list separators.
1978 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1979 for pkg in $enableval; do
1980 IFS="$lt_save_ifs"
1981 if test "X$pkg" = "X$p"; then
1982 enable_shared=yes
1983 fi
1984 done
1985 IFS="$lt_save_ifs"
1986 ;;
1987 esac],
1988 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1989])# AC_ENABLE_SHARED
1990
1991
1992# AC_DISABLE_SHARED
1993# -----------------
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06001994# set the default shared flag to --disable-shared
hp.com!davidm2c9be972003-11-22 06:08:20 +00001995AC_DEFUN([AC_DISABLE_SHARED],
1996[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1997AC_ENABLE_SHARED(no)
1998])# AC_DISABLE_SHARED
1999
2000
2001# AC_ENABLE_STATIC([DEFAULT])
2002# ---------------------------
2003# implement the --enable-static flag
2004# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2005AC_DEFUN([AC_ENABLE_STATIC],
2006[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2007AC_ARG_ENABLE([static],
2008 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2009 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2010 [p=${PACKAGE-default}
2011 case $enableval in
2012 yes) enable_static=yes ;;
2013 no) enable_static=no ;;
2014 *)
2015 enable_static=no
2016 # Look at the argument we got. We use all the common list separators.
2017 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2018 for pkg in $enableval; do
2019 IFS="$lt_save_ifs"
2020 if test "X$pkg" = "X$p"; then
2021 enable_static=yes
2022 fi
2023 done
2024 IFS="$lt_save_ifs"
2025 ;;
2026 esac],
2027 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2028])# AC_ENABLE_STATIC
2029
2030
2031# AC_DISABLE_STATIC
2032# -----------------
2033# set the default static flag to --disable-static
2034AC_DEFUN([AC_DISABLE_STATIC],
2035[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2036AC_ENABLE_STATIC(no)
2037])# AC_DISABLE_STATIC
2038
2039
2040# AC_ENABLE_FAST_INSTALL([DEFAULT])
2041# ---------------------------------
2042# implement the --enable-fast-install flag
2043# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2044AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2045[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2046AC_ARG_ENABLE([fast-install],
2047 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2048 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2049 [p=${PACKAGE-default}
2050 case $enableval in
2051 yes) enable_fast_install=yes ;;
2052 no) enable_fast_install=no ;;
2053 *)
2054 enable_fast_install=no
2055 # Look at the argument we got. We use all the common list separators.
2056 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2057 for pkg in $enableval; do
2058 IFS="$lt_save_ifs"
2059 if test "X$pkg" = "X$p"; then
2060 enable_fast_install=yes
2061 fi
2062 done
2063 IFS="$lt_save_ifs"
2064 ;;
2065 esac],
2066 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2067])# AC_ENABLE_FAST_INSTALL
2068
2069
2070# AC_DISABLE_FAST_INSTALL
2071# -----------------------
2072# set the default to --disable-fast-install
2073AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2074[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2075AC_ENABLE_FAST_INSTALL(no)
2076])# AC_DISABLE_FAST_INSTALL
2077
2078
2079# AC_LIBTOOL_PICMODE([MODE])
2080# --------------------------
2081# implement the --with-pic flag
2082# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2083AC_DEFUN([AC_LIBTOOL_PICMODE],
2084[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2085pic_mode=ifelse($#,1,$1,default)
2086])# AC_LIBTOOL_PICMODE
2087
2088
2089# AC_PROG_EGREP
2090# -------------
2091# This is predefined starting with Autoconf 2.54, so this conditional
2092# definition can be removed once we require Autoconf 2.54 or later.
2093m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2094[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2095 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2096 then ac_cv_prog_egrep='grep -E'
2097 else ac_cv_prog_egrep='egrep'
2098 fi])
2099 EGREP=$ac_cv_prog_egrep
2100 AC_SUBST([EGREP])
2101])])
2102
2103
2104# AC_PATH_TOOL_PREFIX
2105# -------------------
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002106# find a file program which can recognize shared library
hp.com!davidm2c9be972003-11-22 06:08:20 +00002107AC_DEFUN([AC_PATH_TOOL_PREFIX],
2108[AC_REQUIRE([AC_PROG_EGREP])dnl
2109AC_MSG_CHECKING([for $1])
2110AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2111[case $MAGIC_CMD in
2112[[\\/*] | ?:[\\/]*])
2113 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2114 ;;
2115*)
2116 lt_save_MAGIC_CMD="$MAGIC_CMD"
2117 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2118dnl $ac_dummy forces splitting on constant user-supplied paths.
2119dnl POSIX.2 word splitting is done only on the output of word expansions,
2120dnl not every word. This closes a longstanding sh security hole.
2121 ac_dummy="ifelse([$2], , $PATH, [$2])"
2122 for ac_dir in $ac_dummy; do
2123 IFS="$lt_save_ifs"
2124 test -z "$ac_dir" && ac_dir=.
2125 if test -f $ac_dir/$1; then
2126 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2127 if test -n "$file_magic_test_file"; then
2128 case $deplibs_check_method in
2129 "file_magic "*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002130 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
hp.com!davidm2c9be972003-11-22 06:08:20 +00002131 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2132 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2133 $EGREP "$file_magic_regex" > /dev/null; then
2134 :
2135 else
2136 cat <<EOF 1>&2
2137
2138*** Warning: the command libtool uses to detect shared libraries,
2139*** $file_magic_cmd, produces output that libtool cannot recognize.
2140*** The result is that libtool may fail to recognize shared libraries
2141*** as such. This will affect the creation of libtool libraries that
2142*** depend on shared libraries, but programs linked with such libtool
2143*** libraries will work regardless of this problem. Nevertheless, you
2144*** may want to report the problem to your system manager and/or to
2145*** bug-libtool@gnu.org
2146
2147EOF
2148 fi ;;
2149 esac
2150 fi
2151 break
2152 fi
2153 done
2154 IFS="$lt_save_ifs"
2155 MAGIC_CMD="$lt_save_MAGIC_CMD"
2156 ;;
2157esac])
2158MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2159if test -n "$MAGIC_CMD"; then
2160 AC_MSG_RESULT($MAGIC_CMD)
2161else
2162 AC_MSG_RESULT(no)
2163fi
2164])# AC_PATH_TOOL_PREFIX
2165
2166
2167# AC_PATH_MAGIC
2168# -------------
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002169# find a file program which can recognize a shared library
hp.com!davidm2c9be972003-11-22 06:08:20 +00002170AC_DEFUN([AC_PATH_MAGIC],
2171[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2172if test -z "$lt_cv_path_MAGIC_CMD"; then
2173 if test -n "$ac_tool_prefix"; then
2174 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2175 else
2176 MAGIC_CMD=:
2177 fi
2178fi
2179])# AC_PATH_MAGIC
2180
2181
2182# AC_PROG_LD
2183# ----------
2184# find the pathname to the GNU or non-GNU linker
2185AC_DEFUN([AC_PROG_LD],
2186[AC_ARG_WITH([gnu-ld],
2187 [AC_HELP_STRING([--with-gnu-ld],
2188 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2189 [test "$withval" = no || with_gnu_ld=yes],
2190 [with_gnu_ld=no])
2191AC_REQUIRE([LT_AC_PROG_SED])dnl
2192AC_REQUIRE([AC_PROG_CC])dnl
2193AC_REQUIRE([AC_CANONICAL_HOST])dnl
2194AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2195ac_prog=ld
2196if test "$GCC" = yes; then
2197 # Check if gcc -print-prog-name=ld gives a path.
2198 AC_MSG_CHECKING([for ld used by $CC])
2199 case $host in
2200 *-*-mingw*)
2201 # gcc leaves a trailing carriage return which upsets mingw
2202 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2203 *)
2204 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2205 esac
2206 case $ac_prog in
2207 # Accept absolute paths.
2208 [[\\/]]* | ?:[[\\/]]*)
2209 re_direlt='/[[^/]][[^/]]*/\.\./'
2210 # Canonicalize the pathname of ld
2211 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2212 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2213 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2214 done
2215 test -z "$LD" && LD="$ac_prog"
2216 ;;
2217 "")
2218 # If it fails, then pretend we aren't using GCC.
2219 ac_prog=ld
2220 ;;
2221 *)
2222 # If it is relative, then search for the first ld in PATH.
2223 with_gnu_ld=unknown
2224 ;;
2225 esac
2226elif test "$with_gnu_ld" = yes; then
2227 AC_MSG_CHECKING([for GNU ld])
2228else
2229 AC_MSG_CHECKING([for non-GNU ld])
2230fi
2231AC_CACHE_VAL(lt_cv_path_LD,
2232[if test -z "$LD"; then
2233 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2234 for ac_dir in $PATH; do
2235 IFS="$lt_save_ifs"
2236 test -z "$ac_dir" && ac_dir=.
2237 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2238 lt_cv_path_LD="$ac_dir/$ac_prog"
2239 # Check to see if the program is GNU ld. I'd rather use --version,
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002240 # but apparently some variants of GNU ld only accept -v.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002241 # Break only if it was the GNU/non-GNU ld that we prefer.
2242 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2243 *GNU* | *'with BFD'*)
2244 test "$with_gnu_ld" != no && break
2245 ;;
2246 *)
2247 test "$with_gnu_ld" != yes && break
2248 ;;
2249 esac
2250 fi
2251 done
2252 IFS="$lt_save_ifs"
2253else
2254 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2255fi])
2256LD="$lt_cv_path_LD"
2257if test -n "$LD"; then
2258 AC_MSG_RESULT($LD)
2259else
2260 AC_MSG_RESULT(no)
2261fi
2262test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2263AC_PROG_LD_GNU
2264])# AC_PROG_LD
2265
2266
2267# AC_PROG_LD_GNU
2268# --------------
2269AC_DEFUN([AC_PROG_LD_GNU],
2270[AC_REQUIRE([AC_PROG_EGREP])dnl
2271AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002272[# I'd rather use --version here, but apparently some GNU lds only accept -v.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002273case `$LD -v 2>&1 </dev/null` in
2274*GNU* | *'with BFD'*)
2275 lt_cv_prog_gnu_ld=yes
2276 ;;
2277*)
2278 lt_cv_prog_gnu_ld=no
2279 ;;
2280esac])
2281with_gnu_ld=$lt_cv_prog_gnu_ld
2282])# AC_PROG_LD_GNU
2283
2284
2285# AC_PROG_LD_RELOAD_FLAG
2286# ----------------------
2287# find reload flag for linker
2288# -- PORTME Some linkers may need a different reload flag.
2289AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2290[AC_CACHE_CHECK([for $LD option to reload object files],
2291 lt_cv_ld_reload_flag,
2292 [lt_cv_ld_reload_flag='-r'])
2293reload_flag=$lt_cv_ld_reload_flag
2294case $reload_flag in
2295"" | " "*) ;;
2296*) reload_flag=" $reload_flag" ;;
2297esac
2298reload_cmds='$LD$reload_flag -o $output$reload_objs'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002299case $host_os in
2300 darwin*)
2301 if test "$GCC" = yes; then
2302 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2303 else
2304 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2305 fi
2306 ;;
2307esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00002308])# AC_PROG_LD_RELOAD_FLAG
2309
2310
2311# AC_DEPLIBS_CHECK_METHOD
2312# -----------------------
2313# how to check for library dependencies
2314# -- PORTME fill in with the dynamic library characteristics
2315AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002316[AC_CACHE_CHECK([how to recognize dependent libraries],
hp.com!davidm2c9be972003-11-22 06:08:20 +00002317lt_cv_deplibs_check_method,
2318[lt_cv_file_magic_cmd='$MAGIC_CMD'
2319lt_cv_file_magic_test_file=
2320lt_cv_deplibs_check_method='unknown'
2321# Need to set the preceding variable on all platforms that support
2322# interlibrary dependencies.
2323# 'none' -- dependencies not supported.
2324# `unknown' -- same as none, but documents that we really don't know.
2325# 'pass_all' -- all dependencies passed with no checks.
2326# 'test_compile' -- check by making test program.
2327# 'file_magic [[regex]]' -- check by looking for files in library path
2328# which responds to the $file_magic_cmd with a given extended regex.
2329# If you have `file' or equivalent on your system and you're not sure
2330# whether `pass_all' will *always* work, you probably want this one.
2331
2332case $host_os in
2333aix4* | aix5*)
2334 lt_cv_deplibs_check_method=pass_all
2335 ;;
2336
2337beos*)
2338 lt_cv_deplibs_check_method=pass_all
2339 ;;
2340
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002341bsdi[[45]]*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002342 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2343 lt_cv_file_magic_cmd='/usr/bin/file -L'
2344 lt_cv_file_magic_test_file=/shlib/libc.so
2345 ;;
2346
mostang.com!davidmc325d9c2004-01-24 06:45:18 +00002347cygwin*)
hp.com!davidm2de17682004-04-20 16:53:44 +00002348 # func_win32_libid is a shell function defined in ltmain.sh
hp.com!davidm2c9be972003-11-22 06:08:20 +00002349 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
hp.com!davidm2de17682004-04-20 16:53:44 +00002350 lt_cv_file_magic_cmd='func_win32_libid'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002351 ;;
2352
mostang.com!davidmc325d9c2004-01-24 06:45:18 +00002353mingw* | pw32*)
2354 # Base MSYS/MinGW do not provide the 'file' command needed by
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002355 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2356 # unless we find 'file', for example because we are cross-compiling.
2357 if ( file / ) >/dev/null 2>&1; then
2358 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2359 lt_cv_file_magic_cmd='func_win32_libid'
2360 else
2361 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2362 lt_cv_file_magic_cmd='$OBJDUMP -f'
2363 fi
mostang.com!davidmc325d9c2004-01-24 06:45:18 +00002364 ;;
2365
hp.com!davidm2c9be972003-11-22 06:08:20 +00002366darwin* | rhapsody*)
2367 lt_cv_deplibs_check_method=pass_all
2368 ;;
2369
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002370freebsd* | dragonfly*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002371 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2372 case $host_cpu in
2373 i*86 )
2374 # Not sure whether the presence of OpenBSD here was a mistake.
2375 # Let's accept both of them until this is cleared up.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002376 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002377 lt_cv_file_magic_cmd=/usr/bin/file
2378 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2379 ;;
2380 esac
2381 else
2382 lt_cv_deplibs_check_method=pass_all
2383 fi
2384 ;;
2385
2386gnu*)
2387 lt_cv_deplibs_check_method=pass_all
2388 ;;
2389
2390hpux10.20* | hpux11*)
2391 lt_cv_file_magic_cmd=/usr/bin/file
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002392 case $host_cpu in
hp.com!davidm2c9be972003-11-22 06:08:20 +00002393 ia64*)
2394 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2395 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2396 ;;
2397 hppa*64*)
2398 [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]']
2399 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2400 ;;
2401 *)
2402 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2403 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2404 ;;
2405 esac
2406 ;;
2407
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002408interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002409 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2410 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2411 ;;
2412
hp.com!davidm2c9be972003-11-22 06:08:20 +00002413irix5* | irix6* | nonstopux*)
2414 case $LD in
2415 *-32|*"-32 ") libmagic=32-bit;;
2416 *-n32|*"-n32 ") libmagic=N32;;
2417 *-64|*"-64 ") libmagic=64-bit;;
2418 *) libmagic=never-match;;
2419 esac
2420 lt_cv_deplibs_check_method=pass_all
2421 ;;
2422
2423# This must be Linux ELF.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002424linux* | k*bsd*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002425 lt_cv_deplibs_check_method=pass_all
2426 ;;
2427
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002428netbsd* | netbsdelf*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002429 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2430 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2431 else
2432 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2433 fi
2434 ;;
2435
2436newos6*)
2437 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2438 lt_cv_file_magic_cmd=/usr/bin/file
2439 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2440 ;;
2441
2442nto-qnx*)
2443 lt_cv_deplibs_check_method=unknown
2444 ;;
2445
2446openbsd*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002447 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002448 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002449 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002450 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002451 fi
2452 ;;
2453
2454osf3* | osf4* | osf5*)
2455 lt_cv_deplibs_check_method=pass_all
2456 ;;
2457
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002458rdos*)
2459 lt_cv_deplibs_check_method=pass_all
2460 ;;
2461
hp.com!davidm2c9be972003-11-22 06:08:20 +00002462solaris*)
2463 lt_cv_deplibs_check_method=pass_all
2464 ;;
2465
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002466sysv4 | sysv4.3*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002467 case $host_vendor in
2468 motorola)
2469 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]]'
2470 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2471 ;;
2472 ncr)
2473 lt_cv_deplibs_check_method=pass_all
2474 ;;
2475 sequent)
2476 lt_cv_file_magic_cmd='/bin/file'
2477 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2478 ;;
2479 sni)
2480 lt_cv_file_magic_cmd='/bin/file'
2481 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2482 lt_cv_file_magic_test_file=/lib/libc.so
2483 ;;
2484 siemens)
2485 lt_cv_deplibs_check_method=pass_all
2486 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002487 pc)
2488 lt_cv_deplibs_check_method=pass_all
2489 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00002490 esac
2491 ;;
2492
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002493sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002494 lt_cv_deplibs_check_method=pass_all
2495 ;;
2496esac
2497])
2498file_magic_cmd=$lt_cv_file_magic_cmd
2499deplibs_check_method=$lt_cv_deplibs_check_method
2500test -z "$deplibs_check_method" && deplibs_check_method=unknown
2501])# AC_DEPLIBS_CHECK_METHOD
2502
2503
2504# AC_PROG_NM
2505# ----------
2506# find the pathname to a BSD-compatible name lister
2507AC_DEFUN([AC_PROG_NM],
2508[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2509[if test -n "$NM"; then
2510 # Let the user override the test.
2511 lt_cv_path_NM="$NM"
2512else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002513 lt_nm_to_check="${ac_tool_prefix}nm"
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002514 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002515 lt_nm_to_check="$lt_nm_to_check nm"
2516 fi
2517 for lt_tmp_nm in $lt_nm_to_check; do
2518 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2519 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2520 IFS="$lt_save_ifs"
2521 test -z "$ac_dir" && ac_dir=.
2522 tmp_nm="$ac_dir/$lt_tmp_nm"
2523 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2524 # Check to see if the nm accepts a BSD-compat flag.
2525 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2526 # nm: unknown option "B" ignored
2527 # Tru64's nm complains that /dev/null is an invalid object file
2528 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2529 */dev/null* | *'Invalid file or object type'*)
2530 lt_cv_path_NM="$tmp_nm -B"
hp.com!davidm2c9be972003-11-22 06:08:20 +00002531 break
2532 ;;
2533 *)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002534 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2535 */dev/null*)
2536 lt_cv_path_NM="$tmp_nm -p"
2537 break
2538 ;;
2539 *)
2540 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2541 continue # so that we can try to find one that supports BSD flags
2542 ;;
2543 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00002544 ;;
2545 esac
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002546 fi
2547 done
2548 IFS="$lt_save_ifs"
hp.com!davidm2c9be972003-11-22 06:08:20 +00002549 done
hp.com!davidm2c9be972003-11-22 06:08:20 +00002550 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2551fi])
2552NM="$lt_cv_path_NM"
2553])# AC_PROG_NM
2554
2555
2556# AC_CHECK_LIBM
2557# -------------
2558# check for math library
2559AC_DEFUN([AC_CHECK_LIBM],
2560[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2561LIBM=
2562case $host in
2563*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2564 # These system don't have libm, or don't need it
2565 ;;
2566*-ncr-sysv4.3*)
2567 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2568 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2569 ;;
2570*)
2571 AC_CHECK_LIB(m, cos, LIBM="-lm")
2572 ;;
2573esac
2574])# AC_CHECK_LIBM
2575
2576
2577# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2578# -----------------------------------
2579# sets LIBLTDL to the link flags for the libltdl convenience library and
2580# LTDLINCL to the include flags for the libltdl header and adds
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002581# --enable-ltdl-convenience to the configure arguments. Note that
2582# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2583# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2584# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2585# (note the single quotes!). If your package is not flat and you're not
2586# using automake, define top_builddir and top_srcdir appropriately in
2587# the Makefiles.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002588AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2589[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2590 case $enable_ltdl_convenience in
2591 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2592 "") enable_ltdl_convenience=yes
2593 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2594 esac
2595 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2596 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2597 # For backwards non-gettext consistent compatibility...
2598 INCLTDL="$LTDLINCL"
2599])# AC_LIBLTDL_CONVENIENCE
2600
2601
2602# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2603# -----------------------------------
2604# sets LIBLTDL to the link flags for the libltdl installable library and
2605# LTDLINCL to the include flags for the libltdl header and adds
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002606# --enable-ltdl-install to the configure arguments. Note that
2607# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2608# and an installed libltdl is not found, it is assumed to be `libltdl'.
2609# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2610# '${top_srcdir}/' (note the single quotes!). If your package is not
2611# flat and you're not using automake, define top_builddir and top_srcdir
2612# appropriately in the Makefiles.
hp.com!davidm2c9be972003-11-22 06:08:20 +00002613# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2614AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2615[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2616 AC_CHECK_LIB(ltdl, lt_dlinit,
2617 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2618 [if test x"$enable_ltdl_install" = xno; then
2619 AC_MSG_WARN([libltdl not installed, but installation disabled])
2620 else
2621 enable_ltdl_install=yes
2622 fi
2623 ])
2624 if test x"$enable_ltdl_install" = x"yes"; then
2625 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2626 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2627 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2628 else
2629 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2630 LIBLTDL="-lltdl"
2631 LTDLINCL=
2632 fi
2633 # For backwards non-gettext consistent compatibility...
2634 INCLTDL="$LTDLINCL"
2635])# AC_LIBLTDL_INSTALLABLE
2636
2637
2638# AC_LIBTOOL_CXX
2639# --------------
2640# enable support for C++ libraries
2641AC_DEFUN([AC_LIBTOOL_CXX],
2642[AC_REQUIRE([_LT_AC_LANG_CXX])
2643])# AC_LIBTOOL_CXX
2644
2645
2646# _LT_AC_LANG_CXX
2647# ---------------
2648AC_DEFUN([_LT_AC_LANG_CXX],
2649[AC_REQUIRE([AC_PROG_CXX])
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002650AC_REQUIRE([_LT_AC_PROG_CXXCPP])
hp.com!davidm2c9be972003-11-22 06:08:20 +00002651_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2652])# _LT_AC_LANG_CXX
2653
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002654# _LT_AC_PROG_CXXCPP
2655# ------------------
2656AC_DEFUN([_LT_AC_PROG_CXXCPP],
2657[
2658AC_REQUIRE([AC_PROG_CXX])
2659if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2660 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2661 (test "X$CXX" != "Xg++"))) ; then
2662 AC_PROG_CXXCPP
2663fi
2664])# _LT_AC_PROG_CXXCPP
hp.com!davidm2c9be972003-11-22 06:08:20 +00002665
2666# AC_LIBTOOL_F77
2667# --------------
2668# enable support for Fortran 77 libraries
2669AC_DEFUN([AC_LIBTOOL_F77],
2670[AC_REQUIRE([_LT_AC_LANG_F77])
2671])# AC_LIBTOOL_F77
2672
2673
2674# _LT_AC_LANG_F77
2675# ---------------
2676AC_DEFUN([_LT_AC_LANG_F77],
2677[AC_REQUIRE([AC_PROG_F77])
2678_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2679])# _LT_AC_LANG_F77
2680
2681
2682# AC_LIBTOOL_GCJ
2683# --------------
2684# enable support for GCJ libraries
2685AC_DEFUN([AC_LIBTOOL_GCJ],
2686[AC_REQUIRE([_LT_AC_LANG_GCJ])
2687])# AC_LIBTOOL_GCJ
2688
2689
2690# _LT_AC_LANG_GCJ
2691# ---------------
2692AC_DEFUN([_LT_AC_LANG_GCJ],
2693[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2694 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2695 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2696 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2697 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2698 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2699_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2700])# _LT_AC_LANG_GCJ
2701
2702
2703# AC_LIBTOOL_RC
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002704# -------------
hp.com!davidm2c9be972003-11-22 06:08:20 +00002705# enable support for Windows resource files
2706AC_DEFUN([AC_LIBTOOL_RC],
2707[AC_REQUIRE([LT_AC_PROG_RC])
2708_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2709])# AC_LIBTOOL_RC
2710
2711
2712# AC_LIBTOOL_LANG_C_CONFIG
2713# ------------------------
2714# Ensure that the configuration vars for the C compiler are
2715# suitably defined. Those variables are subsequently used by
2716# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2717AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2718AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2719[lt_save_CC="$CC"
2720AC_LANG_PUSH(C)
2721
2722# Source file extension for C test sources.
2723ac_ext=c
2724
2725# Object file extension for compiled C test sources.
2726objext=o
2727_LT_AC_TAGVAR(objext, $1)=$objext
2728
2729# Code to be used in simple compile tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002730lt_simple_compile_test_code="int some_variable = 0;"
hp.com!davidm2c9be972003-11-22 06:08:20 +00002731
2732# Code to be used in simple link tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002733lt_simple_link_test_code='int main(){return(0);}'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002734
2735_LT_AC_SYS_COMPILER
2736
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002737# save warnings/boilerplate of simple test code
2738_LT_COMPILER_BOILERPLATE
2739_LT_LINKER_BOILERPLATE
hp.com!davidm2c9be972003-11-22 06:08:20 +00002740
2741AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2742AC_LIBTOOL_PROG_COMPILER_PIC($1)
2743AC_LIBTOOL_PROG_CC_C_O($1)
2744AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2745AC_LIBTOOL_PROG_LD_SHLIBS($1)
2746AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2747AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2748AC_LIBTOOL_SYS_LIB_STRIP
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002749AC_LIBTOOL_DLOPEN_SELF
hp.com!davidm2c9be972003-11-22 06:08:20 +00002750
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002751# Report which library types will actually be built
mostang.com!davidm0440c532003-01-17 18:12:55 +00002752AC_MSG_CHECKING([if libtool supports shared libraries])
2753AC_MSG_RESULT([$can_build_shared])
2754
2755AC_MSG_CHECKING([whether to build shared libraries])
2756test "$can_build_shared" = "no" && enable_shared=no
2757
2758# On AIX, shared libraries and static libraries use the same namespace, and
2759# are all built from PIC.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002760case $host_os in
mostang.com!davidm0440c532003-01-17 18:12:55 +00002761aix3*)
2762 test "$enable_shared" = yes && enable_static=no
2763 if test -n "$RANLIB"; then
2764 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2765 postinstall_cmds='$RANLIB $lib'
2766 fi
2767 ;;
2768
hp.com!davidm2de17682004-04-20 16:53:44 +00002769aix4* | aix5*)
mostang.com!davidm0440c532003-01-17 18:12:55 +00002770 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2771 test "$enable_shared" = yes && enable_static=no
2772 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00002773 ;;
mostang.com!davidm0440c532003-01-17 18:12:55 +00002774esac
2775AC_MSG_RESULT([$enable_shared])
2776
2777AC_MSG_CHECKING([whether to build static libraries])
2778# Make sure either enable_shared or enable_static is yes.
2779test "$enable_shared" = yes || enable_static=yes
2780AC_MSG_RESULT([$enable_static])
2781
hp.com!davidm2c9be972003-11-22 06:08:20 +00002782AC_LIBTOOL_CONFIG($1)
2783
2784AC_LANG_POP
2785CC="$lt_save_CC"
2786])# AC_LIBTOOL_LANG_C_CONFIG
2787
2788
2789# AC_LIBTOOL_LANG_CXX_CONFIG
2790# --------------------------
2791# Ensure that the configuration vars for the C compiler are
2792# suitably defined. Those variables are subsequently used by
2793# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2794AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2795AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2796[AC_LANG_PUSH(C++)
2797AC_REQUIRE([AC_PROG_CXX])
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002798AC_REQUIRE([_LT_AC_PROG_CXXCPP])
hp.com!davidm2c9be972003-11-22 06:08:20 +00002799
2800_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2801_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2802_LT_AC_TAGVAR(always_export_symbols, $1)=no
2803_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2804_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2805_LT_AC_TAGVAR(hardcode_direct, $1)=no
2806_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2807_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2808_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2809_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002810_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
hp.com!davidm2c9be972003-11-22 06:08:20 +00002811_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2812_LT_AC_TAGVAR(module_cmds, $1)=
2813_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2814_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2815_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2816_LT_AC_TAGVAR(no_undefined_flag, $1)=
2817_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2818_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2819
2820# Dependencies to place before and after the object being linked:
2821_LT_AC_TAGVAR(predep_objects, $1)=
2822_LT_AC_TAGVAR(postdep_objects, $1)=
2823_LT_AC_TAGVAR(predeps, $1)=
2824_LT_AC_TAGVAR(postdeps, $1)=
2825_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2826
2827# Source file extension for C++ test sources.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002828ac_ext=cpp
hp.com!davidm2c9be972003-11-22 06:08:20 +00002829
2830# Object file extension for compiled C++ test sources.
2831objext=o
2832_LT_AC_TAGVAR(objext, $1)=$objext
2833
2834# Code to be used in simple compile tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002835lt_simple_compile_test_code="int some_variable = 0;"
hp.com!davidm2c9be972003-11-22 06:08:20 +00002836
2837# Code to be used in simple link tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002838lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
hp.com!davidm2c9be972003-11-22 06:08:20 +00002839
2840# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2841_LT_AC_SYS_COMPILER
2842
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002843# save warnings/boilerplate of simple test code
2844_LT_COMPILER_BOILERPLATE
2845_LT_LINKER_BOILERPLATE
2846
hp.com!davidm2c9be972003-11-22 06:08:20 +00002847# Allow CC to be a program name with arguments.
2848lt_save_CC=$CC
2849lt_save_LD=$LD
2850lt_save_GCC=$GCC
2851GCC=$GXX
2852lt_save_with_gnu_ld=$with_gnu_ld
2853lt_save_path_LD=$lt_cv_path_LD
2854if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2855 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2856else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002857 $as_unset lt_cv_prog_gnu_ld
hp.com!davidm2c9be972003-11-22 06:08:20 +00002858fi
2859if test -n "${lt_cv_path_LDCXX+set}"; then
2860 lt_cv_path_LD=$lt_cv_path_LDCXX
2861else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002862 $as_unset lt_cv_path_LD
hp.com!davidm2c9be972003-11-22 06:08:20 +00002863fi
2864test -z "${LDCXX+set}" || LD=$LDCXX
2865CC=${CXX-"c++"}
2866compiler=$CC
2867_LT_AC_TAGVAR(compiler, $1)=$CC
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002868_LT_CC_BASENAME([$compiler])
hp.com!davidm2c9be972003-11-22 06:08:20 +00002869
2870# We don't want -fno-exception wen compiling C++ code, so set the
2871# no_builtin_flag separately
2872if test "$GXX" = yes; then
2873 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2874else
2875 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
mostang.com!davidm0440c532003-01-17 18:12:55 +00002876fi
2877
hp.com!davidm2c9be972003-11-22 06:08:20 +00002878if test "$GXX" = yes; then
2879 # Set up default GNU C++ configuration
mostang.com!davidm0440c532003-01-17 18:12:55 +00002880
hp.com!davidm2c9be972003-11-22 06:08:20 +00002881 AC_PROG_LD
mostang.com!davidm0440c532003-01-17 18:12:55 +00002882
hp.com!davidm2c9be972003-11-22 06:08:20 +00002883 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2884 # archiving commands below assume that GNU ld is being used.
2885 if test "$with_gnu_ld" = yes; then
2886 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2887 _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'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002888
hp.com!davidm2c9be972003-11-22 06:08:20 +00002889 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2890 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2891
2892 # If archive_cmds runs LD, not CC, wlarc should be empty
2893 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2894 # investigate it a little bit more. (MM)
2895 wlarc='${wl}'
2896
2897 # ancient GNU ld didn't support --whole-archive et. al.
2898 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2899 grep 'no-whole-archive' > /dev/null; then
2900 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
mostang.com!davidm0440c532003-01-17 18:12:55 +00002901 else
hp.com!davidm2c9be972003-11-22 06:08:20 +00002902 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2903 fi
2904 else
2905 with_gnu_ld=no
2906 wlarc=
mostang.com!davidm0440c532003-01-17 18:12:55 +00002907
hp.com!davidm2c9be972003-11-22 06:08:20 +00002908 # A generic and very simple default shared library creation
2909 # command for GNU C++ for the case where it uses the native
2910 # linker, instead of GNU ld. If possible, this setting should
2911 # overridden to take advantage of the native linker features on
2912 # the platform it is being used on.
2913 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2914 fi
2915
2916 # Commands to make compiler produce verbose output that lists
2917 # what "hidden" libraries, object files and flags are used when
2918 # linking a shared library.
2919 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2920
2921else
2922 GXX=no
2923 with_gnu_ld=no
2924 wlarc=
2925fi
2926
2927# PORTME: fill in a description of your system's C++ link characteristics
2928AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2929_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2930case $host_os in
2931 aix3*)
2932 # FIXME: insert proper C++ library support
2933 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2934 ;;
2935 aix4* | aix5*)
2936 if test "$host_cpu" = ia64; then
2937 # On IA64, the linker does run time linking by default, so we don't
2938 # have to do anything special.
2939 aix_use_runtimelinking=no
2940 exp_sym_flag='-Bexport'
2941 no_entry_flag=""
2942 else
2943 aix_use_runtimelinking=no
2944
2945 # Test if we are trying to use run time linking or normal
2946 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2947 # need to do runtime linking.
2948 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2949 for ld_flag in $LDFLAGS; do
2950 case $ld_flag in
2951 *-brtl*)
2952 aix_use_runtimelinking=yes
2953 break
2954 ;;
2955 esac
2956 done
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002957 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00002958 esac
2959
2960 exp_sym_flag='-bexport'
2961 no_entry_flag='-bnoentry'
2962 fi
2963
2964 # When large executables or shared objects are built, AIX ld can
2965 # have problems creating the table of contents. If linking a library
2966 # or program results in "error TOC overflow" add -mminimal-toc to
2967 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2968 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2969
2970 _LT_AC_TAGVAR(archive_cmds, $1)=''
2971 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2972 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2973 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2974
2975 if test "$GXX" = yes; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002976 case $host_os in aix4.[[012]]|aix4.[[012]].*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00002977 # We only want to do this on AIX 4.2 and lower, the check
2978 # below for broken collect2 doesn't work under 4.3+
2979 collect2name=`${CC} -print-prog-name=collect2`
2980 if test -f "$collect2name" && \
2981 strings "$collect2name" | grep resolve_lib_name >/dev/null
2982 then
2983 # We have reworked collect2
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07002984 :
hp.com!davidm2c9be972003-11-22 06:08:20 +00002985 else
2986 # We have old collect2
2987 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2988 # It fails to find uninstalled libraries when the uninstalled
2989 # path is not listed in the libpath. Setting hardcode_minus_L
2990 # to unsupported forces relinking
2991 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2992 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2993 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2994 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002995 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00002996 esac
2997 shared_flag='-shared'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06002998 if test "$aix_use_runtimelinking" = yes; then
2999 shared_flag="$shared_flag "'${wl}-G'
3000 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00003001 else
3002 # not using gcc
3003 if test "$host_cpu" = ia64; then
3004 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3005 # chokes on -Wl,-G. The following line is correct:
3006 shared_flag='-G'
3007 else
3008 if test "$aix_use_runtimelinking" = yes; then
3009 shared_flag='${wl}-G'
3010 else
3011 shared_flag='${wl}-bM:SRE'
3012 fi
3013 fi
3014 fi
3015
3016 # It seems that -bexpall does not export symbols beginning with
3017 # underscore (_), so it is better to generate a list of symbols to export.
3018 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3019 if test "$aix_use_runtimelinking" = yes; then
3020 # Warning - without using the other runtime loading flags (-brtl),
3021 # -berok will link without error, but may produce a broken library.
3022 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3023 # Determine the default libpath from the value encoded in an empty executable.
3024 _LT_AC_SYS_LIBPATH_AIX
3025 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3026
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003027 _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"
hp.com!davidm2c9be972003-11-22 06:08:20 +00003028 else
3029 if test "$host_cpu" = ia64; then
3030 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3031 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003032 _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"
hp.com!davidm2c9be972003-11-22 06:08:20 +00003033 else
3034 # Determine the default libpath from the value encoded in an empty executable.
3035 _LT_AC_SYS_LIBPATH_AIX
3036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3037 # Warning - without using the other run time loading flags,
3038 # -berok will link without error, but may produce a broken library.
3039 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3040 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003041 # Exported symbols can be pulled into shared objects from archives
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003042 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003043 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003044 # This is similar to how AIX traditionally builds its shared libraries.
3045 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003046 fi
3047 fi
3048 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003049
3050 beos*)
3051 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3052 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3053 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3054 # support --undefined. This deserves some investigation. FIXME
3055 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3056 else
3057 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3058 fi
3059 ;;
3060
hp.com!davidm2c9be972003-11-22 06:08:20 +00003061 chorus*)
3062 case $cc_basename in
3063 *)
3064 # FIXME: insert proper C++ library support
3065 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3066 ;;
3067 esac
3068 ;;
3069
3070 cygwin* | mingw* | pw32*)
3071 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3072 # as there is no search path for DLLs.
3073 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3074 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3075 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3076 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3077
3078 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003079 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003080 # If the export-symbols file already is a .def file (1st line
3081 # is EXPORTS), use it as is; otherwise, prepend...
3082 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3083 cp $export_symbols $output_objdir/$soname.def;
3084 else
3085 echo EXPORTS > $output_objdir/$soname.def;
3086 cat $export_symbols >> $output_objdir/$soname.def;
3087 fi~
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003088 $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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003089 else
3090 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3091 fi
3092 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003093 darwin* | rhapsody*)
3094 case $host_os in
3095 rhapsody* | darwin1.[[012]])
3096 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3097 ;;
3098 *) # Darwin 1.3 on
3099 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3100 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3101 else
3102 case ${MACOSX_DEPLOYMENT_TARGET} in
3103 10.[[012]])
3104 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3105 ;;
3106 10.*)
3107 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3108 ;;
3109 esac
3110 fi
3111 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003112 esac
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003113 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3114 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3115 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3116 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3117 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3118 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
hp.com!davidm2c9be972003-11-22 06:08:20 +00003119
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003120 if test "$GXX" = yes ; then
3121 lt_int_apple_cc_single_mod=no
3122 output_verbose_link_cmd='echo'
3123 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3124 lt_int_apple_cc_single_mod=yes
3125 fi
3126 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3127 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3128 else
3129 _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'
3130 fi
3131 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3132 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3133 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3134 _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}'
3135 else
3136 _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}'
3137 fi
3138 _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}'
3139 else
3140 case $cc_basename in
3141 xlc*)
3142 output_verbose_link_cmd='echo'
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003143 _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'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003144 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3145 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003146 _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}'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003147 _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}'
3148 ;;
3149 *)
3150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3151 ;;
3152 esac
3153 fi
3154 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003155
3156 dgux*)
3157 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003158 ec++*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003159 # FIXME: insert proper C++ library support
3160 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3161 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003162 ghcx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003163 # Green Hills C++ Compiler
3164 # FIXME: insert proper C++ library support
3165 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3166 ;;
3167 *)
3168 # FIXME: insert proper C++ library support
3169 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3170 ;;
3171 esac
3172 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003173 freebsd[[12]]*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003174 # C++ shared libraries reported to be fairly broken before switch to ELF
3175 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3176 ;;
3177 freebsd-elf*)
3178 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3179 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003180 freebsd* | dragonfly*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003181 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3182 # conventions
3183 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3184 ;;
3185 gnu*)
3186 ;;
3187 hpux9*)
3188 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3189 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3190 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3191 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3192 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3193 # but as the default
3194 # location of the library.
3195
3196 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003197 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003198 # FIXME: insert proper C++ library support
3199 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3200 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003201 aCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003202 _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'
3203 # Commands to make compiler produce verbose output that lists
3204 # what "hidden" libraries, object files and flags are used when
3205 # linking a shared library.
3206 #
3207 # There doesn't appear to be a way to prevent this compiler from
3208 # explicitly linking system object files so we need to strip them
3209 # from the output so that they don't get included in the library
3210 # dependencies.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003211 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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003212 ;;
3213 *)
3214 if test "$GXX" = yes; then
3215 _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'
3216 else
3217 # FIXME: insert proper C++ library support
3218 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3219 fi
3220 ;;
3221 esac
3222 ;;
3223 hpux10*|hpux11*)
3224 if test $with_gnu_ld = no; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3226 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3227
3228 case $host_cpu in
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003229 hppa*64*|ia64*) ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003230 *)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003231 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3232 ;;
3233 esac
3234 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003235 case $host_cpu in
3236 hppa*64*|ia64*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003237 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3238 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3239 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003240 *)
3241 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3242 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3243 # but as the default
3244 # location of the library.
3245 ;;
3246 esac
3247
3248 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003249 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003250 # FIXME: insert proper C++ library support
3251 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3252 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003253 aCC*)
3254 case $host_cpu in
3255 hppa*64*)
3256 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3257 ;;
3258 ia64*)
3259 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003260 ;;
3261 *)
3262 _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'
3263 ;;
3264 esac
3265 # Commands to make compiler produce verbose output that lists
3266 # what "hidden" libraries, object files and flags are used when
3267 # linking a shared library.
3268 #
3269 # There doesn't appear to be a way to prevent this compiler from
3270 # explicitly linking system object files so we need to strip them
3271 # from the output so that they don't get included in the library
3272 # dependencies.
3273 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'
3274 ;;
3275 *)
3276 if test "$GXX" = yes; then
3277 if test $with_gnu_ld = no; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003278 case $host_cpu in
3279 hppa*64*)
3280 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3281 ;;
3282 ia64*)
3283 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003284 ;;
3285 *)
3286 _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'
3287 ;;
3288 esac
3289 fi
3290 else
3291 # FIXME: insert proper C++ library support
3292 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3293 fi
3294 ;;
3295 esac
3296 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003297 interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003298 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3299 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3301 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3302 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3303 # Instead, shared libraries are loaded at an image base (0x10000000 by
3304 # default) and relocated if they conflict, which is a slow very memory
3305 # consuming and fragmenting process. To avoid this, we pick a random,
3306 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3307 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3308 _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'
3309 _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'
3310 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003311 irix5* | irix6*)
3312 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003313 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003314 # SGI C++
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003315 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003316
3317 # Archives containing C++ object files must be created using
3318 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3319 # necessary to make sure instantiated templates are included
3320 # in the archive.
3321 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3322 ;;
3323 *)
3324 if test "$GXX" = yes; then
3325 if test "$with_gnu_ld" = no; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003326 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003327 else
3328 _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'
3329 fi
3330 fi
3331 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3332 ;;
3333 esac
3334 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3335 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3336 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003337 linux* | k*bsd*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003338 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003339 KCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003340 # Kuck and Associates, Inc. (KAI) C++ Compiler
3341
3342 # KCC will only create a shared library if the output file
3343 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3344 # to its proper name (with version) after linking.
3345 _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'
3346 _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'
3347 # Commands to make compiler produce verbose output that lists
3348 # what "hidden" libraries, object files and flags are used when
3349 # linking a shared library.
3350 #
3351 # There doesn't appear to be a way to prevent this compiler from
3352 # explicitly linking system object files so we need to strip them
3353 # from the output so that they don't get included in the library
3354 # dependencies.
3355 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'
3356
3357 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3358 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3359
3360 # Archives containing C++ object files must be created using
3361 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3362 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3363 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003364 icpc*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003365 # Intel C++
3366 with_gnu_ld=yes
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003367 # version 8.0 and above of icpc choke on multiply defined symbols
3368 # if we add $predep_objects and $postdep_objects, however 7.1 and
3369 # earlier do not add the objects themselves.
3370 case `$CC -V 2>&1` in
3371 *"Version 7."*)
3372 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3373 _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'
3374 ;;
3375 *) # Version 8.0 or newer
3376 tmp_idyn=
3377 case $host_cpu in
3378 ia64*) tmp_idyn=' -i_dynamic';;
3379 esac
3380 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3381 _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'
3382 ;;
3383 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00003384 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00003385 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3386 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3387 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3388 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003389 pgCC*)
3390 # Portland Group C++ compiler
3391 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3392 _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'
3393
3394 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3395 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3396 _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'
3397 ;;
3398 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003399 # Compaq C++
3400 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3401 _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'
3402
3403 runpath_var=LD_RUN_PATH
3404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3405 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3406
3407 # Commands to make compiler produce verbose output that lists
3408 # what "hidden" libraries, object files and flags are used when
3409 # linking a shared library.
3410 #
3411 # There doesn't appear to be a way to prevent this compiler from
3412 # explicitly linking system object files so we need to strip them
3413 # from the output so that they don't get included in the library
3414 # dependencies.
3415 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'
3416 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003417 *)
3418 case `$CC -V 2>&1 | sed 5q` in
3419 *Sun\ C*)
3420 # Sun C++ 5.9
3421 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3422 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3423 _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'
3424 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3425 _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'
3426
3427 # Not sure whether something based on
3428 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3429 # would be better.
3430 output_verbose_link_cmd='echo'
3431
3432 # Archives containing C++ object files must be created using
3433 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3434 # necessary to make sure instantiated templates are included
3435 # in the archive.
3436 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3437 ;;
3438 esac
3439 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003440 esac
3441 ;;
3442 lynxos*)
3443 # FIXME: insert proper C++ library support
3444 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3445 ;;
3446 m88k*)
3447 # FIXME: insert proper C++ library support
3448 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3449 ;;
3450 mvs*)
3451 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003452 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003453 # FIXME: insert proper C++ library support
3454 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3455 ;;
3456 *)
3457 # FIXME: insert proper C++ library support
3458 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3459 ;;
3460 esac
3461 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003462 netbsd* | netbsdelf*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003463 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3464 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3465 wlarc=
3466 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3467 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3468 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3469 fi
3470 # Workaround some broken pre-1.5 toolchains
3471 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3472 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003473 openbsd2*)
3474 # C++ shared libraries are fairly broken
3475 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3476 ;;
3477 openbsd*)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003478 if test -f /usr/libexec/ld.so; then
3479 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3480 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3481 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3482 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3483 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3484 _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'
3485 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3486 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3487 fi
3488 output_verbose_link_cmd='echo'
3489 else
3490 _LT_AC_TAGVAR(ld_shlibs, $1)=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003491 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003492 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003493 osf3*)
3494 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003495 KCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003496 # Kuck and Associates, Inc. (KAI) C++ Compiler
3497
3498 # KCC will only create a shared library if the output file
3499 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3500 # to its proper name (with version) after linking.
3501 _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'
3502
3503 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3504 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3505
3506 # Archives containing C++ object files must be created using
3507 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3508 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3509
3510 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003511 RCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003512 # Rational C++ 2.4.1
3513 # FIXME: insert proper C++ library support
3514 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3515 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003516 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003517 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003518 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003519
3520 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3521 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3522
3523 # Commands to make compiler produce verbose output that lists
3524 # what "hidden" libraries, object files and flags are used when
3525 # linking a shared library.
3526 #
3527 # There doesn't appear to be a way to prevent this compiler from
3528 # explicitly linking system object files so we need to strip them
3529 # from the output so that they don't get included in the library
3530 # dependencies.
3531 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'
3532 ;;
3533 *)
3534 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3535 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003536 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003537
3538 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3539 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3540
3541 # Commands to make compiler produce verbose output that lists
3542 # what "hidden" libraries, object files and flags are used when
3543 # linking a shared library.
3544 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3545
3546 else
3547 # FIXME: insert proper C++ library support
3548 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3549 fi
3550 ;;
3551 esac
3552 ;;
3553 osf4* | osf5*)
3554 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003555 KCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003556 # Kuck and Associates, Inc. (KAI) C++ Compiler
3557
3558 # KCC will only create a shared library if the output file
3559 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3560 # to its proper name (with version) after linking.
3561 _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'
3562
3563 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3564 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3565
3566 # Archives containing C++ object files must be created using
3567 # the KAI C++ compiler.
3568 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3569 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003570 RCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003571 # Rational C++ 2.4.1
3572 # FIXME: insert proper C++ library support
3573 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3574 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003575 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003576 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003577 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003578 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3579 echo "-hidden">> $lib.exp~
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003580 $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~
hp.com!davidm2c9be972003-11-22 06:08:20 +00003581 $rm $lib.exp'
3582
3583 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3584 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3585
3586 # Commands to make compiler produce verbose output that lists
3587 # what "hidden" libraries, object files and flags are used when
3588 # linking a shared library.
3589 #
3590 # There doesn't appear to be a way to prevent this compiler from
3591 # explicitly linking system object files so we need to strip them
3592 # from the output so that they don't get included in the library
3593 # dependencies.
3594 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'
3595 ;;
3596 *)
3597 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3598 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003599 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003600
3601 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3602 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3603
3604 # Commands to make compiler produce verbose output that lists
3605 # what "hidden" libraries, object files and flags are used when
3606 # linking a shared library.
3607 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3608
3609 else
3610 # FIXME: insert proper C++ library support
3611 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3612 fi
3613 ;;
3614 esac
3615 ;;
3616 psos*)
3617 # FIXME: insert proper C++ library support
3618 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3619 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003620 sunos4*)
3621 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003622 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003623 # Sun C++ 4.x
3624 # FIXME: insert proper C++ library support
3625 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3626 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003627 lcc*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003628 # Lucid
3629 # FIXME: insert proper C++ library support
3630 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3631 ;;
3632 *)
3633 # FIXME: insert proper C++ library support
3634 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3635 ;;
3636 esac
3637 ;;
3638 solaris*)
3639 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003640 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003641 # Sun C++ 4.2, 5.x and Centerline C++
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003642 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
hp.com!davidm2c9be972003-11-22 06:08:20 +00003643 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003644 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003645 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003646 $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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003647
3648 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3649 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3650 case $host_os in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003651 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00003652 *)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003653 # The compiler driver will combine and reorder linker options,
3654 # but understands `-z linker_flag'.
hp.com!davidm2c9be972003-11-22 06:08:20 +00003655 # Supported since Solaris 2.6 (maybe 2.5.1?)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003656 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003657 ;;
3658 esac
3659 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3660
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003661 output_verbose_link_cmd='echo'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003662
3663 # Archives containing C++ object files must be created using
3664 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3665 # necessary to make sure instantiated templates are included
3666 # in the archive.
3667 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3668 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003669 gcx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003670 # Green Hills C++ Compiler
3671 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3672
3673 # The C++ compiler must be used to create the archive.
3674 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3675 ;;
3676 *)
3677 # GNU C++ compiler with Solaris linker
3678 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3679 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3680 if $CC --version | grep -v '^2\.7' > /dev/null; then
3681 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3682 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3683 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3684
3685 # Commands to make compiler produce verbose output that lists
3686 # what "hidden" libraries, object files and flags are used when
3687 # linking a shared library.
3688 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3689 else
3690 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3691 # platform.
3692 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3693 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3694 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3695
3696 # Commands to make compiler produce verbose output that lists
3697 # what "hidden" libraries, object files and flags are used when
3698 # linking a shared library.
3699 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3700 fi
3701
3702 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003703 case $host_os in
3704 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3705 *)
3706 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3707 ;;
3708 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00003709 fi
3710 ;;
3711 esac
3712 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003713 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3714 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
hp.com!davidm2c9be972003-11-22 06:08:20 +00003715 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003716 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3717 runpath_var='LD_RUN_PATH'
3718
3719 case $cc_basename in
3720 CC*)
3721 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3722 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3723 ;;
3724 *)
3725 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3726 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3727 ;;
3728 esac
3729 ;;
3730 sysv5* | sco3.2v5* | sco5v6*)
3731 # Note: We can NOT use -z defs as we might desire, because we do not
3732 # link with -lc, and that would cause any symbols used from libc to
3733 # always be unresolved, which means just about no library would
3734 # ever link correctly. If we're not using GNU ld we use -z text
3735 # though, which does catch some bad symbols but isn't as heavy-handed
3736 # as -z defs.
3737 # For security reasons, it is highly recommended that you always
3738 # use absolute paths for naming shared libraries, and exclude the
3739 # DT_RUNPATH tag from executables and libraries. But doing so
3740 # requires that you compile everything twice, which is a pain.
3741 # So that behaviour is only enabled if SCOABSPATH is set to a
3742 # non-empty value in the environment. Most likely only useful for
3743 # creating official distributions of packages.
3744 # This is a hack until libtool officially supports absolute path
3745 # names for shared libraries.
3746 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3747 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3748 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3749 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3750 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3751 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3752 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3753 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3754 runpath_var='LD_RUN_PATH'
3755
3756 case $cc_basename in
3757 CC*)
3758 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3759 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3760 ;;
3761 *)
3762 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3763 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3764 ;;
3765 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00003766 ;;
3767 tandem*)
3768 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003769 NCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003770 # NonStop-UX NCC 3.20
3771 # FIXME: insert proper C++ library support
3772 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3773 ;;
3774 *)
3775 # FIXME: insert proper C++ library support
3776 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3777 ;;
3778 esac
3779 ;;
3780 vxworks*)
3781 # FIXME: insert proper C++ library support
3782 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3783 ;;
3784 *)
3785 # FIXME: insert proper C++ library support
3786 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3787 ;;
3788esac
3789AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3790test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3791
3792_LT_AC_TAGVAR(GCC, $1)="$GXX"
3793_LT_AC_TAGVAR(LD, $1)="$LD"
3794
3795AC_LIBTOOL_POSTDEP_PREDEP($1)
3796AC_LIBTOOL_PROG_COMPILER_PIC($1)
3797AC_LIBTOOL_PROG_CC_C_O($1)
3798AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3799AC_LIBTOOL_PROG_LD_SHLIBS($1)
3800AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3801AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
hp.com!davidm2c9be972003-11-22 06:08:20 +00003802
3803AC_LIBTOOL_CONFIG($1)
3804
3805AC_LANG_POP
3806CC=$lt_save_CC
3807LDCXX=$LD
3808LD=$lt_save_LD
3809GCC=$lt_save_GCC
3810with_gnu_ldcxx=$with_gnu_ld
3811with_gnu_ld=$lt_save_with_gnu_ld
3812lt_cv_path_LDCXX=$lt_cv_path_LD
3813lt_cv_path_LD=$lt_save_path_LD
3814lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3815lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3816])# AC_LIBTOOL_LANG_CXX_CONFIG
3817
3818# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003819# ------------------------------------
hp.com!davidm2c9be972003-11-22 06:08:20 +00003820# Figure out "hidden" library dependencies from verbose
3821# compiler output when linking a shared library.
3822# Parse the compiler output and extract the necessary
3823# objects, libraries and library flags.
3824AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3825dnl we can't use the lt_simple_compile_test_code here,
3826dnl because it contains code intended for an executable,
3827dnl not a library. It's possible we should let each
3828dnl tag define a new lt_????_link_test_code variable,
3829dnl but it's only used here...
3830ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3831int a;
3832void foo (void) { a = 0; }
3833EOF
3834],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3835class Foo
3836{
3837public:
3838 Foo (void) { a = 0; }
3839private:
3840 int a;
3841};
3842EOF
3843],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3844 subroutine foo
3845 implicit none
3846 integer*4 a
3847 a=0
3848 return
3849 end
3850EOF
3851],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3852public class foo {
3853 private int a;
3854 public void bar (void) {
3855 a = 0;
3856 }
3857};
3858EOF
3859])
3860dnl Parse the compiler output and extract the necessary
3861dnl objects, libraries and library flags.
3862if AC_TRY_EVAL(ac_compile); then
3863 # Parse the compiler output and extract the necessary
3864 # objects, libraries and library flags.
3865
3866 # Sentinel used to keep track of whether or not we are before
3867 # the conftest object file.
3868 pre_test_object_deps_done=no
3869
3870 # The `*' in the case matches for architectures that use `case' in
3871 # $output_verbose_cmd can trigger glob expansion during the loop
3872 # eval without this substitution.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003873 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
hp.com!davidm2c9be972003-11-22 06:08:20 +00003874
3875 for p in `eval $output_verbose_link_cmd`; do
3876 case $p in
3877
3878 -L* | -R* | -l*)
3879 # Some compilers place space between "-{L,R}" and the path.
3880 # Remove the space.
3881 if test $p = "-L" \
3882 || test $p = "-R"; then
3883 prev=$p
3884 continue
3885 else
3886 prev=
3887 fi
3888
3889 if test "$pre_test_object_deps_done" = no; then
3890 case $p in
3891 -L* | -R*)
3892 # Internal compiler library paths should come after those
3893 # provided the user. The postdeps already come after the
3894 # user supplied libs so there is no need to process them.
3895 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3896 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3897 else
3898 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3899 fi
3900 ;;
3901 # The "-l" case would never come before the object being
3902 # linked, so don't bother handling this case.
3903 esac
3904 else
3905 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3906 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3907 else
3908 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3909 fi
3910 fi
3911 ;;
3912
3913 *.$objext)
3914 # This assumes that the test object file only shows up
3915 # once in the compiler output.
3916 if test "$p" = "conftest.$objext"; then
3917 pre_test_object_deps_done=yes
3918 continue
3919 fi
3920
3921 if test "$pre_test_object_deps_done" = no; then
3922 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3923 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3924 else
3925 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3926 fi
3927 else
3928 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3929 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3930 else
3931 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3932 fi
3933 fi
3934 ;;
3935
3936 *) ;; # Ignore the rest.
3937
3938 esac
3939 done
3940
3941 # Clean up.
3942 rm -f a.out a.exe
3943else
3944 echo "libtool.m4: error: problem compiling $1 test program"
3945fi
3946
3947$rm -f confest.$objext
3948
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003949# PORTME: override above test on systems where it is broken
3950ifelse([$1],[CXX],
3951[case $host_os in
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003952interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003953 # Interix 3.5 installs completely hosed .la files for C++, so rather than
3954 # hack all around it, let's just trust "g++" to DTRT.
3955 _LT_AC_TAGVAR(predep_objects,$1)=
3956 _LT_AC_TAGVAR(postdep_objects,$1)=
3957 _LT_AC_TAGVAR(postdeps,$1)=
3958 ;;
3959
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003960linux*)
3961 case `$CC -V 2>&1 | sed 5q` in
3962 *Sun\ C*)
3963 # Sun C++ 5.9
3964 #
3965 # The more standards-conforming stlport4 library is
3966 # incompatible with the Cstd library. Avoid specifying
3967 # it if it's in CXXFLAGS. Ignore libCrun as
3968 # -library=stlport4 depends on it.
3969 case " $CXX $CXXFLAGS " in
3970 *" -library=stlport4 "*)
3971 solaris_use_stlport4=yes
3972 ;;
3973 esac
3974 if test "$solaris_use_stlport4" != yes; then
3975 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3976 fi
3977 ;;
3978 esac
3979 ;;
3980
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003981solaris*)
3982 case $cc_basename in
3983 CC*)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003984 # The more standards-conforming stlport4 library is
3985 # incompatible with the Cstd library. Avoid specifying
3986 # it if it's in CXXFLAGS. Ignore libCrun as
3987 # -library=stlport4 depends on it.
3988 case " $CXX $CXXFLAGS " in
3989 *" -library=stlport4 "*)
3990 solaris_use_stlport4=yes
3991 ;;
3992 esac
3993
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06003994 # Adding this requires a known-good setup of shared libraries for
3995 # Sun compiler versions before 5.6, else PIC objects from an old
3996 # archive will be linked into the output, leading to subtle bugs.
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07003997 if test "$solaris_use_stlport4" != yes; then
3998 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3999 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004000 ;;
4001 esac
4002 ;;
4003esac
4004])
4005
hp.com!davidm2c9be972003-11-22 06:08:20 +00004006case " $_LT_AC_TAGVAR(postdeps, $1) " in
4007*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4008esac
4009])# AC_LIBTOOL_POSTDEP_PREDEP
4010
4011# AC_LIBTOOL_LANG_F77_CONFIG
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004012# --------------------------
hp.com!davidm2c9be972003-11-22 06:08:20 +00004013# Ensure that the configuration vars for the C compiler are
4014# suitably defined. Those variables are subsequently used by
4015# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4016AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4017AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4018[AC_REQUIRE([AC_PROG_F77])
4019AC_LANG_PUSH(Fortran 77)
4020
4021_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4022_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4023_LT_AC_TAGVAR(always_export_symbols, $1)=no
4024_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4025_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4026_LT_AC_TAGVAR(hardcode_direct, $1)=no
4027_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4028_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4029_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4030_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4031_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4032_LT_AC_TAGVAR(module_cmds, $1)=
4033_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4034_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4035_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4036_LT_AC_TAGVAR(no_undefined_flag, $1)=
4037_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4038_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4039
4040# Source file extension for f77 test sources.
4041ac_ext=f
4042
4043# Object file extension for compiled f77 test sources.
4044objext=o
4045_LT_AC_TAGVAR(objext, $1)=$objext
4046
4047# Code to be used in simple compile tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004048lt_simple_compile_test_code="\
4049 subroutine t
4050 return
4051 end
4052"
hp.com!davidm2c9be972003-11-22 06:08:20 +00004053
4054# Code to be used in simple link tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004055lt_simple_link_test_code="\
4056 program t
4057 end
4058"
hp.com!davidm2c9be972003-11-22 06:08:20 +00004059
4060# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4061_LT_AC_SYS_COMPILER
4062
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004063# save warnings/boilerplate of simple test code
4064_LT_COMPILER_BOILERPLATE
4065_LT_LINKER_BOILERPLATE
4066
hp.com!davidm2c9be972003-11-22 06:08:20 +00004067# Allow CC to be a program name with arguments.
4068lt_save_CC="$CC"
4069CC=${F77-"f77"}
4070compiler=$CC
4071_LT_AC_TAGVAR(compiler, $1)=$CC
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004072_LT_CC_BASENAME([$compiler])
hp.com!davidm2c9be972003-11-22 06:08:20 +00004073
4074AC_MSG_CHECKING([if libtool supports shared libraries])
4075AC_MSG_RESULT([$can_build_shared])
4076
4077AC_MSG_CHECKING([whether to build shared libraries])
4078test "$can_build_shared" = "no" && enable_shared=no
4079
4080# On AIX, shared libraries and static libraries use the same namespace, and
4081# are all built from PIC.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004082case $host_os in
hp.com!davidm2c9be972003-11-22 06:08:20 +00004083aix3*)
4084 test "$enable_shared" = yes && enable_static=no
4085 if test -n "$RANLIB"; then
4086 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4087 postinstall_cmds='$RANLIB $lib'
4088 fi
4089 ;;
hp.com!davidm2de17682004-04-20 16:53:44 +00004090aix4* | aix5*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004091 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4092 test "$enable_shared" = yes && enable_static=no
4093 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00004094 ;;
4095esac
4096AC_MSG_RESULT([$enable_shared])
4097
4098AC_MSG_CHECKING([whether to build static libraries])
4099# Make sure either enable_shared or enable_static is yes.
4100test "$enable_shared" = yes || enable_static=yes
4101AC_MSG_RESULT([$enable_static])
4102
hp.com!davidm2c9be972003-11-22 06:08:20 +00004103_LT_AC_TAGVAR(GCC, $1)="$G77"
4104_LT_AC_TAGVAR(LD, $1)="$LD"
4105
4106AC_LIBTOOL_PROG_COMPILER_PIC($1)
4107AC_LIBTOOL_PROG_CC_C_O($1)
4108AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4109AC_LIBTOOL_PROG_LD_SHLIBS($1)
4110AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4111AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
hp.com!davidm2c9be972003-11-22 06:08:20 +00004112
4113AC_LIBTOOL_CONFIG($1)
4114
4115AC_LANG_POP
4116CC="$lt_save_CC"
4117])# AC_LIBTOOL_LANG_F77_CONFIG
4118
4119
4120# AC_LIBTOOL_LANG_GCJ_CONFIG
4121# --------------------------
4122# Ensure that the configuration vars for the C compiler are
4123# suitably defined. Those variables are subsequently used by
4124# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4125AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4126AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4127[AC_LANG_SAVE
4128
4129# Source file extension for Java test sources.
4130ac_ext=java
4131
4132# Object file extension for compiled Java test sources.
4133objext=o
4134_LT_AC_TAGVAR(objext, $1)=$objext
4135
4136# Code to be used in simple compile tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004137lt_simple_compile_test_code="class foo {}"
hp.com!davidm2c9be972003-11-22 06:08:20 +00004138
4139# Code to be used in simple link tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004140lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
hp.com!davidm2c9be972003-11-22 06:08:20 +00004141
4142# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4143_LT_AC_SYS_COMPILER
4144
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004145# save warnings/boilerplate of simple test code
4146_LT_COMPILER_BOILERPLATE
4147_LT_LINKER_BOILERPLATE
4148
hp.com!davidm2c9be972003-11-22 06:08:20 +00004149# Allow CC to be a program name with arguments.
4150lt_save_CC="$CC"
4151CC=${GCJ-"gcj"}
4152compiler=$CC
4153_LT_AC_TAGVAR(compiler, $1)=$CC
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004154_LT_CC_BASENAME([$compiler])
hp.com!davidm2c9be972003-11-22 06:08:20 +00004155
4156# GCJ did not exist at the time GCC didn't implicitly link libc in.
4157_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4158
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004159_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4160
hp.com!davidm2c9be972003-11-22 06:08:20 +00004161AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4162AC_LIBTOOL_PROG_COMPILER_PIC($1)
4163AC_LIBTOOL_PROG_CC_C_O($1)
4164AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4165AC_LIBTOOL_PROG_LD_SHLIBS($1)
4166AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4167AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
hp.com!davidm2c9be972003-11-22 06:08:20 +00004168
4169AC_LIBTOOL_CONFIG($1)
4170
4171AC_LANG_RESTORE
4172CC="$lt_save_CC"
4173])# AC_LIBTOOL_LANG_GCJ_CONFIG
4174
4175
4176# AC_LIBTOOL_LANG_RC_CONFIG
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004177# -------------------------
hp.com!davidm2c9be972003-11-22 06:08:20 +00004178# Ensure that the configuration vars for the Windows resource compiler are
4179# suitably defined. Those variables are subsequently used by
4180# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4181AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4182AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4183[AC_LANG_SAVE
4184
4185# Source file extension for RC test sources.
4186ac_ext=rc
4187
4188# Object file extension for compiled RC test sources.
4189objext=o
4190_LT_AC_TAGVAR(objext, $1)=$objext
4191
4192# Code to be used in simple compile tests
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004193lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
hp.com!davidm2c9be972003-11-22 06:08:20 +00004194
4195# Code to be used in simple link tests
4196lt_simple_link_test_code="$lt_simple_compile_test_code"
4197
4198# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4199_LT_AC_SYS_COMPILER
4200
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004201# save warnings/boilerplate of simple test code
4202_LT_COMPILER_BOILERPLATE
4203_LT_LINKER_BOILERPLATE
4204
hp.com!davidm2c9be972003-11-22 06:08:20 +00004205# Allow CC to be a program name with arguments.
4206lt_save_CC="$CC"
4207CC=${RC-"windres"}
4208compiler=$CC
4209_LT_AC_TAGVAR(compiler, $1)=$CC
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004210_LT_CC_BASENAME([$compiler])
hp.com!davidm2c9be972003-11-22 06:08:20 +00004211_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4212
4213AC_LIBTOOL_CONFIG($1)
4214
4215AC_LANG_RESTORE
4216CC="$lt_save_CC"
4217])# AC_LIBTOOL_LANG_RC_CONFIG
4218
4219
4220# AC_LIBTOOL_CONFIG([TAGNAME])
4221# ----------------------------
4222# If TAGNAME is not passed, then create an initial libtool script
4223# with a default configuration from the untagged config vars. Otherwise
4224# add code to config.status for appending the configuration named by
4225# TAGNAME from the matching tagged config vars.
4226AC_DEFUN([AC_LIBTOOL_CONFIG],
4227[# The else clause should only fire when bootstrapping the
mostang.com!davidm0440c532003-01-17 18:12:55 +00004228# libtool distribution, otherwise you forgot to ship ltmain.sh
4229# with your package, and you will get complaints that there are
4230# no rules to generate ltmain.sh.
4231if test -f "$ltmain"; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00004232 # See if we are running on zsh, and set the options which allow our commands through
4233 # without removal of \ escapes.
4234 if test -n "${ZSH_VERSION+set}" ; then
4235 setopt NO_GLOB_SUBST
4236 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00004237 # Now quote all the things that may contain metacharacters while being
4238 # careful not to overquote the AC_SUBSTed values. We take copies of the
4239 # variables and quote the copies for generation of the libtool script.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004240 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
hp.com!davidm2c9be972003-11-22 06:08:20 +00004241 SED SHELL STRIP \
4242 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4243 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4244 deplibs_check_method reload_flag reload_cmds need_locks \
4245 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4246 lt_cv_sys_global_symbol_to_c_name_address \
mostang.com!davidm0440c532003-01-17 18:12:55 +00004247 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
hp.com!davidm2c9be972003-11-22 06:08:20 +00004248 old_postinstall_cmds old_postuninstall_cmds \
4249 _LT_AC_TAGVAR(compiler, $1) \
4250 _LT_AC_TAGVAR(CC, $1) \
4251 _LT_AC_TAGVAR(LD, $1) \
4252 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4253 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4254 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4255 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4256 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4257 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4258 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4259 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4260 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4261 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4262 _LT_AC_TAGVAR(predep_objects, $1) \
4263 _LT_AC_TAGVAR(postdep_objects, $1) \
4264 _LT_AC_TAGVAR(predeps, $1) \
4265 _LT_AC_TAGVAR(postdeps, $1) \
4266 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4267 _LT_AC_TAGVAR(archive_cmds, $1) \
4268 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4269 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4270 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4271 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4272 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4273 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4274 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4275 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4276 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4277 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4278 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4279 _LT_AC_TAGVAR(module_cmds, $1) \
4280 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4281 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004282 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
hp.com!davidm2c9be972003-11-22 06:08:20 +00004283 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4284 _LT_AC_TAGVAR(include_expsyms, $1); do
mostang.com!davidm0440c532003-01-17 18:12:55 +00004285
4286 case $var in
hp.com!davidm2c9be972003-11-22 06:08:20 +00004287 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4288 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4289 _LT_AC_TAGVAR(archive_cmds, $1) | \
4290 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4291 _LT_AC_TAGVAR(module_cmds, $1) | \
4292 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4293 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4294 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4295 extract_expsyms_cmds | reload_cmds | finish_cmds | \
mostang.com!davidm0440c532003-01-17 18:12:55 +00004296 postinstall_cmds | postuninstall_cmds | \
hp.com!davidm2c9be972003-11-22 06:08:20 +00004297 old_postinstall_cmds | old_postuninstall_cmds | \
4298 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004299 # Double-quote double-evaled strings.
4300 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4301 ;;
4302 *)
4303 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4304 ;;
4305 esac
4306 done
4307
hp.com!davidm2c9be972003-11-22 06:08:20 +00004308 case $lt_echo in
4309 *'\[$]0 --fallback-echo"')
4310 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4311 ;;
4312 esac
mostang.com!davidm0440c532003-01-17 18:12:55 +00004313
hp.com!davidm2c9be972003-11-22 06:08:20 +00004314ifelse([$1], [],
4315 [cfgfile="${ofile}T"
4316 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4317 $rm -f "$cfgfile"
4318 AC_MSG_NOTICE([creating $ofile])],
4319 [cfgfile="$ofile"])
4320
4321 cat <<__EOF__ >> "$cfgfile"
4322ifelse([$1], [],
4323[#! $SHELL
4324
4325# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
mostang.com!davidm0440c532003-01-17 18:12:55 +00004326# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4327# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4328#
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004329# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
hp.com!davidm2c9be972003-11-22 06:08:20 +00004330# Free Software Foundation, Inc.
4331#
4332# This file is part of GNU Libtool:
mostang.com!davidm0440c532003-01-17 18:12:55 +00004333# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4334#
4335# This program is free software; you can redistribute it and/or modify
4336# it under the terms of the GNU General Public License as published by
4337# the Free Software Foundation; either version 2 of the License, or
4338# (at your option) any later version.
4339#
4340# This program is distributed in the hope that it will be useful, but
4341# WITHOUT ANY WARRANTY; without even the implied warranty of
4342# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4343# General Public License for more details.
4344#
4345# You should have received a copy of the GNU General Public License
4346# along with this program; if not, write to the Free Software
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004347# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
mostang.com!davidm0440c532003-01-17 18:12:55 +00004348#
4349# As a special exception to the GNU General Public License, if you
4350# distribute this file as part of a program that contains a
4351# configuration script generated by Autoconf, you may include it under
4352# the same distribution terms that you use for the rest of that program.
4353
hp.com!davidm2c9be972003-11-22 06:08:20 +00004354# A sed program that does not truncate output.
mostang.com!davidm0440c532003-01-17 18:12:55 +00004355SED=$lt_SED
4356
4357# Sed that helps us avoid accidentally triggering echo(1) options like -n.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004358Xsed="$SED -e 1s/^X//"
mostang.com!davidm0440c532003-01-17 18:12:55 +00004359
4360# The HP-UX ksh and POSIX shell print the target directory to stdout
4361# if CDPATH is set.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004362(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
mostang.com!davidm0440c532003-01-17 18:12:55 +00004363
hp.com!davidm2c9be972003-11-22 06:08:20 +00004364# The names of the tagged configurations supported by this script.
4365available_tags=
4366
4367# ### BEGIN LIBTOOL CONFIG],
4368[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
mostang.com!davidm0440c532003-01-17 18:12:55 +00004369
4370# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4371
4372# Shell to use when invoking shell scripts.
4373SHELL=$lt_SHELL
4374
4375# Whether or not to build shared libraries.
4376build_libtool_libs=$enable_shared
4377
4378# Whether or not to build static libraries.
4379build_old_libs=$enable_static
4380
4381# Whether or not to add -lc for building shared libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004382build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4383
4384# Whether or not to disallow shared libs when runtime libs are static
4385allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004386
4387# Whether or not to optimize for fast installation.
4388fast_install=$enable_fast_install
4389
4390# The host system.
4391host_alias=$host_alias
4392host=$host
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004393host_os=$host_os
4394
4395# The build system.
4396build_alias=$build_alias
4397build=$build
4398build_os=$build_os
mostang.com!davidm0440c532003-01-17 18:12:55 +00004399
4400# An echo program that does not interpret backslashes.
4401echo=$lt_echo
4402
4403# The archiver.
4404AR=$lt_AR
4405AR_FLAGS=$lt_AR_FLAGS
4406
hp.com!davidm2c9be972003-11-22 06:08:20 +00004407# A C compiler.
4408LTCC=$lt_LTCC
4409
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004410# LTCC compiler flags.
4411LTCFLAGS=$lt_LTCFLAGS
4412
hp.com!davidm2c9be972003-11-22 06:08:20 +00004413# A language-specific compiler.
4414CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004415
4416# Is the compiler the GNU C compiler?
hp.com!davidm2c9be972003-11-22 06:08:20 +00004417with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4418
4419# An ERE matcher.
4420EGREP=$lt_EGREP
mostang.com!davidm0440c532003-01-17 18:12:55 +00004421
4422# The linker used to build libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004423LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004424
4425# Whether we need hard or soft links.
4426LN_S=$lt_LN_S
4427
4428# A BSD-compatible nm program.
4429NM=$lt_NM
4430
4431# A symbol stripping program
hp.com!davidm2c9be972003-11-22 06:08:20 +00004432STRIP=$lt_STRIP
mostang.com!davidm0440c532003-01-17 18:12:55 +00004433
4434# Used to examine libraries when file_magic_cmd begins "file"
4435MAGIC_CMD=$MAGIC_CMD
4436
4437# Used on cygwin: DLL creation program.
4438DLLTOOL="$DLLTOOL"
4439
4440# Used on cygwin: object dumper.
4441OBJDUMP="$OBJDUMP"
4442
4443# Used on cygwin: assembler.
4444AS="$AS"
4445
4446# The name of the directory that contains temporary libtool files.
4447objdir=$objdir
4448
4449# How to create reloadable object files.
4450reload_flag=$lt_reload_flag
4451reload_cmds=$lt_reload_cmds
4452
4453# How to pass a linker flag through the compiler.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004454wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004455
4456# Object file suffix (normally "o").
4457objext="$ac_objext"
4458
4459# Old archive suffix (normally "a").
4460libext="$libext"
4461
hp.com!davidm2c9be972003-11-22 06:08:20 +00004462# Shared library suffix (normally ".so").
hp.com!davidm2de17682004-04-20 16:53:44 +00004463shrext_cmds='$shrext_cmds'
hp.com!davidm2c9be972003-11-22 06:08:20 +00004464
mostang.com!davidm0440c532003-01-17 18:12:55 +00004465# Executable file suffix (normally "").
4466exeext="$exeext"
4467
4468# Additional compiler flags for building library objects.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004469pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004470pic_mode=$pic_mode
4471
hp.com!davidm2c9be972003-11-22 06:08:20 +00004472# What is the maximum length of a command?
4473max_cmd_len=$lt_cv_sys_max_cmd_len
mostang.com!davidm0440c532003-01-17 18:12:55 +00004474
hp.com!davidm2c9be972003-11-22 06:08:20 +00004475# Does compiler simultaneously support -c and -o options?
4476compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004477
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004478# Must we lock files when doing compilation?
mostang.com!davidm0440c532003-01-17 18:12:55 +00004479need_locks=$lt_need_locks
4480
4481# Do we need the lib prefix for modules?
4482need_lib_prefix=$need_lib_prefix
4483
4484# Do we need a version for libraries?
4485need_version=$need_version
4486
4487# Whether dlopen is supported.
4488dlopen_support=$enable_dlopen
4489
4490# Whether dlopen of programs is supported.
4491dlopen_self=$enable_dlopen_self
4492
4493# Whether dlopen of statically linked programs is supported.
4494dlopen_self_static=$enable_dlopen_self_static
4495
4496# Compiler flag to prevent dynamic linking.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004497link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004498
4499# Compiler flag to turn off builtin functions.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004500no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004501
4502# Compiler flag to allow reflexive dlopens.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004503export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004504
4505# Compiler flag to generate shared objects directly from archives.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004506whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004507
4508# Compiler flag to generate thread-safe objects.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004509thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004510
4511# Library versioning type.
4512version_type=$version_type
4513
4514# Format of library name prefix.
4515libname_spec=$lt_libname_spec
4516
4517# List of archive names. First name is the real one, the rest are links.
4518# The last name is the one that the linker finds with -lNAME.
4519library_names_spec=$lt_library_names_spec
4520
4521# The coded name of the library, if different from the real name.
4522soname_spec=$lt_soname_spec
4523
4524# Commands used to build and install an old-style archive.
4525RANLIB=$lt_RANLIB
hp.com!davidm2c9be972003-11-22 06:08:20 +00004526old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004527old_postinstall_cmds=$lt_old_postinstall_cmds
4528old_postuninstall_cmds=$lt_old_postuninstall_cmds
4529
4530# Create an old-style archive from a shared archive.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004531old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004532
4533# Create a temporary old-style archive to link instead of a shared archive.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004534old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004535
4536# Commands used to build and install a shared archive.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004537archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4538archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004539postinstall_cmds=$lt_postinstall_cmds
4540postuninstall_cmds=$lt_postuninstall_cmds
4541
hp.com!davidm2c9be972003-11-22 06:08:20 +00004542# Commands used to build a loadable module (assumed same as above if empty)
4543module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4544module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4545
mostang.com!davidm0440c532003-01-17 18:12:55 +00004546# Commands to strip libraries.
4547old_striplib=$lt_old_striplib
4548striplib=$lt_striplib
4549
hp.com!davidm2c9be972003-11-22 06:08:20 +00004550# Dependencies to place before the objects being linked to create a
4551# shared library.
4552predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4553
4554# Dependencies to place after the objects being linked to create a
4555# shared library.
4556postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4557
4558# Dependencies to place before the objects being linked to create a
4559# shared library.
4560predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4561
4562# Dependencies to place after the objects being linked to create a
4563# shared library.
4564postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4565
4566# The library search path used internally by the compiler when linking
4567# a shared library.
4568compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4569
mostang.com!davidm0440c532003-01-17 18:12:55 +00004570# Method to check whether dependent libraries are shared objects.
4571deplibs_check_method=$lt_deplibs_check_method
4572
4573# Command to use when deplibs_check_method == file_magic.
4574file_magic_cmd=$lt_file_magic_cmd
4575
4576# Flag that allows shared libraries with undefined symbols to be built.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004577allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004578
4579# Flag that forces no undefined symbols.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004580no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004581
4582# Commands used to finish a libtool library installation in a directory.
4583finish_cmds=$lt_finish_cmds
4584
4585# Same as above, but a single script fragment to be evaled but not shown.
4586finish_eval=$lt_finish_eval
4587
4588# Take the output of nm and produce a listing of raw symbols and C names.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004589global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
mostang.com!davidm0440c532003-01-17 18:12:55 +00004590
4591# Transform the output of nm in a proper C declaration
hp.com!davidm2c9be972003-11-22 06:08:20 +00004592global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
mostang.com!davidm0440c532003-01-17 18:12:55 +00004593
4594# Transform the output of nm in a C name address pair
hp.com!davidm2c9be972003-11-22 06:08:20 +00004595global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
mostang.com!davidm0440c532003-01-17 18:12:55 +00004596
4597# This is the shared library runtime path variable.
4598runpath_var=$runpath_var
4599
4600# This is the shared library path variable.
4601shlibpath_var=$shlibpath_var
4602
4603# Is shlibpath searched before the hard-coded library search path?
4604shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4605
4606# How to hardcode a shared library path into an executable.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004607hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004608
4609# Whether we should hardcode library paths into libraries.
4610hardcode_into_libs=$hardcode_into_libs
4611
4612# Flag to hardcode \$libdir into a binary during linking.
4613# This must work even if \$libdir does not exist.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004614hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4615
4616# If ld is used when linking, flag to hardcode \$libdir into
4617# a binary during linking. This must work even if \$libdir does
4618# not exist.
4619hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004620
4621# Whether we need a single -rpath flag with a separated argument.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004622hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004623
hp.com!davidm2c9be972003-11-22 06:08:20 +00004624# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
mostang.com!davidm0440c532003-01-17 18:12:55 +00004625# resulting binary.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004626hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004627
4628# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4629# resulting binary.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004630hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004631
4632# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4633# the resulting binary.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004634hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4635
4636# Set to yes if building a shared library automatically hardcodes DIR into the library
4637# and all subsequent libraries and executables linked against it.
4638hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004639
4640# Variables whose values should be saved in libtool wrapper scripts and
4641# restored at relink time.
4642variables_saved_for_relink="$variables_saved_for_relink"
4643
4644# Whether libtool must link a program against all its dependency libraries.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004645link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004646
4647# Compile-time system search path for libraries
4648sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4649
4650# Run-time system search path for libraries
4651sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4652
4653# Fix the shell variable \$srcfile for the compiler.
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004654fix_srcfile_path=$lt_fix_srcfile_path
mostang.com!davidm0440c532003-01-17 18:12:55 +00004655
4656# Set to yes if exported symbols are required.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004657always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004658
4659# The commands to list exported symbols.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004660export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004661
4662# The commands to extract the exported symbol list from a shared archive.
4663extract_expsyms_cmds=$lt_extract_expsyms_cmds
4664
4665# Symbols that should not be listed in the preloaded symbols.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004666exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004667
4668# Symbols that must always be exported.
hp.com!davidm2c9be972003-11-22 06:08:20 +00004669include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
mostang.com!davidm0440c532003-01-17 18:12:55 +00004670
hp.com!davidm2c9be972003-11-22 06:08:20 +00004671ifelse([$1],[],
4672[# ### END LIBTOOL CONFIG],
4673[# ### END LIBTOOL TAG CONFIG: $tagname])
mostang.com!davidm0440c532003-01-17 18:12:55 +00004674
4675__EOF__
4676
hp.com!davidm2c9be972003-11-22 06:08:20 +00004677ifelse([$1],[], [
mostang.com!davidm0440c532003-01-17 18:12:55 +00004678 case $host_os in
4679 aix3*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00004680 cat <<\EOF >> "$cfgfile"
mostang.com!davidm0440c532003-01-17 18:12:55 +00004681
4682# AIX sometimes has problems with the GCC collect2 program. For some
4683# reason, if we set the COLLECT_NAMES environment variable, the problems
4684# vanish in a puff of smoke.
4685if test "X${COLLECT_NAMES+set}" != Xset; then
4686 COLLECT_NAMES=
4687 export COLLECT_NAMES
4688fi
4689EOF
4690 ;;
4691 esac
4692
hp.com!davidm2c9be972003-11-22 06:08:20 +00004693 # We use sed instead of cat because bash on DJGPP gets confused if
4694 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4695 # text mode, it properly converts lines to CR/LF. This bash problem
4696 # is reportedly fixed, but why not run on old versions too?
4697 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4698
4699 mv -f "$cfgfile" "$ofile" || \
4700 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4701 chmod +x "$ofile"
4702])
4703else
4704 # If there is no Makefile yet, we rely on a make rule to execute
4705 # `config.status --recheck' to rerun these tests and create the
4706 # libtool script then.
4707 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4708 if test -f "$ltmain_in"; then
4709 test -f Makefile && make "$ltmain"
4710 fi
4711fi
4712])# AC_LIBTOOL_CONFIG
4713
4714
4715# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4716# -------------------------------------------
4717AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4718[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4719
4720_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4721
4722if test "$GCC" = yes; then
4723 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4724
4725 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4726 lt_cv_prog_compiler_rtti_exceptions,
4727 [-fno-rtti -fno-exceptions], [],
4728 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4729fi
4730])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4731
4732
4733# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4734# ---------------------------------
4735AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4736[AC_REQUIRE([AC_CANONICAL_HOST])
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004737AC_REQUIRE([LT_AC_PROG_SED])
hp.com!davidm2c9be972003-11-22 06:08:20 +00004738AC_REQUIRE([AC_PROG_NM])
4739AC_REQUIRE([AC_OBJEXT])
4740# Check for command to grab the raw symbol name followed by C symbol from nm.
4741AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4742AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4743[
4744# These are sane defaults that work on at least a few old systems.
4745# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4746
4747# Character class describing NM global symbol codes.
4748symcode='[[BCDEGRST]]'
4749
4750# Regexp to match symbols that can be accessed directly from C.
4751sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4752
hp.com!davidm2c9be972003-11-22 06:08:20 +00004753# Transform an extracted symbol line into a proper C declaration
4754lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4755
4756# Transform an extracted symbol line into symbol name and symbol address
4757lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4758
4759# Define system-specific variables.
4760case $host_os in
4761aix*)
4762 symcode='[[BCDT]]'
4763 ;;
4764cygwin* | mingw* | pw32*)
4765 symcode='[[ABCDGISTW]]'
4766 ;;
4767hpux*) # Its linker distinguishes data from code symbols
4768 if test "$host_cpu" = ia64; then
4769 symcode='[[ABCDEGRST]]'
4770 fi
4771 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4772 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4773 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004774linux* | k*bsd*-gnu)
4775 if test "$host_cpu" = ia64; then
4776 symcode='[[ABCDGIRSTW]]'
4777 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4778 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4779 fi
4780 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00004781irix* | nonstopux*)
4782 symcode='[[BCDEGRST]]'
4783 ;;
4784osf*)
4785 symcode='[[BCDEGQRST]]'
4786 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004787solaris*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00004788 symcode='[[BDRT]]'
4789 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004790sco3.2v5*)
4791 symcode='[[DT]]'
4792 ;;
4793sysv4.2uw2*)
4794 symcode='[[DT]]'
4795 ;;
4796sysv5* | sco5v6* | unixware* | OpenUNIX*)
4797 symcode='[[ABDT]]'
4798 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00004799sysv4)
4800 symcode='[[DFNSTU]]'
4801 ;;
4802esac
4803
4804# Handle CRLF in mingw tool chain
4805opt_cr=
4806case $build_os in
4807mingw*)
4808 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4809 ;;
4810esac
4811
4812# If we're using GNU nm, then use its standard symbol codes.
4813case `$NM -V 2>&1` in
4814*GNU* | *'with BFD'*)
4815 symcode='[[ABCDGIRSTW]]' ;;
4816esac
4817
4818# Try without a prefix undercore, then with it.
4819for ac_symprfx in "" "_"; do
4820
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004821 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4822 symxfrm="\\1 $ac_symprfx\\2 \\2"
4823
hp.com!davidm2c9be972003-11-22 06:08:20 +00004824 # Write the raw and C identifiers.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004825 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
hp.com!davidm2c9be972003-11-22 06:08:20 +00004826
4827 # Check to see that the pipe works correctly.
4828 pipe_works=no
4829
4830 rm -f conftest*
4831 cat > conftest.$ac_ext <<EOF
4832#ifdef __cplusplus
4833extern "C" {
4834#endif
4835char nm_test_var;
4836void nm_test_func(){}
4837#ifdef __cplusplus
4838}
4839#endif
4840int main(){nm_test_var='a';nm_test_func();return(0);}
4841EOF
4842
4843 if AC_TRY_EVAL(ac_compile); then
4844 # Now try to grab the symbols.
4845 nlist=conftest.nm
4846 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4847 # Try sorting and uniquifying the output.
4848 if sort "$nlist" | uniq > "$nlist"T; then
4849 mv -f "$nlist"T "$nlist"
4850 else
4851 rm -f "$nlist"T
4852 fi
4853
4854 # Make sure that we snagged all the symbols we need.
4855 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4856 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4857 cat <<EOF > conftest.$ac_ext
4858#ifdef __cplusplus
4859extern "C" {
4860#endif
4861
4862EOF
4863 # Now generate the symbol file.
4864 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4865
4866 cat <<EOF >> conftest.$ac_ext
4867#if defined (__STDC__) && __STDC__
4868# define lt_ptr_t void *
4869#else
4870# define lt_ptr_t char *
4871# define const
4872#endif
4873
4874/* The mapping between symbol names and symbols. */
4875const struct {
4876 const char *name;
4877 lt_ptr_t address;
4878}
4879lt_preloaded_symbols[[]] =
4880{
4881EOF
4882 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4883 cat <<\EOF >> conftest.$ac_ext
4884 {0, (lt_ptr_t) 0}
4885};
4886
4887#ifdef __cplusplus
4888}
4889#endif
4890EOF
4891 # Now try linking the two files.
4892 mv conftest.$ac_objext conftstm.$ac_objext
4893 lt_save_LIBS="$LIBS"
4894 lt_save_CFLAGS="$CFLAGS"
4895 LIBS="conftstm.$ac_objext"
4896 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4897 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4898 pipe_works=yes
4899 fi
4900 LIBS="$lt_save_LIBS"
4901 CFLAGS="$lt_save_CFLAGS"
4902 else
4903 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4904 fi
4905 else
4906 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4907 fi
4908 else
4909 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4910 fi
4911 else
4912 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4913 cat conftest.$ac_ext >&5
4914 fi
4915 rm -f conftest* conftst*
4916
4917 # Do not use the global_symbol_pipe unless it works.
4918 if test "$pipe_works" = yes; then
4919 break
4920 else
4921 lt_cv_sys_global_symbol_pipe=
4922 fi
4923done
4924])
4925if test -z "$lt_cv_sys_global_symbol_pipe"; then
4926 lt_cv_sys_global_symbol_to_cdecl=
4927fi
4928if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4929 AC_MSG_RESULT(failed)
4930else
4931 AC_MSG_RESULT(ok)
4932fi
4933]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4934
4935
4936# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4937# ---------------------------------------
4938AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4939[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4940_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4941_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4942
4943AC_MSG_CHECKING([for $compiler option to produce PIC])
4944 ifelse([$1],[CXX],[
4945 # C++ specific cases for pic, static, wl, etc.
4946 if test "$GXX" = yes; then
4947 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4948 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4949
4950 case $host_os in
4951 aix*)
4952 # All AIX code is PIC.
4953 if test "$host_cpu" = ia64; then
4954 # AIX 5 now supports IA64 processor
4955 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4956 fi
4957 ;;
4958 amigaos*)
4959 # FIXME: we need at least 68020 code to build shared libraries, but
4960 # adding the `-m68020' flag to GCC prevents building anything better,
4961 # like `-m68040'.
4962 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4963 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004964 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00004965 # PIC is the default for these OSes.
4966 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004967 mingw* | cygwin* | os2* | pw32*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00004968 # This hack is so that the source file can tell whether it is being
4969 # built for inclusion in a dll (and should export symbols for example).
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004970 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4971 # (--disable-auto-import) libraries
hp.com!davidm2c9be972003-11-22 06:08:20 +00004972 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4973 ;;
4974 darwin* | rhapsody*)
4975 # PIC is the default on this platform
4976 # Common symbols not allowed in MH_DYLIB files
4977 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4978 ;;
4979 *djgpp*)
4980 # DJGPP does not support shared libraries at all
4981 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4982 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07004983 interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004984 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4985 # Instead, we relocate shared libraries at runtime.
4986 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00004987 sysv4*MP*)
4988 if test -d /usr/nec; then
4989 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4990 fi
4991 ;;
4992 hpux*)
4993 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4994 # not for PA HP-UX.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06004995 case $host_cpu in
hp.com!davidm2c9be972003-11-22 06:08:20 +00004996 hppa*64*|ia64*)
4997 ;;
4998 *)
4999 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5000 ;;
5001 esac
5002 ;;
5003 *)
5004 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5005 ;;
5006 esac
5007 else
5008 case $host_os in
5009 aix4* | aix5*)
5010 # All AIX code is PIC.
5011 if test "$host_cpu" = ia64; then
5012 # AIX 5 now supports IA64 processor
5013 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5014 else
5015 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5016 fi
5017 ;;
5018 chorus*)
5019 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005020 cxch68*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005021 # Green Hills C++ Compiler
5022 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5023 ;;
5024 esac
5025 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005026 darwin*)
5027 # PIC is the default on this platform
5028 # Common symbols not allowed in MH_DYLIB files
5029 case $cc_basename in
5030 xlc*)
5031 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5032 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5033 ;;
5034 esac
5035 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005036 dgux*)
5037 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005038 ec++*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005039 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5040 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005041 ghcx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005042 # Green Hills C++ Compiler
5043 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5044 ;;
5045 *)
5046 ;;
5047 esac
5048 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005049 freebsd* | dragonfly*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005050 # FreeBSD uses GNU C++
5051 ;;
5052 hpux9* | hpux10* | hpux11*)
5053 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005054 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005055 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005056 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005057 if test "$host_cpu" != ia64; then
5058 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5059 fi
5060 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005061 aCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005062 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005063 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5064 case $host_cpu in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005065 hppa*64*|ia64*)
5066 # +Z the default
5067 ;;
5068 *)
5069 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5070 ;;
5071 esac
5072 ;;
5073 *)
5074 ;;
5075 esac
5076 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005077 interix*)
5078 # This is c89, which is MS Visual C++ (no shared libs)
5079 # Anyone wants to do a port?
5080 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005081 irix5* | irix6* | nonstopux*)
5082 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005083 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005084 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5086 # CC pic flag -KPIC is the default.
5087 ;;
5088 *)
5089 ;;
5090 esac
5091 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005092 linux* | k*bsd*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005093 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005094 KCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005095 # KAI C++ Compiler
5096 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5097 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5098 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005099 icpc* | ecpc*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005100 # Intel C++
5101 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5102 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5103 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5104 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005105 pgCC*)
5106 # Portland Group C++ compiler.
5107 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5108 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5109 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5110 ;;
5111 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005112 # Compaq C++
5113 # Make sure the PIC flag is empty. It appears that all Alpha
5114 # Linux and Compaq Tru64 Unix objects are PIC.
5115 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5116 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5117 ;;
5118 *)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005119 case `$CC -V 2>&1 | sed 5q` in
5120 *Sun\ C*)
5121 # Sun C++ 5.9
5122 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5123 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5124 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5125 ;;
5126 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00005127 ;;
5128 esac
5129 ;;
5130 lynxos*)
5131 ;;
5132 m88k*)
5133 ;;
5134 mvs*)
5135 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005136 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005137 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5138 ;;
5139 *)
5140 ;;
5141 esac
5142 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005143 netbsd* | netbsdelf*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005144 ;;
5145 osf3* | osf4* | osf5*)
5146 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005147 KCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005148 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5149 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005150 RCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005151 # Rational C++ 2.4.1
5152 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5153 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005154 cxx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005155 # Digital/Compaq C++
5156 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5157 # Make sure the PIC flag is empty. It appears that all Alpha
5158 # Linux and Compaq Tru64 Unix objects are PIC.
5159 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5160 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5161 ;;
5162 *)
5163 ;;
5164 esac
5165 ;;
5166 psos*)
5167 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005168 solaris*)
5169 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005170 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005171 # Sun C++ 4.2, 5.x and Centerline C++
5172 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5173 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5174 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5175 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005176 gcx*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005177 # Green Hills C++ Compiler
5178 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5179 ;;
5180 *)
5181 ;;
5182 esac
5183 ;;
5184 sunos4*)
5185 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005186 CC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005187 # Sun C++ 4.x
5188 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5189 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5190 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005191 lcc*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005192 # Lucid
5193 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5194 ;;
5195 *)
5196 ;;
5197 esac
5198 ;;
5199 tandem*)
5200 case $cc_basename in
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005201 NCC*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005202 # NonStop-UX NCC 3.20
5203 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5204 ;;
5205 *)
5206 ;;
5207 esac
5208 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005209 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5210 case $cc_basename in
5211 CC*)
5212 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5213 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5214 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5215 ;;
5216 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00005217 ;;
5218 vxworks*)
5219 ;;
5220 *)
5221 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5222 ;;
5223 esac
5224 fi
5225],
5226[
5227 if test "$GCC" = yes; then
5228 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5229 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5230
5231 case $host_os in
5232 aix*)
5233 # All AIX code is PIC.
5234 if test "$host_cpu" = ia64; then
5235 # AIX 5 now supports IA64 processor
5236 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5237 fi
5238 ;;
5239
5240 amigaos*)
5241 # FIXME: we need at least 68020 code to build shared libraries, but
5242 # adding the `-m68020' flag to GCC prevents building anything better,
5243 # like `-m68040'.
5244 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5245 ;;
5246
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005247 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005248 # PIC is the default for these OSes.
5249 ;;
5250
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005251 mingw* | cygwin* | pw32* | os2*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005252 # This hack is so that the source file can tell whether it is being
5253 # built for inclusion in a dll (and should export symbols for example).
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005254 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5255 # (--disable-auto-import) libraries
hp.com!davidm2c9be972003-11-22 06:08:20 +00005256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5257 ;;
5258
5259 darwin* | rhapsody*)
5260 # PIC is the default on this platform
5261 # Common symbols not allowed in MH_DYLIB files
5262 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5263 ;;
5264
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005265 interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005266 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5267 # Instead, we relocate shared libraries at runtime.
5268 ;;
5269
hp.com!davidm2c9be972003-11-22 06:08:20 +00005270 msdosdjgpp*)
5271 # Just because we use GCC doesn't mean we suddenly get shared libraries
5272 # on systems that don't support them.
5273 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5274 enable_shared=no
5275 ;;
5276
5277 sysv4*MP*)
5278 if test -d /usr/nec; then
5279 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5280 fi
5281 ;;
5282
5283 hpux*)
5284 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5285 # not for PA HP-UX.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005286 case $host_cpu in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005287 hppa*64*|ia64*)
5288 # +Z the default
5289 ;;
5290 *)
5291 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5292 ;;
5293 esac
5294 ;;
5295
5296 *)
5297 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5298 ;;
5299 esac
5300 else
5301 # PORTME Check for flag to pass linker flags through the system compiler.
5302 case $host_os in
5303 aix*)
5304 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5305 if test "$host_cpu" = ia64; then
5306 # AIX 5 now supports IA64 processor
5307 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5308 else
5309 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5310 fi
5311 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005312 darwin*)
5313 # PIC is the default on this platform
5314 # Common symbols not allowed in MH_DYLIB files
5315 case $cc_basename in
5316 xlc*)
5317 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5318 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5319 ;;
5320 esac
5321 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005322
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005323 mingw* | cygwin* | pw32* | os2*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005324 # This hack is so that the source file can tell whether it is being
5325 # built for inclusion in a dll (and should export symbols for example).
5326 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5327 ;;
5328
5329 hpux9* | hpux10* | hpux11*)
5330 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5331 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5332 # not for PA HP-UX.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005333 case $host_cpu in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005334 hppa*64*|ia64*)
5335 # +Z the default
5336 ;;
5337 *)
5338 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5339 ;;
5340 esac
5341 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5342 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5343 ;;
5344
5345 irix5* | irix6* | nonstopux*)
5346 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5347 # PIC (with -KPIC) is the default.
5348 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5349 ;;
5350
5351 newsos6)
5352 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5353 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5354 ;;
5355
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005356 linux* | k*bsd*-gnu)
5357 case $cc_basename in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005358 icc* | ecc*)
5359 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5360 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5361 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5362 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005363 pgcc* | pgf77* | pgf90* | pgf95*)
5364 # Portland Group compilers (*not* the Pentium gcc compiler,
5365 # which looks to be a dead project)
5366 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5367 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5368 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5369 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005370 ccc*)
5371 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372 # All Alpha code is PIC.
5373 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5374 ;;
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005375 *)
5376 case `$CC -V 2>&1 | sed 5q` in
5377 *Sun\ C*)
5378 # Sun C 5.9
5379 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5380 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5381 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5382 ;;
5383 *Sun\ F*)
5384 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5385 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5386 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5387 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5388 ;;
5389 esac
5390 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005391 esac
5392 ;;
5393
5394 osf3* | osf4* | osf5*)
5395 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5396 # All OSF/1 code is PIC.
5397 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5398 ;;
5399
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005400 rdos*)
5401 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5402 ;;
5403
hp.com!davidm2c9be972003-11-22 06:08:20 +00005404 solaris*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005405 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5406 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005407 case $cc_basename in
5408 f77* | f90* | f95*)
5409 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5410 *)
5411 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5412 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00005413 ;;
5414
5415 sunos4*)
5416 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5418 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5419 ;;
5420
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005421 sysv4 | sysv4.2uw2* | sysv4.3*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005422 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5423 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5424 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5425 ;;
5426
5427 sysv4*MP*)
5428 if test -d /usr/nec ;then
5429 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5430 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431 fi
5432 ;;
5433
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005434 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5435 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5437 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5438 ;;
5439
5440 unicos*)
5441 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5442 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5443 ;;
5444
hp.com!davidm2c9be972003-11-22 06:08:20 +00005445 uts4*)
5446 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5447 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5448 ;;
5449
5450 *)
5451 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5452 ;;
5453 esac
5454 fi
5455])
5456AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5457
5458#
5459# Check to make sure the PIC flag actually works.
5460#
5461if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5462 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5463 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5464 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5465 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5466 "" | " "*) ;;
5467 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5468 esac],
5469 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5470 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5471fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005472case $host_os in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005473 # For platforms which do not support PIC, -DPIC is meaningless:
5474 *djgpp*)
5475 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5476 ;;
5477 *)
5478 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5479 ;;
5480esac
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005481
5482#
5483# Check to make sure the static flag actually works.
5484#
5485wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5486AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5487 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5488 $lt_tmp_static_flag,
5489 [],
5490 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
hp.com!davidm2c9be972003-11-22 06:08:20 +00005491])
5492
5493
5494# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5495# ------------------------------------
5496# See if the linker supports building shared libraries.
5497AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005498[AC_REQUIRE([LT_AC_PROG_SED])dnl
5499AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
hp.com!davidm2c9be972003-11-22 06:08:20 +00005500ifelse([$1],[CXX],[
5501 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
mostang.com!davidm0440c532003-01-17 18:12:55 +00005502 case $host_os in
hp.com!davidm2c9be972003-11-22 06:08:20 +00005503 aix4* | aix5*)
5504 # If we're using GNU nm, then we don't want the "-C" option.
5505 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5506 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5507 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5508 else
5509 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5510 fi
5511 ;;
5512 pw32*)
5513 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5514 ;;
5515 cygwin* | mingw*)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005516 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005517 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005518 linux* | k*bsd*-gnu)
hp.com!davidm2de17682004-04-20 16:53:44 +00005519 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5520 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005521 *)
5522 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5523 ;;
5524 esac
5525],[
5526 runpath_var=
5527 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5528 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5529 _LT_AC_TAGVAR(archive_cmds, $1)=
5530 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5531 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5532 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5533 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5534 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5535 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5537 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5538 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5539 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5540 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5541 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5542 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5543 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5544 _LT_AC_TAGVAR(module_cmds, $1)=
5545 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5546 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5547 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5548 # include_expsyms should be a list of space-separated symbols to be *always*
5549 # included in the symbol list
5550 _LT_AC_TAGVAR(include_expsyms, $1)=
5551 # exclude_expsyms can be an extended regexp of symbols to exclude
5552 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5553 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5554 # as well as any symbol that contains `d'.
5555 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5556 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5557 # platforms (ab)use it in PIC code, but their linkers get confused if
5558 # the symbol is explicitly referenced. Since portable code cannot
5559 # rely on this symbol name, it's probably fine to never include it in
5560 # preloaded symbol tables.
5561 extract_expsyms_cmds=
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005562 # Just being paranoid about ensuring that cc_basename is set.
5563 _LT_CC_BASENAME([$compiler])
hp.com!davidm2c9be972003-11-22 06:08:20 +00005564 case $host_os in
5565 cygwin* | mingw* | pw32*)
5566 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5567 # When not using gcc, we currently assume that we are using
5568 # Microsoft Visual C++.
5569 if test "$GCC" != yes; then
5570 with_gnu_ld=no
5571 fi
5572 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005573 interix*)
5574 # we just hope/assume this is gcc and not c89 (= MSVC++)
5575 with_gnu_ld=yes
5576 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005577 openbsd*)
5578 with_gnu_ld=no
5579 ;;
5580 esac
5581
5582 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5583 if test "$with_gnu_ld" = yes; then
5584 # If archive_cmds runs LD, not CC, wlarc should be empty
5585 wlarc='${wl}'
5586
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005587 # Set some defaults for GNU ld with shared library support. These
5588 # are reset later if shared libraries are not supported. Putting them
5589 # here allows them to be overridden if necessary.
5590 runpath_var=LD_RUN_PATH
5591 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5592 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5593 # ancient GNU ld didn't support --whole-archive et. al.
5594 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5595 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5596 else
5597 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5598 fi
5599 supports_anon_versioning=no
5600 case `$LD -v 2>/dev/null` in
5601 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5602 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5603 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5604 *\ 2.11.*) ;; # other 2.11 versions
5605 *) supports_anon_versioning=yes ;;
5606 esac
5607
hp.com!davidm2c9be972003-11-22 06:08:20 +00005608 # See if GNU ld supports shared libraries.
5609 case $host_os in
5610 aix3* | aix4* | aix5*)
5611 # On AIX/PPC, the GNU linker is very broken
5612 if test "$host_cpu" != ia64; then
5613 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5614 cat <<EOF 1>&2
5615
5616*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5617*** to be unable to reliably create shared libraries on AIX.
5618*** Therefore, libtool is disabling shared libraries support. If you
5619*** really care for shared libraries, you may want to modify your PATH
5620*** so that a non-GNU linker is found, and then restart.
5621
5622EOF
5623 fi
5624 ;;
5625
5626 amigaos*)
5627 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5628 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5629 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5630
5631 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5632 # that the semantics of dynamic libraries on AmigaOS, at least up
5633 # to version 4, is to share data among multiple programs linked
5634 # with the same dynamic library. Since this doesn't match the
5635 # behavior of shared libraries on other platforms, we can't use
5636 # them.
5637 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5638 ;;
5639
5640 beos*)
5641 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5642 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5643 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5644 # support --undefined. This deserves some investigation. FIXME
5645 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5646 else
5647 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5648 fi
5649 ;;
5650
5651 cygwin* | mingw* | pw32*)
5652 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5653 # as there is no search path for DLLs.
5654 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5655 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5656 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5657 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005658 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005659
5660 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005661 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005662 # If the export-symbols file already is a .def file (1st line
5663 # is EXPORTS), use it as is; otherwise, prepend...
5664 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5665 cp $export_symbols $output_objdir/$soname.def;
5666 else
5667 echo EXPORTS > $output_objdir/$soname.def;
5668 cat $export_symbols >> $output_objdir/$soname.def;
5669 fi~
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005670 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005671 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005672 _LT_AC_TAGVAR(ld_shlibs, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00005673 fi
5674 ;;
5675
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005676 interix[[3-9]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005677 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5678 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5679 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5680 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5681 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5682 # Instead, shared libraries are loaded at an image base (0x10000000 by
5683 # default) and relocated if they conflict, which is a slow very memory
5684 # consuming and fragmenting process. To avoid this, we pick a random,
5685 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5686 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5687 _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'
5688 _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'
5689 ;;
5690
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005691 gnu* | linux* | k*bsd*-gnu)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005692 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5693 tmp_addflag=
5694 case $cc_basename,$host_cpu in
5695 pgcc*) # Portland Group C compiler
5696 _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'
5697 tmp_addflag=' $pic_flag'
5698 ;;
5699 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5700 _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'
5701 tmp_addflag=' $pic_flag -Mnomain' ;;
5702 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5703 tmp_addflag=' -i_dynamic' ;;
5704 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5705 tmp_addflag=' -i_dynamic -nofor_main' ;;
5706 ifc* | ifort*) # Intel Fortran compiler
5707 tmp_addflag=' -nofor_main' ;;
5708 esac
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005709 case `$CC -V 2>&1 | sed 5q` in
5710 *Sun\ C*) # Sun C 5.9
5711 _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'
5712 tmp_sharedflag='-G' ;;
5713 *Sun\ F*) # Sun Fortran 8.3
5714 tmp_sharedflag='-G' ;;
5715 *)
5716 tmp_sharedflag='-shared' ;;
5717 esac
5718 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005719
5720 if test $supports_anon_versioning = yes; then
5721 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5722 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5723 $echo "local: *; };" >> $output_objdir/$libname.ver~
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005724 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005725 fi
5726 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5727 else
5728 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5729 fi
5730 ;;
5731
5732 netbsd* | netbsdelf*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005733 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5734 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5735 wlarc=
5736 else
5737 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5738 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5739 fi
5740 ;;
5741
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005742 solaris*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005743 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5744 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5745 cat <<EOF 1>&2
5746
5747*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5748*** create shared libraries on Solaris systems. Therefore, libtool
5749*** is disabling shared libraries support. We urge you to upgrade GNU
5750*** binutils to release 2.9.1 or newer. Another option is to modify
5751*** your PATH or compiler configuration so that the native linker is
5752*** used, and then restart.
5753
5754EOF
5755 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5756 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5757 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5758 else
5759 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5760 fi
5761 ;;
5762
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005763 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5764 case `$LD -v 2>&1` in
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005765 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005766 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5767 cat <<_LT_EOF 1>&2
5768
5769*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5770*** reliably create shared libraries on SCO systems. Therefore, libtool
5771*** is disabling shared libraries support. We urge you to upgrade GNU
5772*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5773*** your PATH or compiler configuration so that the native linker is
5774*** used, and then restart.
5775
5776_LT_EOF
5777 ;;
5778 *)
5779 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5781 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5782 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5783 else
5784 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5785 fi
5786 ;;
5787 esac
5788 ;;
5789
hp.com!davidm2c9be972003-11-22 06:08:20 +00005790 sunos4*)
5791 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5792 wlarc=
5793 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5794 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5795 ;;
5796
hp.com!davidm2c9be972003-11-22 06:08:20 +00005797 *)
5798 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5799 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5800 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5801 else
5802 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5803 fi
5804 ;;
5805 esac
5806
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005807 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5808 runpath_var=
5809 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5810 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5811 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
hp.com!davidm2c9be972003-11-22 06:08:20 +00005812 fi
5813 else
5814 # PORTME fill in a description of your system's linker (not GNU ld)
5815 case $host_os in
5816 aix3*)
5817 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5818 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5819 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5820 # Note: this linker hardcodes the directories in LIBPATH if there
5821 # are no directories specified by -L.
5822 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005823 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00005824 # Neither direct hardcoding nor static linking is supported with a
5825 # broken collect2.
5826 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5827 fi
5828 ;;
5829
5830 aix4* | aix5*)
5831 if test "$host_cpu" = ia64; then
5832 # On IA64, the linker does run time linking by default, so we don't
5833 # have to do anything special.
5834 aix_use_runtimelinking=no
5835 exp_sym_flag='-Bexport'
5836 no_entry_flag=""
5837 else
5838 # If we're using GNU nm, then we don't want the "-C" option.
5839 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5840 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5841 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5842 else
5843 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5844 fi
5845 aix_use_runtimelinking=no
5846
5847 # Test if we are trying to use run time linking or normal
5848 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5849 # need to do runtime linking.
5850 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5851 for ld_flag in $LDFLAGS; do
5852 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5853 aix_use_runtimelinking=yes
5854 break
5855 fi
5856 done
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005857 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005858 esac
5859
5860 exp_sym_flag='-bexport'
5861 no_entry_flag='-bnoentry'
5862 fi
5863
5864 # When large executables or shared objects are built, AIX ld can
5865 # have problems creating the table of contents. If linking a library
5866 # or program results in "error TOC overflow" add -mminimal-toc to
5867 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5868 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5869
5870 _LT_AC_TAGVAR(archive_cmds, $1)=''
5871 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5872 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5873 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5874
5875 if test "$GCC" = yes; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005876 case $host_os in aix4.[[012]]|aix4.[[012]].*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005877 # We only want to do this on AIX 4.2 and lower, the check
5878 # below for broken collect2 doesn't work under 4.3+
5879 collect2name=`${CC} -print-prog-name=collect2`
5880 if test -f "$collect2name" && \
5881 strings "$collect2name" | grep resolve_lib_name >/dev/null
5882 then
5883 # We have reworked collect2
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005884 :
hp.com!davidm2c9be972003-11-22 06:08:20 +00005885 else
5886 # We have old collect2
5887 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5888 # It fails to find uninstalled libraries when the uninstalled
5889 # path is not listed in the libpath. Setting hardcode_minus_L
5890 # to unsupported forces relinking
5891 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5892 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5893 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5894 fi
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005895 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00005896 esac
5897 shared_flag='-shared'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005898 if test "$aix_use_runtimelinking" = yes; then
5899 shared_flag="$shared_flag "'${wl}-G'
5900 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00005901 else
5902 # not using gcc
5903 if test "$host_cpu" = ia64; then
5904 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5905 # chokes on -Wl,-G. The following line is correct:
5906 shared_flag='-G'
5907 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005908 if test "$aix_use_runtimelinking" = yes; then
hp.com!davidm2c9be972003-11-22 06:08:20 +00005909 shared_flag='${wl}-G'
5910 else
5911 shared_flag='${wl}-bM:SRE'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005912 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00005913 fi
5914 fi
5915
5916 # It seems that -bexpall does not export symbols beginning with
5917 # underscore (_), so it is better to generate a list of symbols to export.
5918 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5919 if test "$aix_use_runtimelinking" = yes; then
5920 # Warning - without using the other runtime loading flags (-brtl),
5921 # -berok will link without error, but may produce a broken library.
5922 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5923 # Determine the default libpath from the value encoded in an empty executable.
5924 _LT_AC_SYS_LIBPATH_AIX
5925 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005926 _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"
hp.com!davidm2c9be972003-11-22 06:08:20 +00005927 else
5928 if test "$host_cpu" = ia64; then
5929 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5930 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005931 _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"
hp.com!davidm2c9be972003-11-22 06:08:20 +00005932 else
5933 # Determine the default libpath from the value encoded in an empty executable.
5934 _LT_AC_SYS_LIBPATH_AIX
5935 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5936 # Warning - without using the other run time loading flags,
5937 # -berok will link without error, but may produce a broken library.
5938 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5939 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005940 # Exported symbols can be pulled into shared objects from archives
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005941 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005942 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005943 # This is similar to how AIX traditionally builds its shared libraries.
5944 _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'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005945 fi
5946 fi
5947 ;;
5948
5949 amigaos*)
5950 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5951 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5952 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5953 # see comment about different semantics on the GNU ld section
5954 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5955 ;;
5956
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005957 bsdi[[45]]*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00005958 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5959 ;;
5960
5961 cygwin* | mingw* | pw32*)
5962 # When not using gcc, we currently assume that we are using
5963 # Microsoft Visual C++.
5964 # hardcode_libdir_flag_spec is actually meaningless, as there is
5965 # no search path for DLLs.
5966 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5967 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5968 # Tell ltmain to make .lib files, not .a files.
5969 libext=lib
5970 # Tell ltmain to make .dll files, not .so files.
hp.com!davidm2de17682004-04-20 16:53:44 +00005971 shrext_cmds=".dll"
hp.com!davidm2c9be972003-11-22 06:08:20 +00005972 # FIXME: Setting linknames here is a bad hack.
5973 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5974 # The linker will automatically build a .lib file if we build a DLL.
5975 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5976 # FIXME: Should let the user specify the lib program.
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07005977 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005978 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
hp.com!davidm2c9be972003-11-22 06:08:20 +00005979 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5980 ;;
5981
5982 darwin* | rhapsody*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06005983 case $host_os in
5984 rhapsody* | darwin1.[[012]])
5985 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5986 ;;
5987 *) # Darwin 1.3 on
5988 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5989 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5990 else
5991 case ${MACOSX_DEPLOYMENT_TARGET} in
5992 10.[[012]])
5993 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5994 ;;
5995 10.*)
5996 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5997 ;;
5998 esac
5999 fi
6000 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00006001 esac
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006002 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00006003 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6004 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6005 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006006 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
hp.com!davidm2c9be972003-11-22 06:08:20 +00006007 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006008 if test "$GCC" = yes ; then
6009 output_verbose_link_cmd='echo'
6010 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6011 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6012 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6013 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6014 _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}'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006015 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006016 case $cc_basename in
6017 xlc*)
6018 output_verbose_link_cmd='echo'
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006019 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006020 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6021 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006022 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006023 _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}'
6024 ;;
6025 *)
6026 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6027 ;;
6028 esac
hp.com!davidm2c9be972003-11-22 06:08:20 +00006029 fi
6030 ;;
6031
6032 dgux*)
6033 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6035 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6036 ;;
6037
6038 freebsd1*)
6039 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6040 ;;
6041
6042 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6043 # support. Future versions do this automatically, but an explicit c++rt0.o
6044 # does not break anything, and helps significantly (at the cost of a little
6045 # extra space).
6046 freebsd2.2*)
6047 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6048 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6049 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6050 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6051 ;;
6052
6053 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6054 freebsd2*)
6055 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6056 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6057 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6058 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6059 ;;
6060
6061 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006062 freebsd* | dragonfly*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00006063 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6064 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6065 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6066 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6067 ;;
6068
6069 hpux9*)
6070 if test "$GCC" = yes; then
6071 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6072 else
6073 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6074 fi
6075 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6076 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6077 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6078
6079 # hardcode_minus_L: Not really in the search PATH,
6080 # but as the default location of the library.
6081 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6082 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6083 ;;
6084
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006085 hpux10*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00006086 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006087 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6088 else
6089 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6090 fi
6091 if test "$with_gnu_ld" = no; then
6092 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6093 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6094
6095 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6096 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6097
6098 # hardcode_minus_L: Not really in the search PATH,
6099 # but as the default location of the library.
6100 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6101 fi
6102 ;;
6103
6104 hpux11*)
6105 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6106 case $host_cpu in
6107 hppa*64*)
hp.com!davidm2c9be972003-11-22 06:08:20 +00006108 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6109 ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006110 ia64*)
6111 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6112 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00006113 *)
6114 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6115 ;;
6116 esac
6117 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006118 case $host_cpu in
6119 hppa*64*)
6120 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6121 ;;
6122 ia64*)
6123 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006124 ;;
6125 *)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006126 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006127 ;;
6128 esac
6129 fi
6130 if test "$with_gnu_ld" = no; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006131 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6132 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
hp.com!davidm2c9be972003-11-22 06:08:20 +00006133
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006134 case $host_cpu in
6135 hppa*64*|ia64*)
6136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6137 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6138 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00006139 ;;
6140 *)
hp.com!davidm2c9be972003-11-22 06:08:20 +00006141 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6142 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6143
6144 # hardcode_minus_L: Not really in the search PATH,
6145 # but as the default location of the library.
6146 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6147 ;;
6148 esac
6149 fi
6150 ;;
6151
6152 irix5* | irix6* | nonstopux*)
6153 if test "$GCC" = yes; then
6154 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6155 else
6156 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6157 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6158 fi
6159 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6160 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6161 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6162 ;;
6163
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006164 netbsd* | netbsdelf*-gnu)
hp.com!davidm2c9be972003-11-22 06:08:20 +00006165 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6166 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6167 else
6168 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6169 fi
6170 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6171 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6172 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6173 ;;
6174
6175 newsos6)
6176 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6177 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6179 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6180 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6181 ;;
6182
6183 openbsd*)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006184 if test -f /usr/libexec/ld.so; then
6185 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6186 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6187 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6188 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6189 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6190 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6191 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6192 else
6193 case $host_os in
6194 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6195 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6197 ;;
6198 *)
6199 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6200 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6201 ;;
6202 esac
6203 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00006204 else
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006205 _LT_AC_TAGVAR(ld_shlibs, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00006206 fi
6207 ;;
6208
6209 os2*)
6210 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6211 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6212 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6213 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6214 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6215 ;;
6216
6217 osf3*)
6218 if test "$GCC" = yes; then
6219 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6220 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6221 else
6222 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6223 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6224 fi
6225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6226 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6227 ;;
6228
6229 osf4* | osf5*) # as osf3* with the addition of -msym flag
6230 if test "$GCC" = yes; then
6231 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6232 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6233 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6234 else
6235 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6236 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6237 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006238 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006239
6240 # Both c and cxx compiler support -rpath directly
6241 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6242 fi
6243 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6244 ;;
6245
hp.com!davidm2c9be972003-11-22 06:08:20 +00006246 solaris*)
6247 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6248 if test "$GCC" = yes; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006249 wlarc='${wl}'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006250 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6251 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6252 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6253 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006254 wlarc=''
hp.com!davidm2c9be972003-11-22 06:08:20 +00006255 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6256 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6257 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6258 fi
6259 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6260 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6261 case $host_os in
6262 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006263 *)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006264 # The compiler driver will combine and reorder linker options,
6265 # but understands `-z linker_flag'. GCC discards it without `$wl',
6266 # but is careful enough not to reorder.
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006267 # Supported since Solaris 2.6 (maybe 2.5.1?)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006268 if test "$GCC" = yes; then
6269 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6270 else
6271 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6272 fi
6273 ;;
hp.com!davidm2c9be972003-11-22 06:08:20 +00006274 esac
6275 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6276 ;;
6277
6278 sunos4*)
6279 if test "x$host_vendor" = xsequent; then
6280 # Use $CC to link under sequent, because it throws in some extra .o
6281 # files that make .init and .fini sections work.
6282 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6283 else
6284 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6285 fi
6286 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6287 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6288 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6289 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6290 ;;
6291
6292 sysv4)
6293 case $host_vendor in
6294 sni)
6295 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6296 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6297 ;;
6298 siemens)
6299 ## LD is ld it makes a PLAMLIB
6300 ## CC just makes a GrossModule.
6301 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6302 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6303 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6304 ;;
6305 motorola)
6306 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6307 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6308 ;;
6309 esac
6310 runpath_var='LD_RUN_PATH'
6311 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6312 ;;
6313
6314 sysv4.3*)
6315 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6316 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6317 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6318 ;;
6319
6320 sysv4*MP*)
6321 if test -d /usr/nec; then
6322 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6323 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6324 runpath_var=LD_RUN_PATH
6325 hardcode_runpath_var=yes
6326 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6327 fi
6328 ;;
6329
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006331 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6332 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00006333 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006334 runpath_var='LD_RUN_PATH'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006335
hp.com!davidm2c9be972003-11-22 06:08:20 +00006336 if test "$GCC" = yes; then
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006337 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6338 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006339 else
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6341 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006342 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00006343 ;;
6344
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006345 sysv5* | sco3.2v5* | sco5v6*)
6346 # Note: We can NOT use -z defs as we might desire, because we do not
6347 # link with -lc, and that would cause any symbols used from libc to
6348 # always be unresolved, which means just about no library would
6349 # ever link correctly. If we're not using GNU ld we use -z text
6350 # though, which does catch some bad symbols but isn't as heavy-handed
6351 # as -z defs.
6352 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6353 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6354 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
hp.com!davidm2c9be972003-11-22 06:08:20 +00006355 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006356 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6357 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6358 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6359 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
hp.com!davidm2c9be972003-11-22 06:08:20 +00006360 runpath_var='LD_RUN_PATH'
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006361
6362 if test "$GCC" = yes; then
6363 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6364 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6365 else
6366 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6367 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6368 fi
hp.com!davidm2c9be972003-11-22 06:08:20 +00006369 ;;
6370
6371 uts4*)
6372 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6374 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6375 ;;
6376
6377 *)
6378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6379 ;;
6380 esac
6381 fi
6382])
6383AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6384test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6385
hp.com!davidm2c9be972003-11-22 06:08:20 +00006386#
6387# Do we need to explicitly link libc?
6388#
6389case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6390x|xyes)
6391 # Assume -lc should be added
6392 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6393
6394 if test "$enable_shared" = yes && test "$GCC" = yes; then
6395 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6396 *'~'*)
6397 # FIXME: we may have to deal with multi-command sequences.
6398 ;;
6399 '$CC '*)
6400 # Test whether the compiler implicitly links with -lc since on some
6401 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6402 # to ld, don't add -lc before -lgcc.
6403 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6404 $rm conftest*
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006405 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
hp.com!davidm2c9be972003-11-22 06:08:20 +00006406
6407 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6408 soname=conftest
6409 lib=conftest
6410 libobjs=conftest.$ac_objext
6411 deplibs=
6412 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006413 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
hp.com!davidm2c9be972003-11-22 06:08:20 +00006414 compiler_flags=-v
6415 linker_flags=-v
6416 verstring=
6417 output_objdir=.
6418 libname=conftest
6419 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6420 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6421 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6422 then
6423 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6424 else
6425 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6426 fi
6427 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6428 else
6429 cat conftest.err 1>&5
6430 fi
6431 $rm conftest*
6432 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6433 ;;
6434 esac
6435 fi
6436 ;;
6437esac
6438])# AC_LIBTOOL_PROG_LD_SHLIBS
6439
6440
6441# _LT_AC_FILE_LTDLL_C
6442# -------------------
6443# Be careful that the start marker always follows a newline.
6444AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
mostang.com!davidm0440c532003-01-17 18:12:55 +00006445# /* ltdll.c starts here */
6446# #define WIN32_LEAN_AND_MEAN
6447# #include <windows.h>
6448# #undef WIN32_LEAN_AND_MEAN
6449# #include <stdio.h>
6450#
6451# #ifndef __CYGWIN__
6452# # ifdef __CYGWIN32__
6453# # define __CYGWIN__ __CYGWIN32__
6454# # endif
6455# #endif
6456#
6457# #ifdef __cplusplus
6458# extern "C" {
6459# #endif
6460# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6461# #ifdef __cplusplus
6462# }
6463# #endif
6464#
6465# #ifdef __CYGWIN__
6466# #include <cygwin/cygwin_dll.h>
6467# DECLARE_CYGWIN_DLL( DllMain );
6468# #endif
6469# HINSTANCE __hDllInstance_base;
6470#
6471# BOOL APIENTRY
6472# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6473# {
6474# __hDllInstance_base = hInst;
6475# return TRUE;
6476# }
6477# /* ltdll.c ends here */
hp.com!davidm2c9be972003-11-22 06:08:20 +00006478])# _LT_AC_FILE_LTDLL_C
mostang.com!davidm0440c532003-01-17 18:12:55 +00006479
6480
hp.com!davidm2c9be972003-11-22 06:08:20 +00006481# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6482# ---------------------------------
6483AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
mostang.com!davidm0440c532003-01-17 18:12:55 +00006484
mostang.com!davidm0440c532003-01-17 18:12:55 +00006485
6486# old names
6487AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6488AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6489AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6490AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6491AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6492AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6493AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6494
6495# This is just to silence aclocal about the macro not being used
6496ifelse([AC_DISABLE_FAST_INSTALL])
6497
hp.com!davidm2c9be972003-11-22 06:08:20 +00006498AC_DEFUN([LT_AC_PROG_GCJ],
6499[AC_CHECK_TOOL(GCJ, gcj, no)
6500 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6501 AC_SUBST(GCJFLAGS)
6502])
6503
6504AC_DEFUN([LT_AC_PROG_RC],
6505[AC_CHECK_TOOL(RC, windres, no)
6506])
6507
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006508
6509# Cheap backport of AS_EXECUTABLE_P and required macros
6510# from Autoconf 2.59; we should not use $as_executable_p directly.
6511
6512# _AS_TEST_PREPARE
6513# ----------------
6514m4_ifndef([_AS_TEST_PREPARE],
6515[m4_defun([_AS_TEST_PREPARE],
6516[if test -x / >/dev/null 2>&1; then
6517 as_executable_p='test -x'
6518else
6519 as_executable_p='test -f'
6520fi
6521])])# _AS_TEST_PREPARE
6522
6523# AS_EXECUTABLE_P
6524# ---------------
6525# Check whether a file is executable.
6526m4_ifndef([AS_EXECUTABLE_P],
6527[m4_defun([AS_EXECUTABLE_P],
6528[AS_REQUIRE([_AS_TEST_PREPARE])dnl
6529$as_executable_p $1[]dnl
6530])])# AS_EXECUTABLE_P
6531
mostang.com!davidm0440c532003-01-17 18:12:55 +00006532# NOTE: This macro has been submitted for inclusion into #
6533# GNU Autoconf as AC_PROG_SED. When it is available in #
6534# a released version of Autoconf we should remove this #
6535# macro and use it instead. #
6536# LT_AC_PROG_SED
6537# --------------
6538# Check for a fully-functional sed program, that truncates
6539# as few characters as possible. Prefer GNU sed if found.
6540AC_DEFUN([LT_AC_PROG_SED],
6541[AC_MSG_CHECKING([for a sed that does not truncate output])
6542AC_CACHE_VAL(lt_cv_path_SED,
6543[# Loop through the user's path and test for sed and gsed.
6544# Then use that list of sed's as ones to test for truncation.
mostang.com!davidm0440c532003-01-17 18:12:55 +00006545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548 IFS=$as_save_IFS
6549 test -z "$as_dir" && as_dir=.
hp.com!davidm2c9be972003-11-22 06:08:20 +00006550 for lt_ac_prog in sed gsed; do
mostang.com!davidm0440c532003-01-17 18:12:55 +00006551 for ac_exec_ext in '' $ac_executable_extensions; do
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006552 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
hp.com!davidm2c9be972003-11-22 06:08:20 +00006553 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
mostang.com!davidm0440c532003-01-17 18:12:55 +00006554 fi
6555 done
6556 done
6557done
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006558IFS=$as_save_IFS
hp.com!davidm2c9be972003-11-22 06:08:20 +00006559lt_ac_max=0
6560lt_ac_count=0
6561# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6562# along with /bin/sed that truncates output.
6563for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006564 test ! -f $lt_ac_sed && continue
hp.com!davidm2c9be972003-11-22 06:08:20 +00006565 cat /dev/null > conftest.in
6566 lt_ac_count=0
6567 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6568 # Check for GNU sed and select it if it is found.
6569 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6570 lt_cv_path_SED=$lt_ac_sed
6571 break
6572 fi
6573 while true; do
6574 cat conftest.in conftest.in >conftest.tmp
6575 mv conftest.tmp conftest.in
6576 cp conftest.in conftest.nl
6577 echo >>conftest.nl
6578 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6579 cmp -s conftest.out conftest.nl || break
6580 # 10000 chars as input seems more than enough
6581 test $lt_ac_count -gt 10 && break
6582 lt_ac_count=`expr $lt_ac_count + 1`
6583 if test $lt_ac_count -gt $lt_ac_max; then
6584 lt_ac_max=$lt_ac_count
6585 lt_cv_path_SED=$lt_ac_sed
mostang.com!davidm0440c532003-01-17 18:12:55 +00006586 fi
mostang.com!davidm0440c532003-01-17 18:12:55 +00006587 done
hp.com!davidm2c9be972003-11-22 06:08:20 +00006588done
mostang.com!davidm0440c532003-01-17 18:12:55 +00006589])
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006590SED=$lt_cv_path_SED
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -07006591AC_SUBST([SED])
mostang.com!davidm0440c532003-01-17 18:12:55 +00006592AC_MSG_RESULT([$SED])
6593])
6594
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006595# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
6596#
6597# This file is free software; the Free Software Foundation
6598# gives unlimited permission to copy and/or distribute it,
6599# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006600
6601# AM_AUTOMAKE_VERSION(VERSION)
6602# ----------------------------
6603# Automake X.Y traces this macro to ensure aclocal.m4 has been
6604# generated from the m4 files accompanying Automake X.Y.
6605AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6606
6607# AM_SET_CURRENT_AUTOMAKE_VERSION
6608# -------------------------------
6609# Call AM_AUTOMAKE_VERSION so it can be traced.
6610# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6611AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
David Mosberger-Tang7923ae32007-04-10 20:35:15 -06006612 [AM_AUTOMAKE_VERSION([1.9.6])])
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006613
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006614# Figure out how to run the assembler. -*- Autoconf -*-
mostang.com!davidm0440c532003-01-17 18:12:55 +00006615
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006616# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
6617#
6618# This file is free software; the Free Software Foundation
6619# gives unlimited permission to copy and/or distribute it,
6620# with or without modifications, as long as this notice is preserved.
mostang.com!davidm0440c532003-01-17 18:12:55 +00006621
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006622# serial 4
mostang.com!davidm0440c532003-01-17 18:12:55 +00006623
6624# AM_PROG_AS
6625# ----------
6626AC_DEFUN([AM_PROG_AS],
6627[# By default we simply use the C compiler to build assembly code.
6628AC_REQUIRE([AC_PROG_CC])
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006629test "${CCAS+set}" = set || CCAS=$CC
6630test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
6631AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
6632AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
6633])
mostang.com!davidm0440c532003-01-17 18:12:55 +00006634
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006635# AM_AUX_DIR_EXPAND -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006636
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006637# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6638#
6639# This file is free software; the Free Software Foundation
6640# gives unlimited permission to copy and/or distribute it,
6641# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006642
6643# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6644# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6645# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6646#
6647# Of course, Automake must honor this variable whenever it calls a
6648# tool from the auxiliary directory. The problem is that $srcdir (and
6649# therefore $ac_aux_dir as well) can be either absolute or relative,
6650# depending on how configure is run. This is pretty annoying, since
6651# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6652# source directory, any form will work fine, but in subdirectories a
6653# relative path needs to be adjusted first.
6654#
6655# $ac_aux_dir/missing
6656# fails when called from a subdirectory if $ac_aux_dir is relative
6657# $top_srcdir/$ac_aux_dir/missing
6658# fails if $ac_aux_dir is absolute,
6659# fails when called from a subdirectory in a VPATH build with
6660# a relative $ac_aux_dir
6661#
6662# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6663# are both prefixed by $srcdir. In an in-source build this is usually
6664# harmless because $srcdir is `.', but things will broke when you
6665# start a VPATH build or use an absolute $srcdir.
6666#
6667# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6668# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6669# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6670# and then we would define $MISSING as
6671# MISSING="\${SHELL} $am_aux_dir/missing"
6672# This will work as long as MISSING is not called from configure, because
6673# unfortunately $(top_srcdir) has no meaning in configure.
6674# However there are other variables, like CC, which are often used in
6675# configure, and could therefore not use this "fixed" $ac_aux_dir.
6676#
6677# Another solution, used here, is to always expand $ac_aux_dir to an
6678# absolute PATH. The drawback is that using absolute paths prevent a
6679# configured tree to be moved without reconfiguration.
6680
6681AC_DEFUN([AM_AUX_DIR_EXPAND],
6682[dnl Rely on autoconf to set up CDPATH properly.
6683AC_PREREQ([2.50])dnl
6684# expand $ac_aux_dir to an absolute path
6685am_aux_dir=`cd $ac_aux_dir && pwd`
6686])
6687
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006688# AM_CONDITIONAL -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006689
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006690# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6691# Free Software Foundation, Inc.
6692#
6693# This file is free software; the Free Software Foundation
6694# gives unlimited permission to copy and/or distribute it,
6695# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006696
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006697# serial 7
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006698
6699# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6700# -------------------------------------
6701# Define a conditional.
6702AC_DEFUN([AM_CONDITIONAL],
6703[AC_PREREQ(2.52)dnl
6704 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6705 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6706AC_SUBST([$1_TRUE])
6707AC_SUBST([$1_FALSE])
6708if $2; then
6709 $1_TRUE=
6710 $1_FALSE='#'
6711else
6712 $1_TRUE='#'
6713 $1_FALSE=
6714fi
6715AC_CONFIG_COMMANDS_PRE(
6716[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6717 AC_MSG_ERROR([[conditional "$1" was never defined.
6718Usually this means the macro was only invoked conditionally.]])
6719fi])])
6720
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006721
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006722# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006723# Free Software Foundation, Inc.
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006724#
6725# This file is free software; the Free Software Foundation
6726# gives unlimited permission to copy and/or distribute it,
6727# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006728
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006729# serial 8
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006730
6731# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6732# written in clear, in which case automake, when reading aclocal.m4,
6733# will think it sees a *use*, and therefore will trigger all it's
6734# C support machinery. Also note that it means that autoscan, seeing
6735# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6736
6737
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006738# _AM_DEPENDENCIES(NAME)
6739# ----------------------
6740# See how the compiler implements dependency checking.
6741# NAME is "CC", "CXX", "GCJ", or "OBJC".
6742# We try a few techniques and use that to set a single cache variable.
6743#
6744# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6745# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6746# dependency, and given that the user is not expected to run this macro,
6747# just rely on AC_PROG_CC.
6748AC_DEFUN([_AM_DEPENDENCIES],
6749[AC_REQUIRE([AM_SET_DEPDIR])dnl
6750AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6751AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6752AC_REQUIRE([AM_DEP_TRACK])dnl
6753
6754ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6755 [$1], CXX, [depcc="$CXX" am_compiler_list=],
6756 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6757 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6758 [depcc="$$1" am_compiler_list=])
6759
6760AC_CACHE_CHECK([dependency style of $depcc],
6761 [am_cv_$1_dependencies_compiler_type],
6762[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6763 # We make a subdir and do the tests there. Otherwise we can end up
6764 # making bogus files that we don't know about and never remove. For
6765 # instance it was reported that on HP-UX the gcc test will end up
6766 # making a dummy file named `D' -- because `-MD' means `put the output
6767 # in D'.
6768 mkdir conftest.dir
6769 # Copy depcomp to subdir because otherwise we won't find it if we're
6770 # using a relative directory.
6771 cp "$am_depcomp" conftest.dir
6772 cd conftest.dir
6773 # We will build objects and dependencies in a subdirectory because
6774 # it helps to detect inapplicable dependency modes. For instance
6775 # both Tru64's cc and ICC support -MD to output dependencies as a
6776 # side effect of compilation, but ICC will put the dependencies in
6777 # the current directory while Tru64 will put them in the object
6778 # directory.
6779 mkdir sub
6780
6781 am_cv_$1_dependencies_compiler_type=none
6782 if test "$am_compiler_list" = ""; then
6783 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6784 fi
6785 for depmode in $am_compiler_list; do
6786 # Setup a source with many dependencies, because some compilers
6787 # like to wrap large dependency lists on column 80 (with \), and
6788 # we should not choose a depcomp mode which is confused by this.
6789 #
6790 # We need to recreate these files for each test, as the compiler may
6791 # overwrite some of them when testing with obscure command lines.
6792 # This happens at least with the AIX C compiler.
6793 : > sub/conftest.c
6794 for i in 1 2 3 4 5 6; do
6795 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6796 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6797 # Solaris 8's {/usr,}/bin/sh.
6798 touch sub/conftst$i.h
6799 done
6800 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6801
6802 case $depmode in
6803 nosideeffect)
6804 # after this tag, mechanisms are not by side-effect, so they'll
6805 # only be used when explicitly requested
6806 if test "x$enable_dependency_tracking" = xyes; then
6807 continue
6808 else
6809 break
6810 fi
6811 ;;
6812 none) break ;;
6813 esac
6814 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6815 # mode. It turns out that the SunPro C++ compiler does not properly
6816 # handle `-M -o', and we need to detect this.
6817 if depmode=$depmode \
6818 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6819 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6820 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6821 >/dev/null 2>conftest.err &&
6822 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6823 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6824 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6825 # icc doesn't choke on unknown options, it will just issue warnings
6826 # or remarks (even with -Werror). So we grep stderr for any message
6827 # that says an option was ignored or not supported.
6828 # When given -MP, icc 7.0 and 7.1 complain thusly:
6829 # icc: Command line warning: ignoring option '-M'; no argument required
6830 # The diagnosis changed in icc 8.0:
6831 # icc: Command line remark: option '-MP' not supported
6832 if (grep 'ignoring option' conftest.err ||
6833 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6834 am_cv_$1_dependencies_compiler_type=$depmode
6835 break
6836 fi
6837 fi
6838 done
6839
6840 cd ..
6841 rm -rf conftest.dir
6842else
6843 am_cv_$1_dependencies_compiler_type=none
6844fi
6845])
6846AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6847AM_CONDITIONAL([am__fastdep$1], [
6848 test "x$enable_dependency_tracking" != xno \
6849 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6850])
6851
6852
6853# AM_SET_DEPDIR
6854# -------------
6855# Choose a directory name for dependency files.
6856# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6857AC_DEFUN([AM_SET_DEPDIR],
6858[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6859AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6860])
6861
6862
6863# AM_DEP_TRACK
6864# ------------
6865AC_DEFUN([AM_DEP_TRACK],
6866[AC_ARG_ENABLE(dependency-tracking,
6867[ --disable-dependency-tracking speeds up one-time build
6868 --enable-dependency-tracking do not reject slow dependency extractors])
6869if test "x$enable_dependency_tracking" != xno; then
6870 am_depcomp="$ac_aux_dir/depcomp"
6871 AMDEPBACKSLASH='\'
6872fi
6873AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6874AC_SUBST([AMDEPBACKSLASH])
6875])
6876
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006877# Generate code to set up dependency tracking. -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006878
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006879# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6880# Free Software Foundation, Inc.
6881#
6882# This file is free software; the Free Software Foundation
6883# gives unlimited permission to copy and/or distribute it,
6884# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006885
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006886#serial 3
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006887
6888# _AM_OUTPUT_DEPENDENCY_COMMANDS
6889# ------------------------------
6890AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6891[for mf in $CONFIG_FILES; do
6892 # Strip MF so we end up with the name of the file.
6893 mf=`echo "$mf" | sed -e 's/:.*$//'`
6894 # Check whether this is an Automake generated Makefile or not.
6895 # We used to match only the files named `Makefile.in', but
6896 # some people rename them; so instead we look at the file content.
6897 # Grep'ing the first line is not enough: some people post-process
6898 # each Makefile.in and add a new line on top of each file to say so.
6899 # So let's grep whole file.
6900 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6901 dirpart=`AS_DIRNAME("$mf")`
6902 else
6903 continue
6904 fi
6905 # Extract the definition of DEPDIR, am__include, and am__quote
6906 # from the Makefile without running `make'.
6907 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6908 test -z "$DEPDIR" && continue
6909 am__include=`sed -n 's/^am__include = //p' < "$mf"`
6910 test -z "am__include" && continue
6911 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6912 # When using ansi2knr, U may be empty or an underscore; expand it
6913 U=`sed -n 's/^U = //p' < "$mf"`
6914 # Find all dependency output files, they are included files with
6915 # $(DEPDIR) in their names. We invoke sed twice because it is the
6916 # simplest approach to changing $(DEPDIR) to its actual value in the
6917 # expansion.
6918 for file in `sed -n "
6919 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6920 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6921 # Make sure the directory exists.
6922 test -f "$dirpart/$file" && continue
6923 fdir=`AS_DIRNAME(["$file"])`
6924 AS_MKDIR_P([$dirpart/$fdir])
6925 # echo "creating $dirpart/$file"
6926 echo '# dummy' > "$dirpart/$file"
6927 done
6928done
6929])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6930
6931
6932# AM_OUTPUT_DEPENDENCY_COMMANDS
6933# -----------------------------
6934# This macro should only be invoked once -- use via AC_REQUIRE.
6935#
6936# This code is only required when automatic dependency tracking
6937# is enabled. FIXME. This creates each `.P' file that we will
6938# need in order to bootstrap the dependency handling code.
6939AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6940[AC_CONFIG_COMMANDS([depfiles],
6941 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6942 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6943])
6944
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006945# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6946# Free Software Foundation, Inc.
6947#
6948# This file is free software; the Free Software Foundation
6949# gives unlimited permission to copy and/or distribute it,
6950# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006951
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006952# serial 8
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006953
6954# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6955AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6956
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006957# Do all the work for Automake. -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006958
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006959# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006960# Free Software Foundation, Inc.
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006961#
6962# This file is free software; the Free Software Foundation
6963# gives unlimited permission to copy and/or distribute it,
6964# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006965
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006966# serial 12
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006967
hp.com!davidme65e1fc2005-05-03 09:13:17 +00006968# This macro actually does too much. Some checks are only needed if
6969# your package does certain things. But this isn't really a big deal.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00006970
6971# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6972# AM_INIT_AUTOMAKE([OPTIONS])
6973# -----------------------------------------------
6974# The call with PACKAGE and VERSION arguments is the old style
6975# call (pre autoconf-2.50), which is being phased out. PACKAGE
6976# and VERSION should now be passed to AC_INIT and removed from
6977# the call to AM_INIT_AUTOMAKE.
6978# We support both call styles for the transition. After
6979# the next Automake release, Autoconf can make the AC_INIT
6980# arguments mandatory, and then we can depend on a new Autoconf
6981# release and drop the old call support.
6982AC_DEFUN([AM_INIT_AUTOMAKE],
6983[AC_PREREQ([2.58])dnl
6984dnl Autoconf wants to disallow AM_ names. We explicitly allow
6985dnl the ones we care about.
6986m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6987AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6988AC_REQUIRE([AC_PROG_INSTALL])dnl
6989# test to see if srcdir already configured
6990if test "`cd $srcdir && pwd`" != "`pwd`" &&
6991 test -f $srcdir/config.status; then
6992 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6993fi
6994
6995# test whether we have cygpath
6996if test -z "$CYGPATH_W"; then
6997 if (cygpath --version) >/dev/null 2>/dev/null; then
6998 CYGPATH_W='cygpath -w'
6999 else
7000 CYGPATH_W=echo
7001 fi
7002fi
7003AC_SUBST([CYGPATH_W])
7004
7005# Define the identity of the package.
7006dnl Distinguish between old-style and new-style calls.
7007m4_ifval([$2],
7008[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7009 AC_SUBST([PACKAGE], [$1])dnl
7010 AC_SUBST([VERSION], [$2])],
7011[_AM_SET_OPTIONS([$1])dnl
7012 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7013 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7014
7015_AM_IF_OPTION([no-define],,
7016[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7017 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7018
7019# Some tools Automake needs.
7020AC_REQUIRE([AM_SANITY_CHECK])dnl
7021AC_REQUIRE([AC_ARG_PROGRAM])dnl
7022AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7023AM_MISSING_PROG(AUTOCONF, autoconf)
7024AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7025AM_MISSING_PROG(AUTOHEADER, autoheader)
7026AM_MISSING_PROG(MAKEINFO, makeinfo)
7027AM_PROG_INSTALL_SH
7028AM_PROG_INSTALL_STRIP
7029AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7030# We need awk for the "check" target. The system "awk" is bad on
7031# some platforms.
7032AC_REQUIRE([AC_PROG_AWK])dnl
7033AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7034AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7035_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7036 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7037 [_AM_PROG_TAR([v7])])])
7038_AM_IF_OPTION([no-dependencies],,
7039[AC_PROVIDE_IFELSE([AC_PROG_CC],
7040 [_AM_DEPENDENCIES(CC)],
7041 [define([AC_PROG_CC],
7042 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7043AC_PROVIDE_IFELSE([AC_PROG_CXX],
7044 [_AM_DEPENDENCIES(CXX)],
7045 [define([AC_PROG_CXX],
7046 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7047])
7048])
7049
7050
7051# When config.status generates a header, we must update the stamp-h file.
7052# This file resides in the same directory as the config header
7053# that is generated. The stamp files are numbered to have different names.
7054
7055# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7056# loop where config.status creates the headers, so we can generate
7057# our stamp files there.
7058AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7059[# Compute $1's index in $config_headers.
7060_am_stamp_count=1
7061for _am_header in $config_headers :; do
7062 case $_am_header in
7063 $1 | $1:* )
7064 break ;;
7065 * )
7066 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7067 esac
7068done
7069echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7070
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007071# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7072#
7073# This file is free software; the Free Software Foundation
7074# gives unlimited permission to copy and/or distribute it,
7075# with or without modifications, as long as this notice is preserved.
7076
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007077# AM_PROG_INSTALL_SH
7078# ------------------
7079# Define $install_sh.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007080AC_DEFUN([AM_PROG_INSTALL_SH],
7081[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7082install_sh=${install_sh-"$am_aux_dir/install-sh"}
7083AC_SUBST(install_sh)])
7084
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007085# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
7086#
7087# This file is free software; the Free Software Foundation
7088# gives unlimited permission to copy and/or distribute it,
7089# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007090
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007091# serial 2
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007092
7093# Check whether the underlying file-system supports filenames
7094# with a leading dot. For instance MS-DOS doesn't.
7095AC_DEFUN([AM_SET_LEADING_DOT],
7096[rm -rf .tst 2>/dev/null
7097mkdir .tst 2>/dev/null
7098if test -d .tst; then
7099 am__leading_dot=.
7100else
7101 am__leading_dot=_
7102fi
7103rmdir .tst 2>/dev/null
7104AC_SUBST([am__leading_dot])])
7105
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007106# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007107# From Jim Meyering
7108
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007109# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007110# Free Software Foundation, Inc.
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007111#
7112# This file is free software; the Free Software Foundation
7113# gives unlimited permission to copy and/or distribute it,
7114# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007115
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007116# serial 4
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007117
7118AC_DEFUN([AM_MAINTAINER_MODE],
7119[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7120 dnl maintainer-mode is disabled by default
7121 AC_ARG_ENABLE(maintainer-mode,
7122[ --enable-maintainer-mode enable make rules and dependencies not useful
7123 (and sometimes confusing) to the casual installer],
7124 USE_MAINTAINER_MODE=$enableval,
7125 USE_MAINTAINER_MODE=no)
7126 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7127 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7128 MAINT=$MAINTAINER_MODE_TRUE
7129 AC_SUBST(MAINT)dnl
7130]
7131)
7132
7133AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7134
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007135# Check to see how 'make' treats includes. -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007136
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007137# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7138#
7139# This file is free software; the Free Software Foundation
7140# gives unlimited permission to copy and/or distribute it,
7141# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007142
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007143# serial 3
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007144
7145# AM_MAKE_INCLUDE()
7146# -----------------
7147# Check to see how make treats includes.
7148AC_DEFUN([AM_MAKE_INCLUDE],
7149[am_make=${MAKE-make}
7150cat > confinc << 'END'
7151am__doit:
7152 @echo done
7153.PHONY: am__doit
7154END
7155# If we don't find an include directive, just comment out the code.
7156AC_MSG_CHECKING([for style of include used by $am_make])
7157am__include="#"
7158am__quote=
7159_am_result=none
7160# First try GNU make style include.
7161echo "include confinc" > confmf
7162# We grep out `Entering directory' and `Leaving directory'
7163# messages which can occur if `w' ends up in MAKEFLAGS.
7164# In particular we don't look at `^make:' because GNU make might
7165# be invoked under some other name (usually "gmake"), in which
7166# case it prints its new name instead of `make'.
7167if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7168 am__include=include
7169 am__quote=
7170 _am_result=GNU
7171fi
7172# Now try BSD make style include.
7173if test "$am__include" = "#"; then
7174 echo '.include "confinc"' > confmf
7175 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7176 am__include=.include
7177 am__quote="\""
7178 _am_result=BSD
7179 fi
7180fi
7181AC_SUBST([am__include])
7182AC_SUBST([am__quote])
7183AC_MSG_RESULT([$_am_result])
7184rm -f confinc confmf
7185])
7186
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007187# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
7188#
7189# This file is free software; the Free Software Foundation
7190# gives unlimited permission to copy and/or distribute it,
7191# with or without modifications, as long as this notice is preserved.
7192
7193# serial 3
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007194
7195# AM_PROG_CC_C_O
7196# --------------
7197# Like AC_PROG_CC_C_O, but changed for automake.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007198AC_DEFUN([AM_PROG_CC_C_O],
7199[AC_REQUIRE([AC_PROG_CC_C_O])dnl
7200AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7201# FIXME: we rely on the cache variable name because
7202# there is no other way.
7203set dummy $CC
7204ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
7205if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
7206 # Losing compiler, so override with the script.
7207 # FIXME: It is wrong to rewrite CC.
7208 # But if we don't then we get into trouble of one sort or another.
7209 # A longer-term fix would be to have automake use am__CC in this case,
7210 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
7211 CC="$am_aux_dir/compile $CC"
7212fi
7213])
7214
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007215# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007216
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007217# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
7218# Free Software Foundation, Inc.
7219#
7220# This file is free software; the Free Software Foundation
7221# gives unlimited permission to copy and/or distribute it,
7222# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007223
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007224# serial 4
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007225
7226# AM_MISSING_PROG(NAME, PROGRAM)
7227# ------------------------------
7228AC_DEFUN([AM_MISSING_PROG],
7229[AC_REQUIRE([AM_MISSING_HAS_RUN])
7230$1=${$1-"${am_missing_run}$2"}
7231AC_SUBST($1)])
7232
7233
7234# AM_MISSING_HAS_RUN
7235# ------------------
7236# Define MISSING if not defined so far and test if it supports --run.
7237# If it does, set am_missing_run to use it, otherwise, to nothing.
7238AC_DEFUN([AM_MISSING_HAS_RUN],
7239[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7240test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7241# Use eval to expand $SHELL
7242if eval "$MISSING --run true"; then
7243 am_missing_run="$MISSING --run "
7244else
7245 am_missing_run=
7246 AC_MSG_WARN([`missing' script is too old or missing])
7247fi
7248])
7249
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007250# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
7251#
7252# This file is free software; the Free Software Foundation
7253# gives unlimited permission to copy and/or distribute it,
7254# with or without modifications, as long as this notice is preserved.
7255
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007256# AM_PROG_MKDIR_P
7257# ---------------
7258# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007259#
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007260# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7261# created by `make install' are always world readable, even if the
7262# installer happens to have an overly restrictive umask (e.g. 077).
7263# This was a mistake. There are at least two reasons why we must not
7264# use `-m 0755':
7265# - it causes special bits like SGID to be ignored,
7266# - it may be too restrictive (some setups expect 775 directories).
7267#
7268# Do not use -m 0755 and let people choose whatever they expect by
7269# setting umask.
7270#
7271# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7272# Some implementations (such as Solaris 8's) are not thread-safe: if a
7273# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7274# concurrently, both version can detect that a/ is missing, but only
7275# one can create it and the other will error out. Consequently we
7276# restrict ourselves to GNU make (using the --version option ensures
7277# this.)
7278AC_DEFUN([AM_PROG_MKDIR_P],
7279[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7280 # We used to keeping the `.' as first argument, in order to
7281 # allow $(mkdir_p) to be used without argument. As in
7282 # $(mkdir_p) $(somedir)
7283 # where $(somedir) is conditionally defined. However this is wrong
7284 # for two reasons:
7285 # 1. if the package is installed by a user who cannot write `.'
7286 # make install will fail,
7287 # 2. the above comment should most certainly read
7288 # $(mkdir_p) $(DESTDIR)$(somedir)
7289 # so it does not work when $(somedir) is undefined and
7290 # $(DESTDIR) is not.
7291 # To support the latter case, we have to write
7292 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7293 # so the `.' trick is pointless.
7294 mkdir_p='mkdir -p --'
7295else
7296 # On NextStep and OpenStep, the `mkdir' command does not
7297 # recognize any option. It will interpret all options as
7298 # directories to create, and then abort because `.' already
7299 # exists.
7300 for d in ./-p ./--version;
7301 do
7302 test -d $d && rmdir $d
7303 done
7304 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7305 if test -f "$ac_aux_dir/mkinstalldirs"; then
7306 mkdir_p='$(mkinstalldirs)'
7307 else
7308 mkdir_p='$(install_sh) -d'
7309 fi
7310fi
7311AC_SUBST([mkdir_p])])
7312
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007313# Helper functions for option handling. -*- Autoconf -*-
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007314
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007315# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7316#
7317# This file is free software; the Free Software Foundation
7318# gives unlimited permission to copy and/or distribute it,
7319# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007320
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007321# serial 3
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007322
7323# _AM_MANGLE_OPTION(NAME)
7324# -----------------------
7325AC_DEFUN([_AM_MANGLE_OPTION],
7326[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7327
7328# _AM_SET_OPTION(NAME)
7329# ------------------------------
7330# Set option NAME. Presently that only means defining a flag for this option.
7331AC_DEFUN([_AM_SET_OPTION],
7332[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7333
7334# _AM_SET_OPTIONS(OPTIONS)
7335# ----------------------------------
7336# OPTIONS is a space-separated list of Automake options.
7337AC_DEFUN([_AM_SET_OPTIONS],
7338[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7339
7340# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7341# -------------------------------------------
7342# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7343AC_DEFUN([_AM_IF_OPTION],
7344[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7345
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007346# Check to make sure that the build environment is sane. -*- Autoconf -*-
7347
7348# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7349# Free Software Foundation, Inc.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007350#
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007351# This file is free software; the Free Software Foundation
7352# gives unlimited permission to copy and/or distribute it,
7353# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007354
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007355# serial 4
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007356
7357# AM_SANITY_CHECK
7358# ---------------
7359AC_DEFUN([AM_SANITY_CHECK],
7360[AC_MSG_CHECKING([whether build environment is sane])
7361# Just in case
7362sleep 1
7363echo timestamp > conftest.file
7364# Do `set' in a subshell so we don't clobber the current shell's
7365# arguments. Must try -L first in case configure is actually a
7366# symlink; some systems play weird games with the mod time of symlinks
7367# (eg FreeBSD returns the mod time of the symlink's containing
7368# directory).
7369if (
7370 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7371 if test "$[*]" = "X"; then
7372 # -L didn't work.
7373 set X `ls -t $srcdir/configure conftest.file`
7374 fi
7375 rm -f conftest.file
7376 if test "$[*]" != "X $srcdir/configure conftest.file" \
7377 && test "$[*]" != "X conftest.file $srcdir/configure"; then
7378
7379 # If neither matched, then we have a broken ls. This can happen
7380 # if, for instance, CONFIG_SHELL is bash and it inherits a
7381 # broken ls alias from the environment. This has actually
7382 # happened. Such a system could not be considered "sane".
7383 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7384alias in your environment])
7385 fi
7386
7387 test "$[2]" = conftest.file
7388 )
7389then
7390 # Ok.
7391 :
7392else
7393 AC_MSG_ERROR([newly created file is older than distributed files!
7394Check your system clock])
7395fi
7396AC_MSG_RESULT(yes)])
7397
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007398# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7399#
7400# This file is free software; the Free Software Foundation
7401# gives unlimited permission to copy and/or distribute it,
7402# with or without modifications, as long as this notice is preserved.
7403
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007404# AM_PROG_INSTALL_STRIP
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007405# ---------------------
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007406# One issue with vendor `install' (even GNU) is that you can't
7407# specify the program used to strip binaries. This is especially
7408# annoying in cross-compiling environments, where the build's strip
7409# is unlikely to handle the host's binaries.
7410# Fortunately install-sh will honor a STRIPPROG variable, so we
7411# always use install-sh in `make install-strip', and initialize
7412# STRIPPROG with the value of the STRIP variable (set by the user).
7413AC_DEFUN([AM_PROG_INSTALL_STRIP],
7414[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7415# Installed binaries are usually stripped using `strip' when the user
7416# run `make install-strip'. However `strip' might not be the right
7417# tool to use in cross-compilation environments, therefore Automake
7418# will honor the `STRIP' environment variable to overrule this program.
7419dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7420if test "$cross_compiling" != no; then
7421 AC_CHECK_TOOL([STRIP], [strip], :)
7422fi
7423INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7424AC_SUBST([INSTALL_STRIP_PROGRAM])])
7425
7426# Check how to create a tarball. -*- Autoconf -*-
7427
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007428# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7429#
7430# This file is free software; the Free Software Foundation
7431# gives unlimited permission to copy and/or distribute it,
7432# with or without modifications, as long as this notice is preserved.
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007433
hp.com!davidme65e1fc2005-05-03 09:13:17 +00007434# serial 2
homeip.net!davidm34fa1222004-08-17 15:34:28 +00007435
7436# _AM_PROG_TAR(FORMAT)
7437# --------------------
7438# Check how to create a tarball in format FORMAT.
7439# FORMAT should be one of `v7', `ustar', or `pax'.
7440#
7441# Substitute a variable $(am__tar) that is a command
7442# writing to stdout a FORMAT-tarball containing the directory
7443# $tardir.
7444# tardir=directory && $(am__tar) > result.tar
7445#
7446# Substitute a variable $(am__untar) that extract such
7447# a tarball read from stdin.
7448# $(am__untar) < result.tar
7449AC_DEFUN([_AM_PROG_TAR],
7450[# Always define AMTAR for backward compatibility.
7451AM_MISSING_PROG([AMTAR], [tar])
7452m4_if([$1], [v7],
7453 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7454 [m4_case([$1], [ustar],, [pax],,
7455 [m4_fatal([Unknown tar format])])
7456AC_MSG_CHECKING([how to create a $1 tar archive])
7457# Loop over all known methods to create a tar archive until one works.
7458_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7459_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7460# Do not fold the above two line into one, because Tru64 sh and
7461# Solaris sh will not grok spaces in the rhs of `-'.
7462for _am_tool in $_am_tools
7463do
7464 case $_am_tool in
7465 gnutar)
7466 for _am_tar in tar gnutar gtar;
7467 do
7468 AM_RUN_LOG([$_am_tar --version]) && break
7469 done
7470 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7471 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7472 am__untar="$_am_tar -xf -"
7473 ;;
7474 plaintar)
7475 # Must skip GNU tar: if it does not support --format= it doesn't create
7476 # ustar tarball either.
7477 (tar --version) >/dev/null 2>&1 && continue
7478 am__tar='tar chf - "$$tardir"'
7479 am__tar_='tar chf - "$tardir"'
7480 am__untar='tar xf -'
7481 ;;
7482 pax)
7483 am__tar='pax -L -x $1 -w "$$tardir"'
7484 am__tar_='pax -L -x $1 -w "$tardir"'
7485 am__untar='pax -r'
7486 ;;
7487 cpio)
7488 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7489 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7490 am__untar='cpio -i -H $1 -d'
7491 ;;
7492 none)
7493 am__tar=false
7494 am__tar_=false
7495 am__untar=false
7496 ;;
7497 esac
7498
7499 # If the value was cached, stop now. We just wanted to have am__tar
7500 # and am__untar set.
7501 test -n "${am_cv_prog_tar_$1}" && break
7502
7503 # tar/untar a dummy directory, and stop if the command works
7504 rm -rf conftest.dir
7505 mkdir conftest.dir
7506 echo GrepMe > conftest.dir/file
7507 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7508 rm -rf conftest.dir
7509 if test -s conftest.tar; then
7510 AM_RUN_LOG([$am__untar <conftest.tar])
7511 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7512 fi
7513done
7514rm -rf conftest.dir
7515
7516AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7517AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7518AC_SUBST([am__tar])
7519AC_SUBST([am__untar])
7520]) # _AM_PROG_TAR
7521
7522m4_include([acinclude.m4])