1382ff0afSmrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2382ff0afSmrg
3382ff0afSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4382ff0afSmrg# 2005  Free Software Foundation, Inc.
5382ff0afSmrg# This file is free software; the Free Software Foundation
6382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7382ff0afSmrg# with or without modifications, as long as this notice is preserved.
8382ff0afSmrg
9382ff0afSmrg# This program is distributed in the hope that it will be useful,
10382ff0afSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11382ff0afSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12382ff0afSmrg# PARTICULAR PURPOSE.
13382ff0afSmrg
14382ff0afSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15382ff0afSmrg
16382ff0afSmrg# serial 48 AC_PROG_LIBTOOL
17382ff0afSmrg
18382ff0afSmrg
19382ff0afSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20382ff0afSmrg# -----------------------------------------------------------
21382ff0afSmrg# If this macro is not defined by Autoconf, define it here.
22382ff0afSmrgm4_ifdef([AC_PROVIDE_IFELSE],
23382ff0afSmrg         [],
24382ff0afSmrg         [m4_define([AC_PROVIDE_IFELSE],
25382ff0afSmrg	         [m4_ifdef([AC_PROVIDE_$1],
26382ff0afSmrg		           [$2], [$3])])])
27382ff0afSmrg
28382ff0afSmrg
29382ff0afSmrg# AC_PROG_LIBTOOL
30382ff0afSmrg# ---------------
31382ff0afSmrgAC_DEFUN([AC_PROG_LIBTOOL],
32382ff0afSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33382ff0afSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34382ff0afSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35382ff0afSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
36382ff0afSmrg    [AC_LIBTOOL_CXX],
37382ff0afSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38382ff0afSmrg  ])])
39382ff0afSmrgdnl And a similar setup for Fortran 77 support
40382ff0afSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
41382ff0afSmrg    [AC_LIBTOOL_F77],
42382ff0afSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
43382ff0afSmrg])])
44382ff0afSmrg
45382ff0afSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46382ff0afSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47382ff0afSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48382ff0afSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
49382ff0afSmrg    [AC_LIBTOOL_GCJ],
50382ff0afSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
51382ff0afSmrg      [AC_LIBTOOL_GCJ],
52382ff0afSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
53382ff0afSmrg	[AC_LIBTOOL_GCJ],
54382ff0afSmrg      [ifdef([AC_PROG_GCJ],
55382ff0afSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56382ff0afSmrg       ifdef([A][M_PROG_GCJ],
57382ff0afSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58382ff0afSmrg       ifdef([LT_AC_PROG_GCJ],
59382ff0afSmrg	     [define([LT_AC_PROG_GCJ],
60382ff0afSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
61382ff0afSmrg])])# AC_PROG_LIBTOOL
62382ff0afSmrg
63382ff0afSmrg
64382ff0afSmrg# _AC_PROG_LIBTOOL
65382ff0afSmrg# ----------------
66382ff0afSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
67382ff0afSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68382ff0afSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69382ff0afSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70382ff0afSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
71382ff0afSmrg
72382ff0afSmrg# This can be used to rebuild libtool when needed
73382ff0afSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
74382ff0afSmrg
75382ff0afSmrg# Always use our own libtool.
76382ff0afSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
77382ff0afSmrgAC_SUBST(LIBTOOL)dnl
78382ff0afSmrg
79382ff0afSmrg# Prevent multiple expansion
80382ff0afSmrgdefine([AC_PROG_LIBTOOL], [])
81382ff0afSmrg])# _AC_PROG_LIBTOOL
82382ff0afSmrg
83382ff0afSmrg
84382ff0afSmrg# AC_LIBTOOL_SETUP
85382ff0afSmrg# ----------------
86382ff0afSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
87382ff0afSmrg[AC_PREREQ(2.50)dnl
88382ff0afSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
89382ff0afSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
90382ff0afSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91382ff0afSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
92382ff0afSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
93382ff0afSmrgAC_REQUIRE([AC_PROG_CC])dnl
94382ff0afSmrgAC_REQUIRE([AC_PROG_LD])dnl
95382ff0afSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96382ff0afSmrgAC_REQUIRE([AC_PROG_NM])dnl
97382ff0afSmrg
98382ff0afSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
99382ff0afSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100382ff0afSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101382ff0afSmrgAC_REQUIRE([AC_OBJEXT])dnl
102382ff0afSmrgAC_REQUIRE([AC_EXEEXT])dnl
103382ff0afSmrgdnl
104382ff0afSmrg
105382ff0afSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
106382ff0afSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
107382ff0afSmrgAC_LIBTOOL_OBJDIR
108382ff0afSmrg
109382ff0afSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
110382ff0afSmrg_LT_AC_PROG_ECHO_BACKSLASH
111382ff0afSmrg
112382ff0afSmrgcase $host_os in
113382ff0afSmrgaix3*)
114382ff0afSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
115382ff0afSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
116382ff0afSmrg  # vanish in a puff of smoke.
117382ff0afSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
118382ff0afSmrg    COLLECT_NAMES=
119382ff0afSmrg    export COLLECT_NAMES
120382ff0afSmrg  fi
121382ff0afSmrg  ;;
122382ff0afSmrgesac
123382ff0afSmrg
124382ff0afSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
125382ff0afSmrg# metacharacters that are still active within double-quoted strings.
126382ff0afSmrgXsed='sed -e 1s/^X//'
127382ff0afSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128382ff0afSmrg
129382ff0afSmrg# Same as above, but do not quote variable references.
130382ff0afSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131382ff0afSmrg
132382ff0afSmrg# Sed substitution to delay expansion of an escaped shell variable in a
133382ff0afSmrg# double_quote_subst'ed string.
134382ff0afSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135382ff0afSmrg
136382ff0afSmrg# Sed substitution to avoid accidental globbing in evaled expressions
137382ff0afSmrgno_glob_subst='s/\*/\\\*/g'
138382ff0afSmrg
139382ff0afSmrg# Constants:
140382ff0afSmrgrm="rm -f"
141382ff0afSmrg
142382ff0afSmrg# Global variables:
143382ff0afSmrgdefault_ofile=libtool
144382ff0afSmrgcan_build_shared=yes
145382ff0afSmrg
146382ff0afSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
147382ff0afSmrg# which needs '.lib').
148382ff0afSmrglibext=a
149382ff0afSmrgltmain="$ac_aux_dir/ltmain.sh"
150382ff0afSmrgofile="$default_ofile"
151382ff0afSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
152382ff0afSmrg
153382ff0afSmrgAC_CHECK_TOOL(AR, ar, false)
154382ff0afSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
155382ff0afSmrgAC_CHECK_TOOL(STRIP, strip, :)
156382ff0afSmrg
157382ff0afSmrgold_CC="$CC"
158382ff0afSmrgold_CFLAGS="$CFLAGS"
159382ff0afSmrg
160382ff0afSmrg# Set sane defaults for various variables
161382ff0afSmrgtest -z "$AR" && AR=ar
162382ff0afSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
163382ff0afSmrgtest -z "$AS" && AS=as
164382ff0afSmrgtest -z "$CC" && CC=cc
165382ff0afSmrgtest -z "$LTCC" && LTCC=$CC
166382ff0afSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
167382ff0afSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
168382ff0afSmrgtest -z "$LD" && LD=ld
169382ff0afSmrgtest -z "$LN_S" && LN_S="ln -s"
170382ff0afSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
171382ff0afSmrgtest -z "$NM" && NM=nm
172382ff0afSmrgtest -z "$SED" && SED=sed
173382ff0afSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
174382ff0afSmrgtest -z "$RANLIB" && RANLIB=:
175382ff0afSmrgtest -z "$STRIP" && STRIP=:
176382ff0afSmrgtest -z "$ac_objext" && ac_objext=o
177382ff0afSmrg
178382ff0afSmrg# Determine commands to create old-style static archives.
179382ff0afSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
180382ff0afSmrgold_postinstall_cmds='chmod 644 $oldlib'
181382ff0afSmrgold_postuninstall_cmds=
182382ff0afSmrg
183382ff0afSmrgif test -n "$RANLIB"; then
184382ff0afSmrg  case $host_os in
185382ff0afSmrg  openbsd*)
186382ff0afSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
187382ff0afSmrg    ;;
188382ff0afSmrg  *)
189382ff0afSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
190382ff0afSmrg    ;;
191382ff0afSmrg  esac
192382ff0afSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
193382ff0afSmrgfi
194382ff0afSmrg
195382ff0afSmrg_LT_CC_BASENAME([$compiler])
196382ff0afSmrg
197382ff0afSmrg# Only perform the check for file, if the check method requires it
198382ff0afSmrgcase $deplibs_check_method in
199382ff0afSmrgfile_magic*)
200382ff0afSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
201382ff0afSmrg    AC_PATH_MAGIC
202382ff0afSmrg  fi
203382ff0afSmrg  ;;
204382ff0afSmrgesac
205382ff0afSmrg
206382ff0afSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207382ff0afSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
208382ff0afSmrgenable_win32_dll=yes, enable_win32_dll=no)
209382ff0afSmrg
210382ff0afSmrgAC_ARG_ENABLE([libtool-lock],
211382ff0afSmrg    [AC_HELP_STRING([--disable-libtool-lock],
212382ff0afSmrg	[avoid locking (might break parallel builds)])])
213382ff0afSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
214382ff0afSmrg
215382ff0afSmrgAC_ARG_WITH([pic],
216382ff0afSmrg    [AC_HELP_STRING([--with-pic],
217382ff0afSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218382ff0afSmrg    [pic_mode="$withval"],
219382ff0afSmrg    [pic_mode=default])
220382ff0afSmrgtest -z "$pic_mode" && pic_mode=default
221382ff0afSmrg
222382ff0afSmrg# Use C for the default configuration in the libtool script
223382ff0afSmrgtagname=
224382ff0afSmrgAC_LIBTOOL_LANG_C_CONFIG
225382ff0afSmrg_LT_AC_TAGCONFIG
226382ff0afSmrg])# AC_LIBTOOL_SETUP
227382ff0afSmrg
228382ff0afSmrg
229382ff0afSmrg# _LT_AC_SYS_COMPILER
230382ff0afSmrg# -------------------
231382ff0afSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
232382ff0afSmrg[AC_REQUIRE([AC_PROG_CC])dnl
233382ff0afSmrg
234382ff0afSmrg# If no C compiler was specified, use CC.
235382ff0afSmrgLTCC=${LTCC-"$CC"}
236382ff0afSmrg
237382ff0afSmrg# If no C compiler flags were specified, use CFLAGS.
238382ff0afSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
239382ff0afSmrg
240382ff0afSmrg# Allow CC to be a program name with arguments.
241382ff0afSmrgcompiler=$CC
242382ff0afSmrg])# _LT_AC_SYS_COMPILER
243382ff0afSmrg
244382ff0afSmrg
245382ff0afSmrg# _LT_CC_BASENAME(CC)
246382ff0afSmrg# -------------------
247382ff0afSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
248382ff0afSmrgAC_DEFUN([_LT_CC_BASENAME],
249382ff0afSmrg[for cc_temp in $1""; do
250382ff0afSmrg  case $cc_temp in
251382ff0afSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252382ff0afSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
253382ff0afSmrg    \-*) ;;
254382ff0afSmrg    *) break;;
255382ff0afSmrg  esac
256382ff0afSmrgdone
257382ff0afSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
258382ff0afSmrg])
259382ff0afSmrg
260382ff0afSmrg
261382ff0afSmrg# _LT_COMPILER_BOILERPLATE
262382ff0afSmrg# ------------------------
263382ff0afSmrg# Check for compiler boilerplate output or warnings with
264382ff0afSmrg# the simple compiler test code.
265382ff0afSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
266382ff0afSmrg[ac_outfile=conftest.$ac_objext
267382ff0afSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
268382ff0afSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
269382ff0afSmrg_lt_compiler_boilerplate=`cat conftest.err`
270382ff0afSmrg$rm conftest*
271382ff0afSmrg])# _LT_COMPILER_BOILERPLATE
272382ff0afSmrg
273382ff0afSmrg
274382ff0afSmrg# _LT_LINKER_BOILERPLATE
275382ff0afSmrg# ----------------------
276382ff0afSmrg# Check for linker boilerplate output or warnings with
277382ff0afSmrg# the simple link test code.
278382ff0afSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
279382ff0afSmrg[ac_outfile=conftest.$ac_objext
280382ff0afSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
281382ff0afSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
282382ff0afSmrg_lt_linker_boilerplate=`cat conftest.err`
283382ff0afSmrg$rm conftest*
284382ff0afSmrg])# _LT_LINKER_BOILERPLATE
285382ff0afSmrg
286382ff0afSmrg
287382ff0afSmrg# _LT_AC_SYS_LIBPATH_AIX
288382ff0afSmrg# ----------------------
289382ff0afSmrg# Links a minimal program and checks the executable
290382ff0afSmrg# for the system default hardcoded library path. In most cases,
291382ff0afSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
292382ff0afSmrg# the location of the communication and MPI libs are included too.
293382ff0afSmrg# If we don't find anything, use the default library path according
294382ff0afSmrg# to the aix ld manual.
295382ff0afSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296382ff0afSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297382ff0afSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
298382ff0afSmrg}'`
299382ff0afSmrg# Check for a 64-bit object if we didn't find anything.
300382ff0afSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
301382ff0afSmrg}'`; fi],[])
302382ff0afSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303382ff0afSmrg])# _LT_AC_SYS_LIBPATH_AIX
304382ff0afSmrg
305382ff0afSmrg
306382ff0afSmrg# _LT_AC_SHELL_INIT(ARG)
307382ff0afSmrg# ----------------------
308382ff0afSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
309382ff0afSmrg[ifdef([AC_DIVERSION_NOTICE],
310382ff0afSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
311382ff0afSmrg	 [AC_DIVERT_PUSH(NOTICE)])
312382ff0afSmrg$1
313382ff0afSmrgAC_DIVERT_POP
314382ff0afSmrg])# _LT_AC_SHELL_INIT
315382ff0afSmrg
316382ff0afSmrg
317382ff0afSmrg# _LT_AC_PROG_ECHO_BACKSLASH
318382ff0afSmrg# --------------------------
319382ff0afSmrg# Add some code to the start of the generated configure script which
320382ff0afSmrg# will find an echo command which doesn't interpret backslashes.
321382ff0afSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
322382ff0afSmrg[_LT_AC_SHELL_INIT([
323382ff0afSmrg# Check that we are running under the correct shell.
324382ff0afSmrgSHELL=${CONFIG_SHELL-/bin/sh}
325382ff0afSmrg
326382ff0afSmrgcase X$ECHO in
327382ff0afSmrgX*--fallback-echo)
328382ff0afSmrg  # Remove one level of quotation (which was required for Make).
329382ff0afSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
330382ff0afSmrg  ;;
331382ff0afSmrgesac
332382ff0afSmrg
333382ff0afSmrgecho=${ECHO-echo}
334382ff0afSmrgif test "X[$]1" = X--no-reexec; then
335382ff0afSmrg  # Discard the --no-reexec flag, and continue.
336382ff0afSmrg  shift
337382ff0afSmrgelif test "X[$]1" = X--fallback-echo; then
338382ff0afSmrg  # Avoid inline document here, it may be left over
339382ff0afSmrg  :
340382ff0afSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
341382ff0afSmrg  # Yippee, $echo works!
342382ff0afSmrg  :
343382ff0afSmrgelse
344382ff0afSmrg  # Restart under the correct shell.
345382ff0afSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
346382ff0afSmrgfi
347382ff0afSmrg
348382ff0afSmrgif test "X[$]1" = X--fallback-echo; then
349382ff0afSmrg  # used as fallback echo
350382ff0afSmrg  shift
351382ff0afSmrg  cat <<EOF
352382ff0afSmrg[$]*
353382ff0afSmrgEOF
354382ff0afSmrg  exit 0
355382ff0afSmrgfi
356382ff0afSmrg
357382ff0afSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
358382ff0afSmrg# if CDPATH is set.
359382ff0afSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
360382ff0afSmrg
361382ff0afSmrgif test -z "$ECHO"; then
362382ff0afSmrgif test "X${echo_test_string+set}" != Xset; then
363382ff0afSmrg# find a string as large as possible, as long as the shell can cope with it
364382ff0afSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
365382ff0afSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
366382ff0afSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
367382ff0afSmrg       echo_test_string=`eval $cmd` &&
368382ff0afSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
369382ff0afSmrg    then
370382ff0afSmrg      break
371382ff0afSmrg    fi
372382ff0afSmrg  done
373382ff0afSmrgfi
374382ff0afSmrg
375382ff0afSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
376382ff0afSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
377382ff0afSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
378382ff0afSmrg  :
379382ff0afSmrgelse
380382ff0afSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
381382ff0afSmrg  # backslashes.  This makes it impossible to quote backslashes using
382382ff0afSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
383382ff0afSmrg  #
384382ff0afSmrg  # So, first we look for a working echo in the user's PATH.
385382ff0afSmrg
386382ff0afSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
387382ff0afSmrg  for dir in $PATH /usr/ucb; do
388382ff0afSmrg    IFS="$lt_save_ifs"
389382ff0afSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
390382ff0afSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
391382ff0afSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
392382ff0afSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
393382ff0afSmrg      echo="$dir/echo"
394382ff0afSmrg      break
395382ff0afSmrg    fi
396382ff0afSmrg  done
397382ff0afSmrg  IFS="$lt_save_ifs"
398382ff0afSmrg
399382ff0afSmrg  if test "X$echo" = Xecho; then
400382ff0afSmrg    # We didn't find a better echo, so look for alternatives.
401382ff0afSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
402382ff0afSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
403382ff0afSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
404382ff0afSmrg      # This shell has a builtin print -r that does the trick.
405382ff0afSmrg      echo='print -r'
406382ff0afSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
407382ff0afSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
408382ff0afSmrg      # If we have ksh, try running configure again with it.
409382ff0afSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
410382ff0afSmrg      export ORIGINAL_CONFIG_SHELL
411382ff0afSmrg      CONFIG_SHELL=/bin/ksh
412382ff0afSmrg      export CONFIG_SHELL
413382ff0afSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
414382ff0afSmrg    else
415382ff0afSmrg      # Try using printf.
416382ff0afSmrg      echo='printf %s\n'
417382ff0afSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
418382ff0afSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
419382ff0afSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
420382ff0afSmrg	# Cool, printf works
421382ff0afSmrg	:
422382ff0afSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
423382ff0afSmrg	   test "X$echo_testing_string" = 'X\t' &&
424382ff0afSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
425382ff0afSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
426382ff0afSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
427382ff0afSmrg	export CONFIG_SHELL
428382ff0afSmrg	SHELL="$CONFIG_SHELL"
429382ff0afSmrg	export SHELL
430382ff0afSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
431382ff0afSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
432382ff0afSmrg	   test "X$echo_testing_string" = 'X\t' &&
433382ff0afSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
434382ff0afSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
435382ff0afSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
436382ff0afSmrg      else
437382ff0afSmrg	# maybe with a smaller string...
438382ff0afSmrg	prev=:
439382ff0afSmrg
440382ff0afSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
441382ff0afSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
442382ff0afSmrg	  then
443382ff0afSmrg	    break
444382ff0afSmrg	  fi
445382ff0afSmrg	  prev="$cmd"
446382ff0afSmrg	done
447382ff0afSmrg
448382ff0afSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
449382ff0afSmrg	  echo_test_string=`eval $prev`
450382ff0afSmrg	  export echo_test_string
451382ff0afSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
452382ff0afSmrg	else
453382ff0afSmrg	  # Oops.  We lost completely, so just stick with echo.
454382ff0afSmrg	  echo=echo
455382ff0afSmrg	fi
456382ff0afSmrg      fi
457382ff0afSmrg    fi
458382ff0afSmrg  fi
459382ff0afSmrgfi
460382ff0afSmrgfi
461382ff0afSmrg
462382ff0afSmrg# Copy echo and quote the copy suitably for passing to libtool from
463382ff0afSmrg# the Makefile, instead of quoting the original, which is used later.
464382ff0afSmrgECHO=$echo
465382ff0afSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
466382ff0afSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
467382ff0afSmrgfi
468382ff0afSmrg
469382ff0afSmrgAC_SUBST(ECHO)
470382ff0afSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
471382ff0afSmrg
472382ff0afSmrg
473382ff0afSmrg# _LT_AC_LOCK
474382ff0afSmrg# -----------
475382ff0afSmrgAC_DEFUN([_LT_AC_LOCK],
476382ff0afSmrg[AC_ARG_ENABLE([libtool-lock],
477382ff0afSmrg    [AC_HELP_STRING([--disable-libtool-lock],
478382ff0afSmrg	[avoid locking (might break parallel builds)])])
479382ff0afSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
480382ff0afSmrg
481382ff0afSmrg# Some flags need to be propagated to the compiler or linker for good
482382ff0afSmrg# libtool support.
483382ff0afSmrgcase $host in
484382ff0afSmrgia64-*-hpux*)
485382ff0afSmrg  # Find out which ABI we are using.
486382ff0afSmrg  echo 'int i;' > conftest.$ac_ext
487382ff0afSmrg  if AC_TRY_EVAL(ac_compile); then
488382ff0afSmrg    case `/usr/bin/file conftest.$ac_objext` in
489382ff0afSmrg    *ELF-32*)
490382ff0afSmrg      HPUX_IA64_MODE="32"
491382ff0afSmrg      ;;
492382ff0afSmrg    *ELF-64*)
493382ff0afSmrg      HPUX_IA64_MODE="64"
494382ff0afSmrg      ;;
495382ff0afSmrg    esac
496382ff0afSmrg  fi
497382ff0afSmrg  rm -rf conftest*
498382ff0afSmrg  ;;
499382ff0afSmrg*-*-irix6*)
500382ff0afSmrg  # Find out which ABI we are using.
501382ff0afSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
502382ff0afSmrg  if AC_TRY_EVAL(ac_compile); then
503382ff0afSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
504382ff0afSmrg    case `/usr/bin/file conftest.$ac_objext` in
505382ff0afSmrg    *32-bit*)
506382ff0afSmrg      LD="${LD-ld} -melf32bsmip"
507382ff0afSmrg      ;;
508382ff0afSmrg    *N32*)
509382ff0afSmrg      LD="${LD-ld} -melf32bmipn32"
510382ff0afSmrg      ;;
511382ff0afSmrg    *64-bit*)
512382ff0afSmrg      LD="${LD-ld} -melf64bmip"
513382ff0afSmrg      ;;
514382ff0afSmrg    esac
515382ff0afSmrg   else
516382ff0afSmrg    case `/usr/bin/file conftest.$ac_objext` in
517382ff0afSmrg    *32-bit*)
518382ff0afSmrg      LD="${LD-ld} -32"
519382ff0afSmrg      ;;
520382ff0afSmrg    *N32*)
521382ff0afSmrg      LD="${LD-ld} -n32"
522382ff0afSmrg      ;;
523382ff0afSmrg    *64-bit*)
524382ff0afSmrg      LD="${LD-ld} -64"
525382ff0afSmrg      ;;
526382ff0afSmrg    esac
527382ff0afSmrg   fi
528382ff0afSmrg  fi
529382ff0afSmrg  rm -rf conftest*
530382ff0afSmrg  ;;
531382ff0afSmrg
532382ff0afSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
533382ff0afSmrg  # Find out which ABI we are using.
534382ff0afSmrg  echo 'int i;' > conftest.$ac_ext
535382ff0afSmrg  if AC_TRY_EVAL(ac_compile); then
536382ff0afSmrg    case `/usr/bin/file conftest.o` in
537382ff0afSmrg    *32-bit*)
538382ff0afSmrg      case $host in
539382ff0afSmrg        x86_64-*linux*)
540382ff0afSmrg          LD="${LD-ld} -m elf_i386"
541382ff0afSmrg          ;;
542382ff0afSmrg        ppc64-*linux*|powerpc64-*linux*)
543382ff0afSmrg          LD="${LD-ld} -m elf32ppclinux"
544382ff0afSmrg          ;;
545382ff0afSmrg        s390x-*linux*)
546382ff0afSmrg          LD="${LD-ld} -m elf_s390"
547382ff0afSmrg          ;;
548382ff0afSmrg        sparc64-*linux*)
549382ff0afSmrg          LD="${LD-ld} -m elf32_sparc"
550382ff0afSmrg          ;;
551382ff0afSmrg      esac
552382ff0afSmrg      ;;
553382ff0afSmrg    *64-bit*)
554382ff0afSmrg      case $host in
555382ff0afSmrg        x86_64-*linux*)
556382ff0afSmrg          LD="${LD-ld} -m elf_x86_64"
557382ff0afSmrg          ;;
558382ff0afSmrg        ppc*-*linux*|powerpc*-*linux*)
559382ff0afSmrg          LD="${LD-ld} -m elf64ppc"
560382ff0afSmrg          ;;
561382ff0afSmrg        s390*-*linux*)
562382ff0afSmrg          LD="${LD-ld} -m elf64_s390"
563382ff0afSmrg          ;;
564382ff0afSmrg        sparc*-*linux*)
565382ff0afSmrg          LD="${LD-ld} -m elf64_sparc"
566382ff0afSmrg          ;;
567382ff0afSmrg      esac
568382ff0afSmrg      ;;
569382ff0afSmrg    esac
570382ff0afSmrg  fi
571382ff0afSmrg  rm -rf conftest*
572382ff0afSmrg  ;;
573382ff0afSmrg
574382ff0afSmrg*-*-sco3.2v5*)
575382ff0afSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
576382ff0afSmrg  SAVE_CFLAGS="$CFLAGS"
577382ff0afSmrg  CFLAGS="$CFLAGS -belf"
578382ff0afSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
579382ff0afSmrg    [AC_LANG_PUSH(C)
580382ff0afSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
581382ff0afSmrg     AC_LANG_POP])
582382ff0afSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
583382ff0afSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
584382ff0afSmrg    CFLAGS="$SAVE_CFLAGS"
585382ff0afSmrg  fi
586382ff0afSmrg  ;;
587382ff0afSmrgsparc*-*solaris*)
588382ff0afSmrg  # Find out which ABI we are using.
589382ff0afSmrg  echo 'int i;' > conftest.$ac_ext
590382ff0afSmrg  if AC_TRY_EVAL(ac_compile); then
591382ff0afSmrg    case `/usr/bin/file conftest.o` in
592382ff0afSmrg    *64-bit*)
593382ff0afSmrg      case $lt_cv_prog_gnu_ld in
594382ff0afSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
595382ff0afSmrg      *)    LD="${LD-ld} -64" ;;
596382ff0afSmrg      esac
597382ff0afSmrg      ;;
598382ff0afSmrg    esac
599382ff0afSmrg  fi
600382ff0afSmrg  rm -rf conftest*
601382ff0afSmrg  ;;
602382ff0afSmrg
603382ff0afSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
604382ff0afSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
605382ff0afSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
606382ff0afSmrg  AC_CHECK_TOOL(AS, as, false)
607382ff0afSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
608382ff0afSmrg  ;;
609382ff0afSmrg  ])
610382ff0afSmrgesac
611382ff0afSmrg
612382ff0afSmrgneed_locks="$enable_libtool_lock"
613382ff0afSmrg
614382ff0afSmrg])# _LT_AC_LOCK
615382ff0afSmrg
616382ff0afSmrg
617382ff0afSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
618382ff0afSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
619382ff0afSmrg# ----------------------------------------------------------------
620382ff0afSmrg# Check whether the given compiler option works
621382ff0afSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
622382ff0afSmrg[AC_REQUIRE([LT_AC_PROG_SED])
623382ff0afSmrgAC_CACHE_CHECK([$1], [$2],
624382ff0afSmrg  [$2=no
625382ff0afSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
626382ff0afSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
627382ff0afSmrg   lt_compiler_flag="$3"
628382ff0afSmrg   # Insert the option either (1) after the last *FLAGS variable, or
629382ff0afSmrg   # (2) before a word containing "conftest.", or (3) at the end.
630382ff0afSmrg   # Note that $ac_compile itself does not contain backslashes and begins
631382ff0afSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
632382ff0afSmrg   # The option is referenced via a variable to avoid confusing sed.
633382ff0afSmrg   lt_compile=`echo "$ac_compile" | $SED \
634382ff0afSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
635382ff0afSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
636382ff0afSmrg   -e 's:$: $lt_compiler_flag:'`
637382ff0afSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
638382ff0afSmrg   (eval "$lt_compile" 2>conftest.err)
639382ff0afSmrg   ac_status=$?
640382ff0afSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
641382ff0afSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
642382ff0afSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
643382ff0afSmrg     # The compiler can only warn and ignore the option if not recognized
644382ff0afSmrg     # So say no if there are warnings other than the usual output.
645382ff0afSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
646382ff0afSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
647382ff0afSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
648382ff0afSmrg       $2=yes
649382ff0afSmrg     fi
650382ff0afSmrg   fi
651382ff0afSmrg   $rm conftest*
652382ff0afSmrg])
653382ff0afSmrg
654382ff0afSmrgif test x"[$]$2" = xyes; then
655382ff0afSmrg    ifelse([$5], , :, [$5])
656382ff0afSmrgelse
657382ff0afSmrg    ifelse([$6], , :, [$6])
658382ff0afSmrgfi
659382ff0afSmrg])# AC_LIBTOOL_COMPILER_OPTION
660382ff0afSmrg
661382ff0afSmrg
662382ff0afSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
663382ff0afSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
664382ff0afSmrg# ------------------------------------------------------------
665382ff0afSmrg# Check whether the given compiler option works
666382ff0afSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
667382ff0afSmrg[AC_CACHE_CHECK([$1], [$2],
668382ff0afSmrg  [$2=no
669382ff0afSmrg   save_LDFLAGS="$LDFLAGS"
670382ff0afSmrg   LDFLAGS="$LDFLAGS $3"
671382ff0afSmrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
672382ff0afSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
673382ff0afSmrg     # The linker can only warn and ignore the option if not recognized
674382ff0afSmrg     # So say no if there are warnings
675382ff0afSmrg     if test -s conftest.err; then
676382ff0afSmrg       # Append any errors to the config.log.
677382ff0afSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
678382ff0afSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
679382ff0afSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
680382ff0afSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
681382ff0afSmrg         $2=yes
682382ff0afSmrg       fi
683382ff0afSmrg     else
684382ff0afSmrg       $2=yes
685382ff0afSmrg     fi
686382ff0afSmrg   fi
687382ff0afSmrg   $rm conftest*
688382ff0afSmrg   LDFLAGS="$save_LDFLAGS"
689382ff0afSmrg])
690382ff0afSmrg
691382ff0afSmrgif test x"[$]$2" = xyes; then
692382ff0afSmrg    ifelse([$4], , :, [$4])
693382ff0afSmrgelse
694382ff0afSmrg    ifelse([$5], , :, [$5])
695382ff0afSmrgfi
696382ff0afSmrg])# AC_LIBTOOL_LINKER_OPTION
697382ff0afSmrg
698382ff0afSmrg
699382ff0afSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
700382ff0afSmrg# --------------------------
701382ff0afSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
702382ff0afSmrg[# find the maximum length of command line arguments
703382ff0afSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
704382ff0afSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
705382ff0afSmrg  i=0
706382ff0afSmrg  teststring="ABCD"
707382ff0afSmrg
708382ff0afSmrg  case $build_os in
709382ff0afSmrg  msdosdjgpp*)
710382ff0afSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
711382ff0afSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
712382ff0afSmrg    # during glob expansion).  Even if it were fixed, the result of this
713382ff0afSmrg    # check would be larger than it should be.
714382ff0afSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
715382ff0afSmrg    ;;
716382ff0afSmrg
717382ff0afSmrg  gnu*)
718382ff0afSmrg    # Under GNU Hurd, this test is not required because there is
719382ff0afSmrg    # no limit to the length of command line arguments.
720382ff0afSmrg    # Libtool will interpret -1 as no limit whatsoever
721382ff0afSmrg    lt_cv_sys_max_cmd_len=-1;
722382ff0afSmrg    ;;
723382ff0afSmrg
724382ff0afSmrg  cygwin* | mingw*)
725382ff0afSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
726382ff0afSmrg    # about 5 minutes as the teststring grows exponentially.
727382ff0afSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
728382ff0afSmrg    # you end up with a "frozen" computer, even though with patience
729382ff0afSmrg    # the test eventually succeeds (with a max line length of 256k).
730382ff0afSmrg    # Instead, let's just punt: use the minimum linelength reported by
731382ff0afSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
732382ff0afSmrg    lt_cv_sys_max_cmd_len=8192;
733382ff0afSmrg    ;;
734382ff0afSmrg
735382ff0afSmrg  amigaos*)
736382ff0afSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
737382ff0afSmrg    # So we just punt and use a minimum line length of 8192.
738382ff0afSmrg    lt_cv_sys_max_cmd_len=8192;
739382ff0afSmrg    ;;
740382ff0afSmrg
741382ff0afSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
742382ff0afSmrg    # This has been around since 386BSD, at least.  Likely further.
743382ff0afSmrg    if test -x /sbin/sysctl; then
744382ff0afSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
745382ff0afSmrg    elif test -x /usr/sbin/sysctl; then
746382ff0afSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
747382ff0afSmrg    else
748382ff0afSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
749382ff0afSmrg    fi
750382ff0afSmrg    # And add a safety zone
751382ff0afSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
752382ff0afSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
753382ff0afSmrg    ;;
754382ff0afSmrg
755382ff0afSmrg  interix*)
756382ff0afSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
757382ff0afSmrg    lt_cv_sys_max_cmd_len=196608
758382ff0afSmrg    ;;
759382ff0afSmrg
760382ff0afSmrg  osf*)
761382ff0afSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
762382ff0afSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
763382ff0afSmrg    # nice to cause kernel panics so lets avoid the loop below.
764382ff0afSmrg    # First set a reasonable default.
765382ff0afSmrg    lt_cv_sys_max_cmd_len=16384
766382ff0afSmrg    #
767382ff0afSmrg    if test -x /sbin/sysconfig; then
768382ff0afSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
769382ff0afSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
770382ff0afSmrg      esac
771382ff0afSmrg    fi
772382ff0afSmrg    ;;
773382ff0afSmrg  sco3.2v5*)
774382ff0afSmrg    lt_cv_sys_max_cmd_len=102400
775382ff0afSmrg    ;;
776382ff0afSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
777382ff0afSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
778382ff0afSmrg    if test -n "$kargmax"; then
779382ff0afSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
780382ff0afSmrg    else
781382ff0afSmrg      lt_cv_sys_max_cmd_len=32768
782382ff0afSmrg    fi
783382ff0afSmrg    ;;
784382ff0afSmrg  *)
785382ff0afSmrg    # If test is not a shell built-in, we'll probably end up computing a
786382ff0afSmrg    # maximum length that is only half of the actual maximum length, but
787382ff0afSmrg    # we can't tell.
788382ff0afSmrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789382ff0afSmrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790382ff0afSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
791382ff0afSmrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
792382ff0afSmrg	    lt_cv_sys_max_cmd_len=$new_result &&
793382ff0afSmrg	    test $i != 17 # 1/2 MB should be enough
794382ff0afSmrg    do
795382ff0afSmrg      i=`expr $i + 1`
796382ff0afSmrg      teststring=$teststring$teststring
797382ff0afSmrg    done
798382ff0afSmrg    teststring=
799382ff0afSmrg    # Add a significant safety factor because C++ compilers can tack on massive
800382ff0afSmrg    # amounts of additional arguments before passing them to the linker.
801382ff0afSmrg    # It appears as though 1/2 is a usable value.
802382ff0afSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
803382ff0afSmrg    ;;
804382ff0afSmrg  esac
805382ff0afSmrg])
806382ff0afSmrgif test -n $lt_cv_sys_max_cmd_len ; then
807382ff0afSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
808382ff0afSmrgelse
809382ff0afSmrg  AC_MSG_RESULT(none)
810382ff0afSmrgfi
811382ff0afSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
812382ff0afSmrg
813382ff0afSmrg
814382ff0afSmrg# _LT_AC_CHECK_DLFCN
815382ff0afSmrg# ------------------
816382ff0afSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
817382ff0afSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
818382ff0afSmrg])# _LT_AC_CHECK_DLFCN
819382ff0afSmrg
820382ff0afSmrg
821382ff0afSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
822382ff0afSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
823382ff0afSmrg# ---------------------------------------------------------------------
824382ff0afSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
825382ff0afSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
826382ff0afSmrgif test "$cross_compiling" = yes; then :
827382ff0afSmrg  [$4]
828382ff0afSmrgelse
829382ff0afSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
830382ff0afSmrg  lt_status=$lt_dlunknown
831382ff0afSmrg  cat > conftest.$ac_ext <<EOF
832382ff0afSmrg[#line __oline__ "configure"
833382ff0afSmrg#include "confdefs.h"
834382ff0afSmrg
835382ff0afSmrg#if HAVE_DLFCN_H
836382ff0afSmrg#include <dlfcn.h>
837382ff0afSmrg#endif
838382ff0afSmrg
839382ff0afSmrg#include <stdio.h>
840382ff0afSmrg
841382ff0afSmrg#ifdef RTLD_GLOBAL
842382ff0afSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
843382ff0afSmrg#else
844382ff0afSmrg#  ifdef DL_GLOBAL
845382ff0afSmrg#    define LT_DLGLOBAL		DL_GLOBAL
846382ff0afSmrg#  else
847382ff0afSmrg#    define LT_DLGLOBAL		0
848382ff0afSmrg#  endif
849382ff0afSmrg#endif
850382ff0afSmrg
851382ff0afSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
852382ff0afSmrg   find out it does not work in some platform. */
853382ff0afSmrg#ifndef LT_DLLAZY_OR_NOW
854382ff0afSmrg#  ifdef RTLD_LAZY
855382ff0afSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
856382ff0afSmrg#  else
857382ff0afSmrg#    ifdef DL_LAZY
858382ff0afSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
859382ff0afSmrg#    else
860382ff0afSmrg#      ifdef RTLD_NOW
861382ff0afSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
862382ff0afSmrg#      else
863382ff0afSmrg#        ifdef DL_NOW
864382ff0afSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
865382ff0afSmrg#        else
866382ff0afSmrg#          define LT_DLLAZY_OR_NOW	0
867382ff0afSmrg#        endif
868382ff0afSmrg#      endif
869382ff0afSmrg#    endif
870382ff0afSmrg#  endif
871382ff0afSmrg#endif
872382ff0afSmrg
873382ff0afSmrg#ifdef __cplusplus
874382ff0afSmrgextern "C" void exit (int);
875382ff0afSmrg#endif
876382ff0afSmrg
877382ff0afSmrgvoid fnord() { int i=42;}
878382ff0afSmrgint main ()
879382ff0afSmrg{
880382ff0afSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
881382ff0afSmrg  int status = $lt_dlunknown;
882382ff0afSmrg
883382ff0afSmrg  if (self)
884382ff0afSmrg    {
885382ff0afSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
886382ff0afSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
887382ff0afSmrg      /* dlclose (self); */
888382ff0afSmrg    }
889382ff0afSmrg  else
890382ff0afSmrg    puts (dlerror ());
891382ff0afSmrg
892382ff0afSmrg    exit (status);
893382ff0afSmrg}]
894382ff0afSmrgEOF
895382ff0afSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
896382ff0afSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
897382ff0afSmrg    lt_status=$?
898382ff0afSmrg    case x$lt_status in
899382ff0afSmrg      x$lt_dlno_uscore) $1 ;;
900382ff0afSmrg      x$lt_dlneed_uscore) $2 ;;
901382ff0afSmrg      x$lt_dlunknown|x*) $3 ;;
902382ff0afSmrg    esac
903382ff0afSmrg  else :
904382ff0afSmrg    # compilation failed
905382ff0afSmrg    $3
906382ff0afSmrg  fi
907382ff0afSmrgfi
908382ff0afSmrgrm -fr conftest*
909382ff0afSmrg])# _LT_AC_TRY_DLOPEN_SELF
910382ff0afSmrg
911382ff0afSmrg
912382ff0afSmrg# AC_LIBTOOL_DLOPEN_SELF
913382ff0afSmrg# ----------------------
914382ff0afSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
915382ff0afSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
916382ff0afSmrgif test "x$enable_dlopen" != xyes; then
917382ff0afSmrg  enable_dlopen=unknown
918382ff0afSmrg  enable_dlopen_self=unknown
919382ff0afSmrg  enable_dlopen_self_static=unknown
920382ff0afSmrgelse
921382ff0afSmrg  lt_cv_dlopen=no
922382ff0afSmrg  lt_cv_dlopen_libs=
923382ff0afSmrg
924382ff0afSmrg  case $host_os in
925382ff0afSmrg  beos*)
926382ff0afSmrg    lt_cv_dlopen="load_add_on"
927382ff0afSmrg    lt_cv_dlopen_libs=
928382ff0afSmrg    lt_cv_dlopen_self=yes
929382ff0afSmrg    ;;
930382ff0afSmrg
931382ff0afSmrg  mingw* | pw32*)
932382ff0afSmrg    lt_cv_dlopen="LoadLibrary"
933382ff0afSmrg    lt_cv_dlopen_libs=
934382ff0afSmrg   ;;
935382ff0afSmrg
936382ff0afSmrg  cygwin*)
937382ff0afSmrg    lt_cv_dlopen="dlopen"
938382ff0afSmrg    lt_cv_dlopen_libs=
939382ff0afSmrg   ;;
940382ff0afSmrg
941382ff0afSmrg  darwin*)
942382ff0afSmrg  # if libdl is installed we need to link against it
943382ff0afSmrg    AC_CHECK_LIB([dl], [dlopen],
944382ff0afSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
945382ff0afSmrg    lt_cv_dlopen="dyld"
946382ff0afSmrg    lt_cv_dlopen_libs=
947382ff0afSmrg    lt_cv_dlopen_self=yes
948382ff0afSmrg    ])
949382ff0afSmrg   ;;
950382ff0afSmrg
951382ff0afSmrg  *)
952382ff0afSmrg    AC_CHECK_FUNC([shl_load],
953382ff0afSmrg	  [lt_cv_dlopen="shl_load"],
954382ff0afSmrg      [AC_CHECK_LIB([dld], [shl_load],
955382ff0afSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
956382ff0afSmrg	[AC_CHECK_FUNC([dlopen],
957382ff0afSmrg	      [lt_cv_dlopen="dlopen"],
958382ff0afSmrg	  [AC_CHECK_LIB([dl], [dlopen],
959382ff0afSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
960382ff0afSmrg	    [AC_CHECK_LIB([svld], [dlopen],
961382ff0afSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
962382ff0afSmrg	      [AC_CHECK_LIB([dld], [dld_link],
963382ff0afSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
964382ff0afSmrg	      ])
965382ff0afSmrg	    ])
966382ff0afSmrg	  ])
967382ff0afSmrg	])
968382ff0afSmrg      ])
969382ff0afSmrg    ;;
970382ff0afSmrg  esac
971382ff0afSmrg
972382ff0afSmrg  if test "x$lt_cv_dlopen" != xno; then
973382ff0afSmrg    enable_dlopen=yes
974382ff0afSmrg  else
975382ff0afSmrg    enable_dlopen=no
976382ff0afSmrg  fi
977382ff0afSmrg
978382ff0afSmrg  case $lt_cv_dlopen in
979382ff0afSmrg  dlopen)
980382ff0afSmrg    save_CPPFLAGS="$CPPFLAGS"
981382ff0afSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
982382ff0afSmrg
983382ff0afSmrg    save_LDFLAGS="$LDFLAGS"
984382ff0afSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
985382ff0afSmrg
986382ff0afSmrg    save_LIBS="$LIBS"
987382ff0afSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
988382ff0afSmrg
989382ff0afSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
990382ff0afSmrg	  lt_cv_dlopen_self, [dnl
991382ff0afSmrg	  _LT_AC_TRY_DLOPEN_SELF(
992382ff0afSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
993382ff0afSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
994382ff0afSmrg    ])
995382ff0afSmrg
996382ff0afSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
997382ff0afSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
998382ff0afSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
999382ff0afSmrg    	  lt_cv_dlopen_self_static, [dnl
1000382ff0afSmrg	  _LT_AC_TRY_DLOPEN_SELF(
1001382ff0afSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1002382ff0afSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1003382ff0afSmrg      ])
1004382ff0afSmrg    fi
1005382ff0afSmrg
1006382ff0afSmrg    CPPFLAGS="$save_CPPFLAGS"
1007382ff0afSmrg    LDFLAGS="$save_LDFLAGS"
1008382ff0afSmrg    LIBS="$save_LIBS"
1009382ff0afSmrg    ;;
1010382ff0afSmrg  esac
1011382ff0afSmrg
1012382ff0afSmrg  case $lt_cv_dlopen_self in
1013382ff0afSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1014382ff0afSmrg  *) enable_dlopen_self=unknown ;;
1015382ff0afSmrg  esac
1016382ff0afSmrg
1017382ff0afSmrg  case $lt_cv_dlopen_self_static in
1018382ff0afSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1019382ff0afSmrg  *) enable_dlopen_self_static=unknown ;;
1020382ff0afSmrg  esac
1021382ff0afSmrgfi
1022382ff0afSmrg])# AC_LIBTOOL_DLOPEN_SELF
1023382ff0afSmrg
1024382ff0afSmrg
1025382ff0afSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1026382ff0afSmrg# ---------------------------------
1027382ff0afSmrg# Check to see if options -c and -o are simultaneously supported by compiler
1028382ff0afSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1029382ff0afSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1030382ff0afSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1031382ff0afSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1032382ff0afSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1033382ff0afSmrg   $rm -r conftest 2>/dev/null
1034382ff0afSmrg   mkdir conftest
1035382ff0afSmrg   cd conftest
1036382ff0afSmrg   mkdir out
1037382ff0afSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1038382ff0afSmrg
1039382ff0afSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1040382ff0afSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1041382ff0afSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1042382ff0afSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1043382ff0afSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1044382ff0afSmrg   lt_compile=`echo "$ac_compile" | $SED \
1045382ff0afSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1046382ff0afSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1047382ff0afSmrg   -e 's:$: $lt_compiler_flag:'`
1048382ff0afSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1049382ff0afSmrg   (eval "$lt_compile" 2>out/conftest.err)
1050382ff0afSmrg   ac_status=$?
1051382ff0afSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1052382ff0afSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1053382ff0afSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1054382ff0afSmrg   then
1055382ff0afSmrg     # The compiler can only warn and ignore the option if not recognized
1056382ff0afSmrg     # So say no if there are warnings
1057382ff0afSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1058382ff0afSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1059382ff0afSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1060382ff0afSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1061382ff0afSmrg     fi
1062382ff0afSmrg   fi
1063382ff0afSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1064382ff0afSmrg   $rm conftest*
1065382ff0afSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1066382ff0afSmrg   # template instantiation
1067382ff0afSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1068382ff0afSmrg   $rm out/* && rmdir out
1069382ff0afSmrg   cd ..
1070382ff0afSmrg   rmdir conftest
1071382ff0afSmrg   $rm conftest*
1072382ff0afSmrg])
1073382ff0afSmrg])# AC_LIBTOOL_PROG_CC_C_O
1074382ff0afSmrg
1075382ff0afSmrg
1076382ff0afSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1077382ff0afSmrg# -----------------------------------------
1078382ff0afSmrg# Check to see if we can do hard links to lock some files if needed
1079382ff0afSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1080382ff0afSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
1081382ff0afSmrg
1082382ff0afSmrghard_links="nottested"
1083382ff0afSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1084382ff0afSmrg  # do not overwrite the value of need_locks provided by the user
1085382ff0afSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1086382ff0afSmrg  hard_links=yes
1087382ff0afSmrg  $rm conftest*
1088382ff0afSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1089382ff0afSmrg  touch conftest.a
1090382ff0afSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1091382ff0afSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1092382ff0afSmrg  AC_MSG_RESULT([$hard_links])
1093382ff0afSmrg  if test "$hard_links" = no; then
1094382ff0afSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1095382ff0afSmrg    need_locks=warn
1096382ff0afSmrg  fi
1097382ff0afSmrgelse
1098382ff0afSmrg  need_locks=no
1099382ff0afSmrgfi
1100382ff0afSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1101382ff0afSmrg
1102382ff0afSmrg
1103382ff0afSmrg# AC_LIBTOOL_OBJDIR
1104382ff0afSmrg# -----------------
1105382ff0afSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
1106382ff0afSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1107382ff0afSmrg[rm -f .libs 2>/dev/null
1108382ff0afSmrgmkdir .libs 2>/dev/null
1109382ff0afSmrgif test -d .libs; then
1110382ff0afSmrg  lt_cv_objdir=.libs
1111382ff0afSmrgelse
1112382ff0afSmrg  # MS-DOS does not allow filenames that begin with a dot.
1113382ff0afSmrg  lt_cv_objdir=_libs
1114382ff0afSmrgfi
1115382ff0afSmrgrmdir .libs 2>/dev/null])
1116382ff0afSmrgobjdir=$lt_cv_objdir
1117382ff0afSmrg])# AC_LIBTOOL_OBJDIR
1118382ff0afSmrg
1119382ff0afSmrg
1120382ff0afSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1121382ff0afSmrg# ----------------------------------------------
1122382ff0afSmrg# Check hardcoding attributes.
1123382ff0afSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1124382ff0afSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1125382ff0afSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
1126382ff0afSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1127382ff0afSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1128382ff0afSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1129382ff0afSmrg
1130382ff0afSmrg  # We can hardcode non-existant directories.
1131382ff0afSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1132382ff0afSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1133382ff0afSmrg     # have to relink, otherwise we might link with an installed library
1134382ff0afSmrg     # when we should be linking with a yet-to-be-installed one
1135382ff0afSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1136382ff0afSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1137382ff0afSmrg    # Linking always hardcodes the temporary library directory.
1138382ff0afSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1139382ff0afSmrg  else
1140382ff0afSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1141382ff0afSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1142382ff0afSmrg  fi
1143382ff0afSmrgelse
1144382ff0afSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1145382ff0afSmrg  # directories.
1146382ff0afSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1147382ff0afSmrgfi
1148382ff0afSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1149382ff0afSmrg
1150382ff0afSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1151382ff0afSmrg  # Fast installation is not supported
1152382ff0afSmrg  enable_fast_install=no
1153382ff0afSmrgelif test "$shlibpath_overrides_runpath" = yes ||
1154382ff0afSmrg     test "$enable_shared" = no; then
1155382ff0afSmrg  # Fast installation is not necessary
1156382ff0afSmrg  enable_fast_install=needless
1157382ff0afSmrgfi
1158382ff0afSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1159382ff0afSmrg
1160382ff0afSmrg
1161382ff0afSmrg# AC_LIBTOOL_SYS_LIB_STRIP
1162382ff0afSmrg# ------------------------
1163382ff0afSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1164382ff0afSmrg[striplib=
1165382ff0afSmrgold_striplib=
1166382ff0afSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
1167382ff0afSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1168382ff0afSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1169382ff0afSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1170382ff0afSmrg  AC_MSG_RESULT([yes])
1171382ff0afSmrgelse
1172382ff0afSmrg# FIXME - insert some real tests, host_os isn't really good enough
1173382ff0afSmrg  case $host_os in
1174382ff0afSmrg   darwin*)
1175382ff0afSmrg       if test -n "$STRIP" ; then
1176382ff0afSmrg         striplib="$STRIP -x"
1177382ff0afSmrg         AC_MSG_RESULT([yes])
1178382ff0afSmrg       else
1179382ff0afSmrg  AC_MSG_RESULT([no])
1180382ff0afSmrgfi
1181382ff0afSmrg       ;;
1182382ff0afSmrg   *)
1183382ff0afSmrg  AC_MSG_RESULT([no])
1184382ff0afSmrg    ;;
1185382ff0afSmrg  esac
1186382ff0afSmrgfi
1187382ff0afSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
1188382ff0afSmrg
1189382ff0afSmrg
1190382ff0afSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1191382ff0afSmrg# -----------------------------
1192382ff0afSmrg# PORTME Fill in your ld.so characteristics
1193382ff0afSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1194382ff0afSmrg[AC_MSG_CHECKING([dynamic linker characteristics])
1195382ff0afSmrglibrary_names_spec=
1196382ff0afSmrglibname_spec='lib$name'
1197382ff0afSmrgsoname_spec=
1198382ff0afSmrgshrext_cmds=".so"
1199382ff0afSmrgpostinstall_cmds=
1200382ff0afSmrgpostuninstall_cmds=
1201382ff0afSmrgfinish_cmds=
1202382ff0afSmrgfinish_eval=
1203382ff0afSmrgshlibpath_var=
1204382ff0afSmrgshlibpath_overrides_runpath=unknown
1205382ff0afSmrgversion_type=none
1206382ff0afSmrgdynamic_linker="$host_os ld.so"
1207382ff0afSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1208382ff0afSmrgif test "$GCC" = yes; then
1209382ff0afSmrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210382ff0afSmrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1211382ff0afSmrg    # if the path contains ";" then we assume it to be the separator
1212382ff0afSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
1213382ff0afSmrg    # assumed that no part of a normal pathname contains ";" but that should
1214382ff0afSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
1215382ff0afSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1216382ff0afSmrg  else
1217382ff0afSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1218382ff0afSmrg  fi
1219382ff0afSmrgelse
1220382ff0afSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1221382ff0afSmrgfi
1222382ff0afSmrgneed_lib_prefix=unknown
1223382ff0afSmrghardcode_into_libs=no
1224382ff0afSmrg
1225382ff0afSmrg# when you set need_version to no, make sure it does not cause -set_version
1226382ff0afSmrg# flags to be left without arguments
1227382ff0afSmrgneed_version=unknown
1228382ff0afSmrg
1229382ff0afSmrgcase $host_os in
1230382ff0afSmrgaix3*)
1231382ff0afSmrg  version_type=linux
1232382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1233382ff0afSmrg  shlibpath_var=LIBPATH
1234382ff0afSmrg
1235382ff0afSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
1236382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1237382ff0afSmrg  ;;
1238382ff0afSmrg
1239382ff0afSmrgaix4* | aix5*)
1240382ff0afSmrg  version_type=linux
1241382ff0afSmrg  need_lib_prefix=no
1242382ff0afSmrg  need_version=no
1243382ff0afSmrg  hardcode_into_libs=yes
1244382ff0afSmrg  if test "$host_cpu" = ia64; then
1245382ff0afSmrg    # AIX 5 supports IA64
1246382ff0afSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1247382ff0afSmrg    shlibpath_var=LD_LIBRARY_PATH
1248382ff0afSmrg  else
1249382ff0afSmrg    # With GCC up to 2.95.x, collect2 would create an import file
1250382ff0afSmrg    # for dependence libraries.  The import file would start with
1251382ff0afSmrg    # the line `#! .'.  This would cause the generated library to
1252382ff0afSmrg    # depend on `.', always an invalid library.  This was fixed in
1253382ff0afSmrg    # development snapshots of GCC prior to 3.0.
1254382ff0afSmrg    case $host_os in
1255382ff0afSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
1256382ff0afSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1257382ff0afSmrg	   echo ' yes '
1258382ff0afSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1259382ff0afSmrg	:
1260382ff0afSmrg      else
1261382ff0afSmrg	can_build_shared=no
1262382ff0afSmrg      fi
1263382ff0afSmrg      ;;
1264382ff0afSmrg    esac
1265382ff0afSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1266382ff0afSmrg    # soname into executable. Probably we can add versioning support to
1267382ff0afSmrg    # collect2, so additional links can be useful in future.
1268382ff0afSmrg    if test "$aix_use_runtimelinking" = yes; then
1269382ff0afSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1270382ff0afSmrg      # instead of lib<name>.a to let people know that these are not
1271382ff0afSmrg      # typical AIX shared libraries.
1272382ff0afSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1273382ff0afSmrg    else
1274382ff0afSmrg      # We preserve .a as extension for shared libraries through AIX4.2
1275382ff0afSmrg      # and later when we are not doing run time linking.
1276382ff0afSmrg      library_names_spec='${libname}${release}.a $libname.a'
1277382ff0afSmrg      soname_spec='${libname}${release}${shared_ext}$major'
1278382ff0afSmrg    fi
1279382ff0afSmrg    shlibpath_var=LIBPATH
1280382ff0afSmrg  fi
1281382ff0afSmrg  ;;
1282382ff0afSmrg
1283382ff0afSmrgamigaos*)
1284382ff0afSmrg  library_names_spec='$libname.ixlibrary $libname.a'
1285382ff0afSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1286382ff0afSmrg  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'
1287382ff0afSmrg  ;;
1288382ff0afSmrg
1289382ff0afSmrgbeos*)
1290382ff0afSmrg  library_names_spec='${libname}${shared_ext}'
1291382ff0afSmrg  dynamic_linker="$host_os ld.so"
1292382ff0afSmrg  shlibpath_var=LIBRARY_PATH
1293382ff0afSmrg  ;;
1294382ff0afSmrg
1295382ff0afSmrgbsdi[[45]]*)
1296382ff0afSmrg  version_type=linux
1297382ff0afSmrg  need_version=no
1298382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1299382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1300382ff0afSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1301382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1302382ff0afSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1303382ff0afSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1304382ff0afSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
1305382ff0afSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1306382ff0afSmrg  # libtool to hard-code these into programs
1307382ff0afSmrg  ;;
1308382ff0afSmrg
1309382ff0afSmrgcygwin* | mingw* | pw32*)
1310382ff0afSmrg  version_type=windows
1311382ff0afSmrg  shrext_cmds=".dll"
1312382ff0afSmrg  need_version=no
1313382ff0afSmrg  need_lib_prefix=no
1314382ff0afSmrg
1315382ff0afSmrg  case $GCC,$host_os in
1316382ff0afSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
1317382ff0afSmrg    library_names_spec='$libname.dll.a'
1318382ff0afSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1319382ff0afSmrg    postinstall_cmds='base_file=`basename \${file}`~
1320382ff0afSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1321382ff0afSmrg      dldir=$destdir/`dirname \$dlpath`~
1322382ff0afSmrg      test -d \$dldir || mkdir -p \$dldir~
1323382ff0afSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
1324382ff0afSmrg      chmod a+x \$dldir/$dlname'
1325382ff0afSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1326382ff0afSmrg      dlpath=$dir/\$dldll~
1327382ff0afSmrg       $rm \$dlpath'
1328382ff0afSmrg    shlibpath_overrides_runpath=yes
1329382ff0afSmrg
1330382ff0afSmrg    case $host_os in
1331382ff0afSmrg    cygwin*)
1332382ff0afSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1333382ff0afSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1334382ff0afSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1335382ff0afSmrg      ;;
1336382ff0afSmrg    mingw*)
1337382ff0afSmrg      # MinGW DLLs use traditional 'lib' prefix
1338382ff0afSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1339382ff0afSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1340382ff0afSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1341382ff0afSmrg        # It is most probably a Windows format PATH printed by
1342382ff0afSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1343382ff0afSmrg        # path with ; separators, and with drive letters. We can handle the
1344382ff0afSmrg        # drive letters (cygwin fileutils understands them), so leave them,
1345382ff0afSmrg        # especially as we might pass files found there to a mingw objdump,
1346382ff0afSmrg        # which wouldn't understand a cygwinified path. Ahh.
1347382ff0afSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1348382ff0afSmrg      else
1349382ff0afSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1350382ff0afSmrg      fi
1351382ff0afSmrg      ;;
1352382ff0afSmrg    pw32*)
1353382ff0afSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
1354382ff0afSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1355382ff0afSmrg      ;;
1356382ff0afSmrg    esac
1357382ff0afSmrg    ;;
1358382ff0afSmrg
1359382ff0afSmrg  *)
1360382ff0afSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1361382ff0afSmrg    ;;
1362382ff0afSmrg  esac
1363382ff0afSmrg  dynamic_linker='Win32 ld.exe'
1364382ff0afSmrg  # FIXME: first we should search . and the directory the executable is in
1365382ff0afSmrg  shlibpath_var=PATH
1366382ff0afSmrg  ;;
1367382ff0afSmrg
1368382ff0afSmrgdarwin* | rhapsody*)
1369382ff0afSmrg  dynamic_linker="$host_os dyld"
1370382ff0afSmrg  version_type=darwin
1371382ff0afSmrg  need_lib_prefix=no
1372382ff0afSmrg  need_version=no
1373382ff0afSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1374382ff0afSmrg  soname_spec='${libname}${release}${major}$shared_ext'
1375382ff0afSmrg  shlibpath_overrides_runpath=yes
1376382ff0afSmrg  shlibpath_var=DYLD_LIBRARY_PATH
1377382ff0afSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1378382ff0afSmrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1379382ff0afSmrg  if test "$GCC" = yes; then
1380382ff0afSmrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1381382ff0afSmrg  else
1382382ff0afSmrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1383382ff0afSmrg  fi
1384382ff0afSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1385382ff0afSmrg  ;;
1386382ff0afSmrg
1387382ff0afSmrgdgux*)
1388382ff0afSmrg  version_type=linux
1389382ff0afSmrg  need_lib_prefix=no
1390382ff0afSmrg  need_version=no
1391382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1392382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1393382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1394382ff0afSmrg  ;;
1395382ff0afSmrg
1396382ff0afSmrgfreebsd1*)
1397382ff0afSmrg  dynamic_linker=no
1398382ff0afSmrg  ;;
1399382ff0afSmrg
1400382ff0afSmrgkfreebsd*-gnu)
1401382ff0afSmrg  version_type=linux
1402382ff0afSmrg  need_lib_prefix=no
1403382ff0afSmrg  need_version=no
1404382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1405382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1406382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1407382ff0afSmrg  shlibpath_overrides_runpath=no
1408382ff0afSmrg  hardcode_into_libs=yes
1409382ff0afSmrg  dynamic_linker='GNU ld.so'
1410382ff0afSmrg  ;;
1411382ff0afSmrg
1412382ff0afSmrgfreebsd* | dragonfly*)
1413382ff0afSmrg  # DragonFly does not have aout.  When/if they implement a new
1414382ff0afSmrg  # versioning mechanism, adjust this.
1415382ff0afSmrg  if test -x /usr/bin/objformat; then
1416382ff0afSmrg    objformat=`/usr/bin/objformat`
1417382ff0afSmrg  else
1418382ff0afSmrg    case $host_os in
1419382ff0afSmrg    freebsd[[123]]*) objformat=aout ;;
1420382ff0afSmrg    *) objformat=elf ;;
1421382ff0afSmrg    esac
1422382ff0afSmrg  fi
1423382ff0afSmrg  version_type=freebsd-$objformat
1424382ff0afSmrg  case $version_type in
1425382ff0afSmrg    freebsd-elf*)
1426382ff0afSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1427382ff0afSmrg      need_version=no
1428382ff0afSmrg      need_lib_prefix=no
1429382ff0afSmrg      ;;
1430382ff0afSmrg    freebsd-*)
1431382ff0afSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1432382ff0afSmrg      need_version=yes
1433382ff0afSmrg      ;;
1434382ff0afSmrg  esac
1435382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1436382ff0afSmrg  case $host_os in
1437382ff0afSmrg  freebsd2*)
1438382ff0afSmrg    shlibpath_overrides_runpath=yes
1439382ff0afSmrg    ;;
1440382ff0afSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1441382ff0afSmrg    shlibpath_overrides_runpath=yes
1442382ff0afSmrg    hardcode_into_libs=yes
1443382ff0afSmrg    ;;
1444382ff0afSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1445382ff0afSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1446382ff0afSmrg    shlibpath_overrides_runpath=no
1447382ff0afSmrg    hardcode_into_libs=yes
1448382ff0afSmrg    ;;
1449382ff0afSmrg  freebsd*) # from 4.6 on
1450382ff0afSmrg    shlibpath_overrides_runpath=yes
1451382ff0afSmrg    hardcode_into_libs=yes
1452382ff0afSmrg    ;;
1453382ff0afSmrg  esac
1454382ff0afSmrg  ;;
1455382ff0afSmrg
1456382ff0afSmrggnu*)
1457382ff0afSmrg  version_type=linux
1458382ff0afSmrg  need_lib_prefix=no
1459382ff0afSmrg  need_version=no
1460382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1461382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1462382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1463382ff0afSmrg  hardcode_into_libs=yes
1464382ff0afSmrg  ;;
1465382ff0afSmrg
1466382ff0afSmrghpux9* | hpux10* | hpux11*)
1467382ff0afSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
1468382ff0afSmrg  # link against other versions.
1469382ff0afSmrg  version_type=sunos
1470382ff0afSmrg  need_lib_prefix=no
1471382ff0afSmrg  need_version=no
1472382ff0afSmrg  case $host_cpu in
1473382ff0afSmrg  ia64*)
1474382ff0afSmrg    shrext_cmds='.so'
1475382ff0afSmrg    hardcode_into_libs=yes
1476382ff0afSmrg    dynamic_linker="$host_os dld.so"
1477382ff0afSmrg    shlibpath_var=LD_LIBRARY_PATH
1478382ff0afSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1479382ff0afSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1480382ff0afSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1481382ff0afSmrg    if test "X$HPUX_IA64_MODE" = X32; then
1482382ff0afSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1483382ff0afSmrg    else
1484382ff0afSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1485382ff0afSmrg    fi
1486382ff0afSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1487382ff0afSmrg    ;;
1488382ff0afSmrg   hppa*64*)
1489382ff0afSmrg     shrext_cmds='.sl'
1490382ff0afSmrg     hardcode_into_libs=yes
1491382ff0afSmrg     dynamic_linker="$host_os dld.sl"
1492382ff0afSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1493382ff0afSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1494382ff0afSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1495382ff0afSmrg     soname_spec='${libname}${release}${shared_ext}$major'
1496382ff0afSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1497382ff0afSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1498382ff0afSmrg     ;;
1499382ff0afSmrg   *)
1500382ff0afSmrg    shrext_cmds='.sl'
1501382ff0afSmrg    dynamic_linker="$host_os dld.sl"
1502382ff0afSmrg    shlibpath_var=SHLIB_PATH
1503382ff0afSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1504382ff0afSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1505382ff0afSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1506382ff0afSmrg    ;;
1507382ff0afSmrg  esac
1508382ff0afSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1509382ff0afSmrg  postinstall_cmds='chmod 555 $lib'
1510382ff0afSmrg  ;;
1511382ff0afSmrg
1512382ff0afSmrginterix3*)
1513382ff0afSmrg  version_type=linux
1514382ff0afSmrg  need_lib_prefix=no
1515382ff0afSmrg  need_version=no
1516382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1517382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1518382ff0afSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1519382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1520382ff0afSmrg  shlibpath_overrides_runpath=no
1521382ff0afSmrg  hardcode_into_libs=yes
1522382ff0afSmrg  ;;
1523382ff0afSmrg
1524382ff0afSmrgirix5* | irix6* | nonstopux*)
1525382ff0afSmrg  case $host_os in
1526382ff0afSmrg    nonstopux*) version_type=nonstopux ;;
1527382ff0afSmrg    *)
1528382ff0afSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
1529382ff0afSmrg		version_type=linux
1530382ff0afSmrg	else
1531382ff0afSmrg		version_type=irix
1532382ff0afSmrg	fi ;;
1533382ff0afSmrg  esac
1534382ff0afSmrg  need_lib_prefix=no
1535382ff0afSmrg  need_version=no
1536382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1537382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1538382ff0afSmrg  case $host_os in
1539382ff0afSmrg  irix5* | nonstopux*)
1540382ff0afSmrg    libsuff= shlibsuff=
1541382ff0afSmrg    ;;
1542382ff0afSmrg  *)
1543382ff0afSmrg    case $LD in # libtool.m4 will add one of these switches to LD
1544382ff0afSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1545382ff0afSmrg      libsuff= shlibsuff= libmagic=32-bit;;
1546382ff0afSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1547382ff0afSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
1548382ff0afSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1549382ff0afSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1550382ff0afSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
1551382ff0afSmrg    esac
1552382ff0afSmrg    ;;
1553382ff0afSmrg  esac
1554382ff0afSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1555382ff0afSmrg  shlibpath_overrides_runpath=no
1556382ff0afSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1557382ff0afSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1558382ff0afSmrg  hardcode_into_libs=yes
1559382ff0afSmrg  ;;
1560382ff0afSmrg
1561382ff0afSmrg# No shared lib support for Linux oldld, aout, or coff.
1562382ff0afSmrglinux*oldld* | linux*aout* | linux*coff*)
1563382ff0afSmrg  dynamic_linker=no
1564382ff0afSmrg  ;;
1565382ff0afSmrg
1566382ff0afSmrg# This must be Linux ELF.
1567382ff0afSmrglinux*)
1568382ff0afSmrg  version_type=linux
1569382ff0afSmrg  need_lib_prefix=no
1570382ff0afSmrg  need_version=no
1571382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1572382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1573382ff0afSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1574382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1575382ff0afSmrg  shlibpath_overrides_runpath=no
1576382ff0afSmrg  # This implies no fast_install, which is unacceptable.
1577382ff0afSmrg  # Some rework will be needed to allow for fast_install
1578382ff0afSmrg  # before this can be enabled.
1579382ff0afSmrg  hardcode_into_libs=yes
1580382ff0afSmrg
1581382ff0afSmrg  # find out which ABI we are using
1582382ff0afSmrg  libsuff=
1583382ff0afSmrg  case "$host_cpu" in
1584382ff0afSmrg  x86_64*|s390x*|powerpc64*)
1585382ff0afSmrg    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1586382ff0afSmrg    if AC_TRY_EVAL(ac_compile); then
1587382ff0afSmrg      case `/usr/bin/file conftest.$ac_objext` in
1588382ff0afSmrg      *64-bit*)
1589382ff0afSmrg        libsuff=64
1590382ff0afSmrg        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1591382ff0afSmrg        ;;
1592382ff0afSmrg      esac
1593382ff0afSmrg    fi
1594382ff0afSmrg    rm -rf conftest*
1595382ff0afSmrg    ;;
1596382ff0afSmrg  esac
1597382ff0afSmrg
1598382ff0afSmrg  # Append ld.so.conf contents to the search path
1599382ff0afSmrg  if test -f /etc/ld.so.conf; then
1600382ff0afSmrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1601382ff0afSmrg    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1602382ff0afSmrg  fi
1603382ff0afSmrg
1604382ff0afSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
1605382ff0afSmrg  # powerpc, because MkLinux only supported shared libraries with the
1606382ff0afSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
1607382ff0afSmrg  # most powerpc-linux boxes support dynamic linking these days and
1608382ff0afSmrg  # people can always --disable-shared, the test was removed, and we
1609382ff0afSmrg  # assume the GNU/Linux dynamic linker is in use.
1610382ff0afSmrg  dynamic_linker='GNU/Linux ld.so'
1611382ff0afSmrg  ;;
1612382ff0afSmrg
1613382ff0afSmrgknetbsd*-gnu)
1614382ff0afSmrg  version_type=linux
1615382ff0afSmrg  need_lib_prefix=no
1616382ff0afSmrg  need_version=no
1617382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1618382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1619382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1620382ff0afSmrg  shlibpath_overrides_runpath=no
1621382ff0afSmrg  hardcode_into_libs=yes
1622382ff0afSmrg  dynamic_linker='GNU ld.so'
1623382ff0afSmrg  ;;
1624382ff0afSmrg
1625382ff0afSmrgnetbsd*)
1626382ff0afSmrg  version_type=sunos
1627382ff0afSmrg  need_lib_prefix=no
1628382ff0afSmrg  need_version=no
1629382ff0afSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1630382ff0afSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1631382ff0afSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1632382ff0afSmrg    dynamic_linker='NetBSD (a.out) ld.so'
1633382ff0afSmrg  else
1634382ff0afSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1635382ff0afSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1636382ff0afSmrg    dynamic_linker='NetBSD ld.elf_so'
1637382ff0afSmrg  fi
1638382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1639382ff0afSmrg  shlibpath_overrides_runpath=yes
1640382ff0afSmrg  hardcode_into_libs=yes
1641382ff0afSmrg  ;;
1642382ff0afSmrg
1643382ff0afSmrgnewsos6)
1644382ff0afSmrg  version_type=linux
1645382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1646382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1647382ff0afSmrg  shlibpath_overrides_runpath=yes
1648382ff0afSmrg  ;;
1649382ff0afSmrg
1650382ff0afSmrgnto-qnx*)
1651382ff0afSmrg  version_type=linux
1652382ff0afSmrg  need_lib_prefix=no
1653382ff0afSmrg  need_version=no
1654382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1655382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1656382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1657382ff0afSmrg  shlibpath_overrides_runpath=yes
1658382ff0afSmrg  ;;
1659382ff0afSmrg
1660382ff0afSmrgopenbsd*)
1661382ff0afSmrg  version_type=sunos
1662382ff0afSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
1663382ff0afSmrg  need_lib_prefix=no
1664382ff0afSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1665382ff0afSmrg  case $host_os in
1666382ff0afSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1667382ff0afSmrg    *)                         need_version=no  ;;
1668382ff0afSmrg  esac
1669382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1670382ff0afSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1671382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1672382ff0afSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1673382ff0afSmrg    case $host_os in
1674382ff0afSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
1675382ff0afSmrg	shlibpath_overrides_runpath=no
1676382ff0afSmrg	;;
1677382ff0afSmrg      *)
1678382ff0afSmrg	shlibpath_overrides_runpath=yes
1679382ff0afSmrg	;;
1680382ff0afSmrg      esac
1681382ff0afSmrg  else
1682382ff0afSmrg    shlibpath_overrides_runpath=yes
1683382ff0afSmrg  fi
1684382ff0afSmrg  ;;
1685382ff0afSmrg
1686382ff0afSmrgos2*)
1687382ff0afSmrg  libname_spec='$name'
1688382ff0afSmrg  shrext_cmds=".dll"
1689382ff0afSmrg  need_lib_prefix=no
1690382ff0afSmrg  library_names_spec='$libname${shared_ext} $libname.a'
1691382ff0afSmrg  dynamic_linker='OS/2 ld.exe'
1692382ff0afSmrg  shlibpath_var=LIBPATH
1693382ff0afSmrg  ;;
1694382ff0afSmrg
1695382ff0afSmrgosf3* | osf4* | osf5*)
1696382ff0afSmrg  version_type=osf
1697382ff0afSmrg  need_lib_prefix=no
1698382ff0afSmrg  need_version=no
1699382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1700382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1701382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1702382ff0afSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1703382ff0afSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1704382ff0afSmrg  ;;
1705382ff0afSmrg
1706382ff0afSmrgsolaris*)
1707382ff0afSmrg  version_type=linux
1708382ff0afSmrg  need_lib_prefix=no
1709382ff0afSmrg  need_version=no
1710382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1711382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1712382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1713382ff0afSmrg  shlibpath_overrides_runpath=yes
1714382ff0afSmrg  hardcode_into_libs=yes
1715382ff0afSmrg  # ldd complains unless libraries are executable
1716382ff0afSmrg  postinstall_cmds='chmod +x $lib'
1717382ff0afSmrg  ;;
1718382ff0afSmrg
1719382ff0afSmrgsunos4*)
1720382ff0afSmrg  version_type=sunos
1721382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1722382ff0afSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1723382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1724382ff0afSmrg  shlibpath_overrides_runpath=yes
1725382ff0afSmrg  if test "$with_gnu_ld" = yes; then
1726382ff0afSmrg    need_lib_prefix=no
1727382ff0afSmrg  fi
1728382ff0afSmrg  need_version=yes
1729382ff0afSmrg  ;;
1730382ff0afSmrg
1731382ff0afSmrgsysv4 | sysv4.3*)
1732382ff0afSmrg  version_type=linux
1733382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1734382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1735382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1736382ff0afSmrg  case $host_vendor in
1737382ff0afSmrg    sni)
1738382ff0afSmrg      shlibpath_overrides_runpath=no
1739382ff0afSmrg      need_lib_prefix=no
1740382ff0afSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
1741382ff0afSmrg      runpath_var=LD_RUN_PATH
1742382ff0afSmrg      ;;
1743382ff0afSmrg    siemens)
1744382ff0afSmrg      need_lib_prefix=no
1745382ff0afSmrg      ;;
1746382ff0afSmrg    motorola)
1747382ff0afSmrg      need_lib_prefix=no
1748382ff0afSmrg      need_version=no
1749382ff0afSmrg      shlibpath_overrides_runpath=no
1750382ff0afSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1751382ff0afSmrg      ;;
1752382ff0afSmrg  esac
1753382ff0afSmrg  ;;
1754382ff0afSmrg
1755382ff0afSmrgsysv4*MP*)
1756382ff0afSmrg  if test -d /usr/nec ;then
1757382ff0afSmrg    version_type=linux
1758382ff0afSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1759382ff0afSmrg    soname_spec='$libname${shared_ext}.$major'
1760382ff0afSmrg    shlibpath_var=LD_LIBRARY_PATH
1761382ff0afSmrg  fi
1762382ff0afSmrg  ;;
1763382ff0afSmrg
1764382ff0afSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1765382ff0afSmrg  version_type=freebsd-elf
1766382ff0afSmrg  need_lib_prefix=no
1767382ff0afSmrg  need_version=no
1768382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1769382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1770382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1771382ff0afSmrg  hardcode_into_libs=yes
1772382ff0afSmrg  if test "$with_gnu_ld" = yes; then
1773382ff0afSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1774382ff0afSmrg    shlibpath_overrides_runpath=no
1775382ff0afSmrg  else
1776382ff0afSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1777382ff0afSmrg    shlibpath_overrides_runpath=yes
1778382ff0afSmrg    case $host_os in
1779382ff0afSmrg      sco3.2v5*)
1780382ff0afSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1781382ff0afSmrg	;;
1782382ff0afSmrg    esac
1783382ff0afSmrg  fi
1784382ff0afSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
1785382ff0afSmrg  ;;
1786382ff0afSmrg
1787382ff0afSmrguts4*)
1788382ff0afSmrg  version_type=linux
1789382ff0afSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1790382ff0afSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1791382ff0afSmrg  shlibpath_var=LD_LIBRARY_PATH
1792382ff0afSmrg  ;;
1793382ff0afSmrg
1794382ff0afSmrg*)
1795382ff0afSmrg  dynamic_linker=no
1796382ff0afSmrg  ;;
1797382ff0afSmrgesac
1798382ff0afSmrgAC_MSG_RESULT([$dynamic_linker])
1799382ff0afSmrgtest "$dynamic_linker" = no && can_build_shared=no
1800382ff0afSmrg
1801382ff0afSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1802382ff0afSmrgif test "$GCC" = yes; then
1803382ff0afSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1804382ff0afSmrgfi
1805382ff0afSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1806382ff0afSmrg
1807382ff0afSmrg
1808382ff0afSmrg# _LT_AC_TAGCONFIG
1809382ff0afSmrg# ----------------
1810382ff0afSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
1811382ff0afSmrg[AC_ARG_WITH([tags],
1812382ff0afSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1813382ff0afSmrg        [include additional configurations @<:@automatic@:>@])],
1814382ff0afSmrg    [tagnames="$withval"])
1815382ff0afSmrg
1816382ff0afSmrgif test -f "$ltmain" && test -n "$tagnames"; then
1817382ff0afSmrg  if test ! -f "${ofile}"; then
1818382ff0afSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
1819382ff0afSmrg  fi
1820382ff0afSmrg
1821382ff0afSmrg  if test -z "$LTCC"; then
1822382ff0afSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1823382ff0afSmrg    if test -z "$LTCC"; then
1824382ff0afSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1825382ff0afSmrg    else
1826382ff0afSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1827382ff0afSmrg    fi
1828382ff0afSmrg  fi
1829382ff0afSmrg  if test -z "$LTCFLAGS"; then
1830382ff0afSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1831382ff0afSmrg  fi
1832382ff0afSmrg
1833382ff0afSmrg  # Extract list of available tagged configurations in $ofile.
1834382ff0afSmrg  # Note that this assumes the entire list is on one line.
1835382ff0afSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1836382ff0afSmrg
1837382ff0afSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1838382ff0afSmrg  for tagname in $tagnames; do
1839382ff0afSmrg    IFS="$lt_save_ifs"
1840382ff0afSmrg    # Check whether tagname contains only valid characters
1841382ff0afSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1842382ff0afSmrg    "") ;;
1843382ff0afSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1844382ff0afSmrg	;;
1845382ff0afSmrg    esac
1846382ff0afSmrg
1847382ff0afSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1848382ff0afSmrg    then
1849382ff0afSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1850382ff0afSmrg    fi
1851382ff0afSmrg
1852382ff0afSmrg    # Update the list of available tags.
1853382ff0afSmrg    if test -n "$tagname"; then
1854382ff0afSmrg      echo appending configuration tag \"$tagname\" to $ofile
1855382ff0afSmrg
1856382ff0afSmrg      case $tagname in
1857382ff0afSmrg      CXX)
1858382ff0afSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1859382ff0afSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1860382ff0afSmrg	    (test "X$CXX" != "Xg++"))) ; then
1861382ff0afSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
1862382ff0afSmrg	else
1863382ff0afSmrg	  tagname=""
1864382ff0afSmrg	fi
1865382ff0afSmrg	;;
1866382ff0afSmrg
1867382ff0afSmrg      F77)
1868382ff0afSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
1869382ff0afSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
1870382ff0afSmrg	else
1871382ff0afSmrg	  tagname=""
1872382ff0afSmrg	fi
1873382ff0afSmrg	;;
1874382ff0afSmrg
1875382ff0afSmrg      GCJ)
1876382ff0afSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1877382ff0afSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
1878382ff0afSmrg	else
1879382ff0afSmrg	  tagname=""
1880382ff0afSmrg	fi
1881382ff0afSmrg	;;
1882382ff0afSmrg
1883382ff0afSmrg      RC)
1884382ff0afSmrg	AC_LIBTOOL_LANG_RC_CONFIG
1885382ff0afSmrg	;;
1886382ff0afSmrg
1887382ff0afSmrg      *)
1888382ff0afSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
1889382ff0afSmrg	;;
1890382ff0afSmrg      esac
1891382ff0afSmrg
1892382ff0afSmrg      # Append the new tag name to the list of available tags.
1893382ff0afSmrg      if test -n "$tagname" ; then
1894382ff0afSmrg      available_tags="$available_tags $tagname"
1895382ff0afSmrg    fi
1896382ff0afSmrg    fi
1897382ff0afSmrg  done
1898382ff0afSmrg  IFS="$lt_save_ifs"
1899382ff0afSmrg
1900382ff0afSmrg  # Now substitute the updated list of available tags.
1901382ff0afSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1902382ff0afSmrg    mv "${ofile}T" "$ofile"
1903382ff0afSmrg    chmod +x "$ofile"
1904382ff0afSmrg  else
1905382ff0afSmrg    rm -f "${ofile}T"
1906382ff0afSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1907382ff0afSmrg  fi
1908382ff0afSmrgfi
1909382ff0afSmrg])# _LT_AC_TAGCONFIG
1910382ff0afSmrg
1911382ff0afSmrg
1912382ff0afSmrg# AC_LIBTOOL_DLOPEN
1913382ff0afSmrg# -----------------
1914382ff0afSmrg# enable checks for dlopen support
1915382ff0afSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
1916382ff0afSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1917382ff0afSmrg])# AC_LIBTOOL_DLOPEN
1918382ff0afSmrg
1919382ff0afSmrg
1920382ff0afSmrg# AC_LIBTOOL_WIN32_DLL
1921382ff0afSmrg# --------------------
1922382ff0afSmrg# declare package support for building win32 DLLs
1923382ff0afSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1924382ff0afSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1925382ff0afSmrg])# AC_LIBTOOL_WIN32_DLL
1926382ff0afSmrg
1927382ff0afSmrg
1928382ff0afSmrg# AC_ENABLE_SHARED([DEFAULT])
1929382ff0afSmrg# ---------------------------
1930382ff0afSmrg# implement the --enable-shared flag
1931382ff0afSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1932382ff0afSmrgAC_DEFUN([AC_ENABLE_SHARED],
1933382ff0afSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1934382ff0afSmrgAC_ARG_ENABLE([shared],
1935382ff0afSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1936382ff0afSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1937382ff0afSmrg    [p=${PACKAGE-default}
1938382ff0afSmrg    case $enableval in
1939382ff0afSmrg    yes) enable_shared=yes ;;
1940382ff0afSmrg    no) enable_shared=no ;;
1941382ff0afSmrg    *)
1942382ff0afSmrg      enable_shared=no
1943382ff0afSmrg      # Look at the argument we got.  We use all the common list separators.
1944382ff0afSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1945382ff0afSmrg      for pkg in $enableval; do
1946382ff0afSmrg	IFS="$lt_save_ifs"
1947382ff0afSmrg	if test "X$pkg" = "X$p"; then
1948382ff0afSmrg	  enable_shared=yes
1949382ff0afSmrg	fi
1950382ff0afSmrg      done
1951382ff0afSmrg      IFS="$lt_save_ifs"
1952382ff0afSmrg      ;;
1953382ff0afSmrg    esac],
1954382ff0afSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1955382ff0afSmrg])# AC_ENABLE_SHARED
1956382ff0afSmrg
1957382ff0afSmrg
1958382ff0afSmrg# AC_DISABLE_SHARED
1959382ff0afSmrg# -----------------
1960382ff0afSmrg# set the default shared flag to --disable-shared
1961382ff0afSmrgAC_DEFUN([AC_DISABLE_SHARED],
1962382ff0afSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1963382ff0afSmrgAC_ENABLE_SHARED(no)
1964382ff0afSmrg])# AC_DISABLE_SHARED
1965382ff0afSmrg
1966382ff0afSmrg
1967382ff0afSmrg# AC_ENABLE_STATIC([DEFAULT])
1968382ff0afSmrg# ---------------------------
1969382ff0afSmrg# implement the --enable-static flag
1970382ff0afSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1971382ff0afSmrgAC_DEFUN([AC_ENABLE_STATIC],
1972382ff0afSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1973382ff0afSmrgAC_ARG_ENABLE([static],
1974382ff0afSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1975382ff0afSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1976382ff0afSmrg    [p=${PACKAGE-default}
1977382ff0afSmrg    case $enableval in
1978382ff0afSmrg    yes) enable_static=yes ;;
1979382ff0afSmrg    no) enable_static=no ;;
1980382ff0afSmrg    *)
1981382ff0afSmrg     enable_static=no
1982382ff0afSmrg      # Look at the argument we got.  We use all the common list separators.
1983382ff0afSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1984382ff0afSmrg      for pkg in $enableval; do
1985382ff0afSmrg	IFS="$lt_save_ifs"
1986382ff0afSmrg	if test "X$pkg" = "X$p"; then
1987382ff0afSmrg	  enable_static=yes
1988382ff0afSmrg	fi
1989382ff0afSmrg      done
1990382ff0afSmrg      IFS="$lt_save_ifs"
1991382ff0afSmrg      ;;
1992382ff0afSmrg    esac],
1993382ff0afSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1994382ff0afSmrg])# AC_ENABLE_STATIC
1995382ff0afSmrg
1996382ff0afSmrg
1997382ff0afSmrg# AC_DISABLE_STATIC
1998382ff0afSmrg# -----------------
1999382ff0afSmrg# set the default static flag to --disable-static
2000382ff0afSmrgAC_DEFUN([AC_DISABLE_STATIC],
2001382ff0afSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2002382ff0afSmrgAC_ENABLE_STATIC(no)
2003382ff0afSmrg])# AC_DISABLE_STATIC
2004382ff0afSmrg
2005382ff0afSmrg
2006382ff0afSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
2007382ff0afSmrg# ---------------------------------
2008382ff0afSmrg# implement the --enable-fast-install flag
2009382ff0afSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2010382ff0afSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
2011382ff0afSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2012382ff0afSmrgAC_ARG_ENABLE([fast-install],
2013382ff0afSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2014382ff0afSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2015382ff0afSmrg    [p=${PACKAGE-default}
2016382ff0afSmrg    case $enableval in
2017382ff0afSmrg    yes) enable_fast_install=yes ;;
2018382ff0afSmrg    no) enable_fast_install=no ;;
2019382ff0afSmrg    *)
2020382ff0afSmrg      enable_fast_install=no
2021382ff0afSmrg      # Look at the argument we got.  We use all the common list separators.
2022382ff0afSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2023382ff0afSmrg      for pkg in $enableval; do
2024382ff0afSmrg	IFS="$lt_save_ifs"
2025382ff0afSmrg	if test "X$pkg" = "X$p"; then
2026382ff0afSmrg	  enable_fast_install=yes
2027382ff0afSmrg	fi
2028382ff0afSmrg      done
2029382ff0afSmrg      IFS="$lt_save_ifs"
2030382ff0afSmrg      ;;
2031382ff0afSmrg    esac],
2032382ff0afSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2033382ff0afSmrg])# AC_ENABLE_FAST_INSTALL
2034382ff0afSmrg
2035382ff0afSmrg
2036382ff0afSmrg# AC_DISABLE_FAST_INSTALL
2037382ff0afSmrg# -----------------------
2038382ff0afSmrg# set the default to --disable-fast-install
2039382ff0afSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2040382ff0afSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2041382ff0afSmrgAC_ENABLE_FAST_INSTALL(no)
2042382ff0afSmrg])# AC_DISABLE_FAST_INSTALL
2043382ff0afSmrg
2044382ff0afSmrg
2045382ff0afSmrg# AC_LIBTOOL_PICMODE([MODE])
2046382ff0afSmrg# --------------------------
2047382ff0afSmrg# implement the --with-pic flag
2048382ff0afSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2049382ff0afSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
2050382ff0afSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2051382ff0afSmrgpic_mode=ifelse($#,1,$1,default)
2052382ff0afSmrg])# AC_LIBTOOL_PICMODE
2053382ff0afSmrg
2054382ff0afSmrg
2055382ff0afSmrg# AC_PROG_EGREP
2056382ff0afSmrg# -------------
2057382ff0afSmrg# This is predefined starting with Autoconf 2.54, so this conditional
2058382ff0afSmrg# definition can be removed once we require Autoconf 2.54 or later.
2059382ff0afSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2060382ff0afSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2061382ff0afSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2062382ff0afSmrg    then ac_cv_prog_egrep='grep -E'
2063382ff0afSmrg    else ac_cv_prog_egrep='egrep'
2064382ff0afSmrg    fi])
2065382ff0afSmrg EGREP=$ac_cv_prog_egrep
2066382ff0afSmrg AC_SUBST([EGREP])
2067382ff0afSmrg])])
2068382ff0afSmrg
2069382ff0afSmrg
2070382ff0afSmrg# AC_PATH_TOOL_PREFIX
2071382ff0afSmrg# -------------------
2072382ff0afSmrg# find a file program which can recognise shared library
2073382ff0afSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
2074382ff0afSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2075382ff0afSmrgAC_MSG_CHECKING([for $1])
2076382ff0afSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2077382ff0afSmrg[case $MAGIC_CMD in
2078382ff0afSmrg[[\\/*] |  ?:[\\/]*])
2079382ff0afSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2080382ff0afSmrg  ;;
2081382ff0afSmrg*)
2082382ff0afSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2083382ff0afSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2084382ff0afSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2085382ff0afSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2086382ff0afSmrgdnl not every word.  This closes a longstanding sh security hole.
2087382ff0afSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
2088382ff0afSmrg  for ac_dir in $ac_dummy; do
2089382ff0afSmrg    IFS="$lt_save_ifs"
2090382ff0afSmrg    test -z "$ac_dir" && ac_dir=.
2091382ff0afSmrg    if test -f $ac_dir/$1; then
2092382ff0afSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2093382ff0afSmrg      if test -n "$file_magic_test_file"; then
2094382ff0afSmrg	case $deplibs_check_method in
2095382ff0afSmrg	"file_magic "*)
2096382ff0afSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2097382ff0afSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2098382ff0afSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2099382ff0afSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2100382ff0afSmrg	    :
2101382ff0afSmrg	  else
2102382ff0afSmrg	    cat <<EOF 1>&2
2103382ff0afSmrg
2104382ff0afSmrg*** Warning: the command libtool uses to detect shared libraries,
2105382ff0afSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2106382ff0afSmrg*** The result is that libtool may fail to recognize shared libraries
2107382ff0afSmrg*** as such.  This will affect the creation of libtool libraries that
2108382ff0afSmrg*** depend on shared libraries, but programs linked with such libtool
2109382ff0afSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2110382ff0afSmrg*** may want to report the problem to your system manager and/or to
2111382ff0afSmrg*** bug-libtool@gnu.org
2112382ff0afSmrg
2113382ff0afSmrgEOF
2114382ff0afSmrg	  fi ;;
2115382ff0afSmrg	esac
2116382ff0afSmrg      fi
2117382ff0afSmrg      break
2118382ff0afSmrg    fi
2119382ff0afSmrg  done
2120382ff0afSmrg  IFS="$lt_save_ifs"
2121382ff0afSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2122382ff0afSmrg  ;;
2123382ff0afSmrgesac])
2124382ff0afSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2125382ff0afSmrgif test -n "$MAGIC_CMD"; then
2126382ff0afSmrg  AC_MSG_RESULT($MAGIC_CMD)
2127382ff0afSmrgelse
2128382ff0afSmrg  AC_MSG_RESULT(no)
2129382ff0afSmrgfi
2130382ff0afSmrg])# AC_PATH_TOOL_PREFIX
2131382ff0afSmrg
2132382ff0afSmrg
2133382ff0afSmrg# AC_PATH_MAGIC
2134382ff0afSmrg# -------------
2135382ff0afSmrg# find a file program which can recognise a shared library
2136382ff0afSmrgAC_DEFUN([AC_PATH_MAGIC],
2137382ff0afSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2138382ff0afSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2139382ff0afSmrg  if test -n "$ac_tool_prefix"; then
2140382ff0afSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2141382ff0afSmrg  else
2142382ff0afSmrg    MAGIC_CMD=:
2143382ff0afSmrg  fi
2144382ff0afSmrgfi
2145382ff0afSmrg])# AC_PATH_MAGIC
2146382ff0afSmrg
2147382ff0afSmrg
2148382ff0afSmrg# AC_PROG_LD
2149382ff0afSmrg# ----------
2150382ff0afSmrg# find the pathname to the GNU or non-GNU linker
2151382ff0afSmrgAC_DEFUN([AC_PROG_LD],
2152382ff0afSmrg[AC_ARG_WITH([gnu-ld],
2153382ff0afSmrg    [AC_HELP_STRING([--with-gnu-ld],
2154382ff0afSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2155382ff0afSmrg    [test "$withval" = no || with_gnu_ld=yes],
2156382ff0afSmrg    [with_gnu_ld=no])
2157382ff0afSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
2158382ff0afSmrgAC_REQUIRE([AC_PROG_CC])dnl
2159382ff0afSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2160382ff0afSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2161382ff0afSmrgac_prog=ld
2162382ff0afSmrgif test "$GCC" = yes; then
2163382ff0afSmrg  # Check if gcc -print-prog-name=ld gives a path.
2164382ff0afSmrg  AC_MSG_CHECKING([for ld used by $CC])
2165382ff0afSmrg  case $host in
2166382ff0afSmrg  *-*-mingw*)
2167382ff0afSmrg    # gcc leaves a trailing carriage return which upsets mingw
2168382ff0afSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2169382ff0afSmrg  *)
2170382ff0afSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2171382ff0afSmrg  esac
2172382ff0afSmrg  case $ac_prog in
2173382ff0afSmrg    # Accept absolute paths.
2174382ff0afSmrg    [[\\/]]* | ?:[[\\/]]*)
2175382ff0afSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2176382ff0afSmrg      # Canonicalize the pathname of ld
2177382ff0afSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2178382ff0afSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2179382ff0afSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2180382ff0afSmrg      done
2181382ff0afSmrg      test -z "$LD" && LD="$ac_prog"
2182382ff0afSmrg      ;;
2183382ff0afSmrg  "")
2184382ff0afSmrg    # If it fails, then pretend we aren't using GCC.
2185382ff0afSmrg    ac_prog=ld
2186382ff0afSmrg    ;;
2187382ff0afSmrg  *)
2188382ff0afSmrg    # If it is relative, then search for the first ld in PATH.
2189382ff0afSmrg    with_gnu_ld=unknown
2190382ff0afSmrg    ;;
2191382ff0afSmrg  esac
2192382ff0afSmrgelif test "$with_gnu_ld" = yes; then
2193382ff0afSmrg  AC_MSG_CHECKING([for GNU ld])
2194382ff0afSmrgelse
2195382ff0afSmrg  AC_MSG_CHECKING([for non-GNU ld])
2196382ff0afSmrgfi
2197382ff0afSmrgAC_CACHE_VAL(lt_cv_path_LD,
2198382ff0afSmrg[if test -z "$LD"; then
2199382ff0afSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2200382ff0afSmrg  for ac_dir in $PATH; do
2201382ff0afSmrg    IFS="$lt_save_ifs"
2202382ff0afSmrg    test -z "$ac_dir" && ac_dir=.
2203382ff0afSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2204382ff0afSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2205382ff0afSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2206382ff0afSmrg      # but apparently some variants of GNU ld only accept -v.
2207382ff0afSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2208382ff0afSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2209382ff0afSmrg      *GNU* | *'with BFD'*)
2210382ff0afSmrg	test "$with_gnu_ld" != no && break
2211382ff0afSmrg	;;
2212382ff0afSmrg      *)
2213382ff0afSmrg	test "$with_gnu_ld" != yes && break
2214382ff0afSmrg	;;
2215382ff0afSmrg      esac
2216382ff0afSmrg    fi
2217382ff0afSmrg  done
2218382ff0afSmrg  IFS="$lt_save_ifs"
2219382ff0afSmrgelse
2220382ff0afSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2221382ff0afSmrgfi])
2222382ff0afSmrgLD="$lt_cv_path_LD"
2223382ff0afSmrgif test -n "$LD"; then
2224382ff0afSmrg  AC_MSG_RESULT($LD)
2225382ff0afSmrgelse
2226382ff0afSmrg  AC_MSG_RESULT(no)
2227382ff0afSmrgfi
2228382ff0afSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2229382ff0afSmrgAC_PROG_LD_GNU
2230382ff0afSmrg])# AC_PROG_LD
2231382ff0afSmrg
2232382ff0afSmrg
2233382ff0afSmrg# AC_PROG_LD_GNU
2234382ff0afSmrg# --------------
2235382ff0afSmrgAC_DEFUN([AC_PROG_LD_GNU],
2236382ff0afSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2237382ff0afSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2238382ff0afSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2239382ff0afSmrgcase `$LD -v 2>&1 </dev/null` in
2240382ff0afSmrg*GNU* | *'with BFD'*)
2241382ff0afSmrg  lt_cv_prog_gnu_ld=yes
2242382ff0afSmrg  ;;
2243382ff0afSmrg*)
2244382ff0afSmrg  lt_cv_prog_gnu_ld=no
2245382ff0afSmrg  ;;
2246382ff0afSmrgesac])
2247382ff0afSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2248382ff0afSmrg])# AC_PROG_LD_GNU
2249382ff0afSmrg
2250382ff0afSmrg
2251382ff0afSmrg# AC_PROG_LD_RELOAD_FLAG
2252382ff0afSmrg# ----------------------
2253382ff0afSmrg# find reload flag for linker
2254382ff0afSmrg#   -- PORTME Some linkers may need a different reload flag.
2255382ff0afSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2256382ff0afSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2257382ff0afSmrg  lt_cv_ld_reload_flag,
2258382ff0afSmrg  [lt_cv_ld_reload_flag='-r'])
2259382ff0afSmrgreload_flag=$lt_cv_ld_reload_flag
2260382ff0afSmrgcase $reload_flag in
2261382ff0afSmrg"" | " "*) ;;
2262382ff0afSmrg*) reload_flag=" $reload_flag" ;;
2263382ff0afSmrgesac
2264382ff0afSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2265382ff0afSmrgcase $host_os in
2266382ff0afSmrg  darwin*)
2267382ff0afSmrg    if test "$GCC" = yes; then
2268382ff0afSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2269382ff0afSmrg    else
2270382ff0afSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2271382ff0afSmrg    fi
2272382ff0afSmrg    ;;
2273382ff0afSmrgesac
2274382ff0afSmrg])# AC_PROG_LD_RELOAD_FLAG
2275382ff0afSmrg
2276382ff0afSmrg
2277382ff0afSmrg# AC_DEPLIBS_CHECK_METHOD
2278382ff0afSmrg# -----------------------
2279382ff0afSmrg# how to check for library dependencies
2280382ff0afSmrg#  -- PORTME fill in with the dynamic library characteristics
2281382ff0afSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2282382ff0afSmrg[AC_CACHE_CHECK([how to recognise dependent libraries],
2283382ff0afSmrglt_cv_deplibs_check_method,
2284382ff0afSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2285382ff0afSmrglt_cv_file_magic_test_file=
2286382ff0afSmrglt_cv_deplibs_check_method='unknown'
2287382ff0afSmrg# Need to set the preceding variable on all platforms that support
2288382ff0afSmrg# interlibrary dependencies.
2289382ff0afSmrg# 'none' -- dependencies not supported.
2290382ff0afSmrg# `unknown' -- same as none, but documents that we really don't know.
2291382ff0afSmrg# 'pass_all' -- all dependencies passed with no checks.
2292382ff0afSmrg# 'test_compile' -- check by making test program.
2293382ff0afSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
2294382ff0afSmrg# which responds to the $file_magic_cmd with a given extended regex.
2295382ff0afSmrg# If you have `file' or equivalent on your system and you're not sure
2296382ff0afSmrg# whether `pass_all' will *always* work, you probably want this one.
2297382ff0afSmrg
2298382ff0afSmrgcase $host_os in
2299382ff0afSmrgaix4* | aix5*)
2300382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2301382ff0afSmrg  ;;
2302382ff0afSmrg
2303382ff0afSmrgbeos*)
2304382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2305382ff0afSmrg  ;;
2306382ff0afSmrg
2307382ff0afSmrgbsdi[[45]]*)
2308382ff0afSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2309382ff0afSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
2310382ff0afSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
2311382ff0afSmrg  ;;
2312382ff0afSmrg
2313382ff0afSmrgcygwin*)
2314382ff0afSmrg  # func_win32_libid is a shell function defined in ltmain.sh
2315382ff0afSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2316382ff0afSmrg  lt_cv_file_magic_cmd='func_win32_libid'
2317382ff0afSmrg  ;;
2318382ff0afSmrg
2319382ff0afSmrgmingw* | pw32*)
2320382ff0afSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
2321382ff0afSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2322382ff0afSmrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2323382ff0afSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
2324382ff0afSmrg  ;;
2325382ff0afSmrg
2326382ff0afSmrgdarwin* | rhapsody*)
2327382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2328382ff0afSmrg  ;;
2329382ff0afSmrg
2330382ff0afSmrgfreebsd* | kfreebsd*-gnu | dragonfly*)
2331382ff0afSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2332382ff0afSmrg    case $host_cpu in
2333382ff0afSmrg    i*86 )
2334382ff0afSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
2335382ff0afSmrg      # Let's accept both of them until this is cleared up.
2336382ff0afSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2337382ff0afSmrg      lt_cv_file_magic_cmd=/usr/bin/file
2338382ff0afSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2339382ff0afSmrg      ;;
2340382ff0afSmrg    esac
2341382ff0afSmrg  else
2342382ff0afSmrg    lt_cv_deplibs_check_method=pass_all
2343382ff0afSmrg  fi
2344382ff0afSmrg  ;;
2345382ff0afSmrg
2346382ff0afSmrggnu*)
2347382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2348382ff0afSmrg  ;;
2349382ff0afSmrg
2350382ff0afSmrghpux10.20* | hpux11*)
2351382ff0afSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2352382ff0afSmrg  case $host_cpu in
2353382ff0afSmrg  ia64*)
2354382ff0afSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2355382ff0afSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2356382ff0afSmrg    ;;
2357382ff0afSmrg  hppa*64*)
2358382ff0afSmrg    [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]']
2359382ff0afSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2360382ff0afSmrg    ;;
2361382ff0afSmrg  *)
2362382ff0afSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2363382ff0afSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2364382ff0afSmrg    ;;
2365382ff0afSmrg  esac
2366382ff0afSmrg  ;;
2367382ff0afSmrg
2368382ff0afSmrginterix3*)
2369382ff0afSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2370382ff0afSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2371382ff0afSmrg  ;;
2372382ff0afSmrg
2373382ff0afSmrgirix5* | irix6* | nonstopux*)
2374382ff0afSmrg  case $LD in
2375382ff0afSmrg  *-32|*"-32 ") libmagic=32-bit;;
2376382ff0afSmrg  *-n32|*"-n32 ") libmagic=N32;;
2377382ff0afSmrg  *-64|*"-64 ") libmagic=64-bit;;
2378382ff0afSmrg  *) libmagic=never-match;;
2379382ff0afSmrg  esac
2380382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2381382ff0afSmrg  ;;
2382382ff0afSmrg
2383382ff0afSmrg# This must be Linux ELF.
2384382ff0afSmrglinux*)
2385382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2386382ff0afSmrg  ;;
2387382ff0afSmrg
2388382ff0afSmrgnetbsd*)
2389382ff0afSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2390382ff0afSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2391382ff0afSmrg  else
2392382ff0afSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2393382ff0afSmrg  fi
2394382ff0afSmrg  ;;
2395382ff0afSmrg
2396382ff0afSmrgnewos6*)
2397382ff0afSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2398382ff0afSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2399382ff0afSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2400382ff0afSmrg  ;;
2401382ff0afSmrg
2402382ff0afSmrgnto-qnx*)
2403382ff0afSmrg  lt_cv_deplibs_check_method=unknown
2404382ff0afSmrg  ;;
2405382ff0afSmrg
2406382ff0afSmrgopenbsd*)
2407382ff0afSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2408382ff0afSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2409382ff0afSmrg  else
2410382ff0afSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2411382ff0afSmrg  fi
2412382ff0afSmrg  ;;
2413382ff0afSmrg
2414382ff0afSmrgosf3* | osf4* | osf5*)
2415382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2416382ff0afSmrg  ;;
2417382ff0afSmrg
2418382ff0afSmrgsolaris*)
2419382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2420382ff0afSmrg  ;;
2421382ff0afSmrg
2422382ff0afSmrgsysv4 | sysv4.3*)
2423382ff0afSmrg  case $host_vendor in
2424382ff0afSmrg  motorola)
2425382ff0afSmrg    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]]'
2426382ff0afSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2427382ff0afSmrg    ;;
2428382ff0afSmrg  ncr)
2429382ff0afSmrg    lt_cv_deplibs_check_method=pass_all
2430382ff0afSmrg    ;;
2431382ff0afSmrg  sequent)
2432382ff0afSmrg    lt_cv_file_magic_cmd='/bin/file'
2433382ff0afSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2434382ff0afSmrg    ;;
2435382ff0afSmrg  sni)
2436382ff0afSmrg    lt_cv_file_magic_cmd='/bin/file'
2437382ff0afSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2438382ff0afSmrg    lt_cv_file_magic_test_file=/lib/libc.so
2439382ff0afSmrg    ;;
2440382ff0afSmrg  siemens)
2441382ff0afSmrg    lt_cv_deplibs_check_method=pass_all
2442382ff0afSmrg    ;;
2443382ff0afSmrg  pc)
2444382ff0afSmrg    lt_cv_deplibs_check_method=pass_all
2445382ff0afSmrg    ;;
2446382ff0afSmrg  esac
2447382ff0afSmrg  ;;
2448382ff0afSmrg
2449382ff0afSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2450382ff0afSmrg  lt_cv_deplibs_check_method=pass_all
2451382ff0afSmrg  ;;
2452382ff0afSmrgesac
2453382ff0afSmrg])
2454382ff0afSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
2455382ff0afSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
2456382ff0afSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
2457382ff0afSmrg])# AC_DEPLIBS_CHECK_METHOD
2458382ff0afSmrg
2459382ff0afSmrg
2460382ff0afSmrg# AC_PROG_NM
2461382ff0afSmrg# ----------
2462382ff0afSmrg# find the pathname to a BSD-compatible name lister
2463382ff0afSmrgAC_DEFUN([AC_PROG_NM],
2464382ff0afSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2465382ff0afSmrg[if test -n "$NM"; then
2466382ff0afSmrg  # Let the user override the test.
2467382ff0afSmrg  lt_cv_path_NM="$NM"
2468382ff0afSmrgelse
2469382ff0afSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
2470382ff0afSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
2471382ff0afSmrg    lt_nm_to_check="$lt_nm_to_check nm"
2472382ff0afSmrg  fi
2473382ff0afSmrg  for lt_tmp_nm in $lt_nm_to_check; do
2474382ff0afSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2475382ff0afSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2476382ff0afSmrg      IFS="$lt_save_ifs"
2477382ff0afSmrg      test -z "$ac_dir" && ac_dir=.
2478382ff0afSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
2479382ff0afSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2480382ff0afSmrg	# Check to see if the nm accepts a BSD-compat flag.
2481382ff0afSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2482382ff0afSmrg	#   nm: unknown option "B" ignored
2483382ff0afSmrg	# Tru64's nm complains that /dev/null is an invalid object file
2484382ff0afSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2485382ff0afSmrg	*/dev/null* | *'Invalid file or object type'*)
2486382ff0afSmrg	  lt_cv_path_NM="$tmp_nm -B"
2487382ff0afSmrg	  break
2488382ff0afSmrg	  ;;
2489382ff0afSmrg	*)
2490382ff0afSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2491382ff0afSmrg	  */dev/null*)
2492382ff0afSmrg	    lt_cv_path_NM="$tmp_nm -p"
2493382ff0afSmrg	    break
2494382ff0afSmrg	    ;;
2495382ff0afSmrg	  *)
2496382ff0afSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2497382ff0afSmrg	    continue # so that we can try to find one that supports BSD flags
2498382ff0afSmrg	    ;;
2499382ff0afSmrg	  esac
2500382ff0afSmrg	  ;;
2501382ff0afSmrg	esac
2502382ff0afSmrg      fi
2503382ff0afSmrg    done
2504382ff0afSmrg    IFS="$lt_save_ifs"
2505382ff0afSmrg  done
2506382ff0afSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2507382ff0afSmrgfi])
2508382ff0afSmrgNM="$lt_cv_path_NM"
2509382ff0afSmrg])# AC_PROG_NM
2510382ff0afSmrg
2511382ff0afSmrg
2512382ff0afSmrg# AC_CHECK_LIBM
2513382ff0afSmrg# -------------
2514382ff0afSmrg# check for math library
2515382ff0afSmrgAC_DEFUN([AC_CHECK_LIBM],
2516382ff0afSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2517382ff0afSmrgLIBM=
2518382ff0afSmrgcase $host in
2519382ff0afSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2520382ff0afSmrg  # These system don't have libm, or don't need it
2521382ff0afSmrg  ;;
2522382ff0afSmrg*-ncr-sysv4.3*)
2523382ff0afSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2524382ff0afSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2525382ff0afSmrg  ;;
2526382ff0afSmrg*)
2527382ff0afSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
2528382ff0afSmrg  ;;
2529382ff0afSmrgesac
2530382ff0afSmrg])# AC_CHECK_LIBM
2531382ff0afSmrg
2532382ff0afSmrg
2533382ff0afSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2534382ff0afSmrg# -----------------------------------
2535382ff0afSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
2536382ff0afSmrg# LTDLINCL to the include flags for the libltdl header and adds
2537382ff0afSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
2538382ff0afSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2539382ff0afSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2540382ff0afSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2541382ff0afSmrg# (note the single quotes!).  If your package is not flat and you're not
2542382ff0afSmrg# using automake, define top_builddir and top_srcdir appropriately in
2543382ff0afSmrg# the Makefiles.
2544382ff0afSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2545382ff0afSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2546382ff0afSmrg  case $enable_ltdl_convenience in
2547382ff0afSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2548382ff0afSmrg  "") enable_ltdl_convenience=yes
2549382ff0afSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2550382ff0afSmrg  esac
2551382ff0afSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2552382ff0afSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2553382ff0afSmrg  # For backwards non-gettext consistent compatibility...
2554382ff0afSmrg  INCLTDL="$LTDLINCL"
2555382ff0afSmrg])# AC_LIBLTDL_CONVENIENCE
2556382ff0afSmrg
2557382ff0afSmrg
2558382ff0afSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2559382ff0afSmrg# -----------------------------------
2560382ff0afSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
2561382ff0afSmrg# LTDLINCL to the include flags for the libltdl header and adds
2562382ff0afSmrg# --enable-ltdl-install to the configure arguments.  Note that
2563382ff0afSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2564382ff0afSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
2565382ff0afSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2566382ff0afSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
2567382ff0afSmrg# flat and you're not using automake, define top_builddir and top_srcdir
2568382ff0afSmrg# appropriately in the Makefiles.
2569382ff0afSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2570382ff0afSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2571382ff0afSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2572382ff0afSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
2573382ff0afSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2574382ff0afSmrg  [if test x"$enable_ltdl_install" = xno; then
2575382ff0afSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
2576382ff0afSmrg   else
2577382ff0afSmrg     enable_ltdl_install=yes
2578382ff0afSmrg   fi
2579382ff0afSmrg  ])
2580382ff0afSmrg  if test x"$enable_ltdl_install" = x"yes"; then
2581382ff0afSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2582382ff0afSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2583382ff0afSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2584382ff0afSmrg  else
2585382ff0afSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2586382ff0afSmrg    LIBLTDL="-lltdl"
2587382ff0afSmrg    LTDLINCL=
2588382ff0afSmrg  fi
2589382ff0afSmrg  # For backwards non-gettext consistent compatibility...
2590382ff0afSmrg  INCLTDL="$LTDLINCL"
2591382ff0afSmrg])# AC_LIBLTDL_INSTALLABLE
2592382ff0afSmrg
2593382ff0afSmrg
2594382ff0afSmrg# AC_LIBTOOL_CXX
2595382ff0afSmrg# --------------
2596382ff0afSmrg# enable support for C++ libraries
2597382ff0afSmrgAC_DEFUN([AC_LIBTOOL_CXX],
2598382ff0afSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
2599382ff0afSmrg])# AC_LIBTOOL_CXX
2600382ff0afSmrg
2601382ff0afSmrg
2602382ff0afSmrg# _LT_AC_LANG_CXX
2603382ff0afSmrg# ---------------
2604382ff0afSmrgAC_DEFUN([_LT_AC_LANG_CXX],
2605382ff0afSmrg[AC_REQUIRE([AC_PROG_CXX])
2606382ff0afSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2607382ff0afSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2608382ff0afSmrg])# _LT_AC_LANG_CXX
2609382ff0afSmrg
2610382ff0afSmrg# _LT_AC_PROG_CXXCPP
2611382ff0afSmrg# ------------------
2612382ff0afSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
2613382ff0afSmrg[
2614382ff0afSmrgAC_REQUIRE([AC_PROG_CXX])
2615382ff0afSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2616382ff0afSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2617382ff0afSmrg    (test "X$CXX" != "Xg++"))) ; then
2618382ff0afSmrg  AC_PROG_CXXCPP
2619382ff0afSmrgfi
2620382ff0afSmrg])# _LT_AC_PROG_CXXCPP
2621382ff0afSmrg
2622382ff0afSmrg# AC_LIBTOOL_F77
2623382ff0afSmrg# --------------
2624382ff0afSmrg# enable support for Fortran 77 libraries
2625382ff0afSmrgAC_DEFUN([AC_LIBTOOL_F77],
2626382ff0afSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
2627382ff0afSmrg])# AC_LIBTOOL_F77
2628382ff0afSmrg
2629382ff0afSmrg
2630382ff0afSmrg# _LT_AC_LANG_F77
2631382ff0afSmrg# ---------------
2632382ff0afSmrgAC_DEFUN([_LT_AC_LANG_F77],
2633382ff0afSmrg[AC_REQUIRE([AC_PROG_F77])
2634382ff0afSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2635382ff0afSmrg])# _LT_AC_LANG_F77
2636382ff0afSmrg
2637382ff0afSmrg
2638382ff0afSmrg# AC_LIBTOOL_GCJ
2639382ff0afSmrg# --------------
2640382ff0afSmrg# enable support for GCJ libraries
2641382ff0afSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
2642382ff0afSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
2643382ff0afSmrg])# AC_LIBTOOL_GCJ
2644382ff0afSmrg
2645382ff0afSmrg
2646382ff0afSmrg# _LT_AC_LANG_GCJ
2647382ff0afSmrg# ---------------
2648382ff0afSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
2649382ff0afSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2650382ff0afSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2651382ff0afSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2652382ff0afSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2653382ff0afSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2654382ff0afSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2655382ff0afSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2656382ff0afSmrg])# _LT_AC_LANG_GCJ
2657382ff0afSmrg
2658382ff0afSmrg
2659382ff0afSmrg# AC_LIBTOOL_RC
2660382ff0afSmrg# -------------
2661382ff0afSmrg# enable support for Windows resource files
2662382ff0afSmrgAC_DEFUN([AC_LIBTOOL_RC],
2663382ff0afSmrg[AC_REQUIRE([LT_AC_PROG_RC])
2664382ff0afSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2665382ff0afSmrg])# AC_LIBTOOL_RC
2666382ff0afSmrg
2667382ff0afSmrg
2668382ff0afSmrg# AC_LIBTOOL_LANG_C_CONFIG
2669382ff0afSmrg# ------------------------
2670382ff0afSmrg# Ensure that the configuration vars for the C compiler are
2671382ff0afSmrg# suitably defined.  Those variables are subsequently used by
2672382ff0afSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2673382ff0afSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2674382ff0afSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2675382ff0afSmrg[lt_save_CC="$CC"
2676382ff0afSmrgAC_LANG_PUSH(C)
2677382ff0afSmrg
2678382ff0afSmrg# Source file extension for C test sources.
2679382ff0afSmrgac_ext=c
2680382ff0afSmrg
2681382ff0afSmrg# Object file extension for compiled C test sources.
2682382ff0afSmrgobjext=o
2683382ff0afSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2684382ff0afSmrg
2685382ff0afSmrg# Code to be used in simple compile tests
2686382ff0afSmrglt_simple_compile_test_code="int some_variable = 0;\n"
2687382ff0afSmrg
2688382ff0afSmrg# Code to be used in simple link tests
2689382ff0afSmrglt_simple_link_test_code='int main(){return(0);}\n'
2690382ff0afSmrg
2691382ff0afSmrg_LT_AC_SYS_COMPILER
2692382ff0afSmrg
2693382ff0afSmrg# save warnings/boilerplate of simple test code
2694382ff0afSmrg_LT_COMPILER_BOILERPLATE
2695382ff0afSmrg_LT_LINKER_BOILERPLATE
2696382ff0afSmrg
2697382ff0afSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2698382ff0afSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
2699382ff0afSmrgAC_LIBTOOL_PROG_CC_C_O($1)
2700382ff0afSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2701382ff0afSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
2702382ff0afSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2703382ff0afSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2704382ff0afSmrgAC_LIBTOOL_SYS_LIB_STRIP
2705382ff0afSmrgAC_LIBTOOL_DLOPEN_SELF
2706382ff0afSmrg
2707382ff0afSmrg# Report which library types will actually be built
2708382ff0afSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
2709382ff0afSmrgAC_MSG_RESULT([$can_build_shared])
2710382ff0afSmrg
2711382ff0afSmrgAC_MSG_CHECKING([whether to build shared libraries])
2712382ff0afSmrgtest "$can_build_shared" = "no" && enable_shared=no
2713382ff0afSmrg
2714382ff0afSmrg# On AIX, shared libraries and static libraries use the same namespace, and
2715382ff0afSmrg# are all built from PIC.
2716382ff0afSmrgcase $host_os in
2717382ff0afSmrgaix3*)
2718382ff0afSmrg  test "$enable_shared" = yes && enable_static=no
2719382ff0afSmrg  if test -n "$RANLIB"; then
2720382ff0afSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2721382ff0afSmrg    postinstall_cmds='$RANLIB $lib'
2722382ff0afSmrg  fi
2723382ff0afSmrg  ;;
2724382ff0afSmrg
2725382ff0afSmrgaix4* | aix5*)
2726382ff0afSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2727382ff0afSmrg    test "$enable_shared" = yes && enable_static=no
2728382ff0afSmrg  fi
2729382ff0afSmrg    ;;
2730382ff0afSmrgesac
2731382ff0afSmrgAC_MSG_RESULT([$enable_shared])
2732382ff0afSmrg
2733382ff0afSmrgAC_MSG_CHECKING([whether to build static libraries])
2734382ff0afSmrg# Make sure either enable_shared or enable_static is yes.
2735382ff0afSmrgtest "$enable_shared" = yes || enable_static=yes
2736382ff0afSmrgAC_MSG_RESULT([$enable_static])
2737382ff0afSmrg
2738382ff0afSmrgAC_LIBTOOL_CONFIG($1)
2739382ff0afSmrg
2740382ff0afSmrgAC_LANG_POP
2741382ff0afSmrgCC="$lt_save_CC"
2742382ff0afSmrg])# AC_LIBTOOL_LANG_C_CONFIG
2743382ff0afSmrg
2744382ff0afSmrg
2745382ff0afSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
2746382ff0afSmrg# --------------------------
2747382ff0afSmrg# Ensure that the configuration vars for the C compiler are
2748382ff0afSmrg# suitably defined.  Those variables are subsequently used by
2749382ff0afSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2750382ff0afSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2751382ff0afSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2752382ff0afSmrg[AC_LANG_PUSH(C++)
2753382ff0afSmrgAC_REQUIRE([AC_PROG_CXX])
2754382ff0afSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2755382ff0afSmrg
2756382ff0afSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2757382ff0afSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2758382ff0afSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
2759382ff0afSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2760382ff0afSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2761382ff0afSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
2762382ff0afSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2763382ff0afSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2764382ff0afSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2765382ff0afSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2766382ff0afSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2767382ff0afSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2768382ff0afSmrg_LT_AC_TAGVAR(module_cmds, $1)=
2769382ff0afSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2770382ff0afSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2771382ff0afSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2772382ff0afSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
2773382ff0afSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2774382ff0afSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2775382ff0afSmrg
2776382ff0afSmrg# Dependencies to place before and after the object being linked:
2777382ff0afSmrg_LT_AC_TAGVAR(predep_objects, $1)=
2778382ff0afSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
2779382ff0afSmrg_LT_AC_TAGVAR(predeps, $1)=
2780382ff0afSmrg_LT_AC_TAGVAR(postdeps, $1)=
2781382ff0afSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2782382ff0afSmrg
2783382ff0afSmrg# Source file extension for C++ test sources.
2784382ff0afSmrgac_ext=cpp
2785382ff0afSmrg
2786382ff0afSmrg# Object file extension for compiled C++ test sources.
2787382ff0afSmrgobjext=o
2788382ff0afSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2789382ff0afSmrg
2790382ff0afSmrg# Code to be used in simple compile tests
2791382ff0afSmrglt_simple_compile_test_code="int some_variable = 0;\n"
2792382ff0afSmrg
2793382ff0afSmrg# Code to be used in simple link tests
2794382ff0afSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2795382ff0afSmrg
2796382ff0afSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2797382ff0afSmrg_LT_AC_SYS_COMPILER
2798382ff0afSmrg
2799382ff0afSmrg# save warnings/boilerplate of simple test code
2800382ff0afSmrg_LT_COMPILER_BOILERPLATE
2801382ff0afSmrg_LT_LINKER_BOILERPLATE
2802382ff0afSmrg
2803382ff0afSmrg# Allow CC to be a program name with arguments.
2804382ff0afSmrglt_save_CC=$CC
2805382ff0afSmrglt_save_LD=$LD
2806382ff0afSmrglt_save_GCC=$GCC
2807382ff0afSmrgGCC=$GXX
2808382ff0afSmrglt_save_with_gnu_ld=$with_gnu_ld
2809382ff0afSmrglt_save_path_LD=$lt_cv_path_LD
2810382ff0afSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2811382ff0afSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2812382ff0afSmrgelse
2813382ff0afSmrg  $as_unset lt_cv_prog_gnu_ld
2814382ff0afSmrgfi
2815382ff0afSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
2816382ff0afSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
2817382ff0afSmrgelse
2818382ff0afSmrg  $as_unset lt_cv_path_LD
2819382ff0afSmrgfi
2820382ff0afSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
2821382ff0afSmrgCC=${CXX-"c++"}
2822382ff0afSmrgcompiler=$CC
2823382ff0afSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
2824382ff0afSmrg_LT_CC_BASENAME([$compiler])
2825382ff0afSmrg
2826382ff0afSmrg# We don't want -fno-exception wen compiling C++ code, so set the
2827382ff0afSmrg# no_builtin_flag separately
2828382ff0afSmrgif test "$GXX" = yes; then
2829382ff0afSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2830382ff0afSmrgelse
2831382ff0afSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2832382ff0afSmrgfi
2833382ff0afSmrg
2834382ff0afSmrgif test "$GXX" = yes; then
2835382ff0afSmrg  # Set up default GNU C++ configuration
2836382ff0afSmrg
2837382ff0afSmrg  AC_PROG_LD
2838382ff0afSmrg
2839382ff0afSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2840382ff0afSmrg  # archiving commands below assume that GNU ld is being used.
2841382ff0afSmrg  if test "$with_gnu_ld" = yes; then
2842382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2843382ff0afSmrg    _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'
2844382ff0afSmrg
2845382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2846382ff0afSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2847382ff0afSmrg
2848382ff0afSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
2849382ff0afSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2850382ff0afSmrg    #     investigate it a little bit more. (MM)
2851382ff0afSmrg    wlarc='${wl}'
2852382ff0afSmrg
2853382ff0afSmrg    # ancient GNU ld didn't support --whole-archive et. al.
2854382ff0afSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2855382ff0afSmrg	grep 'no-whole-archive' > /dev/null; then
2856382ff0afSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2857382ff0afSmrg    else
2858382ff0afSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2859382ff0afSmrg    fi
2860382ff0afSmrg  else
2861382ff0afSmrg    with_gnu_ld=no
2862382ff0afSmrg    wlarc=
2863382ff0afSmrg
2864382ff0afSmrg    # A generic and very simple default shared library creation
2865382ff0afSmrg    # command for GNU C++ for the case where it uses the native
2866382ff0afSmrg    # linker, instead of GNU ld.  If possible, this setting should
2867382ff0afSmrg    # overridden to take advantage of the native linker features on
2868382ff0afSmrg    # the platform it is being used on.
2869382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2870382ff0afSmrg  fi
2871382ff0afSmrg
2872382ff0afSmrg  # Commands to make compiler produce verbose output that lists
2873382ff0afSmrg  # what "hidden" libraries, object files and flags are used when
2874382ff0afSmrg  # linking a shared library.
2875382ff0afSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2876382ff0afSmrg
2877382ff0afSmrgelse
2878382ff0afSmrg  GXX=no
2879382ff0afSmrg  with_gnu_ld=no
2880382ff0afSmrg  wlarc=
2881382ff0afSmrgfi
2882382ff0afSmrg
2883382ff0afSmrg# PORTME: fill in a description of your system's C++ link characteristics
2884382ff0afSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2885382ff0afSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2886382ff0afSmrgcase $host_os in
2887382ff0afSmrg  aix3*)
2888382ff0afSmrg    # FIXME: insert proper C++ library support
2889382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2890382ff0afSmrg    ;;
2891382ff0afSmrg  aix4* | aix5*)
2892382ff0afSmrg    if test "$host_cpu" = ia64; then
2893382ff0afSmrg      # On IA64, the linker does run time linking by default, so we don't
2894382ff0afSmrg      # have to do anything special.
2895382ff0afSmrg      aix_use_runtimelinking=no
2896382ff0afSmrg      exp_sym_flag='-Bexport'
2897382ff0afSmrg      no_entry_flag=""
2898382ff0afSmrg    else
2899382ff0afSmrg      aix_use_runtimelinking=no
2900382ff0afSmrg
2901382ff0afSmrg      # Test if we are trying to use run time linking or normal
2902382ff0afSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2903382ff0afSmrg      # need to do runtime linking.
2904382ff0afSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2905382ff0afSmrg	for ld_flag in $LDFLAGS; do
2906382ff0afSmrg	  case $ld_flag in
2907382ff0afSmrg	  *-brtl*)
2908382ff0afSmrg	    aix_use_runtimelinking=yes
2909382ff0afSmrg	    break
2910382ff0afSmrg	    ;;
2911382ff0afSmrg	  esac
2912382ff0afSmrg	done
2913382ff0afSmrg	;;
2914382ff0afSmrg      esac
2915382ff0afSmrg
2916382ff0afSmrg      exp_sym_flag='-bexport'
2917382ff0afSmrg      no_entry_flag='-bnoentry'
2918382ff0afSmrg    fi
2919382ff0afSmrg
2920382ff0afSmrg    # When large executables or shared objects are built, AIX ld can
2921382ff0afSmrg    # have problems creating the table of contents.  If linking a library
2922382ff0afSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
2923382ff0afSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2924382ff0afSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2925382ff0afSmrg
2926382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
2927382ff0afSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2928382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2929382ff0afSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2930382ff0afSmrg
2931382ff0afSmrg    if test "$GXX" = yes; then
2932382ff0afSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2933382ff0afSmrg      # We only want to do this on AIX 4.2 and lower, the check
2934382ff0afSmrg      # below for broken collect2 doesn't work under 4.3+
2935382ff0afSmrg	collect2name=`${CC} -print-prog-name=collect2`
2936382ff0afSmrg	if test -f "$collect2name" && \
2937382ff0afSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2938382ff0afSmrg	then
2939382ff0afSmrg	  # We have reworked collect2
2940382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2941382ff0afSmrg	else
2942382ff0afSmrg	  # We have old collect2
2943382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2944382ff0afSmrg	  # It fails to find uninstalled libraries when the uninstalled
2945382ff0afSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
2946382ff0afSmrg	  # to unsupported forces relinking
2947382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2948382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2949382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2950382ff0afSmrg	fi
2951382ff0afSmrg	;;
2952382ff0afSmrg      esac
2953382ff0afSmrg      shared_flag='-shared'
2954382ff0afSmrg      if test "$aix_use_runtimelinking" = yes; then
2955382ff0afSmrg	shared_flag="$shared_flag "'${wl}-G'
2956382ff0afSmrg      fi
2957382ff0afSmrg    else
2958382ff0afSmrg      # not using gcc
2959382ff0afSmrg      if test "$host_cpu" = ia64; then
2960382ff0afSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2961382ff0afSmrg	# chokes on -Wl,-G. The following line is correct:
2962382ff0afSmrg	shared_flag='-G'
2963382ff0afSmrg      else
2964382ff0afSmrg	if test "$aix_use_runtimelinking" = yes; then
2965382ff0afSmrg	  shared_flag='${wl}-G'
2966382ff0afSmrg	else
2967382ff0afSmrg	  shared_flag='${wl}-bM:SRE'
2968382ff0afSmrg	fi
2969382ff0afSmrg      fi
2970382ff0afSmrg    fi
2971382ff0afSmrg
2972382ff0afSmrg    # It seems that -bexpall does not export symbols beginning with
2973382ff0afSmrg    # underscore (_), so it is better to generate a list of symbols to export.
2974382ff0afSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2975382ff0afSmrg    if test "$aix_use_runtimelinking" = yes; then
2976382ff0afSmrg      # Warning - without using the other runtime loading flags (-brtl),
2977382ff0afSmrg      # -berok will link without error, but may produce a broken library.
2978382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2979382ff0afSmrg      # Determine the default libpath from the value encoded in an empty executable.
2980382ff0afSmrg      _LT_AC_SYS_LIBPATH_AIX
2981382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2982382ff0afSmrg
2983382ff0afSmrg      _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"
2984382ff0afSmrg     else
2985382ff0afSmrg      if test "$host_cpu" = ia64; then
2986382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2987382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2988382ff0afSmrg	_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"
2989382ff0afSmrg      else
2990382ff0afSmrg	# Determine the default libpath from the value encoded in an empty executable.
2991382ff0afSmrg	_LT_AC_SYS_LIBPATH_AIX
2992382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2993382ff0afSmrg	# Warning - without using the other run time loading flags,
2994382ff0afSmrg	# -berok will link without error, but may produce a broken library.
2995382ff0afSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2996382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2997382ff0afSmrg	# Exported symbols can be pulled into shared objects from archives
2998382ff0afSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2999382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3000382ff0afSmrg	# This is similar to how AIX traditionally builds its shared libraries.
3001382ff0afSmrg	_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'
3002382ff0afSmrg      fi
3003382ff0afSmrg    fi
3004382ff0afSmrg    ;;
3005382ff0afSmrg
3006382ff0afSmrg  beos*)
3007382ff0afSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3008382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3009382ff0afSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3010382ff0afSmrg      # support --undefined.  This deserves some investigation.  FIXME
3011382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3012382ff0afSmrg    else
3013382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3014382ff0afSmrg    fi
3015382ff0afSmrg    ;;
3016382ff0afSmrg
3017382ff0afSmrg  chorus*)
3018382ff0afSmrg    case $cc_basename in
3019382ff0afSmrg      *)
3020382ff0afSmrg	# FIXME: insert proper C++ library support
3021382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3022382ff0afSmrg	;;
3023382ff0afSmrg    esac
3024382ff0afSmrg    ;;
3025382ff0afSmrg
3026382ff0afSmrg  cygwin* | mingw* | pw32*)
3027382ff0afSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3028382ff0afSmrg    # as there is no search path for DLLs.
3029382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3030382ff0afSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3031382ff0afSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3032382ff0afSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3033382ff0afSmrg
3034382ff0afSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3035382ff0afSmrg      _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'
3036382ff0afSmrg      # If the export-symbols file already is a .def file (1st line
3037382ff0afSmrg      # is EXPORTS), use it as is; otherwise, prepend...
3038382ff0afSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3039382ff0afSmrg	cp $export_symbols $output_objdir/$soname.def;
3040382ff0afSmrg      else
3041382ff0afSmrg	echo EXPORTS > $output_objdir/$soname.def;
3042382ff0afSmrg	cat $export_symbols >> $output_objdir/$soname.def;
3043382ff0afSmrg      fi~
3044382ff0afSmrg      $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'
3045382ff0afSmrg    else
3046382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3047382ff0afSmrg    fi
3048382ff0afSmrg  ;;
3049382ff0afSmrg      darwin* | rhapsody*)
3050382ff0afSmrg        case $host_os in
3051382ff0afSmrg        rhapsody* | darwin1.[[012]])
3052382ff0afSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3053382ff0afSmrg         ;;
3054382ff0afSmrg       *) # Darwin 1.3 on
3055382ff0afSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3056382ff0afSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3057382ff0afSmrg         else
3058382ff0afSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
3059382ff0afSmrg             10.[[012]])
3060382ff0afSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3061382ff0afSmrg               ;;
3062382ff0afSmrg             10.*)
3063382ff0afSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3064382ff0afSmrg               ;;
3065382ff0afSmrg           esac
3066382ff0afSmrg         fi
3067382ff0afSmrg         ;;
3068382ff0afSmrg        esac
3069382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3070382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3071382ff0afSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3072382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3073382ff0afSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3074382ff0afSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3075382ff0afSmrg
3076382ff0afSmrg    if test "$GXX" = yes ; then
3077382ff0afSmrg      lt_int_apple_cc_single_mod=no
3078382ff0afSmrg      output_verbose_link_cmd='echo'
3079382ff0afSmrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3080382ff0afSmrg       lt_int_apple_cc_single_mod=yes
3081382ff0afSmrg      fi
3082382ff0afSmrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3083382ff0afSmrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3084382ff0afSmrg      else
3085382ff0afSmrg          _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'
3086382ff0afSmrg        fi
3087382ff0afSmrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3088382ff0afSmrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3089382ff0afSmrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3090382ff0afSmrg            _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}'
3091382ff0afSmrg          else
3092382ff0afSmrg            _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}'
3093382ff0afSmrg          fi
3094382ff0afSmrg            _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}'
3095382ff0afSmrg      else
3096382ff0afSmrg      case $cc_basename in
3097382ff0afSmrg        xlc*)
3098382ff0afSmrg         output_verbose_link_cmd='echo'
3099382ff0afSmrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3100382ff0afSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3101382ff0afSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3102382ff0afSmrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3103382ff0afSmrg          _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}'
3104382ff0afSmrg          ;;
3105382ff0afSmrg       *)
3106382ff0afSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3107382ff0afSmrg          ;;
3108382ff0afSmrg      esac
3109382ff0afSmrg      fi
3110382ff0afSmrg        ;;
3111382ff0afSmrg
3112382ff0afSmrg  dgux*)
3113382ff0afSmrg    case $cc_basename in
3114382ff0afSmrg      ec++*)
3115382ff0afSmrg	# FIXME: insert proper C++ library support
3116382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3117382ff0afSmrg	;;
3118382ff0afSmrg      ghcx*)
3119382ff0afSmrg	# Green Hills C++ Compiler
3120382ff0afSmrg	# FIXME: insert proper C++ library support
3121382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3122382ff0afSmrg	;;
3123382ff0afSmrg      *)
3124382ff0afSmrg	# FIXME: insert proper C++ library support
3125382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3126382ff0afSmrg	;;
3127382ff0afSmrg    esac
3128382ff0afSmrg    ;;
3129382ff0afSmrg  freebsd[[12]]*)
3130382ff0afSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
3131382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3132382ff0afSmrg    ;;
3133382ff0afSmrg  freebsd-elf*)
3134382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3135382ff0afSmrg    ;;
3136382ff0afSmrg  freebsd* | kfreebsd*-gnu | dragonfly*)
3137382ff0afSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3138382ff0afSmrg    # conventions
3139382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3140382ff0afSmrg    ;;
3141382ff0afSmrg  gnu*)
3142382ff0afSmrg    ;;
3143382ff0afSmrg  hpux9*)
3144382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3145382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3146382ff0afSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3147382ff0afSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3148382ff0afSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3149382ff0afSmrg				# but as the default
3150382ff0afSmrg				# location of the library.
3151382ff0afSmrg
3152382ff0afSmrg    case $cc_basename in
3153382ff0afSmrg    CC*)
3154382ff0afSmrg      # FIXME: insert proper C++ library support
3155382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3156382ff0afSmrg      ;;
3157382ff0afSmrg    aCC*)
3158382ff0afSmrg      _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'
3159382ff0afSmrg      # Commands to make compiler produce verbose output that lists
3160382ff0afSmrg      # what "hidden" libraries, object files and flags are used when
3161382ff0afSmrg      # linking a shared library.
3162382ff0afSmrg      #
3163382ff0afSmrg      # There doesn't appear to be a way to prevent this compiler from
3164382ff0afSmrg      # explicitly linking system object files so we need to strip them
3165382ff0afSmrg      # from the output so that they don't get included in the library
3166382ff0afSmrg      # dependencies.
3167382ff0afSmrg      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'
3168382ff0afSmrg      ;;
3169382ff0afSmrg    *)
3170382ff0afSmrg      if test "$GXX" = yes; then
3171382ff0afSmrg        _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'
3172382ff0afSmrg      else
3173382ff0afSmrg        # FIXME: insert proper C++ library support
3174382ff0afSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3175382ff0afSmrg      fi
3176382ff0afSmrg      ;;
3177382ff0afSmrg    esac
3178382ff0afSmrg    ;;
3179382ff0afSmrg  hpux10*|hpux11*)
3180382ff0afSmrg    if test $with_gnu_ld = no; then
3181382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3182382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3183382ff0afSmrg
3184382ff0afSmrg      case $host_cpu in
3185382ff0afSmrg      hppa*64*|ia64*)
3186382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3187382ff0afSmrg        ;;
3188382ff0afSmrg      *)
3189382ff0afSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190382ff0afSmrg        ;;
3191382ff0afSmrg      esac
3192382ff0afSmrg    fi
3193382ff0afSmrg    case $host_cpu in
3194382ff0afSmrg    hppa*64*|ia64*)
3195382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3196382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3197382ff0afSmrg      ;;
3198382ff0afSmrg    *)
3199382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3200382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3201382ff0afSmrg					      # but as the default
3202382ff0afSmrg					      # location of the library.
3203382ff0afSmrg      ;;
3204382ff0afSmrg    esac
3205382ff0afSmrg
3206382ff0afSmrg    case $cc_basename in
3207382ff0afSmrg      CC*)
3208382ff0afSmrg	# FIXME: insert proper C++ library support
3209382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3210382ff0afSmrg	;;
3211382ff0afSmrg      aCC*)
3212382ff0afSmrg	case $host_cpu in
3213382ff0afSmrg	hppa*64*)
3214382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3215382ff0afSmrg	  ;;
3216382ff0afSmrg	ia64*)
3217382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3218382ff0afSmrg	  ;;
3219382ff0afSmrg	*)
3220382ff0afSmrg	  _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'
3221382ff0afSmrg	  ;;
3222382ff0afSmrg	esac
3223382ff0afSmrg	# Commands to make compiler produce verbose output that lists
3224382ff0afSmrg	# what "hidden" libraries, object files and flags are used when
3225382ff0afSmrg	# linking a shared library.
3226382ff0afSmrg	#
3227382ff0afSmrg	# There doesn't appear to be a way to prevent this compiler from
3228382ff0afSmrg	# explicitly linking system object files so we need to strip them
3229382ff0afSmrg	# from the output so that they don't get included in the library
3230382ff0afSmrg	# dependencies.
3231382ff0afSmrg	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'
3232382ff0afSmrg	;;
3233382ff0afSmrg      *)
3234382ff0afSmrg	if test "$GXX" = yes; then
3235382ff0afSmrg	  if test $with_gnu_ld = no; then
3236382ff0afSmrg	    case $host_cpu in
3237382ff0afSmrg	    hppa*64*)
3238382ff0afSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3239382ff0afSmrg	      ;;
3240382ff0afSmrg	    ia64*)
3241382ff0afSmrg	      _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'
3242382ff0afSmrg	      ;;
3243382ff0afSmrg	    *)
3244382ff0afSmrg	      _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'
3245382ff0afSmrg	      ;;
3246382ff0afSmrg	    esac
3247382ff0afSmrg	  fi
3248382ff0afSmrg	else
3249382ff0afSmrg	  # FIXME: insert proper C++ library support
3250382ff0afSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3251382ff0afSmrg	fi
3252382ff0afSmrg	;;
3253382ff0afSmrg    esac
3254382ff0afSmrg    ;;
3255382ff0afSmrg  interix3*)
3256382ff0afSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3257382ff0afSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3258382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3259382ff0afSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3260382ff0afSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3261382ff0afSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
3262382ff0afSmrg    # default) and relocated if they conflict, which is a slow very memory
3263382ff0afSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
3264382ff0afSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3265382ff0afSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3266382ff0afSmrg    _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'
3267382ff0afSmrg    _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'
3268382ff0afSmrg    ;;
3269382ff0afSmrg  irix5* | irix6*)
3270382ff0afSmrg    case $cc_basename in
3271382ff0afSmrg      CC*)
3272382ff0afSmrg	# SGI C++
3273382ff0afSmrg	_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'
3274382ff0afSmrg
3275382ff0afSmrg	# Archives containing C++ object files must be created using
3276382ff0afSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3277382ff0afSmrg	# necessary to make sure instantiated templates are included
3278382ff0afSmrg	# in the archive.
3279382ff0afSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3280382ff0afSmrg	;;
3281382ff0afSmrg      *)
3282382ff0afSmrg	if test "$GXX" = yes; then
3283382ff0afSmrg	  if test "$with_gnu_ld" = no; then
3284382ff0afSmrg	    _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'
3285382ff0afSmrg	  else
3286382ff0afSmrg	    _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'
3287382ff0afSmrg	  fi
3288382ff0afSmrg	fi
3289382ff0afSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3290382ff0afSmrg	;;
3291382ff0afSmrg    esac
3292382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3293382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3294382ff0afSmrg    ;;
3295382ff0afSmrg  linux*)
3296382ff0afSmrg    case $cc_basename in
3297382ff0afSmrg      KCC*)
3298382ff0afSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3299382ff0afSmrg
3300382ff0afSmrg	# KCC will only create a shared library if the output file
3301382ff0afSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3302382ff0afSmrg	# to its proper name (with version) after linking.
3303382ff0afSmrg	_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'
3304382ff0afSmrg	_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'
3305382ff0afSmrg	# Commands to make compiler produce verbose output that lists
3306382ff0afSmrg	# what "hidden" libraries, object files and flags are used when
3307382ff0afSmrg	# linking a shared library.
3308382ff0afSmrg	#
3309382ff0afSmrg	# There doesn't appear to be a way to prevent this compiler from
3310382ff0afSmrg	# explicitly linking system object files so we need to strip them
3311382ff0afSmrg	# from the output so that they don't get included in the library
3312382ff0afSmrg	# dependencies.
3313382ff0afSmrg	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'
3314382ff0afSmrg
3315382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3316382ff0afSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3317382ff0afSmrg
3318382ff0afSmrg	# Archives containing C++ object files must be created using
3319382ff0afSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3320382ff0afSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3321382ff0afSmrg	;;
3322382ff0afSmrg      icpc*)
3323382ff0afSmrg	# Intel C++
3324382ff0afSmrg	with_gnu_ld=yes
3325382ff0afSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
3326382ff0afSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
3327382ff0afSmrg	# earlier do not add the objects themselves.
3328382ff0afSmrg	case `$CC -V 2>&1` in
3329382ff0afSmrg	*"Version 7."*)
3330382ff0afSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3331382ff0afSmrg  	  _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'
3332382ff0afSmrg	  ;;
3333382ff0afSmrg	*)  # Version 8.0 or newer
3334382ff0afSmrg	  tmp_idyn=
3335382ff0afSmrg	  case $host_cpu in
3336382ff0afSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
3337382ff0afSmrg	  esac
3338382ff0afSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3339382ff0afSmrg	  _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'
3340382ff0afSmrg	  ;;
3341382ff0afSmrg	esac
3342382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3343382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3344382ff0afSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3345382ff0afSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3346382ff0afSmrg	;;
3347382ff0afSmrg      pgCC*)
3348382ff0afSmrg        # Portland Group C++ compiler
3349382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3350382ff0afSmrg  	_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'
3351382ff0afSmrg
3352382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3353382ff0afSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3354382ff0afSmrg	_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'
3355382ff0afSmrg        ;;
3356382ff0afSmrg      cxx*)
3357382ff0afSmrg	# Compaq C++
3358382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3359382ff0afSmrg	_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'
3360382ff0afSmrg
3361382ff0afSmrg	runpath_var=LD_RUN_PATH
3362382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3363382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3364382ff0afSmrg
3365382ff0afSmrg	# Commands to make compiler produce verbose output that lists
3366382ff0afSmrg	# what "hidden" libraries, object files and flags are used when
3367382ff0afSmrg	# linking a shared library.
3368382ff0afSmrg	#
3369382ff0afSmrg	# There doesn't appear to be a way to prevent this compiler from
3370382ff0afSmrg	# explicitly linking system object files so we need to strip them
3371382ff0afSmrg	# from the output so that they don't get included in the library
3372382ff0afSmrg	# dependencies.
3373382ff0afSmrg	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'
3374382ff0afSmrg	;;
3375382ff0afSmrg    esac
3376382ff0afSmrg    ;;
3377382ff0afSmrg  lynxos*)
3378382ff0afSmrg    # FIXME: insert proper C++ library support
3379382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3380382ff0afSmrg    ;;
3381382ff0afSmrg  m88k*)
3382382ff0afSmrg    # FIXME: insert proper C++ library support
3383382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3384382ff0afSmrg    ;;
3385382ff0afSmrg  mvs*)
3386382ff0afSmrg    case $cc_basename in
3387382ff0afSmrg      cxx*)
3388382ff0afSmrg	# FIXME: insert proper C++ library support
3389382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3390382ff0afSmrg	;;
3391382ff0afSmrg      *)
3392382ff0afSmrg	# FIXME: insert proper C++ library support
3393382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3394382ff0afSmrg	;;
3395382ff0afSmrg    esac
3396382ff0afSmrg    ;;
3397382ff0afSmrg  netbsd*)
3398382ff0afSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3399382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3400382ff0afSmrg      wlarc=
3401382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3402382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3403382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3404382ff0afSmrg    fi
3405382ff0afSmrg    # Workaround some broken pre-1.5 toolchains
3406382ff0afSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3407382ff0afSmrg    ;;
3408382ff0afSmrg  openbsd2*)
3409382ff0afSmrg    # C++ shared libraries are fairly broken
3410382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3411382ff0afSmrg    ;;
3412382ff0afSmrg  openbsd*)
3413382ff0afSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3414382ff0afSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3415382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3416382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3417382ff0afSmrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3418382ff0afSmrg      _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'
3419382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3420382ff0afSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3421382ff0afSmrg    fi
3422382ff0afSmrg    output_verbose_link_cmd='echo'
3423382ff0afSmrg    ;;
3424382ff0afSmrg  osf3*)
3425382ff0afSmrg    case $cc_basename in
3426382ff0afSmrg      KCC*)
3427382ff0afSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3428382ff0afSmrg
3429382ff0afSmrg	# KCC will only create a shared library if the output file
3430382ff0afSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3431382ff0afSmrg	# to its proper name (with version) after linking.
3432382ff0afSmrg	_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'
3433382ff0afSmrg
3434382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3435382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3436382ff0afSmrg
3437382ff0afSmrg	# Archives containing C++ object files must be created using
3438382ff0afSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3439382ff0afSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3440382ff0afSmrg
3441382ff0afSmrg	;;
3442382ff0afSmrg      RCC*)
3443382ff0afSmrg	# Rational C++ 2.4.1
3444382ff0afSmrg	# FIXME: insert proper C++ library support
3445382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3446382ff0afSmrg	;;
3447382ff0afSmrg      cxx*)
3448382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3449382ff0afSmrg	_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'
3450382ff0afSmrg
3451382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3452382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3453382ff0afSmrg
3454382ff0afSmrg	# Commands to make compiler produce verbose output that lists
3455382ff0afSmrg	# what "hidden" libraries, object files and flags are used when
3456382ff0afSmrg	# linking a shared library.
3457382ff0afSmrg	#
3458382ff0afSmrg	# There doesn't appear to be a way to prevent this compiler from
3459382ff0afSmrg	# explicitly linking system object files so we need to strip them
3460382ff0afSmrg	# from the output so that they don't get included in the library
3461382ff0afSmrg	# dependencies.
3462382ff0afSmrg	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'
3463382ff0afSmrg	;;
3464382ff0afSmrg      *)
3465382ff0afSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3466382ff0afSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3467382ff0afSmrg	  _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'
3468382ff0afSmrg
3469382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3470382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3471382ff0afSmrg
3472382ff0afSmrg	  # Commands to make compiler produce verbose output that lists
3473382ff0afSmrg	  # what "hidden" libraries, object files and flags are used when
3474382ff0afSmrg	  # linking a shared library.
3475382ff0afSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3476382ff0afSmrg
3477382ff0afSmrg	else
3478382ff0afSmrg	  # FIXME: insert proper C++ library support
3479382ff0afSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3480382ff0afSmrg	fi
3481382ff0afSmrg	;;
3482382ff0afSmrg    esac
3483382ff0afSmrg    ;;
3484382ff0afSmrg  osf4* | osf5*)
3485382ff0afSmrg    case $cc_basename in
3486382ff0afSmrg      KCC*)
3487382ff0afSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3488382ff0afSmrg
3489382ff0afSmrg	# KCC will only create a shared library if the output file
3490382ff0afSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3491382ff0afSmrg	# to its proper name (with version) after linking.
3492382ff0afSmrg	_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'
3493382ff0afSmrg
3494382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3495382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3496382ff0afSmrg
3497382ff0afSmrg	# Archives containing C++ object files must be created using
3498382ff0afSmrg	# the KAI C++ compiler.
3499382ff0afSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3500382ff0afSmrg	;;
3501382ff0afSmrg      RCC*)
3502382ff0afSmrg	# Rational C++ 2.4.1
3503382ff0afSmrg	# FIXME: insert proper C++ library support
3504382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3505382ff0afSmrg	;;
3506382ff0afSmrg      cxx*)
3507382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3508382ff0afSmrg	_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'
3509382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3510382ff0afSmrg	  echo "-hidden">> $lib.exp~
3511382ff0afSmrg	  $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~
3512382ff0afSmrg	  $rm $lib.exp'
3513382ff0afSmrg
3514382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3515382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3516382ff0afSmrg
3517382ff0afSmrg	# Commands to make compiler produce verbose output that lists
3518382ff0afSmrg	# what "hidden" libraries, object files and flags are used when
3519382ff0afSmrg	# linking a shared library.
3520382ff0afSmrg	#
3521382ff0afSmrg	# There doesn't appear to be a way to prevent this compiler from
3522382ff0afSmrg	# explicitly linking system object files so we need to strip them
3523382ff0afSmrg	# from the output so that they don't get included in the library
3524382ff0afSmrg	# dependencies.
3525382ff0afSmrg	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'
3526382ff0afSmrg	;;
3527382ff0afSmrg      *)
3528382ff0afSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3529382ff0afSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3530382ff0afSmrg	 _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'
3531382ff0afSmrg
3532382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3533382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3534382ff0afSmrg
3535382ff0afSmrg	  # Commands to make compiler produce verbose output that lists
3536382ff0afSmrg	  # what "hidden" libraries, object files and flags are used when
3537382ff0afSmrg	  # linking a shared library.
3538382ff0afSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3539382ff0afSmrg
3540382ff0afSmrg	else
3541382ff0afSmrg	  # FIXME: insert proper C++ library support
3542382ff0afSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3543382ff0afSmrg	fi
3544382ff0afSmrg	;;
3545382ff0afSmrg    esac
3546382ff0afSmrg    ;;
3547382ff0afSmrg  psos*)
3548382ff0afSmrg    # FIXME: insert proper C++ library support
3549382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3550382ff0afSmrg    ;;
3551382ff0afSmrg  sunos4*)
3552382ff0afSmrg    case $cc_basename in
3553382ff0afSmrg      CC*)
3554382ff0afSmrg	# Sun C++ 4.x
3555382ff0afSmrg	# FIXME: insert proper C++ library support
3556382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3557382ff0afSmrg	;;
3558382ff0afSmrg      lcc*)
3559382ff0afSmrg	# Lucid
3560382ff0afSmrg	# FIXME: insert proper C++ library support
3561382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3562382ff0afSmrg	;;
3563382ff0afSmrg      *)
3564382ff0afSmrg	# FIXME: insert proper C++ library support
3565382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3566382ff0afSmrg	;;
3567382ff0afSmrg    esac
3568382ff0afSmrg    ;;
3569382ff0afSmrg  solaris*)
3570382ff0afSmrg    case $cc_basename in
3571382ff0afSmrg      CC*)
3572382ff0afSmrg	# Sun C++ 4.2, 5.x and Centerline C++
3573382ff0afSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3574382ff0afSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3575382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3576382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3577382ff0afSmrg	$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'
3578382ff0afSmrg
3579382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3580382ff0afSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3581382ff0afSmrg	case $host_os in
3582382ff0afSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3583382ff0afSmrg	  *)
3584382ff0afSmrg	    # The C++ compiler is used as linker so we must use $wl
3585382ff0afSmrg	    # flag to pass the commands to the underlying system
3586382ff0afSmrg	    # linker. We must also pass each convience library through
3587382ff0afSmrg	    # to the system linker between allextract/defaultextract.
3588382ff0afSmrg	    # The C++ compiler will combine linker options so we
3589382ff0afSmrg	    # cannot just pass the convience library names through
3590382ff0afSmrg	    # without $wl.
3591382ff0afSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3592382ff0afSmrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3593382ff0afSmrg	    ;;
3594382ff0afSmrg	esac
3595382ff0afSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3596382ff0afSmrg
3597382ff0afSmrg	output_verbose_link_cmd='echo'
3598382ff0afSmrg
3599382ff0afSmrg	# Archives containing C++ object files must be created using
3600382ff0afSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3601382ff0afSmrg	# necessary to make sure instantiated templates are included
3602382ff0afSmrg	# in the archive.
3603382ff0afSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3604382ff0afSmrg	;;
3605382ff0afSmrg      gcx*)
3606382ff0afSmrg	# Green Hills C++ Compiler
3607382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3608382ff0afSmrg
3609382ff0afSmrg	# The C++ compiler must be used to create the archive.
3610382ff0afSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3611382ff0afSmrg	;;
3612382ff0afSmrg      *)
3613382ff0afSmrg	# GNU C++ compiler with Solaris linker
3614382ff0afSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3615382ff0afSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3616382ff0afSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3617382ff0afSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3618382ff0afSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3619382ff0afSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3620382ff0afSmrg
3621382ff0afSmrg	    # Commands to make compiler produce verbose output that lists
3622382ff0afSmrg	    # what "hidden" libraries, object files and flags are used when
3623382ff0afSmrg	    # linking a shared library.
3624382ff0afSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3625382ff0afSmrg	  else
3626382ff0afSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3627382ff0afSmrg	    # platform.
3628382ff0afSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3629382ff0afSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3630382ff0afSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3631382ff0afSmrg
3632382ff0afSmrg	    # Commands to make compiler produce verbose output that lists
3633382ff0afSmrg	    # what "hidden" libraries, object files and flags are used when
3634382ff0afSmrg	    # linking a shared library.
3635382ff0afSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3636382ff0afSmrg	  fi
3637382ff0afSmrg
3638382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3639382ff0afSmrg	fi
3640382ff0afSmrg	;;
3641382ff0afSmrg    esac
3642382ff0afSmrg    ;;
3643382ff0afSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3644382ff0afSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3645382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3646382ff0afSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3647382ff0afSmrg    runpath_var='LD_RUN_PATH'
3648382ff0afSmrg
3649382ff0afSmrg    case $cc_basename in
3650382ff0afSmrg      CC*)
3651382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3652382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3653382ff0afSmrg	;;
3654382ff0afSmrg      *)
3655382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3656382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3657382ff0afSmrg	;;
3658382ff0afSmrg    esac
3659382ff0afSmrg    ;;
3660382ff0afSmrg  sysv5* | sco3.2v5* | sco5v6*)
3661382ff0afSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
3662382ff0afSmrg    # link with -lc, and that would cause any symbols used from libc to
3663382ff0afSmrg    # always be unresolved, which means just about no library would
3664382ff0afSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
3665382ff0afSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
3666382ff0afSmrg    # as -z defs.
3667382ff0afSmrg    # For security reasons, it is highly recommended that you always
3668382ff0afSmrg    # use absolute paths for naming shared libraries, and exclude the
3669382ff0afSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
3670382ff0afSmrg    # requires that you compile everything twice, which is a pain.
3671382ff0afSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
3672382ff0afSmrg    # non-empty value in the environment.  Most likely only useful for
3673382ff0afSmrg    # creating official distributions of packages.
3674382ff0afSmrg    # This is a hack until libtool officially supports absolute path
3675382ff0afSmrg    # names for shared libraries.
3676382ff0afSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3677382ff0afSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3678382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3679382ff0afSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3680382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3681382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3682382ff0afSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3683382ff0afSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3684382ff0afSmrg    runpath_var='LD_RUN_PATH'
3685382ff0afSmrg
3686382ff0afSmrg    case $cc_basename in
3687382ff0afSmrg      CC*)
3688382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3689382ff0afSmrg	_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'
3690382ff0afSmrg	;;
3691382ff0afSmrg      *)
3692382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3693382ff0afSmrg	_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'
3694382ff0afSmrg	;;
3695382ff0afSmrg    esac
3696382ff0afSmrg    ;;
3697382ff0afSmrg  tandem*)
3698382ff0afSmrg    case $cc_basename in
3699382ff0afSmrg      NCC*)
3700382ff0afSmrg	# NonStop-UX NCC 3.20
3701382ff0afSmrg	# FIXME: insert proper C++ library support
3702382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3703382ff0afSmrg	;;
3704382ff0afSmrg      *)
3705382ff0afSmrg	# FIXME: insert proper C++ library support
3706382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3707382ff0afSmrg	;;
3708382ff0afSmrg    esac
3709382ff0afSmrg    ;;
3710382ff0afSmrg  vxworks*)
3711382ff0afSmrg    # FIXME: insert proper C++ library support
3712382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3713382ff0afSmrg    ;;
3714382ff0afSmrg  *)
3715382ff0afSmrg    # FIXME: insert proper C++ library support
3716382ff0afSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3717382ff0afSmrg    ;;
3718382ff0afSmrgesac
3719382ff0afSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3720382ff0afSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3721382ff0afSmrg
3722382ff0afSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
3723382ff0afSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
3724382ff0afSmrg
3725382ff0afSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
3726382ff0afSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3727382ff0afSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3728382ff0afSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3729382ff0afSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3730382ff0afSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3731382ff0afSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3732382ff0afSmrg
3733382ff0afSmrgAC_LIBTOOL_CONFIG($1)
3734382ff0afSmrg
3735382ff0afSmrgAC_LANG_POP
3736382ff0afSmrgCC=$lt_save_CC
3737382ff0afSmrgLDCXX=$LD
3738382ff0afSmrgLD=$lt_save_LD
3739382ff0afSmrgGCC=$lt_save_GCC
3740382ff0afSmrgwith_gnu_ldcxx=$with_gnu_ld
3741382ff0afSmrgwith_gnu_ld=$lt_save_with_gnu_ld
3742382ff0afSmrglt_cv_path_LDCXX=$lt_cv_path_LD
3743382ff0afSmrglt_cv_path_LD=$lt_save_path_LD
3744382ff0afSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3745382ff0afSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3746382ff0afSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
3747382ff0afSmrg
3748382ff0afSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3749382ff0afSmrg# ------------------------------------
3750382ff0afSmrg# Figure out "hidden" library dependencies from verbose
3751382ff0afSmrg# compiler output when linking a shared library.
3752382ff0afSmrg# Parse the compiler output and extract the necessary
3753382ff0afSmrg# objects, libraries and library flags.
3754382ff0afSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3755382ff0afSmrgdnl we can't use the lt_simple_compile_test_code here,
3756382ff0afSmrgdnl because it contains code intended for an executable,
3757382ff0afSmrgdnl not a library.  It's possible we should let each
3758382ff0afSmrgdnl tag define a new lt_????_link_test_code variable,
3759382ff0afSmrgdnl but it's only used here...
3760382ff0afSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3761382ff0afSmrgint a;
3762382ff0afSmrgvoid foo (void) { a = 0; }
3763382ff0afSmrgEOF
3764382ff0afSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3765382ff0afSmrgclass Foo
3766382ff0afSmrg{
3767382ff0afSmrgpublic:
3768382ff0afSmrg  Foo (void) { a = 0; }
3769382ff0afSmrgprivate:
3770382ff0afSmrg  int a;
3771382ff0afSmrg};
3772382ff0afSmrgEOF
3773382ff0afSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3774382ff0afSmrg      subroutine foo
3775382ff0afSmrg      implicit none
3776382ff0afSmrg      integer*4 a
3777382ff0afSmrg      a=0
3778382ff0afSmrg      return
3779382ff0afSmrg      end
3780382ff0afSmrgEOF
3781382ff0afSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3782382ff0afSmrgpublic class foo {
3783382ff0afSmrg  private int a;
3784382ff0afSmrg  public void bar (void) {
3785382ff0afSmrg    a = 0;
3786382ff0afSmrg  }
3787382ff0afSmrg};
3788382ff0afSmrgEOF
3789382ff0afSmrg])
3790382ff0afSmrgdnl Parse the compiler output and extract the necessary
3791382ff0afSmrgdnl objects, libraries and library flags.
3792382ff0afSmrgif AC_TRY_EVAL(ac_compile); then
3793382ff0afSmrg  # Parse the compiler output and extract the necessary
3794382ff0afSmrg  # objects, libraries and library flags.
3795382ff0afSmrg
3796382ff0afSmrg  # Sentinel used to keep track of whether or not we are before
3797382ff0afSmrg  # the conftest object file.
3798382ff0afSmrg  pre_test_object_deps_done=no
3799382ff0afSmrg
3800382ff0afSmrg  # The `*' in the case matches for architectures that use `case' in
3801382ff0afSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
3802382ff0afSmrg  # eval without this substitution.
3803382ff0afSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3804382ff0afSmrg
3805382ff0afSmrg  for p in `eval $output_verbose_link_cmd`; do
3806382ff0afSmrg    case $p in
3807382ff0afSmrg
3808382ff0afSmrg    -L* | -R* | -l*)
3809382ff0afSmrg       # Some compilers place space between "-{L,R}" and the path.
3810382ff0afSmrg       # Remove the space.
3811382ff0afSmrg       if test $p = "-L" \
3812382ff0afSmrg	  || test $p = "-R"; then
3813382ff0afSmrg	 prev=$p
3814382ff0afSmrg	 continue
3815382ff0afSmrg       else
3816382ff0afSmrg	 prev=
3817382ff0afSmrg       fi
3818382ff0afSmrg
3819382ff0afSmrg       if test "$pre_test_object_deps_done" = no; then
3820382ff0afSmrg	 case $p in
3821382ff0afSmrg	 -L* | -R*)
3822382ff0afSmrg	   # Internal compiler library paths should come after those
3823382ff0afSmrg	   # provided the user.  The postdeps already come after the
3824382ff0afSmrg	   # user supplied libs so there is no need to process them.
3825382ff0afSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3826382ff0afSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3827382ff0afSmrg	   else
3828382ff0afSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3829382ff0afSmrg	   fi
3830382ff0afSmrg	   ;;
3831382ff0afSmrg	 # The "-l" case would never come before the object being
3832382ff0afSmrg	 # linked, so don't bother handling this case.
3833382ff0afSmrg	 esac
3834382ff0afSmrg       else
3835382ff0afSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3836382ff0afSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3837382ff0afSmrg	 else
3838382ff0afSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3839382ff0afSmrg	 fi
3840382ff0afSmrg       fi
3841382ff0afSmrg       ;;
3842382ff0afSmrg
3843382ff0afSmrg    *.$objext)
3844382ff0afSmrg       # This assumes that the test object file only shows up
3845382ff0afSmrg       # once in the compiler output.
3846382ff0afSmrg       if test "$p" = "conftest.$objext"; then
3847382ff0afSmrg	 pre_test_object_deps_done=yes
3848382ff0afSmrg	 continue
3849382ff0afSmrg       fi
3850382ff0afSmrg
3851382ff0afSmrg       if test "$pre_test_object_deps_done" = no; then
3852382ff0afSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3853382ff0afSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3854382ff0afSmrg	 else
3855382ff0afSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3856382ff0afSmrg	 fi
3857382ff0afSmrg       else
3858382ff0afSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3859382ff0afSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3860382ff0afSmrg	 else
3861382ff0afSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3862382ff0afSmrg	 fi
3863382ff0afSmrg       fi
3864382ff0afSmrg       ;;
3865382ff0afSmrg
3866382ff0afSmrg    *) ;; # Ignore the rest.
3867382ff0afSmrg
3868382ff0afSmrg    esac
3869382ff0afSmrg  done
3870382ff0afSmrg
3871382ff0afSmrg  # Clean up.
3872382ff0afSmrg  rm -f a.out a.exe
3873382ff0afSmrgelse
3874382ff0afSmrg  echo "libtool.m4: error: problem compiling $1 test program"
3875382ff0afSmrgfi
3876382ff0afSmrg
3877382ff0afSmrg$rm -f confest.$objext
3878382ff0afSmrg
3879382ff0afSmrg# PORTME: override above test on systems where it is broken
3880382ff0afSmrgifelse([$1],[CXX],
3881382ff0afSmrg[case $host_os in
3882382ff0afSmrginterix3*)
3883382ff0afSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3884382ff0afSmrg  # hack all around it, let's just trust "g++" to DTRT.
3885382ff0afSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
3886382ff0afSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
3887382ff0afSmrg  _LT_AC_TAGVAR(postdeps,$1)=
3888382ff0afSmrg  ;;
3889382ff0afSmrg
3890382ff0afSmrgsolaris*)
3891382ff0afSmrg  case $cc_basename in
3892382ff0afSmrg  CC*)
3893382ff0afSmrg    # Adding this requires a known-good setup of shared libraries for
3894382ff0afSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
3895382ff0afSmrg    # archive will be linked into the output, leading to subtle bugs.
3896382ff0afSmrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3897382ff0afSmrg    ;;
3898382ff0afSmrg  esac
3899382ff0afSmrg  ;;
3900382ff0afSmrgesac
3901382ff0afSmrg])
3902382ff0afSmrg
3903382ff0afSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
3904382ff0afSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3905382ff0afSmrgesac
3906382ff0afSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
3907382ff0afSmrg
3908382ff0afSmrg# AC_LIBTOOL_LANG_F77_CONFIG
3909382ff0afSmrg# --------------------------
3910382ff0afSmrg# Ensure that the configuration vars for the C compiler are
3911382ff0afSmrg# suitably defined.  Those variables are subsequently used by
3912382ff0afSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3913382ff0afSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3914382ff0afSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3915382ff0afSmrg[AC_REQUIRE([AC_PROG_F77])
3916382ff0afSmrgAC_LANG_PUSH(Fortran 77)
3917382ff0afSmrg
3918382ff0afSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3919382ff0afSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3920382ff0afSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
3921382ff0afSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3922382ff0afSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3923382ff0afSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
3924382ff0afSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3925382ff0afSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3926382ff0afSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3927382ff0afSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3928382ff0afSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3929382ff0afSmrg_LT_AC_TAGVAR(module_cmds, $1)=
3930382ff0afSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3931382ff0afSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3932382ff0afSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3933382ff0afSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
3934382ff0afSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3935382ff0afSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3936382ff0afSmrg
3937382ff0afSmrg# Source file extension for f77 test sources.
3938382ff0afSmrgac_ext=f
3939382ff0afSmrg
3940382ff0afSmrg# Object file extension for compiled f77 test sources.
3941382ff0afSmrgobjext=o
3942382ff0afSmrg_LT_AC_TAGVAR(objext, $1)=$objext
3943382ff0afSmrg
3944382ff0afSmrg# Code to be used in simple compile tests
3945382ff0afSmrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3946382ff0afSmrg
3947382ff0afSmrg# Code to be used in simple link tests
3948382ff0afSmrglt_simple_link_test_code="      program t\n      end\n"
3949382ff0afSmrg
3950382ff0afSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3951382ff0afSmrg_LT_AC_SYS_COMPILER
3952382ff0afSmrg
3953382ff0afSmrg# save warnings/boilerplate of simple test code
3954382ff0afSmrg_LT_COMPILER_BOILERPLATE
3955382ff0afSmrg_LT_LINKER_BOILERPLATE
3956382ff0afSmrg
3957382ff0afSmrg# Allow CC to be a program name with arguments.
3958382ff0afSmrglt_save_CC="$CC"
3959382ff0afSmrgCC=${F77-"f77"}
3960382ff0afSmrgcompiler=$CC
3961382ff0afSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
3962382ff0afSmrg_LT_CC_BASENAME([$compiler])
3963382ff0afSmrg
3964382ff0afSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
3965382ff0afSmrgAC_MSG_RESULT([$can_build_shared])
3966382ff0afSmrg
3967382ff0afSmrgAC_MSG_CHECKING([whether to build shared libraries])
3968382ff0afSmrgtest "$can_build_shared" = "no" && enable_shared=no
3969382ff0afSmrg
3970382ff0afSmrg# On AIX, shared libraries and static libraries use the same namespace, and
3971382ff0afSmrg# are all built from PIC.
3972382ff0afSmrgcase $host_os in
3973382ff0afSmrgaix3*)
3974382ff0afSmrg  test "$enable_shared" = yes && enable_static=no
3975382ff0afSmrg  if test -n "$RANLIB"; then
3976382ff0afSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3977382ff0afSmrg    postinstall_cmds='$RANLIB $lib'
3978382ff0afSmrg  fi
3979382ff0afSmrg  ;;
3980382ff0afSmrgaix4* | aix5*)
3981382ff0afSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3982382ff0afSmrg    test "$enable_shared" = yes && enable_static=no
3983382ff0afSmrg  fi
3984382ff0afSmrg  ;;
3985382ff0afSmrgesac
3986382ff0afSmrgAC_MSG_RESULT([$enable_shared])
3987382ff0afSmrg
3988382ff0afSmrgAC_MSG_CHECKING([whether to build static libraries])
3989382ff0afSmrg# Make sure either enable_shared or enable_static is yes.
3990382ff0afSmrgtest "$enable_shared" = yes || enable_static=yes
3991382ff0afSmrgAC_MSG_RESULT([$enable_static])
3992382ff0afSmrg
3993382ff0afSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
3994382ff0afSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
3995382ff0afSmrg
3996382ff0afSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3997382ff0afSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3998382ff0afSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3999382ff0afSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4000382ff0afSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4001382ff0afSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4002382ff0afSmrg
4003382ff0afSmrgAC_LIBTOOL_CONFIG($1)
4004382ff0afSmrg
4005382ff0afSmrgAC_LANG_POP
4006382ff0afSmrgCC="$lt_save_CC"
4007382ff0afSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
4008382ff0afSmrg
4009382ff0afSmrg
4010382ff0afSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
4011382ff0afSmrg# --------------------------
4012382ff0afSmrg# Ensure that the configuration vars for the C compiler are
4013382ff0afSmrg# suitably defined.  Those variables are subsequently used by
4014382ff0afSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4015382ff0afSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4016382ff0afSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4017382ff0afSmrg[AC_LANG_SAVE
4018382ff0afSmrg
4019382ff0afSmrg# Source file extension for Java test sources.
4020382ff0afSmrgac_ext=java
4021382ff0afSmrg
4022382ff0afSmrg# Object file extension for compiled Java test sources.
4023382ff0afSmrgobjext=o
4024382ff0afSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4025382ff0afSmrg
4026382ff0afSmrg# Code to be used in simple compile tests
4027382ff0afSmrglt_simple_compile_test_code="class foo {}\n"
4028382ff0afSmrg
4029382ff0afSmrg# Code to be used in simple link tests
4030382ff0afSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4031382ff0afSmrg
4032382ff0afSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4033382ff0afSmrg_LT_AC_SYS_COMPILER
4034382ff0afSmrg
4035382ff0afSmrg# save warnings/boilerplate of simple test code
4036382ff0afSmrg_LT_COMPILER_BOILERPLATE
4037382ff0afSmrg_LT_LINKER_BOILERPLATE
4038382ff0afSmrg
4039382ff0afSmrg# Allow CC to be a program name with arguments.
4040382ff0afSmrglt_save_CC="$CC"
4041382ff0afSmrgCC=${GCJ-"gcj"}
4042382ff0afSmrgcompiler=$CC
4043382ff0afSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4044382ff0afSmrg_LT_CC_BASENAME([$compiler])
4045382ff0afSmrg
4046382ff0afSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
4047382ff0afSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4048382ff0afSmrg
4049382ff0afSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4050382ff0afSmrg
4051382ff0afSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4052382ff0afSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4053382ff0afSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4054382ff0afSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4055382ff0afSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4056382ff0afSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4057382ff0afSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4058382ff0afSmrg
4059382ff0afSmrgAC_LIBTOOL_CONFIG($1)
4060382ff0afSmrg
4061382ff0afSmrgAC_LANG_RESTORE
4062382ff0afSmrgCC="$lt_save_CC"
4063382ff0afSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
4064382ff0afSmrg
4065382ff0afSmrg
4066382ff0afSmrg# AC_LIBTOOL_LANG_RC_CONFIG
4067382ff0afSmrg# -------------------------
4068382ff0afSmrg# Ensure that the configuration vars for the Windows resource compiler are
4069382ff0afSmrg# suitably defined.  Those variables are subsequently used by
4070382ff0afSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4071382ff0afSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4072382ff0afSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4073382ff0afSmrg[AC_LANG_SAVE
4074382ff0afSmrg
4075382ff0afSmrg# Source file extension for RC test sources.
4076382ff0afSmrgac_ext=rc
4077382ff0afSmrg
4078382ff0afSmrg# Object file extension for compiled RC test sources.
4079382ff0afSmrgobjext=o
4080382ff0afSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4081382ff0afSmrg
4082382ff0afSmrg# Code to be used in simple compile tests
4083382ff0afSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4084382ff0afSmrg
4085382ff0afSmrg# Code to be used in simple link tests
4086382ff0afSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
4087382ff0afSmrg
4088382ff0afSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4089382ff0afSmrg_LT_AC_SYS_COMPILER
4090382ff0afSmrg
4091382ff0afSmrg# save warnings/boilerplate of simple test code
4092382ff0afSmrg_LT_COMPILER_BOILERPLATE
4093382ff0afSmrg_LT_LINKER_BOILERPLATE
4094382ff0afSmrg
4095382ff0afSmrg# Allow CC to be a program name with arguments.
4096382ff0afSmrglt_save_CC="$CC"
4097382ff0afSmrgCC=${RC-"windres"}
4098382ff0afSmrgcompiler=$CC
4099382ff0afSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4100382ff0afSmrg_LT_CC_BASENAME([$compiler])
4101382ff0afSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4102382ff0afSmrg
4103382ff0afSmrgAC_LIBTOOL_CONFIG($1)
4104382ff0afSmrg
4105382ff0afSmrgAC_LANG_RESTORE
4106382ff0afSmrgCC="$lt_save_CC"
4107382ff0afSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
4108382ff0afSmrg
4109382ff0afSmrg
4110382ff0afSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
4111382ff0afSmrg# ----------------------------
4112382ff0afSmrg# If TAGNAME is not passed, then create an initial libtool script
4113382ff0afSmrg# with a default configuration from the untagged config vars.  Otherwise
4114382ff0afSmrg# add code to config.status for appending the configuration named by
4115382ff0afSmrg# TAGNAME from the matching tagged config vars.
4116382ff0afSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
4117382ff0afSmrg[# The else clause should only fire when bootstrapping the
4118382ff0afSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
4119382ff0afSmrg# with your package, and you will get complaints that there are
4120382ff0afSmrg# no rules to generate ltmain.sh.
4121382ff0afSmrgif test -f "$ltmain"; then
4122382ff0afSmrg  # See if we are running on zsh, and set the options which allow our commands through
4123382ff0afSmrg  # without removal of \ escapes.
4124382ff0afSmrg  if test -n "${ZSH_VERSION+set}" ; then
4125382ff0afSmrg    setopt NO_GLOB_SUBST
4126382ff0afSmrg  fi
4127382ff0afSmrg  # Now quote all the things that may contain metacharacters while being
4128382ff0afSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4129382ff0afSmrg  # variables and quote the copies for generation of the libtool script.
4130382ff0afSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4131382ff0afSmrg    SED SHELL STRIP \
4132382ff0afSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4133382ff0afSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4134382ff0afSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
4135382ff0afSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4136382ff0afSmrg    lt_cv_sys_global_symbol_to_c_name_address \
4137382ff0afSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4138382ff0afSmrg    old_postinstall_cmds old_postuninstall_cmds \
4139382ff0afSmrg    _LT_AC_TAGVAR(compiler, $1) \
4140382ff0afSmrg    _LT_AC_TAGVAR(CC, $1) \
4141382ff0afSmrg    _LT_AC_TAGVAR(LD, $1) \
4142382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4143382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4144382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4145382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4146382ff0afSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4147382ff0afSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4148382ff0afSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4149382ff0afSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4150382ff0afSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4151382ff0afSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4152382ff0afSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
4153382ff0afSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
4154382ff0afSmrg    _LT_AC_TAGVAR(predeps, $1) \
4155382ff0afSmrg    _LT_AC_TAGVAR(postdeps, $1) \
4156382ff0afSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4157382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
4158382ff0afSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4159382ff0afSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4160382ff0afSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4161382ff0afSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4162382ff0afSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4163382ff0afSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4164382ff0afSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4165382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4166382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4167382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4168382ff0afSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4169382ff0afSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
4170382ff0afSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4171382ff0afSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4172382ff0afSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4173382ff0afSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
4174382ff0afSmrg
4175382ff0afSmrg    case $var in
4176382ff0afSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4177382ff0afSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4178382ff0afSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
4179382ff0afSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4180382ff0afSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
4181382ff0afSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4182382ff0afSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4183382ff0afSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4184382ff0afSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4185382ff0afSmrg    postinstall_cmds | postuninstall_cmds | \
4186382ff0afSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
4187382ff0afSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4188382ff0afSmrg      # Double-quote double-evaled strings.
4189382ff0afSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4190382ff0afSmrg      ;;
4191382ff0afSmrg    *)
4192382ff0afSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4193382ff0afSmrg      ;;
4194382ff0afSmrg    esac
4195382ff0afSmrg  done
4196382ff0afSmrg
4197382ff0afSmrg  case $lt_echo in
4198382ff0afSmrg  *'\[$]0 --fallback-echo"')
4199382ff0afSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4200382ff0afSmrg    ;;
4201382ff0afSmrg  esac
4202382ff0afSmrg
4203382ff0afSmrgifelse([$1], [],
4204382ff0afSmrg  [cfgfile="${ofile}T"
4205382ff0afSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4206382ff0afSmrg  $rm -f "$cfgfile"
4207382ff0afSmrg  AC_MSG_NOTICE([creating $ofile])],
4208382ff0afSmrg  [cfgfile="$ofile"])
4209382ff0afSmrg
4210382ff0afSmrg  cat <<__EOF__ >> "$cfgfile"
4211382ff0afSmrgifelse([$1], [],
4212382ff0afSmrg[#! $SHELL
4213382ff0afSmrg
4214382ff0afSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4215382ff0afSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4216382ff0afSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4217382ff0afSmrg#
4218382ff0afSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4219382ff0afSmrg# Free Software Foundation, Inc.
4220382ff0afSmrg#
4221382ff0afSmrg# This file is part of GNU Libtool:
4222382ff0afSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4223382ff0afSmrg#
4224382ff0afSmrg# This program is free software; you can redistribute it and/or modify
4225382ff0afSmrg# it under the terms of the GNU General Public License as published by
4226382ff0afSmrg# the Free Software Foundation; either version 2 of the License, or
4227382ff0afSmrg# (at your option) any later version.
4228382ff0afSmrg#
4229382ff0afSmrg# This program is distributed in the hope that it will be useful, but
4230382ff0afSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
4231382ff0afSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4232382ff0afSmrg# General Public License for more details.
4233382ff0afSmrg#
4234382ff0afSmrg# You should have received a copy of the GNU General Public License
4235382ff0afSmrg# along with this program; if not, write to the Free Software
4236382ff0afSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4237382ff0afSmrg#
4238382ff0afSmrg# As a special exception to the GNU General Public License, if you
4239382ff0afSmrg# distribute this file as part of a program that contains a
4240382ff0afSmrg# configuration script generated by Autoconf, you may include it under
4241382ff0afSmrg# the same distribution terms that you use for the rest of that program.
4242382ff0afSmrg
4243382ff0afSmrg# A sed program that does not truncate output.
4244382ff0afSmrgSED=$lt_SED
4245382ff0afSmrg
4246382ff0afSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4247382ff0afSmrgXsed="$SED -e 1s/^X//"
4248382ff0afSmrg
4249382ff0afSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4250382ff0afSmrg# if CDPATH is set.
4251382ff0afSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4252382ff0afSmrg
4253382ff0afSmrg# The names of the tagged configurations supported by this script.
4254382ff0afSmrgavailable_tags=
4255382ff0afSmrg
4256382ff0afSmrg# ### BEGIN LIBTOOL CONFIG],
4257382ff0afSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4258382ff0afSmrg
4259382ff0afSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4260382ff0afSmrg
4261382ff0afSmrg# Shell to use when invoking shell scripts.
4262382ff0afSmrgSHELL=$lt_SHELL
4263382ff0afSmrg
4264382ff0afSmrg# Whether or not to build shared libraries.
4265382ff0afSmrgbuild_libtool_libs=$enable_shared
4266382ff0afSmrg
4267382ff0afSmrg# Whether or not to build static libraries.
4268382ff0afSmrgbuild_old_libs=$enable_static
4269382ff0afSmrg
4270382ff0afSmrg# Whether or not to add -lc for building shared libraries.
4271382ff0afSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4272382ff0afSmrg
4273382ff0afSmrg# Whether or not to disallow shared libs when runtime libs are static
4274382ff0afSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4275382ff0afSmrg
4276382ff0afSmrg# Whether or not to optimize for fast installation.
4277382ff0afSmrgfast_install=$enable_fast_install
4278382ff0afSmrg
4279382ff0afSmrg# The host system.
4280382ff0afSmrghost_alias=$host_alias
4281382ff0afSmrghost=$host
4282382ff0afSmrghost_os=$host_os
4283382ff0afSmrg
4284382ff0afSmrg# The build system.
4285382ff0afSmrgbuild_alias=$build_alias
4286382ff0afSmrgbuild=$build
4287382ff0afSmrgbuild_os=$build_os
4288382ff0afSmrg
4289382ff0afSmrg# An echo program that does not interpret backslashes.
4290382ff0afSmrgecho=$lt_echo
4291382ff0afSmrg
4292382ff0afSmrg# The archiver.
4293382ff0afSmrgAR=$lt_AR
4294382ff0afSmrgAR_FLAGS=$lt_AR_FLAGS
4295382ff0afSmrg
4296382ff0afSmrg# A C compiler.
4297382ff0afSmrgLTCC=$lt_LTCC
4298382ff0afSmrg
4299382ff0afSmrg# LTCC compiler flags.
4300382ff0afSmrgLTCFLAGS=$lt_LTCFLAGS
4301382ff0afSmrg
4302382ff0afSmrg# A language-specific compiler.
4303382ff0afSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4304382ff0afSmrg
4305382ff0afSmrg# Is the compiler the GNU C compiler?
4306382ff0afSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4307382ff0afSmrg
4308382ff0afSmrg# An ERE matcher.
4309382ff0afSmrgEGREP=$lt_EGREP
4310382ff0afSmrg
4311382ff0afSmrg# The linker used to build libraries.
4312382ff0afSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4313382ff0afSmrg
4314382ff0afSmrg# Whether we need hard or soft links.
4315382ff0afSmrgLN_S=$lt_LN_S
4316382ff0afSmrg
4317382ff0afSmrg# A BSD-compatible nm program.
4318382ff0afSmrgNM=$lt_NM
4319382ff0afSmrg
4320382ff0afSmrg# A symbol stripping program
4321382ff0afSmrgSTRIP=$lt_STRIP
4322382ff0afSmrg
4323382ff0afSmrg# Used to examine libraries when file_magic_cmd begins "file"
4324382ff0afSmrgMAGIC_CMD=$MAGIC_CMD
4325382ff0afSmrg
4326382ff0afSmrg# Used on cygwin: DLL creation program.
4327382ff0afSmrgDLLTOOL="$DLLTOOL"
4328382ff0afSmrg
4329382ff0afSmrg# Used on cygwin: object dumper.
4330382ff0afSmrgOBJDUMP="$OBJDUMP"
4331382ff0afSmrg
4332382ff0afSmrg# Used on cygwin: assembler.
4333382ff0afSmrgAS="$AS"
4334382ff0afSmrg
4335382ff0afSmrg# The name of the directory that contains temporary libtool files.
4336382ff0afSmrgobjdir=$objdir
4337382ff0afSmrg
4338382ff0afSmrg# How to create reloadable object files.
4339382ff0afSmrgreload_flag=$lt_reload_flag
4340382ff0afSmrgreload_cmds=$lt_reload_cmds
4341382ff0afSmrg
4342382ff0afSmrg# How to pass a linker flag through the compiler.
4343382ff0afSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4344382ff0afSmrg
4345382ff0afSmrg# Object file suffix (normally "o").
4346382ff0afSmrgobjext="$ac_objext"
4347382ff0afSmrg
4348382ff0afSmrg# Old archive suffix (normally "a").
4349382ff0afSmrglibext="$libext"
4350382ff0afSmrg
4351382ff0afSmrg# Shared library suffix (normally ".so").
4352382ff0afSmrgshrext_cmds='$shrext_cmds'
4353382ff0afSmrg
4354382ff0afSmrg# Executable file suffix (normally "").
4355382ff0afSmrgexeext="$exeext"
4356382ff0afSmrg
4357382ff0afSmrg# Additional compiler flags for building library objects.
4358382ff0afSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4359382ff0afSmrgpic_mode=$pic_mode
4360382ff0afSmrg
4361382ff0afSmrg# What is the maximum length of a command?
4362382ff0afSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
4363382ff0afSmrg
4364382ff0afSmrg# Does compiler simultaneously support -c and -o options?
4365382ff0afSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4366382ff0afSmrg
4367382ff0afSmrg# Must we lock files when doing compilation?
4368382ff0afSmrgneed_locks=$lt_need_locks
4369382ff0afSmrg
4370382ff0afSmrg# Do we need the lib prefix for modules?
4371382ff0afSmrgneed_lib_prefix=$need_lib_prefix
4372382ff0afSmrg
4373382ff0afSmrg# Do we need a version for libraries?
4374382ff0afSmrgneed_version=$need_version
4375382ff0afSmrg
4376382ff0afSmrg# Whether dlopen is supported.
4377382ff0afSmrgdlopen_support=$enable_dlopen
4378382ff0afSmrg
4379382ff0afSmrg# Whether dlopen of programs is supported.
4380382ff0afSmrgdlopen_self=$enable_dlopen_self
4381382ff0afSmrg
4382382ff0afSmrg# Whether dlopen of statically linked programs is supported.
4383382ff0afSmrgdlopen_self_static=$enable_dlopen_self_static
4384382ff0afSmrg
4385382ff0afSmrg# Compiler flag to prevent dynamic linking.
4386382ff0afSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4387382ff0afSmrg
4388382ff0afSmrg# Compiler flag to turn off builtin functions.
4389382ff0afSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4390382ff0afSmrg
4391382ff0afSmrg# Compiler flag to allow reflexive dlopens.
4392382ff0afSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4393382ff0afSmrg
4394382ff0afSmrg# Compiler flag to generate shared objects directly from archives.
4395382ff0afSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4396382ff0afSmrg
4397382ff0afSmrg# Compiler flag to generate thread-safe objects.
4398382ff0afSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4399382ff0afSmrg
4400382ff0afSmrg# Library versioning type.
4401382ff0afSmrgversion_type=$version_type
4402382ff0afSmrg
4403382ff0afSmrg# Format of library name prefix.
4404382ff0afSmrglibname_spec=$lt_libname_spec
4405382ff0afSmrg
4406382ff0afSmrg# List of archive names.  First name is the real one, the rest are links.
4407382ff0afSmrg# The last name is the one that the linker finds with -lNAME.
4408382ff0afSmrglibrary_names_spec=$lt_library_names_spec
4409382ff0afSmrg
4410382ff0afSmrg# The coded name of the library, if different from the real name.
4411382ff0afSmrgsoname_spec=$lt_soname_spec
4412382ff0afSmrg
4413382ff0afSmrg# Commands used to build and install an old-style archive.
4414382ff0afSmrgRANLIB=$lt_RANLIB
4415382ff0afSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4416382ff0afSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
4417382ff0afSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
4418382ff0afSmrg
4419382ff0afSmrg# Create an old-style archive from a shared archive.
4420382ff0afSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4421382ff0afSmrg
4422382ff0afSmrg# Create a temporary old-style archive to link instead of a shared archive.
4423382ff0afSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4424382ff0afSmrg
4425382ff0afSmrg# Commands used to build and install a shared archive.
4426382ff0afSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4427382ff0afSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4428382ff0afSmrgpostinstall_cmds=$lt_postinstall_cmds
4429382ff0afSmrgpostuninstall_cmds=$lt_postuninstall_cmds
4430382ff0afSmrg
4431382ff0afSmrg# Commands used to build a loadable module (assumed same as above if empty)
4432382ff0afSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4433382ff0afSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4434382ff0afSmrg
4435382ff0afSmrg# Commands to strip libraries.
4436382ff0afSmrgold_striplib=$lt_old_striplib
4437382ff0afSmrgstriplib=$lt_striplib
4438382ff0afSmrg
4439382ff0afSmrg# Dependencies to place before the objects being linked to create a
4440382ff0afSmrg# shared library.
4441382ff0afSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4442382ff0afSmrg
4443382ff0afSmrg# Dependencies to place after the objects being linked to create a
4444382ff0afSmrg# shared library.
4445382ff0afSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4446382ff0afSmrg
4447382ff0afSmrg# Dependencies to place before the objects being linked to create a
4448382ff0afSmrg# shared library.
4449382ff0afSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4450382ff0afSmrg
4451382ff0afSmrg# Dependencies to place after the objects being linked to create a
4452382ff0afSmrg# shared library.
4453382ff0afSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4454382ff0afSmrg
4455382ff0afSmrg# The library search path used internally by the compiler when linking
4456382ff0afSmrg# a shared library.
4457382ff0afSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4458382ff0afSmrg
4459382ff0afSmrg# Method to check whether dependent libraries are shared objects.
4460382ff0afSmrgdeplibs_check_method=$lt_deplibs_check_method
4461382ff0afSmrg
4462382ff0afSmrg# Command to use when deplibs_check_method == file_magic.
4463382ff0afSmrgfile_magic_cmd=$lt_file_magic_cmd
4464382ff0afSmrg
4465382ff0afSmrg# Flag that allows shared libraries with undefined symbols to be built.
4466382ff0afSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4467382ff0afSmrg
4468382ff0afSmrg# Flag that forces no undefined symbols.
4469382ff0afSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4470382ff0afSmrg
4471382ff0afSmrg# Commands used to finish a libtool library installation in a directory.
4472382ff0afSmrgfinish_cmds=$lt_finish_cmds
4473382ff0afSmrg
4474382ff0afSmrg# Same as above, but a single script fragment to be evaled but not shown.
4475382ff0afSmrgfinish_eval=$lt_finish_eval
4476382ff0afSmrg
4477382ff0afSmrg# Take the output of nm and produce a listing of raw symbols and C names.
4478382ff0afSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4479382ff0afSmrg
4480382ff0afSmrg# Transform the output of nm in a proper C declaration
4481382ff0afSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4482382ff0afSmrg
4483382ff0afSmrg# Transform the output of nm in a C name address pair
4484382ff0afSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4485382ff0afSmrg
4486382ff0afSmrg# This is the shared library runtime path variable.
4487382ff0afSmrgrunpath_var=$runpath_var
4488382ff0afSmrg
4489382ff0afSmrg# This is the shared library path variable.
4490382ff0afSmrgshlibpath_var=$shlibpath_var
4491382ff0afSmrg
4492382ff0afSmrg# Is shlibpath searched before the hard-coded library search path?
4493382ff0afSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4494382ff0afSmrg
4495382ff0afSmrg# How to hardcode a shared library path into an executable.
4496382ff0afSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4497382ff0afSmrg
4498382ff0afSmrg# Whether we should hardcode library paths into libraries.
4499382ff0afSmrghardcode_into_libs=$hardcode_into_libs
4500382ff0afSmrg
4501382ff0afSmrg# Flag to hardcode \$libdir into a binary during linking.
4502382ff0afSmrg# This must work even if \$libdir does not exist.
4503382ff0afSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4504382ff0afSmrg
4505382ff0afSmrg# If ld is used when linking, flag to hardcode \$libdir into
4506382ff0afSmrg# a binary during linking. This must work even if \$libdir does
4507382ff0afSmrg# not exist.
4508382ff0afSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4509382ff0afSmrg
4510382ff0afSmrg# Whether we need a single -rpath flag with a separated argument.
4511382ff0afSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4512382ff0afSmrg
4513382ff0afSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4514382ff0afSmrg# resulting binary.
4515382ff0afSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4516382ff0afSmrg
4517382ff0afSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4518382ff0afSmrg# resulting binary.
4519382ff0afSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4520382ff0afSmrg
4521382ff0afSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4522382ff0afSmrg# the resulting binary.
4523382ff0afSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4524382ff0afSmrg
4525382ff0afSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
4526382ff0afSmrg# and all subsequent libraries and executables linked against it.
4527382ff0afSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4528382ff0afSmrg
4529382ff0afSmrg# Variables whose values should be saved in libtool wrapper scripts and
4530382ff0afSmrg# restored at relink time.
4531382ff0afSmrgvariables_saved_for_relink="$variables_saved_for_relink"
4532382ff0afSmrg
4533382ff0afSmrg# Whether libtool must link a program against all its dependency libraries.
4534382ff0afSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4535382ff0afSmrg
4536382ff0afSmrg# Compile-time system search path for libraries
4537382ff0afSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4538382ff0afSmrg
4539382ff0afSmrg# Run-time system search path for libraries
4540382ff0afSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4541382ff0afSmrg
4542382ff0afSmrg# Fix the shell variable \$srcfile for the compiler.
4543382ff0afSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4544382ff0afSmrg
4545382ff0afSmrg# Set to yes if exported symbols are required.
4546382ff0afSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4547382ff0afSmrg
4548382ff0afSmrg# The commands to list exported symbols.
4549382ff0afSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4550382ff0afSmrg
4551382ff0afSmrg# The commands to extract the exported symbol list from a shared archive.
4552382ff0afSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
4553382ff0afSmrg
4554382ff0afSmrg# Symbols that should not be listed in the preloaded symbols.
4555382ff0afSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4556382ff0afSmrg
4557382ff0afSmrg# Symbols that must always be exported.
4558382ff0afSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4559382ff0afSmrg
4560382ff0afSmrgifelse([$1],[],
4561382ff0afSmrg[# ### END LIBTOOL CONFIG],
4562382ff0afSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
4563382ff0afSmrg
4564382ff0afSmrg__EOF__
4565382ff0afSmrg
4566382ff0afSmrgifelse([$1],[], [
4567382ff0afSmrg  case $host_os in
4568382ff0afSmrg  aix3*)
4569382ff0afSmrg    cat <<\EOF >> "$cfgfile"
4570382ff0afSmrg
4571382ff0afSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
4572382ff0afSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
4573382ff0afSmrg# vanish in a puff of smoke.
4574382ff0afSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
4575382ff0afSmrg  COLLECT_NAMES=
4576382ff0afSmrg  export COLLECT_NAMES
4577382ff0afSmrgfi
4578382ff0afSmrgEOF
4579382ff0afSmrg    ;;
4580382ff0afSmrg  esac
4581382ff0afSmrg
4582382ff0afSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
4583382ff0afSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4584382ff0afSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
4585382ff0afSmrg  # is reportedly fixed, but why not run on old versions too?
4586382ff0afSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4587382ff0afSmrg
4588382ff0afSmrg  mv -f "$cfgfile" "$ofile" || \
4589382ff0afSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4590382ff0afSmrg  chmod +x "$ofile"
4591382ff0afSmrg])
4592382ff0afSmrgelse
4593382ff0afSmrg  # If there is no Makefile yet, we rely on a make rule to execute
4594382ff0afSmrg  # `config.status --recheck' to rerun these tests and create the
4595382ff0afSmrg  # libtool script then.
4596382ff0afSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4597382ff0afSmrg  if test -f "$ltmain_in"; then
4598382ff0afSmrg    test -f Makefile && make "$ltmain"
4599382ff0afSmrg  fi
4600382ff0afSmrgfi
4601382ff0afSmrg])# AC_LIBTOOL_CONFIG
4602382ff0afSmrg
4603382ff0afSmrg
4604382ff0afSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4605382ff0afSmrg# -------------------------------------------
4606382ff0afSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4607382ff0afSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4608382ff0afSmrg
4609382ff0afSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4610382ff0afSmrg
4611382ff0afSmrgif test "$GCC" = yes; then
4612382ff0afSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4613382ff0afSmrg
4614382ff0afSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4615382ff0afSmrg    lt_cv_prog_compiler_rtti_exceptions,
4616382ff0afSmrg    [-fno-rtti -fno-exceptions], [],
4617382ff0afSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4618382ff0afSmrgfi
4619382ff0afSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4620382ff0afSmrg
4621382ff0afSmrg
4622382ff0afSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4623382ff0afSmrg# ---------------------------------
4624382ff0afSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4625382ff0afSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
4626382ff0afSmrgAC_REQUIRE([AC_PROG_NM])
4627382ff0afSmrgAC_REQUIRE([AC_OBJEXT])
4628382ff0afSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
4629382ff0afSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4630382ff0afSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4631382ff0afSmrg[
4632382ff0afSmrg# These are sane defaults that work on at least a few old systems.
4633382ff0afSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4634382ff0afSmrg
4635382ff0afSmrg# Character class describing NM global symbol codes.
4636382ff0afSmrgsymcode='[[BCDEGRST]]'
4637382ff0afSmrg
4638382ff0afSmrg# Regexp to match symbols that can be accessed directly from C.
4639382ff0afSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4640382ff0afSmrg
4641382ff0afSmrg# Transform an extracted symbol line into a proper C declaration
4642382ff0afSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4643382ff0afSmrg
4644382ff0afSmrg# Transform an extracted symbol line into symbol name and symbol address
4645382ff0afSmrglt_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'"
4646382ff0afSmrg
4647382ff0afSmrg# Define system-specific variables.
4648382ff0afSmrgcase $host_os in
4649382ff0afSmrgaix*)
4650382ff0afSmrg  symcode='[[BCDT]]'
4651382ff0afSmrg  ;;
4652382ff0afSmrgcygwin* | mingw* | pw32*)
4653382ff0afSmrg  symcode='[[ABCDGISTW]]'
4654382ff0afSmrg  ;;
4655382ff0afSmrghpux*) # Its linker distinguishes data from code symbols
4656382ff0afSmrg  if test "$host_cpu" = ia64; then
4657382ff0afSmrg    symcode='[[ABCDEGRST]]'
4658382ff0afSmrg  fi
4659382ff0afSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4660382ff0afSmrg  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'"
4661382ff0afSmrg  ;;
4662382ff0afSmrglinux*)
4663382ff0afSmrg  if test "$host_cpu" = ia64; then
4664382ff0afSmrg    symcode='[[ABCDGIRSTW]]'
4665382ff0afSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4666382ff0afSmrg    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'"
4667382ff0afSmrg  fi
4668382ff0afSmrg  ;;
4669382ff0afSmrgirix* | nonstopux*)
4670382ff0afSmrg  symcode='[[BCDEGRST]]'
4671382ff0afSmrg  ;;
4672382ff0afSmrgosf*)
4673382ff0afSmrg  symcode='[[BCDEGQRST]]'
4674382ff0afSmrg  ;;
4675382ff0afSmrgsolaris*)
4676382ff0afSmrg  symcode='[[BDRT]]'
4677382ff0afSmrg  ;;
4678382ff0afSmrgsco3.2v5*)
4679382ff0afSmrg  symcode='[[DT]]'
4680382ff0afSmrg  ;;
4681382ff0afSmrgsysv4.2uw2*)
4682382ff0afSmrg  symcode='[[DT]]'
4683382ff0afSmrg  ;;
4684382ff0afSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
4685382ff0afSmrg  symcode='[[ABDT]]'
4686382ff0afSmrg  ;;
4687382ff0afSmrgsysv4)
4688382ff0afSmrg  symcode='[[DFNSTU]]'
4689382ff0afSmrg  ;;
4690382ff0afSmrgesac
4691382ff0afSmrg
4692382ff0afSmrg# Handle CRLF in mingw tool chain
4693382ff0afSmrgopt_cr=
4694382ff0afSmrgcase $build_os in
4695382ff0afSmrgmingw*)
4696382ff0afSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4697382ff0afSmrg  ;;
4698382ff0afSmrgesac
4699382ff0afSmrg
4700382ff0afSmrg# If we're using GNU nm, then use its standard symbol codes.
4701382ff0afSmrgcase `$NM -V 2>&1` in
4702382ff0afSmrg*GNU* | *'with BFD'*)
4703382ff0afSmrg  symcode='[[ABCDGIRSTW]]' ;;
4704382ff0afSmrgesac
4705382ff0afSmrg
4706382ff0afSmrg# Try without a prefix undercore, then with it.
4707382ff0afSmrgfor ac_symprfx in "" "_"; do
4708382ff0afSmrg
4709382ff0afSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4710382ff0afSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4711382ff0afSmrg
4712382ff0afSmrg  # Write the raw and C identifiers.
4713382ff0afSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4714382ff0afSmrg
4715382ff0afSmrg  # Check to see that the pipe works correctly.
4716382ff0afSmrg  pipe_works=no
4717382ff0afSmrg
4718382ff0afSmrg  rm -f conftest*
4719382ff0afSmrg  cat > conftest.$ac_ext <<EOF
4720382ff0afSmrg#ifdef __cplusplus
4721382ff0afSmrgextern "C" {
4722382ff0afSmrg#endif
4723382ff0afSmrgchar nm_test_var;
4724382ff0afSmrgvoid nm_test_func(){}
4725382ff0afSmrg#ifdef __cplusplus
4726382ff0afSmrg}
4727382ff0afSmrg#endif
4728382ff0afSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
4729382ff0afSmrgEOF
4730382ff0afSmrg
4731382ff0afSmrg  if AC_TRY_EVAL(ac_compile); then
4732382ff0afSmrg    # Now try to grab the symbols.
4733382ff0afSmrg    nlist=conftest.nm
4734382ff0afSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4735382ff0afSmrg      # Try sorting and uniquifying the output.
4736382ff0afSmrg      if sort "$nlist" | uniq > "$nlist"T; then
4737382ff0afSmrg	mv -f "$nlist"T "$nlist"
4738382ff0afSmrg      else
4739382ff0afSmrg	rm -f "$nlist"T
4740382ff0afSmrg      fi
4741382ff0afSmrg
4742382ff0afSmrg      # Make sure that we snagged all the symbols we need.
4743382ff0afSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4744382ff0afSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4745382ff0afSmrg	  cat <<EOF > conftest.$ac_ext
4746382ff0afSmrg#ifdef __cplusplus
4747382ff0afSmrgextern "C" {
4748382ff0afSmrg#endif
4749382ff0afSmrg
4750382ff0afSmrgEOF
4751382ff0afSmrg	  # Now generate the symbol file.
4752382ff0afSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4753382ff0afSmrg
4754382ff0afSmrg	  cat <<EOF >> conftest.$ac_ext
4755382ff0afSmrg#if defined (__STDC__) && __STDC__
4756382ff0afSmrg# define lt_ptr_t void *
4757382ff0afSmrg#else
4758382ff0afSmrg# define lt_ptr_t char *
4759382ff0afSmrg# define const
4760382ff0afSmrg#endif
4761382ff0afSmrg
4762382ff0afSmrg/* The mapping between symbol names and symbols. */
4763382ff0afSmrgconst struct {
4764382ff0afSmrg  const char *name;
4765382ff0afSmrg  lt_ptr_t address;
4766382ff0afSmrg}
4767382ff0afSmrglt_preloaded_symbols[[]] =
4768382ff0afSmrg{
4769382ff0afSmrgEOF
4770382ff0afSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4771382ff0afSmrg	  cat <<\EOF >> conftest.$ac_ext
4772382ff0afSmrg  {0, (lt_ptr_t) 0}
4773382ff0afSmrg};
4774382ff0afSmrg
4775382ff0afSmrg#ifdef __cplusplus
4776382ff0afSmrg}
4777382ff0afSmrg#endif
4778382ff0afSmrgEOF
4779382ff0afSmrg	  # Now try linking the two files.
4780382ff0afSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
4781382ff0afSmrg	  lt_save_LIBS="$LIBS"
4782382ff0afSmrg	  lt_save_CFLAGS="$CFLAGS"
4783382ff0afSmrg	  LIBS="conftstm.$ac_objext"
4784382ff0afSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4785382ff0afSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4786382ff0afSmrg	    pipe_works=yes
4787382ff0afSmrg	  fi
4788382ff0afSmrg	  LIBS="$lt_save_LIBS"
4789382ff0afSmrg	  CFLAGS="$lt_save_CFLAGS"
4790382ff0afSmrg	else
4791382ff0afSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4792382ff0afSmrg	fi
4793382ff0afSmrg      else
4794382ff0afSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4795382ff0afSmrg      fi
4796382ff0afSmrg    else
4797382ff0afSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4798382ff0afSmrg    fi
4799382ff0afSmrg  else
4800382ff0afSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4801382ff0afSmrg    cat conftest.$ac_ext >&5
4802382ff0afSmrg  fi
4803382ff0afSmrg  rm -f conftest* conftst*
4804382ff0afSmrg
4805382ff0afSmrg  # Do not use the global_symbol_pipe unless it works.
4806382ff0afSmrg  if test "$pipe_works" = yes; then
4807382ff0afSmrg    break
4808382ff0afSmrg  else
4809382ff0afSmrg    lt_cv_sys_global_symbol_pipe=
4810382ff0afSmrg  fi
4811382ff0afSmrgdone
4812382ff0afSmrg])
4813382ff0afSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4814382ff0afSmrg  lt_cv_sys_global_symbol_to_cdecl=
4815382ff0afSmrgfi
4816382ff0afSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4817382ff0afSmrg  AC_MSG_RESULT(failed)
4818382ff0afSmrgelse
4819382ff0afSmrg  AC_MSG_RESULT(ok)
4820382ff0afSmrgfi
4821382ff0afSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4822382ff0afSmrg
4823382ff0afSmrg
4824382ff0afSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4825382ff0afSmrg# ---------------------------------------
4826382ff0afSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4827382ff0afSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4828382ff0afSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4829382ff0afSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4830382ff0afSmrg
4831382ff0afSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
4832382ff0afSmrg ifelse([$1],[CXX],[
4833382ff0afSmrg  # C++ specific cases for pic, static, wl, etc.
4834382ff0afSmrg  if test "$GXX" = yes; then
4835382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4837382ff0afSmrg
4838382ff0afSmrg    case $host_os in
4839382ff0afSmrg    aix*)
4840382ff0afSmrg      # All AIX code is PIC.
4841382ff0afSmrg      if test "$host_cpu" = ia64; then
4842382ff0afSmrg	# AIX 5 now supports IA64 processor
4843382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4844382ff0afSmrg      fi
4845382ff0afSmrg      ;;
4846382ff0afSmrg    amigaos*)
4847382ff0afSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
4848382ff0afSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
4849382ff0afSmrg      # like `-m68040'.
4850382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4851382ff0afSmrg      ;;
4852382ff0afSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4853382ff0afSmrg      # PIC is the default for these OSes.
4854382ff0afSmrg      ;;
4855382ff0afSmrg    mingw* | os2* | pw32*)
4856382ff0afSmrg      # This hack is so that the source file can tell whether it is being
4857382ff0afSmrg      # built for inclusion in a dll (and should export symbols for example).
4858382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4859382ff0afSmrg      ;;
4860382ff0afSmrg    darwin* | rhapsody*)
4861382ff0afSmrg      # PIC is the default on this platform
4862382ff0afSmrg      # Common symbols not allowed in MH_DYLIB files
4863382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4864382ff0afSmrg      ;;
4865382ff0afSmrg    *djgpp*)
4866382ff0afSmrg      # DJGPP does not support shared libraries at all
4867382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4868382ff0afSmrg      ;;
4869382ff0afSmrg    interix3*)
4870382ff0afSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4871382ff0afSmrg      # Instead, we relocate shared libraries at runtime.
4872382ff0afSmrg      ;;
4873382ff0afSmrg    sysv4*MP*)
4874382ff0afSmrg      if test -d /usr/nec; then
4875382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4876382ff0afSmrg      fi
4877382ff0afSmrg      ;;
4878382ff0afSmrg    hpux*)
4879382ff0afSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4880382ff0afSmrg      # not for PA HP-UX.
4881382ff0afSmrg      case $host_cpu in
4882382ff0afSmrg      hppa*64*|ia64*)
4883382ff0afSmrg	;;
4884382ff0afSmrg      *)
4885382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4886382ff0afSmrg	;;
4887382ff0afSmrg      esac
4888382ff0afSmrg      ;;
4889382ff0afSmrg    *)
4890382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4891382ff0afSmrg      ;;
4892382ff0afSmrg    esac
4893382ff0afSmrg  else
4894382ff0afSmrg    case $host_os in
4895382ff0afSmrg      aix4* | aix5*)
4896382ff0afSmrg	# All AIX code is PIC.
4897382ff0afSmrg	if test "$host_cpu" = ia64; then
4898382ff0afSmrg	  # AIX 5 now supports IA64 processor
4899382ff0afSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4900382ff0afSmrg	else
4901382ff0afSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4902382ff0afSmrg	fi
4903382ff0afSmrg	;;
4904382ff0afSmrg      chorus*)
4905382ff0afSmrg	case $cc_basename in
4906382ff0afSmrg	cxch68*)
4907382ff0afSmrg	  # Green Hills C++ Compiler
4908382ff0afSmrg	  # _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"
4909382ff0afSmrg	  ;;
4910382ff0afSmrg	esac
4911382ff0afSmrg	;;
4912382ff0afSmrg       darwin*)
4913382ff0afSmrg         # PIC is the default on this platform
4914382ff0afSmrg         # Common symbols not allowed in MH_DYLIB files
4915382ff0afSmrg         case $cc_basename in
4916382ff0afSmrg           xlc*)
4917382ff0afSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4918382ff0afSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4919382ff0afSmrg           ;;
4920382ff0afSmrg         esac
4921382ff0afSmrg       ;;
4922382ff0afSmrg      dgux*)
4923382ff0afSmrg	case $cc_basename in
4924382ff0afSmrg	  ec++*)
4925382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4926382ff0afSmrg	    ;;
4927382ff0afSmrg	  ghcx*)
4928382ff0afSmrg	    # Green Hills C++ Compiler
4929382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4930382ff0afSmrg	    ;;
4931382ff0afSmrg	  *)
4932382ff0afSmrg	    ;;
4933382ff0afSmrg	esac
4934382ff0afSmrg	;;
4935382ff0afSmrg      freebsd* | kfreebsd*-gnu | dragonfly*)
4936382ff0afSmrg	# FreeBSD uses GNU C++
4937382ff0afSmrg	;;
4938382ff0afSmrg      hpux9* | hpux10* | hpux11*)
4939382ff0afSmrg	case $cc_basename in
4940382ff0afSmrg	  CC*)
4941382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4942382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4943382ff0afSmrg	    if test "$host_cpu" != ia64; then
4944382ff0afSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4945382ff0afSmrg	    fi
4946382ff0afSmrg	    ;;
4947382ff0afSmrg	  aCC*)
4948382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4949382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4950382ff0afSmrg	    case $host_cpu in
4951382ff0afSmrg	    hppa*64*|ia64*)
4952382ff0afSmrg	      # +Z the default
4953382ff0afSmrg	      ;;
4954382ff0afSmrg	    *)
4955382ff0afSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4956382ff0afSmrg	      ;;
4957382ff0afSmrg	    esac
4958382ff0afSmrg	    ;;
4959382ff0afSmrg	  *)
4960382ff0afSmrg	    ;;
4961382ff0afSmrg	esac
4962382ff0afSmrg	;;
4963382ff0afSmrg      interix*)
4964382ff0afSmrg	# This is c89, which is MS Visual C++ (no shared libs)
4965382ff0afSmrg	# Anyone wants to do a port?
4966382ff0afSmrg	;;
4967382ff0afSmrg      irix5* | irix6* | nonstopux*)
4968382ff0afSmrg	case $cc_basename in
4969382ff0afSmrg	  CC*)
4970382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4971382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4972382ff0afSmrg	    # CC pic flag -KPIC is the default.
4973382ff0afSmrg	    ;;
4974382ff0afSmrg	  *)
4975382ff0afSmrg	    ;;
4976382ff0afSmrg	esac
4977382ff0afSmrg	;;
4978382ff0afSmrg      linux*)
4979382ff0afSmrg	case $cc_basename in
4980382ff0afSmrg	  KCC*)
4981382ff0afSmrg	    # KAI C++ Compiler
4982382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4983382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4984382ff0afSmrg	    ;;
4985382ff0afSmrg	  icpc* | ecpc*)
4986382ff0afSmrg	    # Intel C++
4987382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4988382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4989382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4990382ff0afSmrg	    ;;
4991382ff0afSmrg	  pgCC*)
4992382ff0afSmrg	    # Portland Group C++ compiler.
4993382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4994382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4995382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4996382ff0afSmrg	    ;;
4997382ff0afSmrg	  cxx*)
4998382ff0afSmrg	    # Compaq C++
4999382ff0afSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5000382ff0afSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5001382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5002382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5003382ff0afSmrg	    ;;
5004382ff0afSmrg	  *)
5005382ff0afSmrg	    ;;
5006382ff0afSmrg	esac
5007382ff0afSmrg	;;
5008382ff0afSmrg      lynxos*)
5009382ff0afSmrg	;;
5010382ff0afSmrg      m88k*)
5011382ff0afSmrg	;;
5012382ff0afSmrg      mvs*)
5013382ff0afSmrg	case $cc_basename in
5014382ff0afSmrg	  cxx*)
5015382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5016382ff0afSmrg	    ;;
5017382ff0afSmrg	  *)
5018382ff0afSmrg	    ;;
5019382ff0afSmrg	esac
5020382ff0afSmrg	;;
5021382ff0afSmrg      netbsd*)
5022382ff0afSmrg	;;
5023382ff0afSmrg      osf3* | osf4* | osf5*)
5024382ff0afSmrg	case $cc_basename in
5025382ff0afSmrg	  KCC*)
5026382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5027382ff0afSmrg	    ;;
5028382ff0afSmrg	  RCC*)
5029382ff0afSmrg	    # Rational C++ 2.4.1
5030382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5031382ff0afSmrg	    ;;
5032382ff0afSmrg	  cxx*)
5033382ff0afSmrg	    # Digital/Compaq C++
5034382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5035382ff0afSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5036382ff0afSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5037382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5038382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5039382ff0afSmrg	    ;;
5040382ff0afSmrg	  *)
5041382ff0afSmrg	    ;;
5042382ff0afSmrg	esac
5043382ff0afSmrg	;;
5044382ff0afSmrg      psos*)
5045382ff0afSmrg	;;
5046382ff0afSmrg      solaris*)
5047382ff0afSmrg	case $cc_basename in
5048382ff0afSmrg	  CC*)
5049382ff0afSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
5050382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5051382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5052382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5053382ff0afSmrg	    ;;
5054382ff0afSmrg	  gcx*)
5055382ff0afSmrg	    # Green Hills C++ Compiler
5056382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5057382ff0afSmrg	    ;;
5058382ff0afSmrg	  *)
5059382ff0afSmrg	    ;;
5060382ff0afSmrg	esac
5061382ff0afSmrg	;;
5062382ff0afSmrg      sunos4*)
5063382ff0afSmrg	case $cc_basename in
5064382ff0afSmrg	  CC*)
5065382ff0afSmrg	    # Sun C++ 4.x
5066382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5067382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5068382ff0afSmrg	    ;;
5069382ff0afSmrg	  lcc*)
5070382ff0afSmrg	    # Lucid
5071382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5072382ff0afSmrg	    ;;
5073382ff0afSmrg	  *)
5074382ff0afSmrg	    ;;
5075382ff0afSmrg	esac
5076382ff0afSmrg	;;
5077382ff0afSmrg      tandem*)
5078382ff0afSmrg	case $cc_basename in
5079382ff0afSmrg	  NCC*)
5080382ff0afSmrg	    # NonStop-UX NCC 3.20
5081382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5082382ff0afSmrg	    ;;
5083382ff0afSmrg	  *)
5084382ff0afSmrg	    ;;
5085382ff0afSmrg	esac
5086382ff0afSmrg	;;
5087382ff0afSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5088382ff0afSmrg	case $cc_basename in
5089382ff0afSmrg	  CC*)
5090382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5091382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5092382ff0afSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5093382ff0afSmrg	    ;;
5094382ff0afSmrg	esac
5095382ff0afSmrg	;;
5096382ff0afSmrg      vxworks*)
5097382ff0afSmrg	;;
5098382ff0afSmrg      *)
5099382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5100382ff0afSmrg	;;
5101382ff0afSmrg    esac
5102382ff0afSmrg  fi
5103382ff0afSmrg],
5104382ff0afSmrg[
5105382ff0afSmrg  if test "$GCC" = yes; then
5106382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5107382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5108382ff0afSmrg
5109382ff0afSmrg    case $host_os in
5110382ff0afSmrg      aix*)
5111382ff0afSmrg      # All AIX code is PIC.
5112382ff0afSmrg      if test "$host_cpu" = ia64; then
5113382ff0afSmrg	# AIX 5 now supports IA64 processor
5114382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5115382ff0afSmrg      fi
5116382ff0afSmrg      ;;
5117382ff0afSmrg
5118382ff0afSmrg    amigaos*)
5119382ff0afSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
5120382ff0afSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
5121382ff0afSmrg      # like `-m68040'.
5122382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5123382ff0afSmrg      ;;
5124382ff0afSmrg
5125382ff0afSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5126382ff0afSmrg      # PIC is the default for these OSes.
5127382ff0afSmrg      ;;
5128382ff0afSmrg
5129382ff0afSmrg    mingw* | pw32* | os2*)
5130382ff0afSmrg      # This hack is so that the source file can tell whether it is being
5131382ff0afSmrg      # built for inclusion in a dll (and should export symbols for example).
5132382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5133382ff0afSmrg      ;;
5134382ff0afSmrg
5135382ff0afSmrg    darwin* | rhapsody*)
5136382ff0afSmrg      # PIC is the default on this platform
5137382ff0afSmrg      # Common symbols not allowed in MH_DYLIB files
5138382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5139382ff0afSmrg      ;;
5140382ff0afSmrg
5141382ff0afSmrg    interix3*)
5142382ff0afSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5143382ff0afSmrg      # Instead, we relocate shared libraries at runtime.
5144382ff0afSmrg      ;;
5145382ff0afSmrg
5146382ff0afSmrg    msdosdjgpp*)
5147382ff0afSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5148382ff0afSmrg      # on systems that don't support them.
5149382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5150382ff0afSmrg      enable_shared=no
5151382ff0afSmrg      ;;
5152382ff0afSmrg
5153382ff0afSmrg    sysv4*MP*)
5154382ff0afSmrg      if test -d /usr/nec; then
5155382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5156382ff0afSmrg      fi
5157382ff0afSmrg      ;;
5158382ff0afSmrg
5159382ff0afSmrg    hpux*)
5160382ff0afSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5161382ff0afSmrg      # not for PA HP-UX.
5162382ff0afSmrg      case $host_cpu in
5163382ff0afSmrg      hppa*64*|ia64*)
5164382ff0afSmrg	# +Z the default
5165382ff0afSmrg	;;
5166382ff0afSmrg      *)
5167382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5168382ff0afSmrg	;;
5169382ff0afSmrg      esac
5170382ff0afSmrg      ;;
5171382ff0afSmrg
5172382ff0afSmrg    *)
5173382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5174382ff0afSmrg      ;;
5175382ff0afSmrg    esac
5176382ff0afSmrg  else
5177382ff0afSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
5178382ff0afSmrg    case $host_os in
5179382ff0afSmrg    aix*)
5180382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5181382ff0afSmrg      if test "$host_cpu" = ia64; then
5182382ff0afSmrg	# AIX 5 now supports IA64 processor
5183382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5184382ff0afSmrg      else
5185382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5186382ff0afSmrg      fi
5187382ff0afSmrg      ;;
5188382ff0afSmrg      darwin*)
5189382ff0afSmrg        # PIC is the default on this platform
5190382ff0afSmrg        # Common symbols not allowed in MH_DYLIB files
5191382ff0afSmrg       case $cc_basename in
5192382ff0afSmrg         xlc*)
5193382ff0afSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5194382ff0afSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5195382ff0afSmrg         ;;
5196382ff0afSmrg       esac
5197382ff0afSmrg       ;;
5198382ff0afSmrg
5199382ff0afSmrg    mingw* | pw32* | os2*)
5200382ff0afSmrg      # This hack is so that the source file can tell whether it is being
5201382ff0afSmrg      # built for inclusion in a dll (and should export symbols for example).
5202382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5203382ff0afSmrg      ;;
5204382ff0afSmrg
5205382ff0afSmrg    hpux9* | hpux10* | hpux11*)
5206382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5207382ff0afSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5208382ff0afSmrg      # not for PA HP-UX.
5209382ff0afSmrg      case $host_cpu in
5210382ff0afSmrg      hppa*64*|ia64*)
5211382ff0afSmrg	# +Z the default
5212382ff0afSmrg	;;
5213382ff0afSmrg      *)
5214382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5215382ff0afSmrg	;;
5216382ff0afSmrg      esac
5217382ff0afSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5218382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5219382ff0afSmrg      ;;
5220382ff0afSmrg
5221382ff0afSmrg    irix5* | irix6* | nonstopux*)
5222382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5223382ff0afSmrg      # PIC (with -KPIC) is the default.
5224382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5225382ff0afSmrg      ;;
5226382ff0afSmrg
5227382ff0afSmrg    newsos6)
5228382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5229382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5230382ff0afSmrg      ;;
5231382ff0afSmrg
5232382ff0afSmrg    linux*)
5233382ff0afSmrg      case $cc_basename in
5234382ff0afSmrg      icc* | ecc*)
5235382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5236382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5237382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5238382ff0afSmrg        ;;
5239382ff0afSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
5240382ff0afSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
5241382ff0afSmrg	# which looks to be a dead project)
5242382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5243382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5244382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5245382ff0afSmrg        ;;
5246382ff0afSmrg      ccc*)
5247382ff0afSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5248382ff0afSmrg        # All Alpha code is PIC.
5249382ff0afSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5250382ff0afSmrg        ;;
5251382ff0afSmrg      esac
5252382ff0afSmrg      ;;
5253382ff0afSmrg
5254382ff0afSmrg    osf3* | osf4* | osf5*)
5255382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5256382ff0afSmrg      # All OSF/1 code is PIC.
5257382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5258382ff0afSmrg      ;;
5259382ff0afSmrg
5260382ff0afSmrg    solaris*)
5261382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5262382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5263382ff0afSmrg      case $cc_basename in
5264382ff0afSmrg      f77* | f90* | f95*)
5265382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5266382ff0afSmrg      *)
5267382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5268382ff0afSmrg      esac
5269382ff0afSmrg      ;;
5270382ff0afSmrg
5271382ff0afSmrg    sunos4*)
5272382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5273382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5274382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5275382ff0afSmrg      ;;
5276382ff0afSmrg
5277382ff0afSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
5278382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5279382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5280382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5281382ff0afSmrg      ;;
5282382ff0afSmrg
5283382ff0afSmrg    sysv4*MP*)
5284382ff0afSmrg      if test -d /usr/nec ;then
5285382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5286382ff0afSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5287382ff0afSmrg      fi
5288382ff0afSmrg      ;;
5289382ff0afSmrg
5290382ff0afSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5291382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5292382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5293382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5294382ff0afSmrg      ;;
5295382ff0afSmrg
5296382ff0afSmrg    unicos*)
5297382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5298382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5299382ff0afSmrg      ;;
5300382ff0afSmrg
5301382ff0afSmrg    uts4*)
5302382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5303382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5304382ff0afSmrg      ;;
5305382ff0afSmrg
5306382ff0afSmrg    *)
5307382ff0afSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5308382ff0afSmrg      ;;
5309382ff0afSmrg    esac
5310382ff0afSmrg  fi
5311382ff0afSmrg])
5312382ff0afSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5313382ff0afSmrg
5314382ff0afSmrg#
5315382ff0afSmrg# Check to make sure the PIC flag actually works.
5316382ff0afSmrg#
5317382ff0afSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5318382ff0afSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5319382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5320382ff0afSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5321382ff0afSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5322382ff0afSmrg     "" | " "*) ;;
5323382ff0afSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5324382ff0afSmrg     esac],
5325382ff0afSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5326382ff0afSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5327382ff0afSmrgfi
5328382ff0afSmrgcase $host_os in
5329382ff0afSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
5330382ff0afSmrg  *djgpp*)
5331382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5332382ff0afSmrg    ;;
5333382ff0afSmrg  *)
5334382ff0afSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5335382ff0afSmrg    ;;
5336382ff0afSmrgesac
5337382ff0afSmrg
5338382ff0afSmrg#
5339382ff0afSmrg# Check to make sure the static flag actually works.
5340382ff0afSmrg#
5341382ff0afSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5342382ff0afSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5343382ff0afSmrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5344382ff0afSmrg  $lt_tmp_static_flag,
5345382ff0afSmrg  [],
5346382ff0afSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5347382ff0afSmrg])
5348382ff0afSmrg
5349382ff0afSmrg
5350382ff0afSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5351382ff0afSmrg# ------------------------------------
5352382ff0afSmrg# See if the linker supports building shared libraries.
5353382ff0afSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5354382ff0afSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5355382ff0afSmrgifelse([$1],[CXX],[
5356382ff0afSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5357382ff0afSmrg  case $host_os in
5358382ff0afSmrg  aix4* | aix5*)
5359382ff0afSmrg    # If we're using GNU nm, then we don't want the "-C" option.
5360382ff0afSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5361382ff0afSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5362382ff0afSmrg      _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'
5363382ff0afSmrg    else
5364382ff0afSmrg      _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'
5365382ff0afSmrg    fi
5366382ff0afSmrg    ;;
5367382ff0afSmrg  pw32*)
5368382ff0afSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5369382ff0afSmrg  ;;
5370382ff0afSmrg  cygwin* | mingw*)
5371382ff0afSmrg    _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'
5372382ff0afSmrg  ;;
5373382ff0afSmrg  *)
5374382ff0afSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5375382ff0afSmrg  ;;
5376382ff0afSmrg  esac
5377382ff0afSmrg],[
5378382ff0afSmrg  runpath_var=
5379382ff0afSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5380382ff0afSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5381382ff0afSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
5382382ff0afSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5383382ff0afSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5384382ff0afSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5385382ff0afSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5386382ff0afSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5387382ff0afSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5388382ff0afSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5389382ff0afSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5390382ff0afSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5391382ff0afSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5392382ff0afSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5393382ff0afSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5394382ff0afSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5395382ff0afSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5396382ff0afSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
5397382ff0afSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5398382ff0afSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5399382ff0afSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5400382ff0afSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
5401382ff0afSmrg  # included in the symbol list
5402382ff0afSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
5403382ff0afSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5404382ff0afSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5405382ff0afSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5406382ff0afSmrg  # as well as any symbol that contains `d'.
5407382ff0afSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5408382ff0afSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5409382ff0afSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5410382ff0afSmrg  # the symbol is explicitly referenced.  Since portable code cannot
5411382ff0afSmrg  # rely on this symbol name, it's probably fine to never include it in
5412382ff0afSmrg  # preloaded symbol tables.
5413382ff0afSmrg  extract_expsyms_cmds=
5414382ff0afSmrg  # Just being paranoid about ensuring that cc_basename is set.
5415382ff0afSmrg  _LT_CC_BASENAME([$compiler])
5416382ff0afSmrg  case $host_os in
5417382ff0afSmrg  cygwin* | mingw* | pw32*)
5418382ff0afSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5419382ff0afSmrg    # When not using gcc, we currently assume that we are using
5420382ff0afSmrg    # Microsoft Visual C++.
5421382ff0afSmrg    if test "$GCC" != yes; then
5422382ff0afSmrg      with_gnu_ld=no
5423382ff0afSmrg    fi
5424382ff0afSmrg    ;;
5425382ff0afSmrg  interix*)
5426382ff0afSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
5427382ff0afSmrg    with_gnu_ld=yes
5428382ff0afSmrg    ;;
5429382ff0afSmrg  openbsd*)
5430382ff0afSmrg    with_gnu_ld=no
5431382ff0afSmrg    ;;
5432382ff0afSmrg  esac
5433382ff0afSmrg
5434382ff0afSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5435382ff0afSmrg  if test "$with_gnu_ld" = yes; then
5436382ff0afSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5437382ff0afSmrg    wlarc='${wl}'
5438382ff0afSmrg
5439382ff0afSmrg    # Set some defaults for GNU ld with shared library support. These
5440382ff0afSmrg    # are reset later if shared libraries are not supported. Putting them
5441382ff0afSmrg    # here allows them to be overridden if necessary.
5442382ff0afSmrg    runpath_var=LD_RUN_PATH
5443382ff0afSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5444382ff0afSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5445382ff0afSmrg    # ancient GNU ld didn't support --whole-archive et. al.
5446382ff0afSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5447382ff0afSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5448382ff0afSmrg      else
5449382ff0afSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5450382ff0afSmrg    fi
5451382ff0afSmrg    supports_anon_versioning=no
5452382ff0afSmrg    case `$LD -v 2>/dev/null` in
5453382ff0afSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5454382ff0afSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5455382ff0afSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5456382ff0afSmrg      *\ 2.11.*) ;; # other 2.11 versions
5457382ff0afSmrg      *) supports_anon_versioning=yes ;;
5458382ff0afSmrg    esac
5459382ff0afSmrg
5460382ff0afSmrg    # See if GNU ld supports shared libraries.
5461382ff0afSmrg    case $host_os in
5462382ff0afSmrg    aix3* | aix4* | aix5*)
5463382ff0afSmrg      # On AIX/PPC, the GNU linker is very broken
5464382ff0afSmrg      if test "$host_cpu" != ia64; then
5465382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5466382ff0afSmrg	cat <<EOF 1>&2
5467382ff0afSmrg
5468382ff0afSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5469382ff0afSmrg*** to be unable to reliably create shared libraries on AIX.
5470382ff0afSmrg*** Therefore, libtool is disabling shared libraries support.  If you
5471382ff0afSmrg*** really care for shared libraries, you may want to modify your PATH
5472382ff0afSmrg*** so that a non-GNU linker is found, and then restart.
5473382ff0afSmrg
5474382ff0afSmrgEOF
5475382ff0afSmrg      fi
5476382ff0afSmrg      ;;
5477382ff0afSmrg
5478382ff0afSmrg    amigaos*)
5479382ff0afSmrg      _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)'
5480382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5481382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5482382ff0afSmrg
5483382ff0afSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5484382ff0afSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
5485382ff0afSmrg      # to version 4, is to share data among multiple programs linked
5486382ff0afSmrg      # with the same dynamic library.  Since this doesn't match the
5487382ff0afSmrg      # behavior of shared libraries on other platforms, we can't use
5488382ff0afSmrg      # them.
5489382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5490382ff0afSmrg      ;;
5491382ff0afSmrg
5492382ff0afSmrg    beos*)
5493382ff0afSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5494382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5495382ff0afSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5496382ff0afSmrg	# support --undefined.  This deserves some investigation.  FIXME
5497382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5498382ff0afSmrg      else
5499382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5500382ff0afSmrg      fi
5501382ff0afSmrg      ;;
5502382ff0afSmrg
5503382ff0afSmrg    cygwin* | mingw* | pw32*)
5504382ff0afSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5505382ff0afSmrg      # as there is no search path for DLLs.
5506382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5507382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5508382ff0afSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5509382ff0afSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5510382ff0afSmrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5511382ff0afSmrg
5512382ff0afSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5513382ff0afSmrg        _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'
5514382ff0afSmrg	# If the export-symbols file already is a .def file (1st line
5515382ff0afSmrg	# is EXPORTS), use it as is; otherwise, prepend...
5516382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5517382ff0afSmrg	  cp $export_symbols $output_objdir/$soname.def;
5518382ff0afSmrg	else
5519382ff0afSmrg	  echo EXPORTS > $output_objdir/$soname.def;
5520382ff0afSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
5521382ff0afSmrg	fi~
5522382ff0afSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5523382ff0afSmrg      else
5524382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5525382ff0afSmrg      fi
5526382ff0afSmrg      ;;
5527382ff0afSmrg
5528382ff0afSmrg    interix3*)
5529382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5530382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5531382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5532382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5533382ff0afSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5534382ff0afSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5535382ff0afSmrg      # default) and relocated if they conflict, which is a slow very memory
5536382ff0afSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5537382ff0afSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5538382ff0afSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5539382ff0afSmrg      _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'
5540382ff0afSmrg      _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'
5541382ff0afSmrg      ;;
5542382ff0afSmrg
5543382ff0afSmrg    linux*)
5544382ff0afSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5545382ff0afSmrg	tmp_addflag=
5546382ff0afSmrg	case $cc_basename,$host_cpu in
5547382ff0afSmrg	pgcc*)				# Portland Group C compiler
5548382ff0afSmrg	  _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'
5549382ff0afSmrg	  tmp_addflag=' $pic_flag'
5550382ff0afSmrg	  ;;
5551382ff0afSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5552382ff0afSmrg	  _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'
5553382ff0afSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5554382ff0afSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5555382ff0afSmrg	  tmp_addflag=' -i_dynamic' ;;
5556382ff0afSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5557382ff0afSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5558382ff0afSmrg	ifc* | ifort*)			# Intel Fortran compiler
5559382ff0afSmrg	  tmp_addflag=' -nofor_main' ;;
5560382ff0afSmrg	esac
5561382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5562382ff0afSmrg
5563382ff0afSmrg	if test $supports_anon_versioning = yes; then
5564382ff0afSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5565382ff0afSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5566382ff0afSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
5567382ff0afSmrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5568382ff0afSmrg	fi
5569382ff0afSmrg      else
5570382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5571382ff0afSmrg      fi
5572382ff0afSmrg      ;;
5573382ff0afSmrg
5574382ff0afSmrg    netbsd*)
5575382ff0afSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5576382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5577382ff0afSmrg	wlarc=
5578382ff0afSmrg      else
5579382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5580382ff0afSmrg	_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'
5581382ff0afSmrg      fi
5582382ff0afSmrg      ;;
5583382ff0afSmrg
5584382ff0afSmrg    solaris*)
5585382ff0afSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5586382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5587382ff0afSmrg	cat <<EOF 1>&2
5588382ff0afSmrg
5589382ff0afSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5590382ff0afSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
5591382ff0afSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5592382ff0afSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5593382ff0afSmrg*** your PATH or compiler configuration so that the native linker is
5594382ff0afSmrg*** used, and then restart.
5595382ff0afSmrg
5596382ff0afSmrgEOF
5597382ff0afSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5598382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5599382ff0afSmrg	_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'
5600382ff0afSmrg      else
5601382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5602382ff0afSmrg      fi
5603382ff0afSmrg      ;;
5604382ff0afSmrg
5605382ff0afSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5606382ff0afSmrg      case `$LD -v 2>&1` in
5607382ff0afSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
5608382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5609382ff0afSmrg	cat <<_LT_EOF 1>&2
5610382ff0afSmrg
5611382ff0afSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5612382ff0afSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5613382ff0afSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5614382ff0afSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5615382ff0afSmrg*** your PATH or compiler configuration so that the native linker is
5616382ff0afSmrg*** used, and then restart.
5617382ff0afSmrg
5618382ff0afSmrg_LT_EOF
5619382ff0afSmrg	;;
5620382ff0afSmrg	*)
5621382ff0afSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5622382ff0afSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5623382ff0afSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5624382ff0afSmrg	    _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'
5625382ff0afSmrg	  else
5626382ff0afSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5627382ff0afSmrg	  fi
5628382ff0afSmrg	;;
5629382ff0afSmrg      esac
5630382ff0afSmrg      ;;
5631382ff0afSmrg
5632382ff0afSmrg    sunos4*)
5633382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5634382ff0afSmrg      wlarc=
5635382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5636382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5637382ff0afSmrg      ;;
5638382ff0afSmrg
5639382ff0afSmrg    *)
5640382ff0afSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5641382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5642382ff0afSmrg	_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'
5643382ff0afSmrg      else
5644382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5645382ff0afSmrg      fi
5646382ff0afSmrg      ;;
5647382ff0afSmrg    esac
5648382ff0afSmrg
5649382ff0afSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5650382ff0afSmrg      runpath_var=
5651382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5652382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5653382ff0afSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5654382ff0afSmrg    fi
5655382ff0afSmrg  else
5656382ff0afSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
5657382ff0afSmrg    case $host_os in
5658382ff0afSmrg    aix3*)
5659382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5660382ff0afSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5661382ff0afSmrg      _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'
5662382ff0afSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
5663382ff0afSmrg      # are no directories specified by -L.
5664382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5665382ff0afSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5666382ff0afSmrg	# Neither direct hardcoding nor static linking is supported with a
5667382ff0afSmrg	# broken collect2.
5668382ff0afSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5669382ff0afSmrg      fi
5670382ff0afSmrg      ;;
5671382ff0afSmrg
5672382ff0afSmrg    aix4* | aix5*)
5673382ff0afSmrg      if test "$host_cpu" = ia64; then
5674382ff0afSmrg	# On IA64, the linker does run time linking by default, so we don't
5675382ff0afSmrg	# have to do anything special.
5676382ff0afSmrg	aix_use_runtimelinking=no
5677382ff0afSmrg	exp_sym_flag='-Bexport'
5678382ff0afSmrg	no_entry_flag=""
5679382ff0afSmrg      else
5680382ff0afSmrg	# If we're using GNU nm, then we don't want the "-C" option.
5681382ff0afSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5682382ff0afSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5683382ff0afSmrg	  _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'
5684382ff0afSmrg	else
5685382ff0afSmrg	  _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'
5686382ff0afSmrg	fi
5687382ff0afSmrg	aix_use_runtimelinking=no
5688382ff0afSmrg
5689382ff0afSmrg	# Test if we are trying to use run time linking or normal
5690382ff0afSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5691382ff0afSmrg	# need to do runtime linking.
5692382ff0afSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5693382ff0afSmrg	  for ld_flag in $LDFLAGS; do
5694382ff0afSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5695382ff0afSmrg  	    aix_use_runtimelinking=yes
5696382ff0afSmrg  	    break
5697382ff0afSmrg  	  fi
5698382ff0afSmrg	  done
5699382ff0afSmrg	  ;;
5700382ff0afSmrg	esac
5701382ff0afSmrg
5702382ff0afSmrg	exp_sym_flag='-bexport'
5703382ff0afSmrg	no_entry_flag='-bnoentry'
5704382ff0afSmrg      fi
5705382ff0afSmrg
5706382ff0afSmrg      # When large executables or shared objects are built, AIX ld can
5707382ff0afSmrg      # have problems creating the table of contents.  If linking a library
5708382ff0afSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5709382ff0afSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5710382ff0afSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5711382ff0afSmrg
5712382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
5713382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5714382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5715382ff0afSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5716382ff0afSmrg
5717382ff0afSmrg      if test "$GCC" = yes; then
5718382ff0afSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5719382ff0afSmrg	# We only want to do this on AIX 4.2 and lower, the check
5720382ff0afSmrg	# below for broken collect2 doesn't work under 4.3+
5721382ff0afSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5722382ff0afSmrg	  if test -f "$collect2name" && \
5723382ff0afSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5724382ff0afSmrg	  then
5725382ff0afSmrg  	  # We have reworked collect2
5726382ff0afSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5727382ff0afSmrg	  else
5728382ff0afSmrg  	  # We have old collect2
5729382ff0afSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5730382ff0afSmrg  	  # It fails to find uninstalled libraries when the uninstalled
5731382ff0afSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5732382ff0afSmrg  	  # to unsupported forces relinking
5733382ff0afSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5734382ff0afSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5735382ff0afSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5736382ff0afSmrg	  fi
5737382ff0afSmrg	  ;;
5738382ff0afSmrg	esac
5739382ff0afSmrg	shared_flag='-shared'
5740382ff0afSmrg	if test "$aix_use_runtimelinking" = yes; then
5741382ff0afSmrg	  shared_flag="$shared_flag "'${wl}-G'
5742382ff0afSmrg	fi
5743382ff0afSmrg      else
5744382ff0afSmrg	# not using gcc
5745382ff0afSmrg	if test "$host_cpu" = ia64; then
5746382ff0afSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5747382ff0afSmrg  	# chokes on -Wl,-G. The following line is correct:
5748382ff0afSmrg	  shared_flag='-G'
5749382ff0afSmrg	else
5750382ff0afSmrg	  if test "$aix_use_runtimelinking" = yes; then
5751382ff0afSmrg	    shared_flag='${wl}-G'
5752382ff0afSmrg	  else
5753382ff0afSmrg	    shared_flag='${wl}-bM:SRE'
5754382ff0afSmrg	  fi
5755382ff0afSmrg	fi
5756382ff0afSmrg      fi
5757382ff0afSmrg
5758382ff0afSmrg      # It seems that -bexpall does not export symbols beginning with
5759382ff0afSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5760382ff0afSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5761382ff0afSmrg      if test "$aix_use_runtimelinking" = yes; then
5762382ff0afSmrg	# Warning - without using the other runtime loading flags (-brtl),
5763382ff0afSmrg	# -berok will link without error, but may produce a broken library.
5764382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5765382ff0afSmrg       # Determine the default libpath from the value encoded in an empty executable.
5766382ff0afSmrg       _LT_AC_SYS_LIBPATH_AIX
5767382ff0afSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5768382ff0afSmrg	_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"
5769382ff0afSmrg       else
5770382ff0afSmrg	if test "$host_cpu" = ia64; then
5771382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5772382ff0afSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5773382ff0afSmrg	  _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"
5774382ff0afSmrg	else
5775382ff0afSmrg	 # Determine the default libpath from the value encoded in an empty executable.
5776382ff0afSmrg	 _LT_AC_SYS_LIBPATH_AIX
5777382ff0afSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5778382ff0afSmrg	  # Warning - without using the other run time loading flags,
5779382ff0afSmrg	  # -berok will link without error, but may produce a broken library.
5780382ff0afSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5781382ff0afSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5782382ff0afSmrg	  # Exported symbols can be pulled into shared objects from archives
5783382ff0afSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5784382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5785382ff0afSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
5786382ff0afSmrg	  _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'
5787382ff0afSmrg	fi
5788382ff0afSmrg      fi
5789382ff0afSmrg      ;;
5790382ff0afSmrg
5791382ff0afSmrg    amigaos*)
5792382ff0afSmrg      _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)'
5793382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5794382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5795382ff0afSmrg      # see comment about different semantics on the GNU ld section
5796382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5797382ff0afSmrg      ;;
5798382ff0afSmrg
5799382ff0afSmrg    bsdi[[45]]*)
5800382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5801382ff0afSmrg      ;;
5802382ff0afSmrg
5803382ff0afSmrg    cygwin* | mingw* | pw32*)
5804382ff0afSmrg      # When not using gcc, we currently assume that we are using
5805382ff0afSmrg      # Microsoft Visual C++.
5806382ff0afSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5807382ff0afSmrg      # no search path for DLLs.
5808382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5809382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5810382ff0afSmrg      # Tell ltmain to make .lib files, not .a files.
5811382ff0afSmrg      libext=lib
5812382ff0afSmrg      # Tell ltmain to make .dll files, not .so files.
5813382ff0afSmrg      shrext_cmds=".dll"
5814382ff0afSmrg      # FIXME: Setting linknames here is a bad hack.
5815382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5816382ff0afSmrg      # The linker will automatically build a .lib file if we build a DLL.
5817382ff0afSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5818382ff0afSmrg      # FIXME: Should let the user specify the lib program.
5819382ff0afSmrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5820382ff0afSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5821382ff0afSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5822382ff0afSmrg      ;;
5823382ff0afSmrg
5824382ff0afSmrg    darwin* | rhapsody*)
5825382ff0afSmrg      case $host_os in
5826382ff0afSmrg        rhapsody* | darwin1.[[012]])
5827382ff0afSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5828382ff0afSmrg         ;;
5829382ff0afSmrg       *) # Darwin 1.3 on
5830382ff0afSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5831382ff0afSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5832382ff0afSmrg         else
5833382ff0afSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
5834382ff0afSmrg             10.[[012]])
5835382ff0afSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5836382ff0afSmrg               ;;
5837382ff0afSmrg             10.*)
5838382ff0afSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5839382ff0afSmrg               ;;
5840382ff0afSmrg           esac
5841382ff0afSmrg         fi
5842382ff0afSmrg         ;;
5843382ff0afSmrg      esac
5844382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5845382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5846382ff0afSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5847382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5848382ff0afSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5849382ff0afSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5850382ff0afSmrg    if test "$GCC" = yes ; then
5851382ff0afSmrg    	output_verbose_link_cmd='echo'
5852382ff0afSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5853382ff0afSmrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5854382ff0afSmrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5855382ff0afSmrg      _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}'
5856382ff0afSmrg      _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}'
5857382ff0afSmrg    else
5858382ff0afSmrg      case $cc_basename in
5859382ff0afSmrg        xlc*)
5860382ff0afSmrg         output_verbose_link_cmd='echo'
5861382ff0afSmrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5862382ff0afSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5863382ff0afSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5864382ff0afSmrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5865382ff0afSmrg          _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}'
5866382ff0afSmrg          ;;
5867382ff0afSmrg       *)
5868382ff0afSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5869382ff0afSmrg          ;;
5870382ff0afSmrg      esac
5871382ff0afSmrg    fi
5872382ff0afSmrg      ;;
5873382ff0afSmrg
5874382ff0afSmrg    dgux*)
5875382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5876382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5877382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5878382ff0afSmrg      ;;
5879382ff0afSmrg
5880382ff0afSmrg    freebsd1*)
5881382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5882382ff0afSmrg      ;;
5883382ff0afSmrg
5884382ff0afSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5885382ff0afSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
5886382ff0afSmrg    # does not break anything, and helps significantly (at the cost of a little
5887382ff0afSmrg    # extra space).
5888382ff0afSmrg    freebsd2.2*)
5889382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5890382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5891382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5892382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5893382ff0afSmrg      ;;
5894382ff0afSmrg
5895382ff0afSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5896382ff0afSmrg    freebsd2*)
5897382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5898382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5899382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5900382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5901382ff0afSmrg      ;;
5902382ff0afSmrg
5903382ff0afSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5904382ff0afSmrg    freebsd* | kfreebsd*-gnu | dragonfly*)
5905382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5906382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5907382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5908382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5909382ff0afSmrg      ;;
5910382ff0afSmrg
5911382ff0afSmrg    hpux9*)
5912382ff0afSmrg      if test "$GCC" = yes; then
5913382ff0afSmrg	_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'
5914382ff0afSmrg      else
5915382ff0afSmrg	_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'
5916382ff0afSmrg      fi
5917382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5918382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5919382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5920382ff0afSmrg
5921382ff0afSmrg      # hardcode_minus_L: Not really in the search PATH,
5922382ff0afSmrg      # but as the default location of the library.
5923382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5924382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5925382ff0afSmrg      ;;
5926382ff0afSmrg
5927382ff0afSmrg    hpux10*)
5928382ff0afSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5929382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5930382ff0afSmrg      else
5931382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5932382ff0afSmrg      fi
5933382ff0afSmrg      if test "$with_gnu_ld" = no; then
5934382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5935382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5936382ff0afSmrg
5937382ff0afSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5938382ff0afSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5939382ff0afSmrg
5940382ff0afSmrg	# hardcode_minus_L: Not really in the search PATH,
5941382ff0afSmrg	# but as the default location of the library.
5942382ff0afSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5943382ff0afSmrg      fi
5944382ff0afSmrg      ;;
5945382ff0afSmrg
5946382ff0afSmrg    hpux11*)
5947382ff0afSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5948382ff0afSmrg	case $host_cpu in
5949382ff0afSmrg	hppa*64*)
5950382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5951382ff0afSmrg	  ;;
5952382ff0afSmrg	ia64*)
5953382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5954382ff0afSmrg	  ;;
5955382ff0afSmrg	*)
5956382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5957382ff0afSmrg	  ;;
5958382ff0afSmrg	esac
5959382ff0afSmrg      else
5960382ff0afSmrg	case $host_cpu in
5961382ff0afSmrg	hppa*64*)
5962382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5963382ff0afSmrg	  ;;
5964382ff0afSmrg	ia64*)
5965382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5966382ff0afSmrg	  ;;
5967382ff0afSmrg	*)
5968382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5969382ff0afSmrg	  ;;
5970382ff0afSmrg	esac
5971382ff0afSmrg      fi
5972382ff0afSmrg      if test "$with_gnu_ld" = no; then
5973382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5974382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5975382ff0afSmrg
5976382ff0afSmrg	case $host_cpu in
5977382ff0afSmrg	hppa*64*|ia64*)
5978382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5979382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5980382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5981382ff0afSmrg	  ;;
5982382ff0afSmrg	*)
5983382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5984382ff0afSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5985382ff0afSmrg
5986382ff0afSmrg	  # hardcode_minus_L: Not really in the search PATH,
5987382ff0afSmrg	  # but as the default location of the library.
5988382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5989382ff0afSmrg	  ;;
5990382ff0afSmrg	esac
5991382ff0afSmrg      fi
5992382ff0afSmrg      ;;
5993382ff0afSmrg
5994382ff0afSmrg    irix5* | irix6* | nonstopux*)
5995382ff0afSmrg      if test "$GCC" = yes; then
5996382ff0afSmrg	_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'
5997382ff0afSmrg      else
5998382ff0afSmrg	_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'
5999382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6000382ff0afSmrg      fi
6001382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6002382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6003382ff0afSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6004382ff0afSmrg      ;;
6005382ff0afSmrg
6006382ff0afSmrg    netbsd*)
6007382ff0afSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6008382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6009382ff0afSmrg      else
6010382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6011382ff0afSmrg      fi
6012382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6013382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6014382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6015382ff0afSmrg      ;;
6016382ff0afSmrg
6017382ff0afSmrg    newsos6)
6018382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6020382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6021382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6022382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6023382ff0afSmrg      ;;
6024382ff0afSmrg
6025382ff0afSmrg    openbsd*)
6026382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6027382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6028382ff0afSmrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6029382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6030382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6031382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6032382ff0afSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6033382ff0afSmrg      else
6034382ff0afSmrg       case $host_os in
6035382ff0afSmrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6036382ff0afSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6037382ff0afSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6038382ff0afSmrg	   ;;
6039382ff0afSmrg	 *)
6040382ff0afSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6041382ff0afSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6042382ff0afSmrg	   ;;
6043382ff0afSmrg       esac
6044382ff0afSmrg      fi
6045382ff0afSmrg      ;;
6046382ff0afSmrg
6047382ff0afSmrg    os2*)
6048382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6049382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6050382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6051382ff0afSmrg      _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'
6052382ff0afSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6053382ff0afSmrg      ;;
6054382ff0afSmrg
6055382ff0afSmrg    osf3*)
6056382ff0afSmrg      if test "$GCC" = yes; then
6057382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6058382ff0afSmrg	_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'
6059382ff0afSmrg      else
6060382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6061382ff0afSmrg	_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'
6062382ff0afSmrg      fi
6063382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6064382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6065382ff0afSmrg      ;;
6066382ff0afSmrg
6067382ff0afSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6068382ff0afSmrg      if test "$GCC" = yes; then
6069382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6070382ff0afSmrg	_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'
6071382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6072382ff0afSmrg      else
6073382ff0afSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6074382ff0afSmrg	_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'
6075382ff0afSmrg	_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~
6076382ff0afSmrg	$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'
6077382ff0afSmrg
6078382ff0afSmrg	# Both c and cxx compiler support -rpath directly
6079382ff0afSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6080382ff0afSmrg      fi
6081382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6082382ff0afSmrg      ;;
6083382ff0afSmrg
6084382ff0afSmrg    solaris*)
6085382ff0afSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6086382ff0afSmrg      if test "$GCC" = yes; then
6087382ff0afSmrg	wlarc='${wl}'
6088382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6089382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6090382ff0afSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6091382ff0afSmrg      else
6092382ff0afSmrg	wlarc=''
6093382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6094382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6095382ff0afSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6096382ff0afSmrg      fi
6097382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6098382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6099382ff0afSmrg      case $host_os in
6100382ff0afSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6101382ff0afSmrg      *)
6102382ff0afSmrg 	# The compiler driver will combine linker options so we
6103382ff0afSmrg 	# cannot just pass the convience library names through
6104382ff0afSmrg 	# without $wl, iff we do not link with $LD.
6105382ff0afSmrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6106382ff0afSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6107382ff0afSmrg 	case $wlarc in
6108382ff0afSmrg 	'')
6109382ff0afSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6110382ff0afSmrg 	*)
6111382ff0afSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6112382ff0afSmrg 	esac ;;
6113382ff0afSmrg      esac
6114382ff0afSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6115382ff0afSmrg      ;;
6116382ff0afSmrg
6117382ff0afSmrg    sunos4*)
6118382ff0afSmrg      if test "x$host_vendor" = xsequent; then
6119382ff0afSmrg	# Use $CC to link under sequent, because it throws in some extra .o
6120382ff0afSmrg	# files that make .init and .fini sections work.
6121382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6122382ff0afSmrg      else
6123382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6124382ff0afSmrg      fi
6125382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6126382ff0afSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6127382ff0afSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6128382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6129382ff0afSmrg      ;;
6130382ff0afSmrg
6131382ff0afSmrg    sysv4)
6132382ff0afSmrg      case $host_vendor in
6133382ff0afSmrg	sni)
6134382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6135382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6136382ff0afSmrg	;;
6137382ff0afSmrg	siemens)
6138382ff0afSmrg	  ## LD is ld it makes a PLAMLIB
6139382ff0afSmrg	  ## CC just makes a GrossModule.
6140382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6141382ff0afSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6142382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6143382ff0afSmrg        ;;
6144382ff0afSmrg	motorola)
6145382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6146382ff0afSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6147382ff0afSmrg	;;
6148382ff0afSmrg      esac
6149382ff0afSmrg      runpath_var='LD_RUN_PATH'
6150382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6151382ff0afSmrg      ;;
6152382ff0afSmrg
6153382ff0afSmrg    sysv4.3*)
6154382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6155382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6156382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6157382ff0afSmrg      ;;
6158382ff0afSmrg
6159382ff0afSmrg    sysv4*MP*)
6160382ff0afSmrg      if test -d /usr/nec; then
6161382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6162382ff0afSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6163382ff0afSmrg	runpath_var=LD_RUN_PATH
6164382ff0afSmrg	hardcode_runpath_var=yes
6165382ff0afSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6166382ff0afSmrg      fi
6167382ff0afSmrg      ;;
6168382ff0afSmrg
6169382ff0afSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6170382ff0afSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6171382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6172382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6173382ff0afSmrg      runpath_var='LD_RUN_PATH'
6174382ff0afSmrg
6175382ff0afSmrg      if test "$GCC" = yes; then
6176382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6177382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6178382ff0afSmrg      else
6179382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6180382ff0afSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6181382ff0afSmrg      fi
6182382ff0afSmrg      ;;
6183382ff0afSmrg
6184382ff0afSmrg    sysv5* | sco3.2v5* | sco5v6*)
6185382ff0afSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
6186382ff0afSmrg      # link with -lc, and that would cause any symbols used from libc to
6187382ff0afSmrg      # always be unresolved, which means just about no library would
6188382ff0afSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
6189382ff0afSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
6190382ff0afSmrg      # as -z defs.
6191382ff0afSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6192382ff0afSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6193382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6194382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6195382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6196382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6197382ff0afSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6198382ff0afSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6199382ff0afSmrg      runpath_var='LD_RUN_PATH'
6200382ff0afSmrg
6201382ff0afSmrg      if test "$GCC" = yes; then
6202382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6203382ff0afSmrg	_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'
6204382ff0afSmrg      else
6205382ff0afSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6206382ff0afSmrg	_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'
6207382ff0afSmrg      fi
6208382ff0afSmrg      ;;
6209382ff0afSmrg
6210382ff0afSmrg    uts4*)
6211382ff0afSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6212382ff0afSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6213382ff0afSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6214382ff0afSmrg      ;;
6215382ff0afSmrg
6216382ff0afSmrg    *)
6217382ff0afSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6218382ff0afSmrg      ;;
6219382ff0afSmrg    esac
6220382ff0afSmrg  fi
6221382ff0afSmrg])
6222382ff0afSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6223382ff0afSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6224382ff0afSmrg
6225382ff0afSmrg#
6226382ff0afSmrg# Do we need to explicitly link libc?
6227382ff0afSmrg#
6228382ff0afSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6229382ff0afSmrgx|xyes)
6230382ff0afSmrg  # Assume -lc should be added
6231382ff0afSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6232382ff0afSmrg
6233382ff0afSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6234382ff0afSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6235382ff0afSmrg    *'~'*)
6236382ff0afSmrg      # FIXME: we may have to deal with multi-command sequences.
6237382ff0afSmrg      ;;
6238382ff0afSmrg    '$CC '*)
6239382ff0afSmrg      # Test whether the compiler implicitly links with -lc since on some
6240382ff0afSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6241382ff0afSmrg      # to ld, don't add -lc before -lgcc.
6242382ff0afSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6243382ff0afSmrg      $rm conftest*
6244382ff0afSmrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6245382ff0afSmrg
6246382ff0afSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6247382ff0afSmrg        soname=conftest
6248382ff0afSmrg        lib=conftest
6249382ff0afSmrg        libobjs=conftest.$ac_objext
6250382ff0afSmrg        deplibs=
6251382ff0afSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6252382ff0afSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6253382ff0afSmrg        compiler_flags=-v
6254382ff0afSmrg        linker_flags=-v
6255382ff0afSmrg        verstring=
6256382ff0afSmrg        output_objdir=.
6257382ff0afSmrg        libname=conftest
6258382ff0afSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6259382ff0afSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6260382ff0afSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6261382ff0afSmrg        then
6262382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6263382ff0afSmrg        else
6264382ff0afSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6265382ff0afSmrg        fi
6266382ff0afSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6267382ff0afSmrg      else
6268382ff0afSmrg        cat conftest.err 1>&5
6269382ff0afSmrg      fi
6270382ff0afSmrg      $rm conftest*
6271382ff0afSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6272382ff0afSmrg      ;;
6273382ff0afSmrg    esac
6274382ff0afSmrg  fi
6275382ff0afSmrg  ;;
6276382ff0afSmrgesac
6277382ff0afSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
6278382ff0afSmrg
6279382ff0afSmrg
6280382ff0afSmrg# _LT_AC_FILE_LTDLL_C
6281382ff0afSmrg# -------------------
6282382ff0afSmrg# Be careful that the start marker always follows a newline.
6283382ff0afSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6284382ff0afSmrg# /* ltdll.c starts here */
6285382ff0afSmrg# #define WIN32_LEAN_AND_MEAN
6286382ff0afSmrg# #include <windows.h>
6287382ff0afSmrg# #undef WIN32_LEAN_AND_MEAN
6288382ff0afSmrg# #include <stdio.h>
6289382ff0afSmrg#
6290382ff0afSmrg# #ifndef __CYGWIN__
6291382ff0afSmrg# #  ifdef __CYGWIN32__
6292382ff0afSmrg# #    define __CYGWIN__ __CYGWIN32__
6293382ff0afSmrg# #  endif
6294382ff0afSmrg# #endif
6295382ff0afSmrg#
6296382ff0afSmrg# #ifdef __cplusplus
6297382ff0afSmrg# extern "C" {
6298382ff0afSmrg# #endif
6299382ff0afSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6300382ff0afSmrg# #ifdef __cplusplus
6301382ff0afSmrg# }
6302382ff0afSmrg# #endif
6303382ff0afSmrg#
6304382ff0afSmrg# #ifdef __CYGWIN__
6305382ff0afSmrg# #include <cygwin/cygwin_dll.h>
6306382ff0afSmrg# DECLARE_CYGWIN_DLL( DllMain );
6307382ff0afSmrg# #endif
6308382ff0afSmrg# HINSTANCE __hDllInstance_base;
6309382ff0afSmrg#
6310382ff0afSmrg# BOOL APIENTRY
6311382ff0afSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6312382ff0afSmrg# {
6313382ff0afSmrg#   __hDllInstance_base = hInst;
6314382ff0afSmrg#   return TRUE;
6315382ff0afSmrg# }
6316382ff0afSmrg# /* ltdll.c ends here */
6317382ff0afSmrg])# _LT_AC_FILE_LTDLL_C
6318382ff0afSmrg
6319382ff0afSmrg
6320382ff0afSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6321382ff0afSmrg# ---------------------------------
6322382ff0afSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6323382ff0afSmrg
6324382ff0afSmrg
6325382ff0afSmrg# old names
6326382ff0afSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6327382ff0afSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6328382ff0afSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6329382ff0afSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6330382ff0afSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6331382ff0afSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6332382ff0afSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6333382ff0afSmrg
6334382ff0afSmrg# This is just to silence aclocal about the macro not being used
6335382ff0afSmrgifelse([AC_DISABLE_FAST_INSTALL])
6336382ff0afSmrg
6337382ff0afSmrgAC_DEFUN([LT_AC_PROG_GCJ],
6338382ff0afSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
6339382ff0afSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6340382ff0afSmrg  AC_SUBST(GCJFLAGS)
6341382ff0afSmrg])
6342382ff0afSmrg
6343382ff0afSmrgAC_DEFUN([LT_AC_PROG_RC],
6344382ff0afSmrg[AC_CHECK_TOOL(RC, windres, no)
6345382ff0afSmrg])
6346382ff0afSmrg
6347382ff0afSmrg# NOTE: This macro has been submitted for inclusion into   #
6348382ff0afSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6349382ff0afSmrg#  a released version of Autoconf we should remove this    #
6350382ff0afSmrg#  macro and use it instead.                               #
6351382ff0afSmrg# LT_AC_PROG_SED
6352382ff0afSmrg# --------------
6353382ff0afSmrg# Check for a fully-functional sed program, that truncates
6354382ff0afSmrg# as few characters as possible.  Prefer GNU sed if found.
6355382ff0afSmrgAC_DEFUN([LT_AC_PROG_SED],
6356382ff0afSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
6357382ff0afSmrgAC_CACHE_VAL(lt_cv_path_SED,
6358382ff0afSmrg[# Loop through the user's path and test for sed and gsed.
6359382ff0afSmrg# Then use that list of sed's as ones to test for truncation.
6360382ff0afSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361382ff0afSmrgfor as_dir in $PATH
6362382ff0afSmrgdo
6363382ff0afSmrg  IFS=$as_save_IFS
6364382ff0afSmrg  test -z "$as_dir" && as_dir=.
6365382ff0afSmrg  for lt_ac_prog in sed gsed; do
6366382ff0afSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
6367382ff0afSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6368382ff0afSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6369382ff0afSmrg      fi
6370382ff0afSmrg    done
6371382ff0afSmrg  done
6372382ff0afSmrgdone
6373382ff0afSmrglt_ac_max=0
6374382ff0afSmrglt_ac_count=0
6375382ff0afSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6376382ff0afSmrg# along with /bin/sed that truncates output.
6377382ff0afSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6378382ff0afSmrg  test ! -f $lt_ac_sed && continue
6379382ff0afSmrg  cat /dev/null > conftest.in
6380382ff0afSmrg  lt_ac_count=0
6381382ff0afSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6382382ff0afSmrg  # Check for GNU sed and select it if it is found.
6383382ff0afSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6384382ff0afSmrg    lt_cv_path_SED=$lt_ac_sed
6385382ff0afSmrg    break
6386382ff0afSmrg  fi
6387382ff0afSmrg  while true; do
6388382ff0afSmrg    cat conftest.in conftest.in >conftest.tmp
6389382ff0afSmrg    mv conftest.tmp conftest.in
6390382ff0afSmrg    cp conftest.in conftest.nl
6391382ff0afSmrg    echo >>conftest.nl
6392382ff0afSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6393382ff0afSmrg    cmp -s conftest.out conftest.nl || break
6394382ff0afSmrg    # 10000 chars as input seems more than enough
6395382ff0afSmrg    test $lt_ac_count -gt 10 && break
6396382ff0afSmrg    lt_ac_count=`expr $lt_ac_count + 1`
6397382ff0afSmrg    if test $lt_ac_count -gt $lt_ac_max; then
6398382ff0afSmrg      lt_ac_max=$lt_ac_count
6399382ff0afSmrg      lt_cv_path_SED=$lt_ac_sed
6400382ff0afSmrg    fi
6401382ff0afSmrg  done
6402382ff0afSmrgdone
6403382ff0afSmrg])
6404382ff0afSmrgSED=$lt_cv_path_SED
6405382ff0afSmrgAC_MSG_RESULT([$SED])
6406382ff0afSmrg])
6407382ff0afSmrg
6408382ff0afSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6409382ff0afSmrg# 
6410382ff0afSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6411382ff0afSmrg#
6412382ff0afSmrg# This program is free software; you can redistribute it and/or modify
6413382ff0afSmrg# it under the terms of the GNU General Public License as published by
6414382ff0afSmrg# the Free Software Foundation; either version 2 of the License, or
6415382ff0afSmrg# (at your option) any later version.
6416382ff0afSmrg#
6417382ff0afSmrg# This program is distributed in the hope that it will be useful, but
6418382ff0afSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
6419382ff0afSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6420382ff0afSmrg# General Public License for more details.
6421382ff0afSmrg#
6422382ff0afSmrg# You should have received a copy of the GNU General Public License
6423382ff0afSmrg# along with this program; if not, write to the Free Software
6424382ff0afSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6425382ff0afSmrg#
6426382ff0afSmrg# As a special exception to the GNU General Public License, if you
6427382ff0afSmrg# distribute this file as part of a program that contains a
6428382ff0afSmrg# configuration script generated by Autoconf, you may include it under
6429382ff0afSmrg# the same distribution terms that you use for the rest of that program.
6430382ff0afSmrg
6431382ff0afSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6432382ff0afSmrg# ----------------------------------
6433382ff0afSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
6434382ff0afSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6435382ff0afSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6436382ff0afSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6437382ff0afSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6438382ff0afSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6439382ff0afSmrgfi
6440382ff0afSmrgif test -n "$PKG_CONFIG"; then
6441382ff0afSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
6442382ff0afSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6443382ff0afSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6444382ff0afSmrg		AC_MSG_RESULT([yes])
6445382ff0afSmrg	else
6446382ff0afSmrg		AC_MSG_RESULT([no])
6447382ff0afSmrg		PKG_CONFIG=""
6448382ff0afSmrg	fi
6449382ff0afSmrg		
6450382ff0afSmrgfi[]dnl
6451382ff0afSmrg])# PKG_PROG_PKG_CONFIG
6452382ff0afSmrg
6453382ff0afSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6454382ff0afSmrg#
6455382ff0afSmrg# Check to see whether a particular set of modules exists.  Similar
6456382ff0afSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6457382ff0afSmrg#
6458382ff0afSmrg#
6459382ff0afSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6460382ff0afSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
6461382ff0afSmrg# PKG_CHECK_EXISTS manually
6462382ff0afSmrg# --------------------------------------------------------------
6463382ff0afSmrgAC_DEFUN([PKG_CHECK_EXISTS],
6464382ff0afSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6465382ff0afSmrgif test -n "$PKG_CONFIG" && \
6466382ff0afSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6467382ff0afSmrg  m4_ifval([$2], [$2], [:])
6468382ff0afSmrgm4_ifvaln([$3], [else
6469382ff0afSmrg  $3])dnl
6470382ff0afSmrgfi])
6471382ff0afSmrg
6472382ff0afSmrg
6473382ff0afSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6474382ff0afSmrg# ---------------------------------------------
6475382ff0afSmrgm4_define([_PKG_CONFIG],
6476382ff0afSmrg[if test -n "$PKG_CONFIG"; then
6477382ff0afSmrg    if test -n "$$1"; then
6478382ff0afSmrg        pkg_cv_[]$1="$$1"
6479382ff0afSmrg    else
6480382ff0afSmrg        PKG_CHECK_EXISTS([$3],
6481382ff0afSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6482382ff0afSmrg			 [pkg_failed=yes])
6483382ff0afSmrg    fi
6484382ff0afSmrgelse
6485382ff0afSmrg	pkg_failed=untried
6486382ff0afSmrgfi[]dnl
6487382ff0afSmrg])# _PKG_CONFIG
6488382ff0afSmrg
6489382ff0afSmrg# _PKG_SHORT_ERRORS_SUPPORTED
6490382ff0afSmrg# -----------------------------
6491382ff0afSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6492382ff0afSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6493382ff0afSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6494382ff0afSmrg        _pkg_short_errors_supported=yes
6495382ff0afSmrgelse
6496382ff0afSmrg        _pkg_short_errors_supported=no
6497382ff0afSmrgfi[]dnl
6498382ff0afSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
6499382ff0afSmrg
6500382ff0afSmrg
6501382ff0afSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6502382ff0afSmrg# [ACTION-IF-NOT-FOUND])
6503382ff0afSmrg#
6504382ff0afSmrg#
6505382ff0afSmrg# Note that if there is a possibility the first call to
6506382ff0afSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
6507382ff0afSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6508382ff0afSmrg#
6509382ff0afSmrg#
6510382ff0afSmrg# --------------------------------------------------------------
6511382ff0afSmrgAC_DEFUN([PKG_CHECK_MODULES],
6512382ff0afSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6513382ff0afSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6514382ff0afSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6515382ff0afSmrg
6516382ff0afSmrgpkg_failed=no
6517382ff0afSmrgAC_MSG_CHECKING([for $1])
6518382ff0afSmrg
6519382ff0afSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6520382ff0afSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6521382ff0afSmrg
6522382ff0afSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6523382ff0afSmrgand $1[]_LIBS to avoid the need to call pkg-config.
6524382ff0afSmrgSee the pkg-config man page for more details.])
6525382ff0afSmrg
6526382ff0afSmrgif test $pkg_failed = yes; then
6527382ff0afSmrg        _PKG_SHORT_ERRORS_SUPPORTED
6528382ff0afSmrg        if test $_pkg_short_errors_supported = yes; then
6529382ff0afSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6530382ff0afSmrg        else 
6531382ff0afSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6532382ff0afSmrg        fi
6533382ff0afSmrg	# Put the nasty error message in config.log where it belongs
6534382ff0afSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6535382ff0afSmrg
6536382ff0afSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
6537382ff0afSmrg[Package requirements ($2) were not met:
6538382ff0afSmrg
6539382ff0afSmrg$$1_PKG_ERRORS
6540382ff0afSmrg
6541382ff0afSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
6542382ff0afSmrginstalled software in a non-standard prefix.
6543382ff0afSmrg
6544382ff0afSmrg_PKG_TEXT
6545382ff0afSmrg])],
6546382ff0afSmrg		[$4])
6547382ff0afSmrgelif test $pkg_failed = untried; then
6548382ff0afSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
6549382ff0afSmrg[The pkg-config script could not be found or is too old.  Make sure it
6550382ff0afSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
6551382ff0afSmrgpath to pkg-config.
6552382ff0afSmrg
6553382ff0afSmrg_PKG_TEXT
6554382ff0afSmrg
6555382ff0afSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6556382ff0afSmrg		[$4])
6557382ff0afSmrgelse
6558382ff0afSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6559382ff0afSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6560382ff0afSmrg        AC_MSG_RESULT([yes])
6561382ff0afSmrg	ifelse([$3], , :, [$3])
6562382ff0afSmrgfi[]dnl
6563382ff0afSmrg])# PKG_CHECK_MODULES
6564382ff0afSmrg
6565382ff0afSmrgdnl Copyright 2005 Red Hat, Inc
6566382ff0afSmrgdnl
6567382ff0afSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
6568382ff0afSmrgdnl documentation for any purpose is hereby granted without fee, provided that
6569382ff0afSmrgdnl the above copyright notice appear in all copies and that both that
6570382ff0afSmrgdnl copyright notice and this permission notice appear in supporting
6571382ff0afSmrgdnl documentation.
6572382ff0afSmrgdnl
6573382ff0afSmrgdnl The above copyright notice and this permission notice shall be included
6574382ff0afSmrgdnl in all copies or substantial portions of the Software.
6575382ff0afSmrgdnl
6576382ff0afSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6577382ff0afSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6578382ff0afSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6579382ff0afSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6580382ff0afSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6581382ff0afSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6582382ff0afSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
6583382ff0afSmrgdnl
6584382ff0afSmrgdnl Except as contained in this notice, the name of the copyright holders shall
6585382ff0afSmrgdnl not be used in advertising or otherwise to promote the sale, use or
6586382ff0afSmrgdnl other dealings in this Software without prior written authorization
6587382ff0afSmrgdnl from the copyright holders.
6588382ff0afSmrgdnl
6589382ff0afSmrg
6590382ff0afSmrg# XORG_RELEASE_VERSION
6591382ff0afSmrg# --------------------
6592382ff0afSmrg# Adds --with/without-release-string and changes the PACKAGE and
6593382ff0afSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
6594382ff0afSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
6595382ff0afSmrg 
6596382ff0afSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
6597382ff0afSmrg	AC_ARG_WITH(release-version,
6598382ff0afSmrg			AC_HELP_STRING([--with-release-version=STRING],
6599382ff0afSmrg				[Use release version string in package name]),
6600382ff0afSmrg			[RELEASE_VERSION="$withval"],
6601382ff0afSmrg			[RELEASE_VERSION=""])
6602382ff0afSmrg	if test "x$RELEASE_VERSION" != "x"; then
6603382ff0afSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
6604382ff0afSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
6605382ff0afSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
6606382ff0afSmrg	fi
6607382ff0afSmrg])
6608382ff0afSmrg
6609382ff0afSmrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
6610382ff0afSmrg#
6611382ff0afSmrg# This file is free software; the Free Software Foundation
6612382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6613382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6614382ff0afSmrg
6615382ff0afSmrg# AM_AUTOMAKE_VERSION(VERSION)
6616382ff0afSmrg# ----------------------------
6617382ff0afSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
6618382ff0afSmrg# generated from the m4 files accompanying Automake X.Y.
6619382ff0afSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6620382ff0afSmrg
6621382ff0afSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
6622382ff0afSmrg# -------------------------------
6623382ff0afSmrg# Call AM_AUTOMAKE_VERSION so it can be traced.
6624382ff0afSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6625382ff0afSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6626382ff0afSmrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
6627382ff0afSmrg
6628382ff0afSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6629382ff0afSmrg
6630382ff0afSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6631382ff0afSmrg#
6632382ff0afSmrg# This file is free software; the Free Software Foundation
6633382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6634382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6635382ff0afSmrg
6636382ff0afSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6637382ff0afSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6638382ff0afSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6639382ff0afSmrg#
6640382ff0afSmrg# Of course, Automake must honor this variable whenever it calls a
6641382ff0afSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
6642382ff0afSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
6643382ff0afSmrg# depending on how configure is run.  This is pretty annoying, since
6644382ff0afSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6645382ff0afSmrg# source directory, any form will work fine, but in subdirectories a
6646382ff0afSmrg# relative path needs to be adjusted first.
6647382ff0afSmrg#
6648382ff0afSmrg# $ac_aux_dir/missing
6649382ff0afSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
6650382ff0afSmrg# $top_srcdir/$ac_aux_dir/missing
6651382ff0afSmrg#    fails if $ac_aux_dir is absolute,
6652382ff0afSmrg#    fails when called from a subdirectory in a VPATH build with
6653382ff0afSmrg#          a relative $ac_aux_dir
6654382ff0afSmrg#
6655382ff0afSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6656382ff0afSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
6657382ff0afSmrg# harmless because $srcdir is `.', but things will broke when you
6658382ff0afSmrg# start a VPATH build or use an absolute $srcdir.
6659382ff0afSmrg#
6660382ff0afSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6661382ff0afSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6662382ff0afSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6663382ff0afSmrg# and then we would define $MISSING as
6664382ff0afSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
6665382ff0afSmrg# This will work as long as MISSING is not called from configure, because
6666382ff0afSmrg# unfortunately $(top_srcdir) has no meaning in configure.
6667382ff0afSmrg# However there are other variables, like CC, which are often used in
6668382ff0afSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
6669382ff0afSmrg#
6670382ff0afSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
6671382ff0afSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
6672382ff0afSmrg# configured tree to be moved without reconfiguration.
6673382ff0afSmrg
6674382ff0afSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
6675382ff0afSmrg[dnl Rely on autoconf to set up CDPATH properly.
6676382ff0afSmrgAC_PREREQ([2.50])dnl
6677382ff0afSmrg# expand $ac_aux_dir to an absolute path
6678382ff0afSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
6679382ff0afSmrg])
6680382ff0afSmrg
6681382ff0afSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
6682382ff0afSmrg
6683382ff0afSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6684382ff0afSmrg# Free Software Foundation, Inc.
6685382ff0afSmrg#
6686382ff0afSmrg# This file is free software; the Free Software Foundation
6687382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6688382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6689382ff0afSmrg
6690382ff0afSmrg# serial 7
6691382ff0afSmrg
6692382ff0afSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6693382ff0afSmrg# -------------------------------------
6694382ff0afSmrg# Define a conditional.
6695382ff0afSmrgAC_DEFUN([AM_CONDITIONAL],
6696382ff0afSmrg[AC_PREREQ(2.52)dnl
6697382ff0afSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6698382ff0afSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6699382ff0afSmrgAC_SUBST([$1_TRUE])
6700382ff0afSmrgAC_SUBST([$1_FALSE])
6701382ff0afSmrgif $2; then
6702382ff0afSmrg  $1_TRUE=
6703382ff0afSmrg  $1_FALSE='#'
6704382ff0afSmrgelse
6705382ff0afSmrg  $1_TRUE='#'
6706382ff0afSmrg  $1_FALSE=
6707382ff0afSmrgfi
6708382ff0afSmrgAC_CONFIG_COMMANDS_PRE(
6709382ff0afSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6710382ff0afSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
6711382ff0afSmrgUsually this means the macro was only invoked conditionally.]])
6712382ff0afSmrgfi])])
6713382ff0afSmrg
6714382ff0afSmrg
6715382ff0afSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6716382ff0afSmrg# Free Software Foundation, Inc.
6717382ff0afSmrg#
6718382ff0afSmrg# This file is free software; the Free Software Foundation
6719382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6720382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6721382ff0afSmrg
6722382ff0afSmrg# serial 8
6723382ff0afSmrg
6724382ff0afSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6725382ff0afSmrg# written in clear, in which case automake, when reading aclocal.m4,
6726382ff0afSmrg# will think it sees a *use*, and therefore will trigger all it's
6727382ff0afSmrg# C support machinery.  Also note that it means that autoscan, seeing
6728382ff0afSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6729382ff0afSmrg
6730382ff0afSmrg
6731382ff0afSmrg# _AM_DEPENDENCIES(NAME)
6732382ff0afSmrg# ----------------------
6733382ff0afSmrg# See how the compiler implements dependency checking.
6734382ff0afSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
6735382ff0afSmrg# We try a few techniques and use that to set a single cache variable.
6736382ff0afSmrg#
6737382ff0afSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6738382ff0afSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6739382ff0afSmrg# dependency, and given that the user is not expected to run this macro,
6740382ff0afSmrg# just rely on AC_PROG_CC.
6741382ff0afSmrgAC_DEFUN([_AM_DEPENDENCIES],
6742382ff0afSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
6743382ff0afSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6744382ff0afSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
6745382ff0afSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
6746382ff0afSmrg
6747382ff0afSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6748382ff0afSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6749382ff0afSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6750382ff0afSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6751382ff0afSmrg                   [depcc="$$1"   am_compiler_list=])
6752382ff0afSmrg
6753382ff0afSmrgAC_CACHE_CHECK([dependency style of $depcc],
6754382ff0afSmrg               [am_cv_$1_dependencies_compiler_type],
6755382ff0afSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6756382ff0afSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
6757382ff0afSmrg  # making bogus files that we don't know about and never remove.  For
6758382ff0afSmrg  # instance it was reported that on HP-UX the gcc test will end up
6759382ff0afSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
6760382ff0afSmrg  # in D'.
6761382ff0afSmrg  mkdir conftest.dir
6762382ff0afSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
6763382ff0afSmrg  # using a relative directory.
6764382ff0afSmrg  cp "$am_depcomp" conftest.dir
6765382ff0afSmrg  cd conftest.dir
6766382ff0afSmrg  # We will build objects and dependencies in a subdirectory because
6767382ff0afSmrg  # it helps to detect inapplicable dependency modes.  For instance
6768382ff0afSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
6769382ff0afSmrg  # side effect of compilation, but ICC will put the dependencies in
6770382ff0afSmrg  # the current directory while Tru64 will put them in the object
6771382ff0afSmrg  # directory.
6772382ff0afSmrg  mkdir sub
6773382ff0afSmrg
6774382ff0afSmrg  am_cv_$1_dependencies_compiler_type=none
6775382ff0afSmrg  if test "$am_compiler_list" = ""; then
6776382ff0afSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6777382ff0afSmrg  fi
6778382ff0afSmrg  for depmode in $am_compiler_list; do
6779382ff0afSmrg    # Setup a source with many dependencies, because some compilers
6780382ff0afSmrg    # like to wrap large dependency lists on column 80 (with \), and
6781382ff0afSmrg    # we should not choose a depcomp mode which is confused by this.
6782382ff0afSmrg    #
6783382ff0afSmrg    # We need to recreate these files for each test, as the compiler may
6784382ff0afSmrg    # overwrite some of them when testing with obscure command lines.
6785382ff0afSmrg    # This happens at least with the AIX C compiler.
6786382ff0afSmrg    : > sub/conftest.c
6787382ff0afSmrg    for i in 1 2 3 4 5 6; do
6788382ff0afSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6789382ff0afSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6790382ff0afSmrg      # Solaris 8's {/usr,}/bin/sh.
6791382ff0afSmrg      touch sub/conftst$i.h
6792382ff0afSmrg    done
6793382ff0afSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6794382ff0afSmrg
6795382ff0afSmrg    case $depmode in
6796382ff0afSmrg    nosideeffect)
6797382ff0afSmrg      # after this tag, mechanisms are not by side-effect, so they'll
6798382ff0afSmrg      # only be used when explicitly requested
6799382ff0afSmrg      if test "x$enable_dependency_tracking" = xyes; then
6800382ff0afSmrg	continue
6801382ff0afSmrg      else
6802382ff0afSmrg	break
6803382ff0afSmrg      fi
6804382ff0afSmrg      ;;
6805382ff0afSmrg    none) break ;;
6806382ff0afSmrg    esac
6807382ff0afSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6808382ff0afSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
6809382ff0afSmrg    # handle `-M -o', and we need to detect this.
6810382ff0afSmrg    if depmode=$depmode \
6811382ff0afSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6812382ff0afSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6813382ff0afSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6814382ff0afSmrg         >/dev/null 2>conftest.err &&
6815382ff0afSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6816382ff0afSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6817382ff0afSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6818382ff0afSmrg      # icc doesn't choke on unknown options, it will just issue warnings
6819382ff0afSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
6820382ff0afSmrg      # that says an option was ignored or not supported.
6821382ff0afSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
6822382ff0afSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
6823382ff0afSmrg      # The diagnosis changed in icc 8.0:
6824382ff0afSmrg      #   icc: Command line remark: option '-MP' not supported
6825382ff0afSmrg      if (grep 'ignoring option' conftest.err ||
6826382ff0afSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6827382ff0afSmrg        am_cv_$1_dependencies_compiler_type=$depmode
6828382ff0afSmrg        break
6829382ff0afSmrg      fi
6830382ff0afSmrg    fi
6831382ff0afSmrg  done
6832382ff0afSmrg
6833382ff0afSmrg  cd ..
6834382ff0afSmrg  rm -rf conftest.dir
6835382ff0afSmrgelse
6836382ff0afSmrg  am_cv_$1_dependencies_compiler_type=none
6837382ff0afSmrgfi
6838382ff0afSmrg])
6839382ff0afSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6840382ff0afSmrgAM_CONDITIONAL([am__fastdep$1], [
6841382ff0afSmrg  test "x$enable_dependency_tracking" != xno \
6842382ff0afSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6843382ff0afSmrg])
6844382ff0afSmrg
6845382ff0afSmrg
6846382ff0afSmrg# AM_SET_DEPDIR
6847382ff0afSmrg# -------------
6848382ff0afSmrg# Choose a directory name for dependency files.
6849382ff0afSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6850382ff0afSmrgAC_DEFUN([AM_SET_DEPDIR],
6851382ff0afSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6852382ff0afSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6853382ff0afSmrg])
6854382ff0afSmrg
6855382ff0afSmrg
6856382ff0afSmrg# AM_DEP_TRACK
6857382ff0afSmrg# ------------
6858382ff0afSmrgAC_DEFUN([AM_DEP_TRACK],
6859382ff0afSmrg[AC_ARG_ENABLE(dependency-tracking,
6860382ff0afSmrg[  --disable-dependency-tracking  speeds up one-time build
6861382ff0afSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
6862382ff0afSmrgif test "x$enable_dependency_tracking" != xno; then
6863382ff0afSmrg  am_depcomp="$ac_aux_dir/depcomp"
6864382ff0afSmrg  AMDEPBACKSLASH='\'
6865382ff0afSmrgfi
6866382ff0afSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6867382ff0afSmrgAC_SUBST([AMDEPBACKSLASH])
6868382ff0afSmrg])
6869382ff0afSmrg
6870382ff0afSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
6871382ff0afSmrg
6872382ff0afSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6873382ff0afSmrg# Free Software Foundation, Inc.
6874382ff0afSmrg#
6875382ff0afSmrg# This file is free software; the Free Software Foundation
6876382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6877382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6878382ff0afSmrg
6879382ff0afSmrg#serial 3
6880382ff0afSmrg
6881382ff0afSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
6882382ff0afSmrg# ------------------------------
6883382ff0afSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6884382ff0afSmrg[for mf in $CONFIG_FILES; do
6885382ff0afSmrg  # Strip MF so we end up with the name of the file.
6886382ff0afSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
6887382ff0afSmrg  # Check whether this is an Automake generated Makefile or not.
6888382ff0afSmrg  # We used to match only the files named `Makefile.in', but
6889382ff0afSmrg  # some people rename them; so instead we look at the file content.
6890382ff0afSmrg  # Grep'ing the first line is not enough: some people post-process
6891382ff0afSmrg  # each Makefile.in and add a new line on top of each file to say so.
6892382ff0afSmrg  # So let's grep whole file.
6893382ff0afSmrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6894382ff0afSmrg    dirpart=`AS_DIRNAME("$mf")`
6895382ff0afSmrg  else
6896382ff0afSmrg    continue
6897382ff0afSmrg  fi
6898382ff0afSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
6899382ff0afSmrg  # from the Makefile without running `make'.
6900382ff0afSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6901382ff0afSmrg  test -z "$DEPDIR" && continue
6902382ff0afSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
6903382ff0afSmrg  test -z "am__include" && continue
6904382ff0afSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6905382ff0afSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
6906382ff0afSmrg  U=`sed -n 's/^U = //p' < "$mf"`
6907382ff0afSmrg  # Find all dependency output files, they are included files with
6908382ff0afSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
6909382ff0afSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
6910382ff0afSmrg  # expansion.
6911382ff0afSmrg  for file in `sed -n "
6912382ff0afSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6913382ff0afSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6914382ff0afSmrg    # Make sure the directory exists.
6915382ff0afSmrg    test -f "$dirpart/$file" && continue
6916382ff0afSmrg    fdir=`AS_DIRNAME(["$file"])`
6917382ff0afSmrg    AS_MKDIR_P([$dirpart/$fdir])
6918382ff0afSmrg    # echo "creating $dirpart/$file"
6919382ff0afSmrg    echo '# dummy' > "$dirpart/$file"
6920382ff0afSmrg  done
6921382ff0afSmrgdone
6922382ff0afSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6923382ff0afSmrg
6924382ff0afSmrg
6925382ff0afSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
6926382ff0afSmrg# -----------------------------
6927382ff0afSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
6928382ff0afSmrg#
6929382ff0afSmrg# This code is only required when automatic dependency tracking
6930382ff0afSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
6931382ff0afSmrg# need in order to bootstrap the dependency handling code.
6932382ff0afSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6933382ff0afSmrg[AC_CONFIG_COMMANDS([depfiles],
6934382ff0afSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6935382ff0afSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6936382ff0afSmrg])
6937382ff0afSmrg
6938382ff0afSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6939382ff0afSmrg# Free Software Foundation, Inc.
6940382ff0afSmrg#
6941382ff0afSmrg# This file is free software; the Free Software Foundation
6942382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6943382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6944382ff0afSmrg
6945382ff0afSmrg# serial 8
6946382ff0afSmrg
6947382ff0afSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
6948382ff0afSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6949382ff0afSmrg
6950382ff0afSmrg# Do all the work for Automake.                             -*- Autoconf -*-
6951382ff0afSmrg
6952382ff0afSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6953382ff0afSmrg# Free Software Foundation, Inc.
6954382ff0afSmrg#
6955382ff0afSmrg# This file is free software; the Free Software Foundation
6956382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
6957382ff0afSmrg# with or without modifications, as long as this notice is preserved.
6958382ff0afSmrg
6959382ff0afSmrg# serial 12
6960382ff0afSmrg
6961382ff0afSmrg# This macro actually does too much.  Some checks are only needed if
6962382ff0afSmrg# your package does certain things.  But this isn't really a big deal.
6963382ff0afSmrg
6964382ff0afSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6965382ff0afSmrg# AM_INIT_AUTOMAKE([OPTIONS])
6966382ff0afSmrg# -----------------------------------------------
6967382ff0afSmrg# The call with PACKAGE and VERSION arguments is the old style
6968382ff0afSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
6969382ff0afSmrg# and VERSION should now be passed to AC_INIT and removed from
6970382ff0afSmrg# the call to AM_INIT_AUTOMAKE.
6971382ff0afSmrg# We support both call styles for the transition.  After
6972382ff0afSmrg# the next Automake release, Autoconf can make the AC_INIT
6973382ff0afSmrg# arguments mandatory, and then we can depend on a new Autoconf
6974382ff0afSmrg# release and drop the old call support.
6975382ff0afSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
6976382ff0afSmrg[AC_PREREQ([2.58])dnl
6977382ff0afSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
6978382ff0afSmrgdnl the ones we care about.
6979382ff0afSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6980382ff0afSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6981382ff0afSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
6982382ff0afSmrg# test to see if srcdir already configured
6983382ff0afSmrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
6984382ff0afSmrg   test -f $srcdir/config.status; then
6985382ff0afSmrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6986382ff0afSmrgfi
6987382ff0afSmrg
6988382ff0afSmrg# test whether we have cygpath
6989382ff0afSmrgif test -z "$CYGPATH_W"; then
6990382ff0afSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
6991382ff0afSmrg    CYGPATH_W='cygpath -w'
6992382ff0afSmrg  else
6993382ff0afSmrg    CYGPATH_W=echo
6994382ff0afSmrg  fi
6995382ff0afSmrgfi
6996382ff0afSmrgAC_SUBST([CYGPATH_W])
6997382ff0afSmrg
6998382ff0afSmrg# Define the identity of the package.
6999382ff0afSmrgdnl Distinguish between old-style and new-style calls.
7000382ff0afSmrgm4_ifval([$2],
7001382ff0afSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7002382ff0afSmrg AC_SUBST([PACKAGE], [$1])dnl
7003382ff0afSmrg AC_SUBST([VERSION], [$2])],
7004382ff0afSmrg[_AM_SET_OPTIONS([$1])dnl
7005382ff0afSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7006382ff0afSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7007382ff0afSmrg
7008382ff0afSmrg_AM_IF_OPTION([no-define],,
7009382ff0afSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7010382ff0afSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7011382ff0afSmrg
7012382ff0afSmrg# Some tools Automake needs.
7013382ff0afSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
7014382ff0afSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
7015382ff0afSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7016382ff0afSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
7017382ff0afSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7018382ff0afSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
7019382ff0afSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
7020382ff0afSmrgAM_PROG_INSTALL_SH
7021382ff0afSmrgAM_PROG_INSTALL_STRIP
7022382ff0afSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
7023382ff0afSmrg# We need awk for the "check" target.  The system "awk" is bad on
7024382ff0afSmrg# some platforms.
7025382ff0afSmrgAC_REQUIRE([AC_PROG_AWK])dnl
7026382ff0afSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
7027382ff0afSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
7028382ff0afSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7029382ff0afSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7030382ff0afSmrg	      		     [_AM_PROG_TAR([v7])])])
7031382ff0afSmrg_AM_IF_OPTION([no-dependencies],,
7032382ff0afSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
7033382ff0afSmrg                  [_AM_DEPENDENCIES(CC)],
7034382ff0afSmrg                  [define([AC_PROG_CC],
7035382ff0afSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7036382ff0afSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
7037382ff0afSmrg                  [_AM_DEPENDENCIES(CXX)],
7038382ff0afSmrg                  [define([AC_PROG_CXX],
7039382ff0afSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7040382ff0afSmrg])
7041382ff0afSmrg])
7042382ff0afSmrg
7043382ff0afSmrg
7044382ff0afSmrg# When config.status generates a header, we must update the stamp-h file.
7045382ff0afSmrg# This file resides in the same directory as the config header
7046382ff0afSmrg# that is generated.  The stamp files are numbered to have different names.
7047382ff0afSmrg
7048382ff0afSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7049382ff0afSmrg# loop where config.status creates the headers, so we can generate
7050382ff0afSmrg# our stamp files there.
7051382ff0afSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7052382ff0afSmrg[# Compute $1's index in $config_headers.
7053382ff0afSmrg_am_stamp_count=1
7054382ff0afSmrgfor _am_header in $config_headers :; do
7055382ff0afSmrg  case $_am_header in
7056382ff0afSmrg    $1 | $1:* )
7057382ff0afSmrg      break ;;
7058382ff0afSmrg    * )
7059382ff0afSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7060382ff0afSmrg  esac
7061382ff0afSmrgdone
7062382ff0afSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7063382ff0afSmrg
7064382ff0afSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7065382ff0afSmrg#
7066382ff0afSmrg# This file is free software; the Free Software Foundation
7067382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7068382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7069382ff0afSmrg
7070382ff0afSmrg# AM_PROG_INSTALL_SH
7071382ff0afSmrg# ------------------
7072382ff0afSmrg# Define $install_sh.
7073382ff0afSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
7074382ff0afSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7075382ff0afSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
7076382ff0afSmrgAC_SUBST(install_sh)])
7077382ff0afSmrg
7078382ff0afSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7079382ff0afSmrg#
7080382ff0afSmrg# This file is free software; the Free Software Foundation
7081382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7082382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7083382ff0afSmrg
7084382ff0afSmrg# serial 2
7085382ff0afSmrg
7086382ff0afSmrg# Check whether the underlying file-system supports filenames
7087382ff0afSmrg# with a leading dot.  For instance MS-DOS doesn't.
7088382ff0afSmrgAC_DEFUN([AM_SET_LEADING_DOT],
7089382ff0afSmrg[rm -rf .tst 2>/dev/null
7090382ff0afSmrgmkdir .tst 2>/dev/null
7091382ff0afSmrgif test -d .tst; then
7092382ff0afSmrg  am__leading_dot=.
7093382ff0afSmrgelse
7094382ff0afSmrg  am__leading_dot=_
7095382ff0afSmrgfi
7096382ff0afSmrgrmdir .tst 2>/dev/null
7097382ff0afSmrgAC_SUBST([am__leading_dot])])
7098382ff0afSmrg
7099382ff0afSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7100382ff0afSmrg# From Jim Meyering
7101382ff0afSmrg
7102382ff0afSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7103382ff0afSmrg# Free Software Foundation, Inc.
7104382ff0afSmrg#
7105382ff0afSmrg# This file is free software; the Free Software Foundation
7106382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7107382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7108382ff0afSmrg
7109382ff0afSmrg# serial 4
7110382ff0afSmrg
7111382ff0afSmrgAC_DEFUN([AM_MAINTAINER_MODE],
7112382ff0afSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7113382ff0afSmrg  dnl maintainer-mode is disabled by default
7114382ff0afSmrg  AC_ARG_ENABLE(maintainer-mode,
7115382ff0afSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
7116382ff0afSmrg			  (and sometimes confusing) to the casual installer],
7117382ff0afSmrg      USE_MAINTAINER_MODE=$enableval,
7118382ff0afSmrg      USE_MAINTAINER_MODE=no)
7119382ff0afSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7120382ff0afSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7121382ff0afSmrg  MAINT=$MAINTAINER_MODE_TRUE
7122382ff0afSmrg  AC_SUBST(MAINT)dnl
7123382ff0afSmrg]
7124382ff0afSmrg)
7125382ff0afSmrg
7126382ff0afSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7127382ff0afSmrg
7128382ff0afSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7129382ff0afSmrg
7130382ff0afSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7131382ff0afSmrg#
7132382ff0afSmrg# This file is free software; the Free Software Foundation
7133382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7134382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7135382ff0afSmrg
7136382ff0afSmrg# serial 3
7137382ff0afSmrg
7138382ff0afSmrg# AM_MAKE_INCLUDE()
7139382ff0afSmrg# -----------------
7140382ff0afSmrg# Check to see how make treats includes.
7141382ff0afSmrgAC_DEFUN([AM_MAKE_INCLUDE],
7142382ff0afSmrg[am_make=${MAKE-make}
7143382ff0afSmrgcat > confinc << 'END'
7144382ff0afSmrgam__doit:
7145382ff0afSmrg	@echo done
7146382ff0afSmrg.PHONY: am__doit
7147382ff0afSmrgEND
7148382ff0afSmrg# If we don't find an include directive, just comment out the code.
7149382ff0afSmrgAC_MSG_CHECKING([for style of include used by $am_make])
7150382ff0afSmrgam__include="#"
7151382ff0afSmrgam__quote=
7152382ff0afSmrg_am_result=none
7153382ff0afSmrg# First try GNU make style include.
7154382ff0afSmrgecho "include confinc" > confmf
7155382ff0afSmrg# We grep out `Entering directory' and `Leaving directory'
7156382ff0afSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
7157382ff0afSmrg# In particular we don't look at `^make:' because GNU make might
7158382ff0afSmrg# be invoked under some other name (usually "gmake"), in which
7159382ff0afSmrg# case it prints its new name instead of `make'.
7160382ff0afSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7161382ff0afSmrg   am__include=include
7162382ff0afSmrg   am__quote=
7163382ff0afSmrg   _am_result=GNU
7164382ff0afSmrgfi
7165382ff0afSmrg# Now try BSD make style include.
7166382ff0afSmrgif test "$am__include" = "#"; then
7167382ff0afSmrg   echo '.include "confinc"' > confmf
7168382ff0afSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7169382ff0afSmrg      am__include=.include
7170382ff0afSmrg      am__quote="\""
7171382ff0afSmrg      _am_result=BSD
7172382ff0afSmrg   fi
7173382ff0afSmrgfi
7174382ff0afSmrgAC_SUBST([am__include])
7175382ff0afSmrgAC_SUBST([am__quote])
7176382ff0afSmrgAC_MSG_RESULT([$_am_result])
7177382ff0afSmrgrm -f confinc confmf
7178382ff0afSmrg])
7179382ff0afSmrg
7180382ff0afSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7181382ff0afSmrg
7182382ff0afSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
7183382ff0afSmrg# Free Software Foundation, Inc.
7184382ff0afSmrg#
7185382ff0afSmrg# This file is free software; the Free Software Foundation
7186382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7187382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7188382ff0afSmrg
7189382ff0afSmrg# serial 4
7190382ff0afSmrg
7191382ff0afSmrg# AM_MISSING_PROG(NAME, PROGRAM)
7192382ff0afSmrg# ------------------------------
7193382ff0afSmrgAC_DEFUN([AM_MISSING_PROG],
7194382ff0afSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7195382ff0afSmrg$1=${$1-"${am_missing_run}$2"}
7196382ff0afSmrgAC_SUBST($1)])
7197382ff0afSmrg
7198382ff0afSmrg
7199382ff0afSmrg# AM_MISSING_HAS_RUN
7200382ff0afSmrg# ------------------
7201382ff0afSmrg# Define MISSING if not defined so far and test if it supports --run.
7202382ff0afSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
7203382ff0afSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7204382ff0afSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7205382ff0afSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7206382ff0afSmrg# Use eval to expand $SHELL
7207382ff0afSmrgif eval "$MISSING --run true"; then
7208382ff0afSmrg  am_missing_run="$MISSING --run "
7209382ff0afSmrgelse
7210382ff0afSmrg  am_missing_run=
7211382ff0afSmrg  AC_MSG_WARN([`missing' script is too old or missing])
7212382ff0afSmrgfi
7213382ff0afSmrg])
7214382ff0afSmrg
7215382ff0afSmrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
7216382ff0afSmrg#
7217382ff0afSmrg# This file is free software; the Free Software Foundation
7218382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7219382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7220382ff0afSmrg
7221382ff0afSmrg# AM_PROG_MKDIR_P
7222382ff0afSmrg# ---------------
7223382ff0afSmrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7224382ff0afSmrg#
7225382ff0afSmrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7226382ff0afSmrg# created by `make install' are always world readable, even if the
7227382ff0afSmrg# installer happens to have an overly restrictive umask (e.g. 077).
7228382ff0afSmrg# This was a mistake.  There are at least two reasons why we must not
7229382ff0afSmrg# use `-m 0755':
7230382ff0afSmrg#   - it causes special bits like SGID to be ignored,
7231382ff0afSmrg#   - it may be too restrictive (some setups expect 775 directories).
7232382ff0afSmrg#
7233382ff0afSmrg# Do not use -m 0755 and let people choose whatever they expect by
7234382ff0afSmrg# setting umask.
7235382ff0afSmrg#
7236382ff0afSmrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7237382ff0afSmrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
7238382ff0afSmrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7239382ff0afSmrg# concurrently, both version can detect that a/ is missing, but only
7240382ff0afSmrg# one can create it and the other will error out.  Consequently we
7241382ff0afSmrg# restrict ourselves to GNU make (using the --version option ensures
7242382ff0afSmrg# this.)
7243382ff0afSmrgAC_DEFUN([AM_PROG_MKDIR_P],
7244382ff0afSmrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7245382ff0afSmrg  # We used to keeping the `.' as first argument, in order to
7246382ff0afSmrg  # allow $(mkdir_p) to be used without argument.  As in
7247382ff0afSmrg  #   $(mkdir_p) $(somedir)
7248382ff0afSmrg  # where $(somedir) is conditionally defined.  However this is wrong
7249382ff0afSmrg  # for two reasons:
7250382ff0afSmrg  #  1. if the package is installed by a user who cannot write `.'
7251382ff0afSmrg  #     make install will fail,
7252382ff0afSmrg  #  2. the above comment should most certainly read
7253382ff0afSmrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
7254382ff0afSmrg  #     so it does not work when $(somedir) is undefined and
7255382ff0afSmrg  #     $(DESTDIR) is not.
7256382ff0afSmrg  #  To support the latter case, we have to write
7257382ff0afSmrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7258382ff0afSmrg  #  so the `.' trick is pointless.
7259382ff0afSmrg  mkdir_p='mkdir -p --'
7260382ff0afSmrgelse
7261382ff0afSmrg  # On NextStep and OpenStep, the `mkdir' command does not
7262382ff0afSmrg  # recognize any option.  It will interpret all options as
7263382ff0afSmrg  # directories to create, and then abort because `.' already
7264382ff0afSmrg  # exists.
7265382ff0afSmrg  for d in ./-p ./--version;
7266382ff0afSmrg  do
7267382ff0afSmrg    test -d $d && rmdir $d
7268382ff0afSmrg  done
7269382ff0afSmrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7270382ff0afSmrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
7271382ff0afSmrg    mkdir_p='$(mkinstalldirs)'
7272382ff0afSmrg  else
7273382ff0afSmrg    mkdir_p='$(install_sh) -d'
7274382ff0afSmrg  fi
7275382ff0afSmrgfi
7276382ff0afSmrgAC_SUBST([mkdir_p])])
7277382ff0afSmrg
7278382ff0afSmrg# Helper functions for option handling.                     -*- Autoconf -*-
7279382ff0afSmrg
7280382ff0afSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7281382ff0afSmrg#
7282382ff0afSmrg# This file is free software; the Free Software Foundation
7283382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7284382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7285382ff0afSmrg
7286382ff0afSmrg# serial 3
7287382ff0afSmrg
7288382ff0afSmrg# _AM_MANGLE_OPTION(NAME)
7289382ff0afSmrg# -----------------------
7290382ff0afSmrgAC_DEFUN([_AM_MANGLE_OPTION],
7291382ff0afSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7292382ff0afSmrg
7293382ff0afSmrg# _AM_SET_OPTION(NAME)
7294382ff0afSmrg# ------------------------------
7295382ff0afSmrg# Set option NAME.  Presently that only means defining a flag for this option.
7296382ff0afSmrgAC_DEFUN([_AM_SET_OPTION],
7297382ff0afSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7298382ff0afSmrg
7299382ff0afSmrg# _AM_SET_OPTIONS(OPTIONS)
7300382ff0afSmrg# ----------------------------------
7301382ff0afSmrg# OPTIONS is a space-separated list of Automake options.
7302382ff0afSmrgAC_DEFUN([_AM_SET_OPTIONS],
7303382ff0afSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7304382ff0afSmrg
7305382ff0afSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7306382ff0afSmrg# -------------------------------------------
7307382ff0afSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7308382ff0afSmrgAC_DEFUN([_AM_IF_OPTION],
7309382ff0afSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7310382ff0afSmrg
7311382ff0afSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7312382ff0afSmrg
7313382ff0afSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7314382ff0afSmrg# Free Software Foundation, Inc.
7315382ff0afSmrg#
7316382ff0afSmrg# This file is free software; the Free Software Foundation
7317382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7318382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7319382ff0afSmrg
7320382ff0afSmrg# serial 4
7321382ff0afSmrg
7322382ff0afSmrg# AM_SANITY_CHECK
7323382ff0afSmrg# ---------------
7324382ff0afSmrgAC_DEFUN([AM_SANITY_CHECK],
7325382ff0afSmrg[AC_MSG_CHECKING([whether build environment is sane])
7326382ff0afSmrg# Just in case
7327382ff0afSmrgsleep 1
7328382ff0afSmrgecho timestamp > conftest.file
7329382ff0afSmrg# Do `set' in a subshell so we don't clobber the current shell's
7330382ff0afSmrg# arguments.  Must try -L first in case configure is actually a
7331382ff0afSmrg# symlink; some systems play weird games with the mod time of symlinks
7332382ff0afSmrg# (eg FreeBSD returns the mod time of the symlink's containing
7333382ff0afSmrg# directory).
7334382ff0afSmrgif (
7335382ff0afSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7336382ff0afSmrg   if test "$[*]" = "X"; then
7337382ff0afSmrg      # -L didn't work.
7338382ff0afSmrg      set X `ls -t $srcdir/configure conftest.file`
7339382ff0afSmrg   fi
7340382ff0afSmrg   rm -f conftest.file
7341382ff0afSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
7342382ff0afSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7343382ff0afSmrg
7344382ff0afSmrg      # If neither matched, then we have a broken ls.  This can happen
7345382ff0afSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
7346382ff0afSmrg      # broken ls alias from the environment.  This has actually
7347382ff0afSmrg      # happened.  Such a system could not be considered "sane".
7348382ff0afSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7349382ff0afSmrgalias in your environment])
7350382ff0afSmrg   fi
7351382ff0afSmrg
7352382ff0afSmrg   test "$[2]" = conftest.file
7353382ff0afSmrg   )
7354382ff0afSmrgthen
7355382ff0afSmrg   # Ok.
7356382ff0afSmrg   :
7357382ff0afSmrgelse
7358382ff0afSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
7359382ff0afSmrgCheck your system clock])
7360382ff0afSmrgfi
7361382ff0afSmrgAC_MSG_RESULT(yes)])
7362382ff0afSmrg
7363382ff0afSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7364382ff0afSmrg#
7365382ff0afSmrg# This file is free software; the Free Software Foundation
7366382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7367382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7368382ff0afSmrg
7369382ff0afSmrg# AM_PROG_INSTALL_STRIP
7370382ff0afSmrg# ---------------------
7371382ff0afSmrg# One issue with vendor `install' (even GNU) is that you can't
7372382ff0afSmrg# specify the program used to strip binaries.  This is especially
7373382ff0afSmrg# annoying in cross-compiling environments, where the build's strip
7374382ff0afSmrg# is unlikely to handle the host's binaries.
7375382ff0afSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
7376382ff0afSmrg# always use install-sh in `make install-strip', and initialize
7377382ff0afSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
7378382ff0afSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
7379382ff0afSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7380382ff0afSmrg# Installed binaries are usually stripped using `strip' when the user
7381382ff0afSmrg# run `make install-strip'.  However `strip' might not be the right
7382382ff0afSmrg# tool to use in cross-compilation environments, therefore Automake
7383382ff0afSmrg# will honor the `STRIP' environment variable to overrule this program.
7384382ff0afSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7385382ff0afSmrgif test "$cross_compiling" != no; then
7386382ff0afSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
7387382ff0afSmrgfi
7388382ff0afSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7389382ff0afSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
7390382ff0afSmrg
7391382ff0afSmrg# Check how to create a tarball.                            -*- Autoconf -*-
7392382ff0afSmrg
7393382ff0afSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7394382ff0afSmrg#
7395382ff0afSmrg# This file is free software; the Free Software Foundation
7396382ff0afSmrg# gives unlimited permission to copy and/or distribute it,
7397382ff0afSmrg# with or without modifications, as long as this notice is preserved.
7398382ff0afSmrg
7399382ff0afSmrg# serial 2
7400382ff0afSmrg
7401382ff0afSmrg# _AM_PROG_TAR(FORMAT)
7402382ff0afSmrg# --------------------
7403382ff0afSmrg# Check how to create a tarball in format FORMAT.
7404382ff0afSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
7405382ff0afSmrg#
7406382ff0afSmrg# Substitute a variable $(am__tar) that is a command
7407382ff0afSmrg# writing to stdout a FORMAT-tarball containing the directory
7408382ff0afSmrg# $tardir.
7409382ff0afSmrg#     tardir=directory && $(am__tar) > result.tar
7410382ff0afSmrg#
7411382ff0afSmrg# Substitute a variable $(am__untar) that extract such
7412382ff0afSmrg# a tarball read from stdin.
7413382ff0afSmrg#     $(am__untar) < result.tar
7414382ff0afSmrgAC_DEFUN([_AM_PROG_TAR],
7415382ff0afSmrg[# Always define AMTAR for backward compatibility.
7416382ff0afSmrgAM_MISSING_PROG([AMTAR], [tar])
7417382ff0afSmrgm4_if([$1], [v7],
7418382ff0afSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7419382ff0afSmrg     [m4_case([$1], [ustar],, [pax],,
7420382ff0afSmrg              [m4_fatal([Unknown tar format])])
7421382ff0afSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
7422382ff0afSmrg# Loop over all known methods to create a tar archive until one works.
7423382ff0afSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7424382ff0afSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7425382ff0afSmrg# Do not fold the above two line into one, because Tru64 sh and
7426382ff0afSmrg# Solaris sh will not grok spaces in the rhs of `-'.
7427382ff0afSmrgfor _am_tool in $_am_tools
7428382ff0afSmrgdo
7429382ff0afSmrg  case $_am_tool in
7430382ff0afSmrg  gnutar)
7431382ff0afSmrg    for _am_tar in tar gnutar gtar;
7432382ff0afSmrg    do
7433382ff0afSmrg      AM_RUN_LOG([$_am_tar --version]) && break
7434382ff0afSmrg    done
7435382ff0afSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7436382ff0afSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7437382ff0afSmrg    am__untar="$_am_tar -xf -"
7438382ff0afSmrg    ;;
7439382ff0afSmrg  plaintar)
7440382ff0afSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
7441382ff0afSmrg    # ustar tarball either.
7442382ff0afSmrg    (tar --version) >/dev/null 2>&1 && continue
7443382ff0afSmrg    am__tar='tar chf - "$$tardir"'
7444382ff0afSmrg    am__tar_='tar chf - "$tardir"'
7445382ff0afSmrg    am__untar='tar xf -'
7446382ff0afSmrg    ;;
7447382ff0afSmrg  pax)
7448382ff0afSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
7449382ff0afSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
7450382ff0afSmrg    am__untar='pax -r'
7451382ff0afSmrg    ;;
7452382ff0afSmrg  cpio)
7453382ff0afSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7454382ff0afSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7455382ff0afSmrg    am__untar='cpio -i -H $1 -d'
7456382ff0afSmrg    ;;
7457382ff0afSmrg  none)
7458382ff0afSmrg    am__tar=false
7459382ff0afSmrg    am__tar_=false
7460382ff0afSmrg    am__untar=false
7461382ff0afSmrg    ;;
7462382ff0afSmrg  esac
7463382ff0afSmrg
7464382ff0afSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
7465382ff0afSmrg  # and am__untar set.
7466382ff0afSmrg  test -n "${am_cv_prog_tar_$1}" && break
7467382ff0afSmrg
7468382ff0afSmrg  # tar/untar a dummy directory, and stop if the command works
7469382ff0afSmrg  rm -rf conftest.dir
7470382ff0afSmrg  mkdir conftest.dir
7471382ff0afSmrg  echo GrepMe > conftest.dir/file
7472382ff0afSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7473382ff0afSmrg  rm -rf conftest.dir
7474382ff0afSmrg  if test -s conftest.tar; then
7475382ff0afSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
7476382ff0afSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7477382ff0afSmrg  fi
7478382ff0afSmrgdone
7479382ff0afSmrgrm -rf conftest.dir
7480382ff0afSmrg
7481382ff0afSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7482382ff0afSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
7483382ff0afSmrgAC_SUBST([am__tar])
7484382ff0afSmrgAC_SUBST([am__untar])
7485382ff0afSmrg]) # _AM_PROG_TAR
7486382ff0afSmrg
7487