1200576Sroberto# generated automatically by aclocal 1.11 -*- Autoconf -*-
2132451Sroberto
3182007Sroberto# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4200576Sroberto# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5132451Sroberto# This file is free software; the Free Software Foundation
6132451Sroberto# gives unlimited permission to copy and/or distribute it,
7132451Sroberto# with or without modifications, as long as this notice is preserved.
8132451Sroberto
9132451Sroberto# This program is distributed in the hope that it will be useful,
10132451Sroberto# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11132451Sroberto# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12132451Sroberto# PARTICULAR PURPOSE.
13132451Sroberto
14200576Srobertom4_ifndef([AC_AUTOCONF_VERSION],
15200576Sroberto  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16200576Srobertom4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17200576Sroberto[m4_warning([this file was generated for autoconf 2.65.
18200576SrobertoYou have another version of autoconf.  It may work, but is not guaranteed to.
19200576SrobertoIf you have problems, you may need to regenerate the build system entirely.
20200576SrobertoTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21200576Sroberto
22182007Sroberto# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23132451Sroberto
24182007Sroberto# serial 47 AC_PROG_LIBTOOL
25132451Sroberto
26132451Sroberto
27182007Sroberto# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28182007Sroberto# -----------------------------------------------------------
29182007Sroberto# If this macro is not defined by Autoconf, define it here.
30182007Srobertom4_ifdef([AC_PROVIDE_IFELSE],
31182007Sroberto         [],
32182007Sroberto         [m4_define([AC_PROVIDE_IFELSE],
33182007Sroberto	         [m4_ifdef([AC_PROVIDE_$1],
34182007Sroberto		           [$2], [$3])])])
35132451Sroberto
36132451Sroberto
37182007Sroberto# AC_PROG_LIBTOOL
38182007Sroberto# ---------------
39182007SrobertoAC_DEFUN([AC_PROG_LIBTOOL],
40182007Sroberto[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41182007Srobertodnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42182007Srobertodnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43182007Sroberto  AC_PROVIDE_IFELSE([AC_PROG_CXX],
44182007Sroberto    [AC_LIBTOOL_CXX],
45182007Sroberto    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46182007Sroberto  ])])
47182007Srobertodnl And a similar setup for Fortran 77 support
48182007Sroberto  AC_PROVIDE_IFELSE([AC_PROG_F77],
49182007Sroberto    [AC_LIBTOOL_F77],
50182007Sroberto    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
51182007Sroberto])])
52132451Sroberto
53182007Srobertodnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54182007Srobertodnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55182007Srobertodnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56182007Sroberto  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
57182007Sroberto    [AC_LIBTOOL_GCJ],
58182007Sroberto    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
59182007Sroberto      [AC_LIBTOOL_GCJ],
60182007Sroberto      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
61182007Sroberto	[AC_LIBTOOL_GCJ],
62182007Sroberto      [ifdef([AC_PROG_GCJ],
63182007Sroberto	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64182007Sroberto       ifdef([A][M_PROG_GCJ],
65182007Sroberto	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66182007Sroberto       ifdef([LT_AC_PROG_GCJ],
67182007Sroberto	     [define([LT_AC_PROG_GCJ],
68182007Sroberto		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
69182007Sroberto])])# AC_PROG_LIBTOOL
70132451Sroberto
71132451Sroberto
72182007Sroberto# _AC_PROG_LIBTOOL
73182007Sroberto# ----------------
74182007SrobertoAC_DEFUN([_AC_PROG_LIBTOOL],
75182007Sroberto[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76182007SrobertoAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77182007SrobertoAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78182007SrobertoAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79132451Sroberto
80182007Sroberto# This can be used to rebuild libtool when needed
81182007SrobertoLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
82182007Sroberto
83182007Sroberto# Always use our own libtool.
84182007SrobertoLIBTOOL='$(SHELL) $(top_builddir)/libtool'
85182007SrobertoAC_SUBST(LIBTOOL)dnl
86182007Sroberto
87182007Sroberto# Prevent multiple expansion
88182007Srobertodefine([AC_PROG_LIBTOOL], [])
89182007Sroberto])# _AC_PROG_LIBTOOL
90182007Sroberto
91182007Sroberto
92182007Sroberto# AC_LIBTOOL_SETUP
93182007Sroberto# ----------------
94182007SrobertoAC_DEFUN([AC_LIBTOOL_SETUP],
95182007Sroberto[AC_PREREQ(2.50)dnl
96182007SrobertoAC_REQUIRE([AC_ENABLE_SHARED])dnl
97182007SrobertoAC_REQUIRE([AC_ENABLE_STATIC])dnl
98182007SrobertoAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99182007SrobertoAC_REQUIRE([AC_CANONICAL_HOST])dnl
100182007SrobertoAC_REQUIRE([AC_CANONICAL_BUILD])dnl
101182007SrobertoAC_REQUIRE([AC_PROG_CC])dnl
102182007SrobertoAC_REQUIRE([AC_PROG_LD])dnl
103182007SrobertoAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104182007SrobertoAC_REQUIRE([AC_PROG_NM])dnl
105182007Sroberto
106182007SrobertoAC_REQUIRE([AC_PROG_LN_S])dnl
107182007SrobertoAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108182007Sroberto# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109182007SrobertoAC_REQUIRE([AC_OBJEXT])dnl
110182007SrobertoAC_REQUIRE([AC_EXEEXT])dnl
111182007Srobertodnl
112182007Sroberto
113182007SrobertoAC_LIBTOOL_SYS_MAX_CMD_LEN
114182007SrobertoAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
115182007SrobertoAC_LIBTOOL_OBJDIR
116182007Sroberto
117182007SrobertoAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
118182007Sroberto_LT_AC_PROG_ECHO_BACKSLASH
119182007Sroberto
120182007Srobertocase $host_os in
121182007Srobertoaix3*)
122182007Sroberto  # AIX sometimes has problems with the GCC collect2 program.  For some
123182007Sroberto  # reason, if we set the COLLECT_NAMES environment variable, the problems
124182007Sroberto  # vanish in a puff of smoke.
125182007Sroberto  if test "X${COLLECT_NAMES+set}" != Xset; then
126182007Sroberto    COLLECT_NAMES=
127182007Sroberto    export COLLECT_NAMES
128182007Sroberto  fi
129182007Sroberto  ;;
130182007Srobertoesac
131182007Sroberto
132182007Sroberto# Sed substitution that helps us do robust quoting.  It backslashifies
133182007Sroberto# metacharacters that are still active within double-quoted strings.
134182007SrobertoXsed='sed -e 1s/^X//'
135182007Sroberto[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
136182007Sroberto
137182007Sroberto# Same as above, but do not quote variable references.
138182007Sroberto[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
139182007Sroberto
140182007Sroberto# Sed substitution to delay expansion of an escaped shell variable in a
141182007Sroberto# double_quote_subst'ed string.
142182007Srobertodelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
143182007Sroberto
144182007Sroberto# Sed substitution to avoid accidental globbing in evaled expressions
145182007Srobertono_glob_subst='s/\*/\\\*/g'
146182007Sroberto
147182007Sroberto# Constants:
148182007Srobertorm="rm -f"
149182007Sroberto
150182007Sroberto# Global variables:
151182007Srobertodefault_ofile=libtool
152182007Srobertocan_build_shared=yes
153182007Sroberto
154182007Sroberto# All known linkers require a `.a' archive for static linking (except MSVC,
155182007Sroberto# which needs '.lib').
156182007Srobertolibext=a
157182007Srobertoltmain="$ac_aux_dir/ltmain.sh"
158182007Srobertoofile="$default_ofile"
159182007Srobertowith_gnu_ld="$lt_cv_prog_gnu_ld"
160182007Sroberto
161182007SrobertoAC_CHECK_TOOL(AR, ar, false)
162182007SrobertoAC_CHECK_TOOL(RANLIB, ranlib, :)
163182007SrobertoAC_CHECK_TOOL(STRIP, strip, :)
164182007Sroberto
165182007Srobertoold_CC="$CC"
166182007Srobertoold_CFLAGS="$CFLAGS"
167182007Sroberto
168182007Sroberto# Set sane defaults for various variables
169182007Srobertotest -z "$AR" && AR=ar
170182007Srobertotest -z "$AR_FLAGS" && AR_FLAGS=cru
171182007Srobertotest -z "$AS" && AS=as
172182007Srobertotest -z "$CC" && CC=cc
173182007Srobertotest -z "$LTCC" && LTCC=$CC
174182007Srobertotest -z "$DLLTOOL" && DLLTOOL=dlltool
175182007Srobertotest -z "$LD" && LD=ld
176182007Srobertotest -z "$LN_S" && LN_S="ln -s"
177182007Srobertotest -z "$MAGIC_CMD" && MAGIC_CMD=file
178182007Srobertotest -z "$NM" && NM=nm
179182007Srobertotest -z "$SED" && SED=sed
180182007Srobertotest -z "$OBJDUMP" && OBJDUMP=objdump
181182007Srobertotest -z "$RANLIB" && RANLIB=:
182182007Srobertotest -z "$STRIP" && STRIP=:
183182007Srobertotest -z "$ac_objext" && ac_objext=o
184182007Sroberto
185182007Sroberto# Determine commands to create old-style static archives.
186182007Srobertoold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
187182007Srobertoold_postinstall_cmds='chmod 644 $oldlib'
188182007Srobertoold_postuninstall_cmds=
189182007Sroberto
190182007Srobertoif test -n "$RANLIB"; then
191182007Sroberto  case $host_os in
192182007Sroberto  openbsd*)
193182007Sroberto    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
194182007Sroberto    ;;
195182007Sroberto  *)
196182007Sroberto    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
197182007Sroberto    ;;
198182007Sroberto  esac
199182007Sroberto  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
200132451Srobertofi
201132451Sroberto
202182007Sroberto_LT_CC_BASENAME([$compiler])
203182007Sroberto
204182007Sroberto# Only perform the check for file, if the check method requires it
205182007Srobertocase $deplibs_check_method in
206182007Srobertofile_magic*)
207182007Sroberto  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
208182007Sroberto    AC_PATH_MAGIC
209132451Sroberto  fi
210182007Sroberto  ;;
211182007Srobertoesac
212182007Sroberto
213182007SrobertoAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
214182007SrobertoAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
215182007Srobertoenable_win32_dll=yes, enable_win32_dll=no)
216182007Sroberto
217182007SrobertoAC_ARG_ENABLE([libtool-lock],
218182007Sroberto    [AC_HELP_STRING([--disable-libtool-lock],
219182007Sroberto	[avoid locking (might break parallel builds)])])
220182007Srobertotest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
221182007Sroberto
222182007SrobertoAC_ARG_WITH([pic],
223182007Sroberto    [AC_HELP_STRING([--with-pic],
224182007Sroberto	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
225182007Sroberto    [pic_mode="$withval"],
226182007Sroberto    [pic_mode=default])
227182007Srobertotest -z "$pic_mode" && pic_mode=default
228182007Sroberto
229182007Sroberto# Use C for the default configuration in the libtool script
230182007Srobertotagname=
231182007SrobertoAC_LIBTOOL_LANG_C_CONFIG
232182007Sroberto_LT_AC_TAGCONFIG
233182007Sroberto])# AC_LIBTOOL_SETUP
234182007Sroberto
235182007Sroberto
236182007Sroberto# _LT_AC_SYS_COMPILER
237182007Sroberto# -------------------
238182007SrobertoAC_DEFUN([_LT_AC_SYS_COMPILER],
239182007Sroberto[AC_REQUIRE([AC_PROG_CC])dnl
240182007Sroberto
241182007Sroberto# If no C compiler was specified, use CC.
242182007SrobertoLTCC=${LTCC-"$CC"}
243182007Sroberto
244182007Sroberto# Allow CC to be a program name with arguments.
245182007Srobertocompiler=$CC
246182007Sroberto])# _LT_AC_SYS_COMPILER
247182007Sroberto
248182007Sroberto
249182007Sroberto# _LT_CC_BASENAME(CC)
250182007Sroberto# -------------------
251182007Sroberto# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
252182007SrobertoAC_DEFUN([_LT_CC_BASENAME],
253182007Sroberto[for cc_temp in $1""; do
254182007Sroberto  case $cc_temp in
255182007Sroberto    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
256182007Sroberto    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
257182007Sroberto    \-*) ;;
258182007Sroberto    *) break;;
259182007Sroberto  esac
260182007Srobertodone
261182007Srobertocc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
262182007Sroberto])
263182007Sroberto
264182007Sroberto
265182007Sroberto# _LT_COMPILER_BOILERPLATE
266182007Sroberto# ------------------------
267182007Sroberto# Check for compiler boilerplate output or warnings with
268182007Sroberto# the simple compiler test code.
269182007SrobertoAC_DEFUN([_LT_COMPILER_BOILERPLATE],
270182007Sroberto[ac_outfile=conftest.$ac_objext
271182007Srobertoprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
272182007Srobertoeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
273182007Sroberto_lt_compiler_boilerplate=`cat conftest.err`
274182007Sroberto$rm conftest*
275182007Sroberto])# _LT_COMPILER_BOILERPLATE
276182007Sroberto
277182007Sroberto
278182007Sroberto# _LT_LINKER_BOILERPLATE
279182007Sroberto# ----------------------
280182007Sroberto# Check for linker boilerplate output or warnings with
281182007Sroberto# the simple link test code.
282182007SrobertoAC_DEFUN([_LT_LINKER_BOILERPLATE],
283182007Sroberto[ac_outfile=conftest.$ac_objext
284182007Srobertoprintf "$lt_simple_link_test_code" >conftest.$ac_ext
285182007Srobertoeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
286182007Sroberto_lt_linker_boilerplate=`cat conftest.err`
287182007Sroberto$rm conftest*
288182007Sroberto])# _LT_LINKER_BOILERPLATE
289182007Sroberto
290182007Sroberto
291182007Sroberto# _LT_AC_SYS_LIBPATH_AIX
292182007Sroberto# ----------------------
293182007Sroberto# Links a minimal program and checks the executable
294182007Sroberto# for the system default hardcoded library path. In most cases,
295182007Sroberto# this is /usr/lib:/lib, but when the MPI compilers are used
296182007Sroberto# the location of the communication and MPI libs are included too.
297182007Sroberto# If we don't find anything, use the default library path according
298182007Sroberto# to the aix ld manual.
299182007SrobertoAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
300182007Sroberto[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
301182007Srobertoaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
302182007Sroberto}'`
303182007Sroberto# Check for a 64-bit object if we didn't find anything.
304182007Srobertoif 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; }
305182007Sroberto}'`; fi],[])
306182007Srobertoif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
307182007Sroberto])# _LT_AC_SYS_LIBPATH_AIX
308182007Sroberto
309182007Sroberto
310182007Sroberto# _LT_AC_SHELL_INIT(ARG)
311182007Sroberto# ----------------------
312182007SrobertoAC_DEFUN([_LT_AC_SHELL_INIT],
313182007Sroberto[ifdef([AC_DIVERSION_NOTICE],
314182007Sroberto	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
315182007Sroberto	 [AC_DIVERT_PUSH(NOTICE)])
316182007Sroberto$1
317182007SrobertoAC_DIVERT_POP
318182007Sroberto])# _LT_AC_SHELL_INIT
319182007Sroberto
320182007Sroberto
321182007Sroberto# _LT_AC_PROG_ECHO_BACKSLASH
322182007Sroberto# --------------------------
323182007Sroberto# Add some code to the start of the generated configure script which
324182007Sroberto# will find an echo command which doesn't interpret backslashes.
325182007SrobertoAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
326182007Sroberto[_LT_AC_SHELL_INIT([
327182007Sroberto# Check that we are running under the correct shell.
328182007SrobertoSHELL=${CONFIG_SHELL-/bin/sh}
329182007Sroberto
330182007Srobertocase X$ECHO in
331182007SrobertoX*--fallback-echo)
332182007Sroberto  # Remove one level of quotation (which was required for Make).
333182007Sroberto  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
334182007Sroberto  ;;
335182007Srobertoesac
336182007Sroberto
337182007Srobertoecho=${ECHO-echo}
338182007Srobertoif test "X[$]1" = X--no-reexec; then
339182007Sroberto  # Discard the --no-reexec flag, and continue.
340182007Sroberto  shift
341182007Srobertoelif test "X[$]1" = X--fallback-echo; then
342182007Sroberto  # Avoid inline document here, it may be left over
343182007Sroberto  :
344182007Srobertoelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
345182007Sroberto  # Yippee, $echo works!
346182007Sroberto  :
347182007Srobertoelse
348182007Sroberto  # Restart under the correct shell.
349182007Sroberto  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
350132451Srobertofi
351132451Sroberto
352182007Srobertoif test "X[$]1" = X--fallback-echo; then
353182007Sroberto  # used as fallback echo
354182007Sroberto  shift
355182007Sroberto  cat <<EOF
356182007Sroberto[$]*
357182007SrobertoEOF
358182007Sroberto  exit 0
359182007Srobertofi
360132451Sroberto
361182007Sroberto# The HP-UX ksh and POSIX shell print the target directory to stdout
362182007Sroberto# if CDPATH is set.
363182007Sroberto(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
364132451Sroberto
365182007Srobertoif test -z "$ECHO"; then
366182007Srobertoif test "X${echo_test_string+set}" != Xset; then
367182007Sroberto# find a string as large as possible, as long as the shell can cope with it
368182007Sroberto  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
369182007Sroberto    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
370182007Sroberto    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
371182007Sroberto       echo_test_string=`eval $cmd` &&
372182007Sroberto       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
373182007Sroberto    then
374182007Sroberto      break
375182007Sroberto    fi
376182007Sroberto  done
377182007Srobertofi
378132451Sroberto
379182007Srobertoif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
380182007Sroberto   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
381182007Sroberto   test "X$echo_testing_string" = "X$echo_test_string"; then
382182007Sroberto  :
383182007Srobertoelse
384182007Sroberto  # The Solaris, AIX, and Digital Unix default echo programs unquote
385182007Sroberto  # backslashes.  This makes it impossible to quote backslashes using
386182007Sroberto  #   echo "$something" | sed 's/\\/\\\\/g'
387182007Sroberto  #
388182007Sroberto  # So, first we look for a working echo in the user's PATH.
389182007Sroberto
390182007Sroberto  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
391182007Sroberto  for dir in $PATH /usr/ucb; do
392182007Sroberto    IFS="$lt_save_ifs"
393182007Sroberto    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
394182007Sroberto       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
395182007Sroberto       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
396182007Sroberto       test "X$echo_testing_string" = "X$echo_test_string"; then
397182007Sroberto      echo="$dir/echo"
398182007Sroberto      break
399182007Sroberto    fi
400182007Sroberto  done
401182007Sroberto  IFS="$lt_save_ifs"
402182007Sroberto
403182007Sroberto  if test "X$echo" = Xecho; then
404182007Sroberto    # We didn't find a better echo, so look for alternatives.
405182007Sroberto    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
406182007Sroberto       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
407182007Sroberto       test "X$echo_testing_string" = "X$echo_test_string"; then
408182007Sroberto      # This shell has a builtin print -r that does the trick.
409182007Sroberto      echo='print -r'
410182007Sroberto    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
411182007Sroberto	 test "X$CONFIG_SHELL" != X/bin/ksh; then
412182007Sroberto      # If we have ksh, try running configure again with it.
413182007Sroberto      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
414182007Sroberto      export ORIGINAL_CONFIG_SHELL
415182007Sroberto      CONFIG_SHELL=/bin/ksh
416182007Sroberto      export CONFIG_SHELL
417182007Sroberto      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
418182007Sroberto    else
419182007Sroberto      # Try using printf.
420182007Sroberto      echo='printf %s\n'
421182007Sroberto      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
422182007Sroberto	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
423182007Sroberto	 test "X$echo_testing_string" = "X$echo_test_string"; then
424182007Sroberto	# Cool, printf works
425182007Sroberto	:
426182007Sroberto      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
427182007Sroberto	   test "X$echo_testing_string" = 'X\t' &&
428182007Sroberto	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
429182007Sroberto	   test "X$echo_testing_string" = "X$echo_test_string"; then
430182007Sroberto	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
431182007Sroberto	export CONFIG_SHELL
432182007Sroberto	SHELL="$CONFIG_SHELL"
433182007Sroberto	export SHELL
434182007Sroberto	echo="$CONFIG_SHELL [$]0 --fallback-echo"
435182007Sroberto      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
436182007Sroberto	   test "X$echo_testing_string" = 'X\t' &&
437182007Sroberto	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
438182007Sroberto	   test "X$echo_testing_string" = "X$echo_test_string"; then
439182007Sroberto	echo="$CONFIG_SHELL [$]0 --fallback-echo"
440182007Sroberto      else
441182007Sroberto	# maybe with a smaller string...
442182007Sroberto	prev=:
443182007Sroberto
444182007Sroberto	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
445182007Sroberto	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
446182007Sroberto	  then
447182007Sroberto	    break
448182007Sroberto	  fi
449182007Sroberto	  prev="$cmd"
450182007Sroberto	done
451182007Sroberto
452182007Sroberto	if test "$prev" != 'sed 50q "[$]0"'; then
453182007Sroberto	  echo_test_string=`eval $prev`
454182007Sroberto	  export echo_test_string
455182007Sroberto	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
456182007Sroberto	else
457182007Sroberto	  # Oops.  We lost completely, so just stick with echo.
458182007Sroberto	  echo=echo
459182007Sroberto	fi
460182007Sroberto      fi
461182007Sroberto    fi
462182007Sroberto  fi
463182007Srobertofi
464182007Srobertofi
465182007Sroberto
466182007Sroberto# Copy echo and quote the copy suitably for passing to libtool from
467182007Sroberto# the Makefile, instead of quoting the original, which is used later.
468182007SrobertoECHO=$echo
469182007Srobertoif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
470182007Sroberto   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
471182007Srobertofi
472182007Sroberto
473182007SrobertoAC_SUBST(ECHO)
474182007Sroberto])])# _LT_AC_PROG_ECHO_BACKSLASH
475182007Sroberto
476182007Sroberto
477182007Sroberto# _LT_AC_LOCK
478182007Sroberto# -----------
479182007SrobertoAC_DEFUN([_LT_AC_LOCK],
480182007Sroberto[AC_ARG_ENABLE([libtool-lock],
481182007Sroberto    [AC_HELP_STRING([--disable-libtool-lock],
482182007Sroberto	[avoid locking (might break parallel builds)])])
483182007Srobertotest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
484182007Sroberto
485182007Sroberto# Some flags need to be propagated to the compiler or linker for good
486182007Sroberto# libtool support.
487182007Srobertocase $host in
488182007Srobertoia64-*-hpux*)
489182007Sroberto  # Find out which ABI we are using.
490182007Sroberto  echo 'int i;' > conftest.$ac_ext
491182007Sroberto  if AC_TRY_EVAL(ac_compile); then
492182007Sroberto    case `/usr/bin/file conftest.$ac_objext` in
493182007Sroberto    *ELF-32*)
494182007Sroberto      HPUX_IA64_MODE="32"
495182007Sroberto      ;;
496182007Sroberto    *ELF-64*)
497182007Sroberto      HPUX_IA64_MODE="64"
498182007Sroberto      ;;
499182007Sroberto    esac
500182007Sroberto  fi
501182007Sroberto  rm -rf conftest*
502182007Sroberto  ;;
503182007Sroberto*-*-irix6*)
504182007Sroberto  # Find out which ABI we are using.
505182007Sroberto  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
506182007Sroberto  if AC_TRY_EVAL(ac_compile); then
507182007Sroberto   if test "$lt_cv_prog_gnu_ld" = yes; then
508182007Sroberto    case `/usr/bin/file conftest.$ac_objext` in
509182007Sroberto    *32-bit*)
510182007Sroberto      LD="${LD-ld} -melf32bsmip"
511182007Sroberto      ;;
512182007Sroberto    *N32*)
513182007Sroberto      LD="${LD-ld} -melf32bmipn32"
514182007Sroberto      ;;
515182007Sroberto    *64-bit*)
516182007Sroberto      LD="${LD-ld} -melf64bmip"
517182007Sroberto      ;;
518182007Sroberto    esac
519182007Sroberto   else
520182007Sroberto    case `/usr/bin/file conftest.$ac_objext` in
521182007Sroberto    *32-bit*)
522182007Sroberto      LD="${LD-ld} -32"
523182007Sroberto      ;;
524182007Sroberto    *N32*)
525182007Sroberto      LD="${LD-ld} -n32"
526182007Sroberto      ;;
527182007Sroberto    *64-bit*)
528182007Sroberto      LD="${LD-ld} -64"
529182007Sroberto      ;;
530182007Sroberto    esac
531182007Sroberto   fi
532182007Sroberto  fi
533182007Sroberto  rm -rf conftest*
534182007Sroberto  ;;
535182007Sroberto
536182007Srobertox86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
537182007Sroberto  # Find out which ABI we are using.
538182007Sroberto  echo 'int i;' > conftest.$ac_ext
539182007Sroberto  if AC_TRY_EVAL(ac_compile); then
540182007Sroberto    case `/usr/bin/file conftest.o` in
541182007Sroberto    *32-bit*)
542182007Sroberto      case $host in
543182007Sroberto        x86_64-*linux*)
544182007Sroberto          LD="${LD-ld} -m elf_i386"
545182007Sroberto          ;;
546182007Sroberto        ppc64-*linux*|powerpc64-*linux*)
547182007Sroberto          LD="${LD-ld} -m elf32ppclinux"
548182007Sroberto          ;;
549182007Sroberto        s390x-*linux*)
550182007Sroberto          LD="${LD-ld} -m elf_s390"
551182007Sroberto          ;;
552182007Sroberto        sparc64-*linux*)
553182007Sroberto          LD="${LD-ld} -m elf32_sparc"
554182007Sroberto          ;;
555182007Sroberto      esac
556182007Sroberto      ;;
557182007Sroberto    *64-bit*)
558182007Sroberto      case $host in
559182007Sroberto        x86_64-*linux*)
560182007Sroberto          LD="${LD-ld} -m elf_x86_64"
561182007Sroberto          ;;
562182007Sroberto        ppc*-*linux*|powerpc*-*linux*)
563182007Sroberto          LD="${LD-ld} -m elf64ppc"
564182007Sroberto          ;;
565182007Sroberto        s390*-*linux*)
566182007Sroberto          LD="${LD-ld} -m elf64_s390"
567182007Sroberto          ;;
568182007Sroberto        sparc*-*linux*)
569182007Sroberto          LD="${LD-ld} -m elf64_sparc"
570182007Sroberto          ;;
571182007Sroberto      esac
572182007Sroberto      ;;
573182007Sroberto    esac
574182007Sroberto  fi
575182007Sroberto  rm -rf conftest*
576182007Sroberto  ;;
577182007Sroberto
578182007Sroberto*-*-sco3.2v5*)
579182007Sroberto  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
580182007Sroberto  SAVE_CFLAGS="$CFLAGS"
581182007Sroberto  CFLAGS="$CFLAGS -belf"
582182007Sroberto  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
583182007Sroberto    [AC_LANG_PUSH(C)
584182007Sroberto     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
585182007Sroberto     AC_LANG_POP])
586182007Sroberto  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
587182007Sroberto    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
588182007Sroberto    CFLAGS="$SAVE_CFLAGS"
589182007Sroberto  fi
590182007Sroberto  ;;
591182007SrobertoAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
592182007Sroberto[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
593182007Sroberto  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
594182007Sroberto  AC_CHECK_TOOL(AS, as, false)
595182007Sroberto  AC_CHECK_TOOL(OBJDUMP, objdump, false)
596182007Sroberto  ;;
597182007Sroberto  ])
598182007Srobertoesac
599182007Sroberto
600182007Srobertoneed_locks="$enable_libtool_lock"
601182007Sroberto
602182007Sroberto])# _LT_AC_LOCK
603182007Sroberto
604182007Sroberto
605182007Sroberto# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
606182007Sroberto#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
607182007Sroberto# ----------------------------------------------------------------
608182007Sroberto# Check whether the given compiler option works
609182007SrobertoAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
610182007Sroberto[AC_REQUIRE([LT_AC_PROG_SED])
611182007SrobertoAC_CACHE_CHECK([$1], [$2],
612182007Sroberto  [$2=no
613182007Sroberto  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
614182007Sroberto   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
615182007Sroberto   lt_compiler_flag="$3"
616182007Sroberto   # Insert the option either (1) after the last *FLAGS variable, or
617182007Sroberto   # (2) before a word containing "conftest.", or (3) at the end.
618182007Sroberto   # Note that $ac_compile itself does not contain backslashes and begins
619182007Sroberto   # with a dollar sign (not a hyphen), so the echo should work correctly.
620182007Sroberto   # The option is referenced via a variable to avoid confusing sed.
621182007Sroberto   lt_compile=`echo "$ac_compile" | $SED \
622182007Sroberto   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
623182007Sroberto   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
624182007Sroberto   -e 's:$: $lt_compiler_flag:'`
625182007Sroberto   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
626182007Sroberto   (eval "$lt_compile" 2>conftest.err)
627182007Sroberto   ac_status=$?
628182007Sroberto   cat conftest.err >&AS_MESSAGE_LOG_FD
629182007Sroberto   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
630182007Sroberto   if (exit $ac_status) && test -s "$ac_outfile"; then
631182007Sroberto     # The compiler can only warn and ignore the option if not recognized
632182007Sroberto     # So say no if there are warnings other than the usual output.
633182007Sroberto     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
634182007Sroberto     $SED '/^$/d' conftest.err >conftest.er2
635182007Sroberto     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
636182007Sroberto       $2=yes
637182007Sroberto     fi
638182007Sroberto   fi
639182007Sroberto   $rm conftest*
640132451Sroberto])
641182007Sroberto
642182007Srobertoif test x"[$]$2" = xyes; then
643182007Sroberto    ifelse([$5], , :, [$5])
644182007Srobertoelse
645182007Sroberto    ifelse([$6], , :, [$6])
646182007Srobertofi
647182007Sroberto])# AC_LIBTOOL_COMPILER_OPTION
648182007Sroberto
649182007Sroberto
650182007Sroberto# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
651182007Sroberto#                          [ACTION-SUCCESS], [ACTION-FAILURE])
652182007Sroberto# ------------------------------------------------------------
653182007Sroberto# Check whether the given compiler option works
654182007SrobertoAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
655182007Sroberto[AC_CACHE_CHECK([$1], [$2],
656182007Sroberto  [$2=no
657182007Sroberto   save_LDFLAGS="$LDFLAGS"
658182007Sroberto   LDFLAGS="$LDFLAGS $3"
659182007Sroberto   printf "$lt_simple_link_test_code" > conftest.$ac_ext
660182007Sroberto   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
661182007Sroberto     # The linker can only warn and ignore the option if not recognized
662182007Sroberto     # So say no if there are warnings
663182007Sroberto     if test -s conftest.err; then
664182007Sroberto       # Append any errors to the config.log.
665182007Sroberto       cat conftest.err 1>&AS_MESSAGE_LOG_FD
666182007Sroberto       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
667182007Sroberto       $SED '/^$/d' conftest.err >conftest.er2
668182007Sroberto       if diff conftest.exp conftest.er2 >/dev/null; then
669182007Sroberto         $2=yes
670182007Sroberto       fi
671182007Sroberto     else
672182007Sroberto       $2=yes
673182007Sroberto     fi
674182007Sroberto   fi
675182007Sroberto   $rm conftest*
676182007Sroberto   LDFLAGS="$save_LDFLAGS"
677132451Sroberto])
678132451Sroberto
679182007Srobertoif test x"[$]$2" = xyes; then
680182007Sroberto    ifelse([$4], , :, [$4])
681182007Srobertoelse
682182007Sroberto    ifelse([$5], , :, [$5])
683182007Srobertofi
684182007Sroberto])# AC_LIBTOOL_LINKER_OPTION
685132451Sroberto
686132451Sroberto
687182007Sroberto# AC_LIBTOOL_SYS_MAX_CMD_LEN
688182007Sroberto# --------------------------
689182007SrobertoAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
690182007Sroberto[# find the maximum length of command line arguments
691182007SrobertoAC_MSG_CHECKING([the maximum length of command line arguments])
692182007SrobertoAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
693182007Sroberto  i=0
694182007Sroberto  teststring="ABCD"
695182007Sroberto
696182007Sroberto  case $build_os in
697182007Sroberto  msdosdjgpp*)
698182007Sroberto    # On DJGPP, this test can blow up pretty badly due to problems in libc
699182007Sroberto    # (any single argument exceeding 2000 bytes causes a buffer overrun
700182007Sroberto    # during glob expansion).  Even if it were fixed, the result of this
701182007Sroberto    # check would be larger than it should be.
702182007Sroberto    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
703182007Sroberto    ;;
704182007Sroberto
705182007Sroberto  gnu*)
706182007Sroberto    # Under GNU Hurd, this test is not required because there is
707182007Sroberto    # no limit to the length of command line arguments.
708182007Sroberto    # Libtool will interpret -1 as no limit whatsoever
709182007Sroberto    lt_cv_sys_max_cmd_len=-1;
710182007Sroberto    ;;
711182007Sroberto
712182007Sroberto  cygwin* | mingw*)
713182007Sroberto    # On Win9x/ME, this test blows up -- it succeeds, but takes
714182007Sroberto    # about 5 minutes as the teststring grows exponentially.
715182007Sroberto    # Worse, since 9x/ME are not pre-emptively multitasking,
716182007Sroberto    # you end up with a "frozen" computer, even though with patience
717182007Sroberto    # the test eventually succeeds (with a max line length of 256k).
718182007Sroberto    # Instead, let's just punt: use the minimum linelength reported by
719182007Sroberto    # all of the supported platforms: 8192 (on NT/2K/XP).
720182007Sroberto    lt_cv_sys_max_cmd_len=8192;
721182007Sroberto    ;;
722182007Sroberto
723182007Sroberto  amigaos*)
724182007Sroberto    # On AmigaOS with pdksh, this test takes hours, literally.
725182007Sroberto    # So we just punt and use a minimum line length of 8192.
726182007Sroberto    lt_cv_sys_max_cmd_len=8192;
727182007Sroberto    ;;
728182007Sroberto
729182007Sroberto  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
730182007Sroberto    # This has been around since 386BSD, at least.  Likely further.
731182007Sroberto    if test -x /sbin/sysctl; then
732182007Sroberto      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
733182007Sroberto    elif test -x /usr/sbin/sysctl; then
734182007Sroberto      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
735182007Sroberto    else
736182007Sroberto      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
737182007Sroberto    fi
738182007Sroberto    # And add a safety zone
739182007Sroberto    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
740182007Sroberto    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
741182007Sroberto    ;;
742182007Sroberto  osf*)
743182007Sroberto    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
744182007Sroberto    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
745182007Sroberto    # nice to cause kernel panics so lets avoid the loop below.
746182007Sroberto    # First set a reasonable default.
747182007Sroberto    lt_cv_sys_max_cmd_len=16384
748182007Sroberto    #
749182007Sroberto    if test -x /sbin/sysconfig; then
750182007Sroberto      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
751182007Sroberto        *1*) lt_cv_sys_max_cmd_len=-1 ;;
752182007Sroberto      esac
753182007Sroberto    fi
754182007Sroberto    ;;
755182007Sroberto  *)
756182007Sroberto    # If test is not a shell built-in, we'll probably end up computing a
757182007Sroberto    # maximum length that is only half of the actual maximum length, but
758182007Sroberto    # we can't tell.
759182007Sroberto    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
760182007Sroberto    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
761182007Sroberto	       = "XX$teststring") >/dev/null 2>&1 &&
762182007Sroberto	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
763182007Sroberto	    lt_cv_sys_max_cmd_len=$new_result &&
764182007Sroberto	    test $i != 17 # 1/2 MB should be enough
765182007Sroberto    do
766182007Sroberto      i=`expr $i + 1`
767182007Sroberto      teststring=$teststring$teststring
768182007Sroberto    done
769182007Sroberto    teststring=
770182007Sroberto    # Add a significant safety factor because C++ compilers can tack on massive
771182007Sroberto    # amounts of additional arguments before passing them to the linker.
772182007Sroberto    # It appears as though 1/2 is a usable value.
773182007Sroberto    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
774182007Sroberto    ;;
775132451Sroberto  esac
776182007Sroberto])
777182007Srobertoif test -n $lt_cv_sys_max_cmd_len ; then
778182007Sroberto  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
779182007Srobertoelse
780182007Sroberto  AC_MSG_RESULT(none)
781182007Srobertofi
782182007Sroberto])# AC_LIBTOOL_SYS_MAX_CMD_LEN
783132451Sroberto
784132451Sroberto
785182007Sroberto# _LT_AC_CHECK_DLFCN
786182007Sroberto# --------------------
787182007SrobertoAC_DEFUN([_LT_AC_CHECK_DLFCN],
788182007Sroberto[AC_CHECK_HEADERS(dlfcn.h)dnl
789182007Sroberto])# _LT_AC_CHECK_DLFCN
790132451Sroberto
791132451Sroberto
792182007Sroberto# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
793182007Sroberto#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
794182007Sroberto# ------------------------------------------------------------------
795182007SrobertoAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
796182007Sroberto[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
797182007Srobertoif test "$cross_compiling" = yes; then :
798182007Sroberto  [$4]
799182007Srobertoelse
800182007Sroberto  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
801182007Sroberto  lt_status=$lt_dlunknown
802182007Sroberto  cat > conftest.$ac_ext <<EOF
803182007Sroberto[#line __oline__ "configure"
804182007Sroberto#include "confdefs.h"
805132451Sroberto
806182007Sroberto#if HAVE_DLFCN_H
807182007Sroberto#include <dlfcn.h>
808182007Sroberto#endif
809132451Sroberto
810182007Sroberto#include <stdio.h>
811132451Sroberto
812182007Sroberto#ifdef RTLD_GLOBAL
813182007Sroberto#  define LT_DLGLOBAL		RTLD_GLOBAL
814182007Sroberto#else
815182007Sroberto#  ifdef DL_GLOBAL
816182007Sroberto#    define LT_DLGLOBAL		DL_GLOBAL
817182007Sroberto#  else
818182007Sroberto#    define LT_DLGLOBAL		0
819182007Sroberto#  endif
820182007Sroberto#endif
821132451Sroberto
822182007Sroberto/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
823182007Sroberto   find out it does not work in some platform. */
824182007Sroberto#ifndef LT_DLLAZY_OR_NOW
825182007Sroberto#  ifdef RTLD_LAZY
826182007Sroberto#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
827182007Sroberto#  else
828182007Sroberto#    ifdef DL_LAZY
829182007Sroberto#      define LT_DLLAZY_OR_NOW		DL_LAZY
830182007Sroberto#    else
831182007Sroberto#      ifdef RTLD_NOW
832182007Sroberto#        define LT_DLLAZY_OR_NOW	RTLD_NOW
833182007Sroberto#      else
834182007Sroberto#        ifdef DL_NOW
835182007Sroberto#          define LT_DLLAZY_OR_NOW	DL_NOW
836182007Sroberto#        else
837182007Sroberto#          define LT_DLLAZY_OR_NOW	0
838182007Sroberto#        endif
839182007Sroberto#      endif
840182007Sroberto#    endif
841182007Sroberto#  endif
842182007Sroberto#endif
843132451Sroberto
844182007Sroberto#ifdef __cplusplus
845182007Srobertoextern "C" void exit (int);
846182007Sroberto#endif
847132451Sroberto
848182007Srobertovoid fnord() { int i=42;}
849182007Srobertoint main ()
850182007Sroberto{
851182007Sroberto  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
852182007Sroberto  int status = $lt_dlunknown;
853132451Sroberto
854182007Sroberto  if (self)
855182007Sroberto    {
856182007Sroberto      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
857182007Sroberto      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
858182007Sroberto      /* dlclose (self); */
859182007Sroberto    }
860132451Sroberto
861182007Sroberto    exit (status);
862182007Sroberto}]
863182007SrobertoEOF
864182007Sroberto  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
865182007Sroberto    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
866182007Sroberto    lt_status=$?
867182007Sroberto    case x$lt_status in
868182007Sroberto      x$lt_dlno_uscore) $1 ;;
869182007Sroberto      x$lt_dlneed_uscore) $2 ;;
870182007Sroberto      x$lt_unknown|x*) $3 ;;
871182007Sroberto    esac
872182007Sroberto  else :
873182007Sroberto    # compilation failed
874182007Sroberto    $3
875182007Sroberto  fi
876182007Srobertofi
877182007Srobertorm -fr conftest*
878182007Sroberto])# _LT_AC_TRY_DLOPEN_SELF
879132451Sroberto
880182007Sroberto
881182007Sroberto# AC_LIBTOOL_DLOPEN_SELF
882182007Sroberto# -------------------
883182007SrobertoAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
884182007Sroberto[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
885182007Srobertoif test "x$enable_dlopen" != xyes; then
886182007Sroberto  enable_dlopen=unknown
887182007Sroberto  enable_dlopen_self=unknown
888182007Sroberto  enable_dlopen_self_static=unknown
889182007Srobertoelse
890182007Sroberto  lt_cv_dlopen=no
891182007Sroberto  lt_cv_dlopen_libs=
892182007Sroberto
893182007Sroberto  case $host_os in
894182007Sroberto  beos*)
895182007Sroberto    lt_cv_dlopen="load_add_on"
896182007Sroberto    lt_cv_dlopen_libs=
897182007Sroberto    lt_cv_dlopen_self=yes
898182007Sroberto    ;;
899182007Sroberto
900182007Sroberto  mingw* | pw32*)
901182007Sroberto    lt_cv_dlopen="LoadLibrary"
902182007Sroberto    lt_cv_dlopen_libs=
903182007Sroberto   ;;
904182007Sroberto
905182007Sroberto  cygwin*)
906182007Sroberto    lt_cv_dlopen="dlopen"
907182007Sroberto    lt_cv_dlopen_libs=
908182007Sroberto   ;;
909182007Sroberto
910182007Sroberto  darwin*)
911182007Sroberto  # if libdl is installed we need to link against it
912182007Sroberto    AC_CHECK_LIB([dl], [dlopen],
913182007Sroberto		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
914182007Sroberto    lt_cv_dlopen="dyld"
915182007Sroberto    lt_cv_dlopen_libs=
916182007Sroberto    lt_cv_dlopen_self=yes
917182007Sroberto    ])
918182007Sroberto   ;;
919182007Sroberto
920182007Sroberto  *)
921182007Sroberto    AC_CHECK_FUNC([shl_load],
922182007Sroberto	  [lt_cv_dlopen="shl_load"],
923182007Sroberto      [AC_CHECK_LIB([dld], [shl_load],
924182007Sroberto	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
925182007Sroberto	[AC_CHECK_FUNC([dlopen],
926182007Sroberto	      [lt_cv_dlopen="dlopen"],
927182007Sroberto	  [AC_CHECK_LIB([dl], [dlopen],
928182007Sroberto		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
929182007Sroberto	    [AC_CHECK_LIB([svld], [dlopen],
930182007Sroberto		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
931182007Sroberto	      [AC_CHECK_LIB([dld], [dld_link],
932182007Sroberto		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
933182007Sroberto	      ])
934182007Sroberto	    ])
935182007Sroberto	  ])
936182007Sroberto	])
937182007Sroberto      ])
938182007Sroberto    ;;
939182007Sroberto  esac
940182007Sroberto
941182007Sroberto  if test "x$lt_cv_dlopen" != xno; then
942182007Sroberto    enable_dlopen=yes
943182007Sroberto  else
944182007Sroberto    enable_dlopen=no
945182007Sroberto  fi
946182007Sroberto
947182007Sroberto  case $lt_cv_dlopen in
948182007Sroberto  dlopen)
949182007Sroberto    save_CPPFLAGS="$CPPFLAGS"
950182007Sroberto    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
951182007Sroberto
952182007Sroberto    save_LDFLAGS="$LDFLAGS"
953182007Sroberto    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
954182007Sroberto
955182007Sroberto    save_LIBS="$LIBS"
956182007Sroberto    LIBS="$lt_cv_dlopen_libs $LIBS"
957182007Sroberto
958182007Sroberto    AC_CACHE_CHECK([whether a program can dlopen itself],
959182007Sroberto	  lt_cv_dlopen_self, [dnl
960182007Sroberto	  _LT_AC_TRY_DLOPEN_SELF(
961182007Sroberto	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
962182007Sroberto	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
963182007Sroberto    ])
964182007Sroberto
965182007Sroberto    if test "x$lt_cv_dlopen_self" = xyes; then
966182007Sroberto      LDFLAGS="$LDFLAGS $link_static_flag"
967182007Sroberto      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
968182007Sroberto    	  lt_cv_dlopen_self_static, [dnl
969182007Sroberto	  _LT_AC_TRY_DLOPEN_SELF(
970182007Sroberto	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
971182007Sroberto	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
972182007Sroberto      ])
973182007Sroberto    fi
974182007Sroberto
975182007Sroberto    CPPFLAGS="$save_CPPFLAGS"
976182007Sroberto    LDFLAGS="$save_LDFLAGS"
977182007Sroberto    LIBS="$save_LIBS"
978182007Sroberto    ;;
979182007Sroberto  esac
980182007Sroberto
981182007Sroberto  case $lt_cv_dlopen_self in
982182007Sroberto  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
983182007Sroberto  *) enable_dlopen_self=unknown ;;
984182007Sroberto  esac
985182007Sroberto
986182007Sroberto  case $lt_cv_dlopen_self_static in
987182007Sroberto  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
988182007Sroberto  *) enable_dlopen_self_static=unknown ;;
989182007Sroberto  esac
990182007Srobertofi
991182007Sroberto])# AC_LIBTOOL_DLOPEN_SELF
992182007Sroberto
993182007Sroberto
994182007Sroberto# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
995182007Sroberto# ---------------------------------
996182007Sroberto# Check to see if options -c and -o are simultaneously supported by compiler
997182007SrobertoAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
998182007Sroberto[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
999182007SrobertoAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1000182007Sroberto  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1001182007Sroberto  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1002182007Sroberto   $rm -r conftest 2>/dev/null
1003182007Sroberto   mkdir conftest
1004182007Sroberto   cd conftest
1005182007Sroberto   mkdir out
1006182007Sroberto   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1007182007Sroberto
1008182007Sroberto   lt_compiler_flag="-o out/conftest2.$ac_objext"
1009182007Sroberto   # Insert the option either (1) after the last *FLAGS variable, or
1010182007Sroberto   # (2) before a word containing "conftest.", or (3) at the end.
1011182007Sroberto   # Note that $ac_compile itself does not contain backslashes and begins
1012182007Sroberto   # with a dollar sign (not a hyphen), so the echo should work correctly.
1013182007Sroberto   lt_compile=`echo "$ac_compile" | $SED \
1014182007Sroberto   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1015182007Sroberto   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1016182007Sroberto   -e 's:$: $lt_compiler_flag:'`
1017182007Sroberto   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1018182007Sroberto   (eval "$lt_compile" 2>out/conftest.err)
1019182007Sroberto   ac_status=$?
1020182007Sroberto   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1021182007Sroberto   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1022182007Sroberto   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1023182007Sroberto   then
1024182007Sroberto     # The compiler can only warn and ignore the option if not recognized
1025182007Sroberto     # So say no if there are warnings
1026182007Sroberto     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1027182007Sroberto     $SED '/^$/d' out/conftest.err >out/conftest.er2
1028182007Sroberto     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1029182007Sroberto       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1030182007Sroberto     fi
1031182007Sroberto   fi
1032182007Sroberto   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1033182007Sroberto   $rm conftest*
1034182007Sroberto   # SGI C++ compiler will create directory out/ii_files/ for
1035182007Sroberto   # template instantiation
1036182007Sroberto   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1037182007Sroberto   $rm out/* && rmdir out
1038182007Sroberto   cd ..
1039182007Sroberto   rmdir conftest
1040182007Sroberto   $rm conftest*
1041182007Sroberto])
1042182007Sroberto])# AC_LIBTOOL_PROG_CC_C_O
1043182007Sroberto
1044182007Sroberto
1045182007Sroberto# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1046182007Sroberto# -----------------------------------------
1047182007Sroberto# Check to see if we can do hard links to lock some files if needed
1048182007SrobertoAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1049182007Sroberto[AC_REQUIRE([_LT_AC_LOCK])dnl
1050182007Sroberto
1051182007Srobertohard_links="nottested"
1052182007Srobertoif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1053182007Sroberto  # do not overwrite the value of need_locks provided by the user
1054182007Sroberto  AC_MSG_CHECKING([if we can lock with hard links])
1055182007Sroberto  hard_links=yes
1056182007Sroberto  $rm conftest*
1057182007Sroberto  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1058182007Sroberto  touch conftest.a
1059182007Sroberto  ln conftest.a conftest.b 2>&5 || hard_links=no
1060182007Sroberto  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1061182007Sroberto  AC_MSG_RESULT([$hard_links])
1062182007Sroberto  if test "$hard_links" = no; then
1063182007Sroberto    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1064182007Sroberto    need_locks=warn
1065182007Sroberto  fi
1066182007Srobertoelse
1067182007Sroberto  need_locks=no
1068182007Srobertofi
1069182007Sroberto])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1070182007Sroberto
1071182007Sroberto
1072182007Sroberto# AC_LIBTOOL_OBJDIR
1073182007Sroberto# -----------------
1074182007SrobertoAC_DEFUN([AC_LIBTOOL_OBJDIR],
1075182007Sroberto[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1076182007Sroberto[rm -f .libs 2>/dev/null
1077182007Srobertomkdir .libs 2>/dev/null
1078182007Srobertoif test -d .libs; then
1079182007Sroberto  lt_cv_objdir=.libs
1080182007Srobertoelse
1081182007Sroberto  # MS-DOS does not allow filenames that begin with a dot.
1082182007Sroberto  lt_cv_objdir=_libs
1083182007Srobertofi
1084182007Srobertormdir .libs 2>/dev/null])
1085182007Srobertoobjdir=$lt_cv_objdir
1086182007Sroberto])# AC_LIBTOOL_OBJDIR
1087182007Sroberto
1088182007Sroberto
1089182007Sroberto# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1090182007Sroberto# ----------------------------------------------
1091182007Sroberto# Check hardcoding attributes.
1092182007SrobertoAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1093182007Sroberto[AC_MSG_CHECKING([how to hardcode library paths into programs])
1094182007Sroberto_LT_AC_TAGVAR(hardcode_action, $1)=
1095182007Srobertoif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1096182007Sroberto   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1097182007Sroberto   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1098182007Sroberto
1099182007Sroberto  # We can hardcode non-existant directories.
1100182007Sroberto  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1101182007Sroberto     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1102182007Sroberto     # have to relink, otherwise we might link with an installed library
1103182007Sroberto     # when we should be linking with a yet-to-be-installed one
1104182007Sroberto     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1105182007Sroberto     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1106182007Sroberto    # Linking always hardcodes the temporary library directory.
1107182007Sroberto    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1108182007Sroberto  else
1109182007Sroberto    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1110182007Sroberto    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1111182007Sroberto  fi
1112182007Srobertoelse
1113182007Sroberto  # We cannot hardcode anything, or else we can only hardcode existing
1114182007Sroberto  # directories.
1115182007Sroberto  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1116182007Srobertofi
1117182007SrobertoAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1118182007Sroberto
1119182007Srobertoif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1120182007Sroberto  # Fast installation is not supported
1121182007Sroberto  enable_fast_install=no
1122182007Srobertoelif test "$shlibpath_overrides_runpath" = yes ||
1123182007Sroberto     test "$enable_shared" = no; then
1124182007Sroberto  # Fast installation is not necessary
1125182007Sroberto  enable_fast_install=needless
1126182007Srobertofi
1127182007Sroberto])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1128182007Sroberto
1129182007Sroberto
1130182007Sroberto# AC_LIBTOOL_SYS_LIB_STRIP
1131182007Sroberto# ------------------------
1132182007SrobertoAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1133182007Sroberto[striplib=
1134182007Srobertoold_striplib=
1135182007SrobertoAC_MSG_CHECKING([whether stripping libraries is possible])
1136182007Srobertoif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1137182007Sroberto  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1138182007Sroberto  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1139182007Sroberto  AC_MSG_RESULT([yes])
1140182007Srobertoelse
1141182007Sroberto# FIXME - insert some real tests, host_os isn't really good enough
1142182007Sroberto  case $host_os in
1143182007Sroberto   darwin*)
1144182007Sroberto       if test -n "$STRIP" ; then
1145182007Sroberto         striplib="$STRIP -x"
1146182007Sroberto         AC_MSG_RESULT([yes])
1147182007Sroberto       else
1148182007Sroberto  AC_MSG_RESULT([no])
1149182007Srobertofi
1150182007Sroberto       ;;
1151182007Sroberto   *)
1152182007Sroberto  AC_MSG_RESULT([no])
1153182007Sroberto    ;;
1154182007Sroberto  esac
1155182007Srobertofi
1156182007Sroberto])# AC_LIBTOOL_SYS_LIB_STRIP
1157182007Sroberto
1158182007Sroberto
1159182007Sroberto# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1160182007Sroberto# -----------------------------
1161182007Sroberto# PORTME Fill in your ld.so characteristics
1162182007SrobertoAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1163182007Sroberto[AC_MSG_CHECKING([dynamic linker characteristics])
1164182007Srobertolibrary_names_spec=
1165182007Srobertolibname_spec='lib$name'
1166182007Srobertosoname_spec=
1167182007Srobertoshrext_cmds=".so"
1168182007Srobertopostinstall_cmds=
1169182007Srobertopostuninstall_cmds=
1170182007Srobertofinish_cmds=
1171182007Srobertofinish_eval=
1172182007Srobertoshlibpath_var=
1173182007Srobertoshlibpath_overrides_runpath=unknown
1174182007Srobertoversion_type=none
1175182007Srobertodynamic_linker="$host_os ld.so"
1176182007Srobertosys_lib_dlsearch_path_spec="/lib /usr/lib"
1177182007Srobertoif test "$GCC" = yes; then
1178182007Sroberto  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1179182007Sroberto  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1180182007Sroberto    # if the path contains ";" then we assume it to be the separator
1181182007Sroberto    # otherwise default to the standard path separator (i.e. ":") - it is
1182182007Sroberto    # assumed that no part of a normal pathname contains ";" but that should
1183182007Sroberto    # okay in the real world where ";" in dirpaths is itself problematic.
1184182007Sroberto    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1185182007Sroberto  else
1186182007Sroberto    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1187182007Sroberto  fi
1188182007Srobertoelse
1189182007Sroberto  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1190182007Srobertofi
1191182007Srobertoneed_lib_prefix=unknown
1192182007Srobertohardcode_into_libs=no
1193182007Sroberto
1194182007Sroberto# when you set need_version to no, make sure it does not cause -set_version
1195182007Sroberto# flags to be left without arguments
1196182007Srobertoneed_version=unknown
1197182007Sroberto
1198182007Srobertocase $host_os in
1199182007Srobertoaix3*)
1200182007Sroberto  version_type=linux
1201182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1202182007Sroberto  shlibpath_var=LIBPATH
1203182007Sroberto
1204182007Sroberto  # AIX 3 has no versioning support, so we append a major version to the name.
1205182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1206182007Sroberto  ;;
1207182007Sroberto
1208182007Srobertoaix4* | aix5*)
1209182007Sroberto  version_type=linux
1210182007Sroberto  need_lib_prefix=no
1211182007Sroberto  need_version=no
1212182007Sroberto  hardcode_into_libs=yes
1213182007Sroberto  if test "$host_cpu" = ia64; then
1214182007Sroberto    # AIX 5 supports IA64
1215182007Sroberto    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1216182007Sroberto    shlibpath_var=LD_LIBRARY_PATH
1217182007Sroberto  else
1218182007Sroberto    # With GCC up to 2.95.x, collect2 would create an import file
1219182007Sroberto    # for dependence libraries.  The import file would start with
1220182007Sroberto    # the line `#! .'.  This would cause the generated library to
1221182007Sroberto    # depend on `.', always an invalid library.  This was fixed in
1222182007Sroberto    # development snapshots of GCC prior to 3.0.
1223182007Sroberto    case $host_os in
1224182007Sroberto      aix4 | aix4.[[01]] | aix4.[[01]].*)
1225182007Sroberto      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1226182007Sroberto	   echo ' yes '
1227182007Sroberto	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1228182007Sroberto	:
1229182007Sroberto      else
1230182007Sroberto	can_build_shared=no
1231182007Sroberto      fi
1232182007Sroberto      ;;
1233182007Sroberto    esac
1234182007Sroberto    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1235182007Sroberto    # soname into executable. Probably we can add versioning support to
1236182007Sroberto    # collect2, so additional links can be useful in future.
1237182007Sroberto    if test "$aix_use_runtimelinking" = yes; then
1238182007Sroberto      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1239182007Sroberto      # instead of lib<name>.a to let people know that these are not
1240182007Sroberto      # typical AIX shared libraries.
1241182007Sroberto      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1242182007Sroberto    else
1243182007Sroberto      # We preserve .a as extension for shared libraries through AIX4.2
1244182007Sroberto      # and later when we are not doing run time linking.
1245182007Sroberto      library_names_spec='${libname}${release}.a $libname.a'
1246182007Sroberto      soname_spec='${libname}${release}${shared_ext}$major'
1247182007Sroberto    fi
1248182007Sroberto    shlibpath_var=LIBPATH
1249182007Sroberto  fi
1250182007Sroberto  ;;
1251182007Sroberto
1252182007Srobertoamigaos*)
1253182007Sroberto  library_names_spec='$libname.ixlibrary $libname.a'
1254182007Sroberto  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1255182007Sroberto  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'
1256182007Sroberto  ;;
1257182007Sroberto
1258182007Srobertobeos*)
1259182007Sroberto  library_names_spec='${libname}${shared_ext}'
1260182007Sroberto  dynamic_linker="$host_os ld.so"
1261182007Sroberto  shlibpath_var=LIBRARY_PATH
1262182007Sroberto  ;;
1263182007Sroberto
1264182007Srobertobsdi[[45]]*)
1265182007Sroberto  version_type=linux
1266182007Sroberto  need_version=no
1267182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1268182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1269182007Sroberto  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1270182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1271182007Sroberto  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1272182007Sroberto  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1273182007Sroberto  # the default ld.so.conf also contains /usr/contrib/lib and
1274182007Sroberto  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1275182007Sroberto  # libtool to hard-code these into programs
1276182007Sroberto  ;;
1277182007Sroberto
1278182007Srobertocygwin* | mingw* | pw32*)
1279182007Sroberto  version_type=windows
1280182007Sroberto  shrext_cmds=".dll"
1281182007Sroberto  need_version=no
1282182007Sroberto  need_lib_prefix=no
1283182007Sroberto
1284182007Sroberto  case $GCC,$host_os in
1285182007Sroberto  yes,cygwin* | yes,mingw* | yes,pw32*)
1286182007Sroberto    library_names_spec='$libname.dll.a'
1287182007Sroberto    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1288182007Sroberto    postinstall_cmds='base_file=`basename \${file}`~
1289182007Sroberto      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1290182007Sroberto      dldir=$destdir/`dirname \$dlpath`~
1291182007Sroberto      test -d \$dldir || mkdir -p \$dldir~
1292182007Sroberto      $install_prog $dir/$dlname \$dldir/$dlname~
1293182007Sroberto      chmod a+x \$dldir/$dlname'
1294182007Sroberto    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1295182007Sroberto      dlpath=$dir/\$dldll~
1296182007Sroberto       $rm \$dlpath'
1297182007Sroberto    shlibpath_overrides_runpath=yes
1298182007Sroberto
1299182007Sroberto    case $host_os in
1300182007Sroberto    cygwin*)
1301182007Sroberto      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1302182007Sroberto      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1303182007Sroberto      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1304182007Sroberto      ;;
1305182007Sroberto    mingw*)
1306182007Sroberto      # MinGW DLLs use traditional 'lib' prefix
1307182007Sroberto      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1308182007Sroberto      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1309182007Sroberto      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1310182007Sroberto        # It is most probably a Windows format PATH printed by
1311182007Sroberto        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1312182007Sroberto        # path with ; separators, and with drive letters. We can handle the
1313182007Sroberto        # drive letters (cygwin fileutils understands them), so leave them,
1314182007Sroberto        # especially as we might pass files found there to a mingw objdump,
1315182007Sroberto        # which wouldn't understand a cygwinified path. Ahh.
1316182007Sroberto        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1317182007Sroberto      else
1318182007Sroberto        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1319182007Sroberto      fi
1320182007Sroberto      ;;
1321182007Sroberto    pw32*)
1322182007Sroberto      # pw32 DLLs use 'pw' prefix rather than 'lib'
1323182007Sroberto      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1324182007Sroberto      ;;
1325182007Sroberto    esac
1326182007Sroberto    ;;
1327182007Sroberto
1328182007Sroberto  *)
1329182007Sroberto    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1330182007Sroberto    ;;
1331182007Sroberto  esac
1332182007Sroberto  dynamic_linker='Win32 ld.exe'
1333182007Sroberto  # FIXME: first we should search . and the directory the executable is in
1334182007Sroberto  shlibpath_var=PATH
1335182007Sroberto  ;;
1336182007Sroberto
1337182007Srobertodarwin* | rhapsody*)
1338182007Sroberto  dynamic_linker="$host_os dyld"
1339182007Sroberto  version_type=darwin
1340182007Sroberto  need_lib_prefix=no
1341182007Sroberto  need_version=no
1342182007Sroberto  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1343182007Sroberto  soname_spec='${libname}${release}${major}$shared_ext'
1344182007Sroberto  shlibpath_overrides_runpath=yes
1345182007Sroberto  shlibpath_var=DYLD_LIBRARY_PATH
1346182007Sroberto  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1347182007Sroberto  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1348182007Sroberto  if test "$GCC" = yes; then
1349182007Sroberto    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"`
1350182007Sroberto  else
1351182007Sroberto    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1352182007Sroberto  fi
1353182007Sroberto  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1354182007Sroberto  ;;
1355182007Sroberto
1356182007Srobertodgux*)
1357182007Sroberto  version_type=linux
1358182007Sroberto  need_lib_prefix=no
1359182007Sroberto  need_version=no
1360182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1361182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1362182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1363182007Sroberto  ;;
1364182007Sroberto
1365182007Srobertofreebsd1*)
1366182007Sroberto  dynamic_linker=no
1367182007Sroberto  ;;
1368182007Sroberto
1369182007Srobertokfreebsd*-gnu)
1370182007Sroberto  version_type=linux
1371182007Sroberto  need_lib_prefix=no
1372182007Sroberto  need_version=no
1373182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1374182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1375182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1376182007Sroberto  shlibpath_overrides_runpath=no
1377182007Sroberto  hardcode_into_libs=yes
1378182007Sroberto  dynamic_linker='GNU ld.so'
1379182007Sroberto  ;;
1380182007Sroberto
1381182007Srobertofreebsd* | dragonfly*)
1382182007Sroberto  # DragonFly does not have aout.  When/if they implement a new
1383182007Sroberto  # versioning mechanism, adjust this.
1384182007Sroberto  if test -x /usr/bin/objformat; then
1385182007Sroberto    objformat=`/usr/bin/objformat`
1386182007Sroberto  else
1387182007Sroberto    case $host_os in
1388182007Sroberto    freebsd[[123]]*) objformat=aout ;;
1389182007Sroberto    *) objformat=elf ;;
1390182007Sroberto    esac
1391182007Sroberto  fi
1392182007Sroberto  version_type=freebsd-$objformat
1393182007Sroberto  case $version_type in
1394182007Sroberto    freebsd-elf*)
1395182007Sroberto      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1396182007Sroberto      need_version=no
1397182007Sroberto      need_lib_prefix=no
1398182007Sroberto      ;;
1399182007Sroberto    freebsd-*)
1400182007Sroberto      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1401182007Sroberto      need_version=yes
1402182007Sroberto      ;;
1403182007Sroberto  esac
1404182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1405182007Sroberto  case $host_os in
1406182007Sroberto  freebsd2*)
1407182007Sroberto    shlibpath_overrides_runpath=yes
1408182007Sroberto    ;;
1409182007Sroberto  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1410182007Sroberto    shlibpath_overrides_runpath=yes
1411182007Sroberto    hardcode_into_libs=yes
1412182007Sroberto    ;;
1413182007Sroberto  *) # from 3.2 on
1414182007Sroberto    shlibpath_overrides_runpath=no
1415182007Sroberto    hardcode_into_libs=yes
1416182007Sroberto    ;;
1417182007Sroberto  esac
1418182007Sroberto  ;;
1419182007Sroberto
1420182007Srobertognu*)
1421182007Sroberto  version_type=linux
1422182007Sroberto  need_lib_prefix=no
1423182007Sroberto  need_version=no
1424182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1425182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1426182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1427182007Sroberto  hardcode_into_libs=yes
1428182007Sroberto  ;;
1429182007Sroberto
1430182007Srobertohpux9* | hpux10* | hpux11*)
1431182007Sroberto  # Give a soname corresponding to the major version so that dld.sl refuses to
1432182007Sroberto  # link against other versions.
1433182007Sroberto  version_type=sunos
1434182007Sroberto  need_lib_prefix=no
1435182007Sroberto  need_version=no
1436182007Sroberto  case $host_cpu in
1437182007Sroberto  ia64*)
1438182007Sroberto    shrext_cmds='.so'
1439182007Sroberto    hardcode_into_libs=yes
1440182007Sroberto    dynamic_linker="$host_os dld.so"
1441182007Sroberto    shlibpath_var=LD_LIBRARY_PATH
1442182007Sroberto    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1443182007Sroberto    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1444182007Sroberto    soname_spec='${libname}${release}${shared_ext}$major'
1445182007Sroberto    if test "X$HPUX_IA64_MODE" = X32; then
1446182007Sroberto      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1447182007Sroberto    else
1448182007Sroberto      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1449182007Sroberto    fi
1450182007Sroberto    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1451182007Sroberto    ;;
1452182007Sroberto   hppa*64*)
1453182007Sroberto     shrext_cmds='.sl'
1454182007Sroberto     hardcode_into_libs=yes
1455182007Sroberto     dynamic_linker="$host_os dld.sl"
1456182007Sroberto     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1457182007Sroberto     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1458182007Sroberto     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1459182007Sroberto     soname_spec='${libname}${release}${shared_ext}$major'
1460182007Sroberto     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1461182007Sroberto     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1462182007Sroberto     ;;
1463182007Sroberto   *)
1464182007Sroberto    shrext_cmds='.sl'
1465182007Sroberto    dynamic_linker="$host_os dld.sl"
1466182007Sroberto    shlibpath_var=SHLIB_PATH
1467182007Sroberto    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1468182007Sroberto    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1469182007Sroberto    soname_spec='${libname}${release}${shared_ext}$major'
1470182007Sroberto    ;;
1471182007Sroberto  esac
1472182007Sroberto  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1473182007Sroberto  postinstall_cmds='chmod 555 $lib'
1474182007Sroberto  ;;
1475182007Sroberto
1476182007Srobertoirix5* | irix6* | nonstopux*)
1477182007Sroberto  case $host_os in
1478182007Sroberto    nonstopux*) version_type=nonstopux ;;
1479182007Sroberto    *)
1480182007Sroberto	if test "$lt_cv_prog_gnu_ld" = yes; then
1481182007Sroberto		version_type=linux
1482182007Sroberto	else
1483182007Sroberto		version_type=irix
1484182007Sroberto	fi ;;
1485182007Sroberto  esac
1486182007Sroberto  need_lib_prefix=no
1487182007Sroberto  need_version=no
1488182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1489182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1490182007Sroberto  case $host_os in
1491182007Sroberto  irix5* | nonstopux*)
1492182007Sroberto    libsuff= shlibsuff=
1493182007Sroberto    ;;
1494182007Sroberto  *)
1495182007Sroberto    case $LD in # libtool.m4 will add one of these switches to LD
1496182007Sroberto    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1497182007Sroberto      libsuff= shlibsuff= libmagic=32-bit;;
1498182007Sroberto    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1499182007Sroberto      libsuff=32 shlibsuff=N32 libmagic=N32;;
1500182007Sroberto    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1501182007Sroberto      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1502182007Sroberto    *) libsuff= shlibsuff= libmagic=never-match;;
1503182007Sroberto    esac
1504182007Sroberto    ;;
1505182007Sroberto  esac
1506182007Sroberto  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1507182007Sroberto  shlibpath_overrides_runpath=no
1508182007Sroberto  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1509182007Sroberto  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1510182007Sroberto  hardcode_into_libs=yes
1511182007Sroberto  ;;
1512182007Sroberto
1513182007Sroberto# No shared lib support for Linux oldld, aout, or coff.
1514182007Srobertolinux*oldld* | linux*aout* | linux*coff*)
1515182007Sroberto  dynamic_linker=no
1516182007Sroberto  ;;
1517182007Sroberto
1518182007Sroberto# This must be Linux ELF.
1519182007Srobertolinux*)
1520182007Sroberto  version_type=linux
1521182007Sroberto  need_lib_prefix=no
1522182007Sroberto  need_version=no
1523182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1524182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1525182007Sroberto  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1526182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1527182007Sroberto  shlibpath_overrides_runpath=no
1528182007Sroberto  # This implies no fast_install, which is unacceptable.
1529182007Sroberto  # Some rework will be needed to allow for fast_install
1530182007Sroberto  # before this can be enabled.
1531182007Sroberto  hardcode_into_libs=yes
1532182007Sroberto
1533182007Sroberto  # Append ld.so.conf contents to the search path
1534182007Sroberto  if test -f /etc/ld.so.conf; then
1535182007Sroberto    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' ' '`
1536182007Sroberto    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1537182007Sroberto  fi
1538182007Sroberto
1539182007Sroberto  # We used to test for /lib/ld.so.1 and disable shared libraries on
1540182007Sroberto  # powerpc, because MkLinux only supported shared libraries with the
1541182007Sroberto  # GNU dynamic linker.  Since this was broken with cross compilers,
1542182007Sroberto  # most powerpc-linux boxes support dynamic linking these days and
1543182007Sroberto  # people can always --disable-shared, the test was removed, and we
1544182007Sroberto  # assume the GNU/Linux dynamic linker is in use.
1545182007Sroberto  dynamic_linker='GNU/Linux ld.so'
1546182007Sroberto  ;;
1547182007Sroberto
1548182007Srobertoknetbsd*-gnu)
1549182007Sroberto  version_type=linux
1550182007Sroberto  need_lib_prefix=no
1551182007Sroberto  need_version=no
1552182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1553182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1554182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1555182007Sroberto  shlibpath_overrides_runpath=no
1556182007Sroberto  hardcode_into_libs=yes
1557182007Sroberto  dynamic_linker='GNU ld.so'
1558182007Sroberto  ;;
1559182007Sroberto
1560182007Srobertonetbsd*)
1561182007Sroberto  version_type=sunos
1562182007Sroberto  need_lib_prefix=no
1563182007Sroberto  need_version=no
1564182007Sroberto  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1565182007Sroberto    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1566182007Sroberto    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1567182007Sroberto    dynamic_linker='NetBSD (a.out) ld.so'
1568182007Sroberto  else
1569182007Sroberto    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1570182007Sroberto    soname_spec='${libname}${release}${shared_ext}$major'
1571182007Sroberto    dynamic_linker='NetBSD ld.elf_so'
1572182007Sroberto  fi
1573182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1574182007Sroberto  shlibpath_overrides_runpath=yes
1575182007Sroberto  hardcode_into_libs=yes
1576182007Sroberto  ;;
1577182007Sroberto
1578182007Srobertonewsos6)
1579182007Sroberto  version_type=linux
1580182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1581182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1582182007Sroberto  shlibpath_overrides_runpath=yes
1583182007Sroberto  ;;
1584182007Sroberto
1585182007Srobertonto-qnx*)
1586182007Sroberto  version_type=linux
1587182007Sroberto  need_lib_prefix=no
1588182007Sroberto  need_version=no
1589182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1590182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1591182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1592182007Sroberto  shlibpath_overrides_runpath=yes
1593182007Sroberto  ;;
1594182007Sroberto
1595182007Srobertoopenbsd*)
1596182007Sroberto  version_type=sunos
1597182007Sroberto  need_lib_prefix=no
1598182007Sroberto  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1599182007Sroberto  case $host_os in
1600182007Sroberto    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1601182007Sroberto    *)                         need_version=no  ;;
1602182007Sroberto  esac
1603182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1604182007Sroberto  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1605182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1606182007Sroberto  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1607182007Sroberto    case $host_os in
1608182007Sroberto      openbsd2.[[89]] | openbsd2.[[89]].*)
1609182007Sroberto	shlibpath_overrides_runpath=no
1610182007Sroberto	;;
1611182007Sroberto      *)
1612182007Sroberto	shlibpath_overrides_runpath=yes
1613182007Sroberto	;;
1614182007Sroberto      esac
1615182007Sroberto  else
1616182007Sroberto    shlibpath_overrides_runpath=yes
1617182007Sroberto  fi
1618182007Sroberto  ;;
1619182007Sroberto
1620182007Srobertoos2*)
1621182007Sroberto  libname_spec='$name'
1622182007Sroberto  shrext_cmds=".dll"
1623182007Sroberto  need_lib_prefix=no
1624182007Sroberto  library_names_spec='$libname${shared_ext} $libname.a'
1625182007Sroberto  dynamic_linker='OS/2 ld.exe'
1626182007Sroberto  shlibpath_var=LIBPATH
1627182007Sroberto  ;;
1628182007Sroberto
1629182007Srobertoosf3* | osf4* | osf5*)
1630182007Sroberto  version_type=osf
1631182007Sroberto  need_lib_prefix=no
1632182007Sroberto  need_version=no
1633182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1634182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1635182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1636182007Sroberto  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1637182007Sroberto  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1638182007Sroberto  ;;
1639182007Sroberto
1640182007Srobertosco3.2v5*)
1641182007Sroberto  version_type=osf
1642182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1643182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1644182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1645182007Sroberto  ;;
1646182007Sroberto
1647182007Srobertosolaris*)
1648182007Sroberto  version_type=linux
1649182007Sroberto  need_lib_prefix=no
1650182007Sroberto  need_version=no
1651182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1652182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1653182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1654182007Sroberto  shlibpath_overrides_runpath=yes
1655182007Sroberto  hardcode_into_libs=yes
1656182007Sroberto  # ldd complains unless libraries are executable
1657182007Sroberto  postinstall_cmds='chmod +x $lib'
1658182007Sroberto  ;;
1659182007Sroberto
1660182007Srobertosunos4*)
1661182007Sroberto  version_type=sunos
1662182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1663182007Sroberto  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1664182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1665182007Sroberto  shlibpath_overrides_runpath=yes
1666182007Sroberto  if test "$with_gnu_ld" = yes; then
1667182007Sroberto    need_lib_prefix=no
1668182007Sroberto  fi
1669182007Sroberto  need_version=yes
1670182007Sroberto  ;;
1671182007Sroberto
1672182007Srobertosysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1673182007Sroberto  version_type=linux
1674182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1675182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1676182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1677182007Sroberto  case $host_vendor in
1678182007Sroberto    sni)
1679182007Sroberto      shlibpath_overrides_runpath=no
1680182007Sroberto      need_lib_prefix=no
1681182007Sroberto      export_dynamic_flag_spec='${wl}-Blargedynsym'
1682182007Sroberto      runpath_var=LD_RUN_PATH
1683182007Sroberto      ;;
1684182007Sroberto    siemens)
1685182007Sroberto      need_lib_prefix=no
1686182007Sroberto      ;;
1687182007Sroberto    motorola)
1688182007Sroberto      need_lib_prefix=no
1689182007Sroberto      need_version=no
1690182007Sroberto      shlibpath_overrides_runpath=no
1691182007Sroberto      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1692182007Sroberto      ;;
1693182007Sroberto  esac
1694182007Sroberto  ;;
1695182007Sroberto
1696182007Srobertosysv4*MP*)
1697182007Sroberto  if test -d /usr/nec ;then
1698182007Sroberto    version_type=linux
1699182007Sroberto    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1700182007Sroberto    soname_spec='$libname${shared_ext}.$major'
1701182007Sroberto    shlibpath_var=LD_LIBRARY_PATH
1702182007Sroberto  fi
1703182007Sroberto  ;;
1704182007Sroberto
1705182007Srobertouts4*)
1706182007Sroberto  version_type=linux
1707182007Sroberto  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1708182007Sroberto  soname_spec='${libname}${release}${shared_ext}$major'
1709182007Sroberto  shlibpath_var=LD_LIBRARY_PATH
1710182007Sroberto  ;;
1711182007Sroberto
1712182007Sroberto*)
1713182007Sroberto  dynamic_linker=no
1714182007Sroberto  ;;
1715182007Srobertoesac
1716182007SrobertoAC_MSG_RESULT([$dynamic_linker])
1717182007Srobertotest "$dynamic_linker" = no && can_build_shared=no
1718182007Sroberto])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1719182007Sroberto
1720182007Sroberto
1721182007Sroberto# _LT_AC_TAGCONFIG
1722182007Sroberto# ----------------
1723182007SrobertoAC_DEFUN([_LT_AC_TAGCONFIG],
1724182007Sroberto[AC_ARG_WITH([tags],
1725182007Sroberto    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1726182007Sroberto        [include additional configurations @<:@automatic@:>@])],
1727182007Sroberto    [tagnames="$withval"])
1728182007Sroberto
1729182007Srobertoif test -f "$ltmain" && test -n "$tagnames"; then
1730182007Sroberto  if test ! -f "${ofile}"; then
1731182007Sroberto    AC_MSG_WARN([output file `$ofile' does not exist])
1732182007Sroberto  fi
1733182007Sroberto
1734182007Sroberto  if test -z "$LTCC"; then
1735182007Sroberto    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1736182007Sroberto    if test -z "$LTCC"; then
1737182007Sroberto      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1738182007Sroberto    else
1739182007Sroberto      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1740182007Sroberto    fi
1741182007Sroberto  fi
1742182007Sroberto
1743182007Sroberto  # Extract list of available tagged configurations in $ofile.
1744182007Sroberto  # Note that this assumes the entire list is on one line.
1745182007Sroberto  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1746182007Sroberto
1747182007Sroberto  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1748182007Sroberto  for tagname in $tagnames; do
1749182007Sroberto    IFS="$lt_save_ifs"
1750182007Sroberto    # Check whether tagname contains only valid characters
1751182007Sroberto    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1752182007Sroberto    "") ;;
1753182007Sroberto    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1754182007Sroberto	;;
1755182007Sroberto    esac
1756182007Sroberto
1757182007Sroberto    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1758182007Sroberto    then
1759182007Sroberto      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1760182007Sroberto    fi
1761182007Sroberto
1762182007Sroberto    # Update the list of available tags.
1763182007Sroberto    if test -n "$tagname"; then
1764182007Sroberto      echo appending configuration tag \"$tagname\" to $ofile
1765182007Sroberto
1766182007Sroberto      case $tagname in
1767182007Sroberto      CXX)
1768182007Sroberto	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1769182007Sroberto	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1770182007Sroberto	    (test "X$CXX" != "Xg++"))) ; then
1771182007Sroberto	  AC_LIBTOOL_LANG_CXX_CONFIG
1772182007Sroberto	else
1773182007Sroberto	  tagname=""
1774182007Sroberto	fi
1775182007Sroberto	;;
1776182007Sroberto
1777182007Sroberto      F77)
1778182007Sroberto	if test -n "$F77" && test "X$F77" != "Xno"; then
1779182007Sroberto	  AC_LIBTOOL_LANG_F77_CONFIG
1780182007Sroberto	else
1781182007Sroberto	  tagname=""
1782182007Sroberto	fi
1783182007Sroberto	;;
1784182007Sroberto
1785182007Sroberto      GCJ)
1786182007Sroberto	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1787182007Sroberto	  AC_LIBTOOL_LANG_GCJ_CONFIG
1788182007Sroberto	else
1789182007Sroberto	  tagname=""
1790182007Sroberto	fi
1791182007Sroberto	;;
1792182007Sroberto
1793182007Sroberto      RC)
1794182007Sroberto	AC_LIBTOOL_LANG_RC_CONFIG
1795182007Sroberto	;;
1796182007Sroberto
1797182007Sroberto      *)
1798182007Sroberto	AC_MSG_ERROR([Unsupported tag name: $tagname])
1799182007Sroberto	;;
1800182007Sroberto      esac
1801182007Sroberto
1802182007Sroberto      # Append the new tag name to the list of available tags.
1803182007Sroberto      if test -n "$tagname" ; then
1804182007Sroberto      available_tags="$available_tags $tagname"
1805182007Sroberto    fi
1806182007Sroberto    fi
1807182007Sroberto  done
1808182007Sroberto  IFS="$lt_save_ifs"
1809182007Sroberto
1810182007Sroberto  # Now substitute the updated list of available tags.
1811182007Sroberto  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1812182007Sroberto    mv "${ofile}T" "$ofile"
1813182007Sroberto    chmod +x "$ofile"
1814182007Sroberto  else
1815182007Sroberto    rm -f "${ofile}T"
1816182007Sroberto    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1817182007Sroberto  fi
1818182007Srobertofi
1819182007Sroberto])# _LT_AC_TAGCONFIG
1820182007Sroberto
1821182007Sroberto
1822182007Sroberto# AC_LIBTOOL_DLOPEN
1823182007Sroberto# -----------------
1824182007Sroberto# enable checks for dlopen support
1825182007SrobertoAC_DEFUN([AC_LIBTOOL_DLOPEN],
1826182007Sroberto [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1827182007Sroberto])# AC_LIBTOOL_DLOPEN
1828182007Sroberto
1829182007Sroberto
1830182007Sroberto# AC_LIBTOOL_WIN32_DLL
1831182007Sroberto# --------------------
1832182007Sroberto# declare package support for building win32 DLLs
1833182007SrobertoAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1834182007Sroberto[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1835182007Sroberto])# AC_LIBTOOL_WIN32_DLL
1836182007Sroberto
1837182007Sroberto
1838182007Sroberto# AC_ENABLE_SHARED([DEFAULT])
1839182007Sroberto# ---------------------------
1840182007Sroberto# implement the --enable-shared flag
1841182007Sroberto# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1842182007SrobertoAC_DEFUN([AC_ENABLE_SHARED],
1843182007Sroberto[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1844182007SrobertoAC_ARG_ENABLE([shared],
1845182007Sroberto    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1846182007Sroberto	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1847182007Sroberto    [p=${PACKAGE-default}
1848182007Sroberto    case $enableval in
1849182007Sroberto    yes) enable_shared=yes ;;
1850182007Sroberto    no) enable_shared=no ;;
1851182007Sroberto    *)
1852182007Sroberto      enable_shared=no
1853182007Sroberto      # Look at the argument we got.  We use all the common list separators.
1854182007Sroberto      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1855182007Sroberto      for pkg in $enableval; do
1856182007Sroberto	IFS="$lt_save_ifs"
1857182007Sroberto	if test "X$pkg" = "X$p"; then
1858182007Sroberto	  enable_shared=yes
1859182007Sroberto	fi
1860182007Sroberto      done
1861182007Sroberto      IFS="$lt_save_ifs"
1862182007Sroberto      ;;
1863182007Sroberto    esac],
1864182007Sroberto    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1865182007Sroberto])# AC_ENABLE_SHARED
1866182007Sroberto
1867182007Sroberto
1868182007Sroberto# AC_DISABLE_SHARED
1869182007Sroberto# -----------------
1870182007Sroberto#- set the default shared flag to --disable-shared
1871182007SrobertoAC_DEFUN([AC_DISABLE_SHARED],
1872182007Sroberto[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1873182007SrobertoAC_ENABLE_SHARED(no)
1874182007Sroberto])# AC_DISABLE_SHARED
1875182007Sroberto
1876182007Sroberto
1877182007Sroberto# AC_ENABLE_STATIC([DEFAULT])
1878182007Sroberto# ---------------------------
1879182007Sroberto# implement the --enable-static flag
1880182007Sroberto# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1881182007SrobertoAC_DEFUN([AC_ENABLE_STATIC],
1882182007Sroberto[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1883182007SrobertoAC_ARG_ENABLE([static],
1884182007Sroberto    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1885182007Sroberto	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1886182007Sroberto    [p=${PACKAGE-default}
1887182007Sroberto    case $enableval in
1888182007Sroberto    yes) enable_static=yes ;;
1889182007Sroberto    no) enable_static=no ;;
1890182007Sroberto    *)
1891182007Sroberto     enable_static=no
1892182007Sroberto      # Look at the argument we got.  We use all the common list separators.
1893182007Sroberto      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1894182007Sroberto      for pkg in $enableval; do
1895182007Sroberto	IFS="$lt_save_ifs"
1896182007Sroberto	if test "X$pkg" = "X$p"; then
1897182007Sroberto	  enable_static=yes
1898182007Sroberto	fi
1899182007Sroberto      done
1900182007Sroberto      IFS="$lt_save_ifs"
1901182007Sroberto      ;;
1902182007Sroberto    esac],
1903182007Sroberto    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1904182007Sroberto])# AC_ENABLE_STATIC
1905182007Sroberto
1906182007Sroberto
1907182007Sroberto# AC_DISABLE_STATIC
1908182007Sroberto# -----------------
1909182007Sroberto# set the default static flag to --disable-static
1910182007SrobertoAC_DEFUN([AC_DISABLE_STATIC],
1911182007Sroberto[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1912182007SrobertoAC_ENABLE_STATIC(no)
1913182007Sroberto])# AC_DISABLE_STATIC
1914182007Sroberto
1915182007Sroberto
1916182007Sroberto# AC_ENABLE_FAST_INSTALL([DEFAULT])
1917182007Sroberto# ---------------------------------
1918182007Sroberto# implement the --enable-fast-install flag
1919182007Sroberto# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1920182007SrobertoAC_DEFUN([AC_ENABLE_FAST_INSTALL],
1921182007Sroberto[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1922182007SrobertoAC_ARG_ENABLE([fast-install],
1923182007Sroberto    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1924182007Sroberto    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1925182007Sroberto    [p=${PACKAGE-default}
1926182007Sroberto    case $enableval in
1927182007Sroberto    yes) enable_fast_install=yes ;;
1928182007Sroberto    no) enable_fast_install=no ;;
1929182007Sroberto    *)
1930182007Sroberto      enable_fast_install=no
1931182007Sroberto      # Look at the argument we got.  We use all the common list separators.
1932182007Sroberto      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1933182007Sroberto      for pkg in $enableval; do
1934182007Sroberto	IFS="$lt_save_ifs"
1935182007Sroberto	if test "X$pkg" = "X$p"; then
1936182007Sroberto	  enable_fast_install=yes
1937182007Sroberto	fi
1938182007Sroberto      done
1939182007Sroberto      IFS="$lt_save_ifs"
1940182007Sroberto      ;;
1941182007Sroberto    esac],
1942182007Sroberto    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1943182007Sroberto])# AC_ENABLE_FAST_INSTALL
1944182007Sroberto
1945182007Sroberto
1946182007Sroberto# AC_DISABLE_FAST_INSTALL
1947132451Sroberto# -----------------------
1948182007Sroberto# set the default to --disable-fast-install
1949182007SrobertoAC_DEFUN([AC_DISABLE_FAST_INSTALL],
1950182007Sroberto[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1951182007SrobertoAC_ENABLE_FAST_INSTALL(no)
1952182007Sroberto])# AC_DISABLE_FAST_INSTALL
1953132451Sroberto
1954132451Sroberto
1955182007Sroberto# AC_LIBTOOL_PICMODE([MODE])
1956182007Sroberto# --------------------------
1957182007Sroberto# implement the --with-pic flag
1958182007Sroberto# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
1959182007SrobertoAC_DEFUN([AC_LIBTOOL_PICMODE],
1960182007Sroberto[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1961182007Srobertopic_mode=ifelse($#,1,$1,default)
1962182007Sroberto])# AC_LIBTOOL_PICMODE
1963132451Sroberto
1964132451Sroberto
1965182007Sroberto# AC_PROG_EGREP
1966182007Sroberto# -------------
1967182007Sroberto# This is predefined starting with Autoconf 2.54, so this conditional
1968182007Sroberto# definition can be removed once we require Autoconf 2.54 or later.
1969182007Srobertom4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
1970182007Sroberto[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
1971182007Sroberto   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1972182007Sroberto    then ac_cv_prog_egrep='grep -E'
1973182007Sroberto    else ac_cv_prog_egrep='egrep'
1974182007Sroberto    fi])
1975182007Sroberto EGREP=$ac_cv_prog_egrep
1976182007Sroberto AC_SUBST([EGREP])
1977182007Sroberto])])
1978182007Sroberto
1979182007Sroberto
1980182007Sroberto# AC_PATH_TOOL_PREFIX
1981182007Sroberto# -------------------
1982182007Sroberto# find a file program which can recognise shared library
1983182007SrobertoAC_DEFUN([AC_PATH_TOOL_PREFIX],
1984182007Sroberto[AC_REQUIRE([AC_PROG_EGREP])dnl
1985182007SrobertoAC_MSG_CHECKING([for $1])
1986182007SrobertoAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1987182007Sroberto[case $MAGIC_CMD in
1988182007Sroberto[[\\/*] |  ?:[\\/]*])
1989182007Sroberto  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1990182007Sroberto  ;;
1991182007Sroberto*)
1992182007Sroberto  lt_save_MAGIC_CMD="$MAGIC_CMD"
1993182007Sroberto  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1994182007Srobertodnl $ac_dummy forces splitting on constant user-supplied paths.
1995182007Srobertodnl POSIX.2 word splitting is done only on the output of word expansions,
1996182007Srobertodnl not every word.  This closes a longstanding sh security hole.
1997182007Sroberto  ac_dummy="ifelse([$2], , $PATH, [$2])"
1998182007Sroberto  for ac_dir in $ac_dummy; do
1999182007Sroberto    IFS="$lt_save_ifs"
2000182007Sroberto    test -z "$ac_dir" && ac_dir=.
2001182007Sroberto    if test -f $ac_dir/$1; then
2002182007Sroberto      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2003182007Sroberto      if test -n "$file_magic_test_file"; then
2004182007Sroberto	case $deplibs_check_method in
2005182007Sroberto	"file_magic "*)
2006182007Sroberto	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2007182007Sroberto	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2008182007Sroberto	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2009182007Sroberto	    $EGREP "$file_magic_regex" > /dev/null; then
2010182007Sroberto	    :
2011182007Sroberto	  else
2012182007Sroberto	    cat <<EOF 1>&2
2013182007Sroberto
2014182007Sroberto*** Warning: the command libtool uses to detect shared libraries,
2015182007Sroberto*** $file_magic_cmd, produces output that libtool cannot recognize.
2016182007Sroberto*** The result is that libtool may fail to recognize shared libraries
2017182007Sroberto*** as such.  This will affect the creation of libtool libraries that
2018182007Sroberto*** depend on shared libraries, but programs linked with such libtool
2019182007Sroberto*** libraries will work regardless of this problem.  Nevertheless, you
2020182007Sroberto*** may want to report the problem to your system manager and/or to
2021182007Sroberto*** bug-libtool@gnu.org
2022182007Sroberto
2023182007SrobertoEOF
2024182007Sroberto	  fi ;;
2025182007Sroberto	esac
2026182007Sroberto      fi
2027182007Sroberto      break
2028182007Sroberto    fi
2029182007Sroberto  done
2030182007Sroberto  IFS="$lt_save_ifs"
2031182007Sroberto  MAGIC_CMD="$lt_save_MAGIC_CMD"
2032182007Sroberto  ;;
2033182007Srobertoesac])
2034182007SrobertoMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2035182007Srobertoif test -n "$MAGIC_CMD"; then
2036182007Sroberto  AC_MSG_RESULT($MAGIC_CMD)
2037182007Srobertoelse
2038182007Sroberto  AC_MSG_RESULT(no)
2039182007Srobertofi
2040182007Sroberto])# AC_PATH_TOOL_PREFIX
2041182007Sroberto
2042182007Sroberto
2043182007Sroberto# AC_PATH_MAGIC
2044182007Sroberto# -------------
2045182007Sroberto# find a file program which can recognise a shared library
2046182007SrobertoAC_DEFUN([AC_PATH_MAGIC],
2047182007Sroberto[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2048182007Srobertoif test -z "$lt_cv_path_MAGIC_CMD"; then
2049182007Sroberto  if test -n "$ac_tool_prefix"; then
2050182007Sroberto    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2051182007Sroberto  else
2052182007Sroberto    MAGIC_CMD=:
2053182007Sroberto  fi
2054182007Srobertofi
2055182007Sroberto])# AC_PATH_MAGIC
2056182007Sroberto
2057182007Sroberto
2058182007Sroberto# AC_PROG_LD
2059182007Sroberto# ----------
2060182007Sroberto# find the pathname to the GNU or non-GNU linker
2061182007SrobertoAC_DEFUN([AC_PROG_LD],
2062182007Sroberto[AC_ARG_WITH([gnu-ld],
2063182007Sroberto    [AC_HELP_STRING([--with-gnu-ld],
2064182007Sroberto	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2065182007Sroberto    [test "$withval" = no || with_gnu_ld=yes],
2066182007Sroberto    [with_gnu_ld=no])
2067182007SrobertoAC_REQUIRE([LT_AC_PROG_SED])dnl
2068182007SrobertoAC_REQUIRE([AC_PROG_CC])dnl
2069182007SrobertoAC_REQUIRE([AC_CANONICAL_HOST])dnl
2070182007SrobertoAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2071182007Srobertoac_prog=ld
2072182007Srobertoif test "$GCC" = yes; then
2073182007Sroberto  # Check if gcc -print-prog-name=ld gives a path.
2074182007Sroberto  AC_MSG_CHECKING([for ld used by $CC])
2075182007Sroberto  case $host in
2076182007Sroberto  *-*-mingw*)
2077182007Sroberto    # gcc leaves a trailing carriage return which upsets mingw
2078182007Sroberto    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2079182007Sroberto  *)
2080182007Sroberto    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2081182007Sroberto  esac
2082182007Sroberto  case $ac_prog in
2083182007Sroberto    # Accept absolute paths.
2084182007Sroberto    [[\\/]]* | ?:[[\\/]]*)
2085182007Sroberto      re_direlt='/[[^/]][[^/]]*/\.\./'
2086182007Sroberto      # Canonicalize the pathname of ld
2087182007Sroberto      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2088182007Sroberto      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2089182007Sroberto	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2090182007Sroberto      done
2091182007Sroberto      test -z "$LD" && LD="$ac_prog"
2092182007Sroberto      ;;
2093182007Sroberto  "")
2094182007Sroberto    # If it fails, then pretend we aren't using GCC.
2095182007Sroberto    ac_prog=ld
2096182007Sroberto    ;;
2097182007Sroberto  *)
2098182007Sroberto    # If it is relative, then search for the first ld in PATH.
2099182007Sroberto    with_gnu_ld=unknown
2100182007Sroberto    ;;
2101182007Sroberto  esac
2102182007Srobertoelif test "$with_gnu_ld" = yes; then
2103182007Sroberto  AC_MSG_CHECKING([for GNU ld])
2104182007Srobertoelse
2105182007Sroberto  AC_MSG_CHECKING([for non-GNU ld])
2106182007Srobertofi
2107182007SrobertoAC_CACHE_VAL(lt_cv_path_LD,
2108182007Sroberto[if test -z "$LD"; then
2109182007Sroberto  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2110182007Sroberto  for ac_dir in $PATH; do
2111182007Sroberto    IFS="$lt_save_ifs"
2112182007Sroberto    test -z "$ac_dir" && ac_dir=.
2113182007Sroberto    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2114182007Sroberto      lt_cv_path_LD="$ac_dir/$ac_prog"
2115182007Sroberto      # Check to see if the program is GNU ld.  I'd rather use --version,
2116182007Sroberto      # but apparently some variants of GNU ld only accept -v.
2117182007Sroberto      # Break only if it was the GNU/non-GNU ld that we prefer.
2118182007Sroberto      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2119182007Sroberto      *GNU* | *'with BFD'*)
2120182007Sroberto	test "$with_gnu_ld" != no && break
2121182007Sroberto	;;
2122182007Sroberto      *)
2123182007Sroberto	test "$with_gnu_ld" != yes && break
2124182007Sroberto	;;
2125182007Sroberto      esac
2126182007Sroberto    fi
2127182007Sroberto  done
2128182007Sroberto  IFS="$lt_save_ifs"
2129182007Srobertoelse
2130182007Sroberto  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2131182007Srobertofi])
2132182007SrobertoLD="$lt_cv_path_LD"
2133182007Srobertoif test -n "$LD"; then
2134182007Sroberto  AC_MSG_RESULT($LD)
2135182007Srobertoelse
2136182007Sroberto  AC_MSG_RESULT(no)
2137182007Srobertofi
2138182007Srobertotest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2139182007SrobertoAC_PROG_LD_GNU
2140182007Sroberto])# AC_PROG_LD
2141182007Sroberto
2142182007Sroberto
2143182007Sroberto# AC_PROG_LD_GNU
2144182007Sroberto# --------------
2145182007SrobertoAC_DEFUN([AC_PROG_LD_GNU],
2146182007Sroberto[AC_REQUIRE([AC_PROG_EGREP])dnl
2147182007SrobertoAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2148182007Sroberto[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2149182007Srobertocase `$LD -v 2>&1 </dev/null` in
2150182007Sroberto*GNU* | *'with BFD'*)
2151182007Sroberto  lt_cv_prog_gnu_ld=yes
2152182007Sroberto  ;;
2153182007Sroberto*)
2154182007Sroberto  lt_cv_prog_gnu_ld=no
2155182007Sroberto  ;;
2156182007Srobertoesac])
2157182007Srobertowith_gnu_ld=$lt_cv_prog_gnu_ld
2158182007Sroberto])# AC_PROG_LD_GNU
2159182007Sroberto
2160182007Sroberto
2161182007Sroberto# AC_PROG_LD_RELOAD_FLAG
2162182007Sroberto# ----------------------
2163182007Sroberto# find reload flag for linker
2164182007Sroberto#   -- PORTME Some linkers may need a different reload flag.
2165182007SrobertoAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2166182007Sroberto[AC_CACHE_CHECK([for $LD option to reload object files],
2167182007Sroberto  lt_cv_ld_reload_flag,
2168182007Sroberto  [lt_cv_ld_reload_flag='-r'])
2169182007Srobertoreload_flag=$lt_cv_ld_reload_flag
2170182007Srobertocase $reload_flag in
2171182007Sroberto"" | " "*) ;;
2172182007Sroberto*) reload_flag=" $reload_flag" ;;
2173182007Srobertoesac
2174182007Srobertoreload_cmds='$LD$reload_flag -o $output$reload_objs'
2175182007Srobertocase $host_os in
2176182007Sroberto  darwin*)
2177182007Sroberto    if test "$GCC" = yes; then
2178182007Sroberto      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2179182007Sroberto    else
2180182007Sroberto      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2181182007Sroberto    fi
2182182007Sroberto    ;;
2183182007Srobertoesac
2184182007Sroberto])# AC_PROG_LD_RELOAD_FLAG
2185182007Sroberto
2186182007Sroberto
2187182007Sroberto# AC_DEPLIBS_CHECK_METHOD
2188182007Sroberto# -----------------------
2189182007Sroberto# how to check for library dependencies
2190182007Sroberto#  -- PORTME fill in with the dynamic library characteristics
2191182007SrobertoAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2192182007Sroberto[AC_CACHE_CHECK([how to recognise dependent libraries],
2193182007Srobertolt_cv_deplibs_check_method,
2194182007Sroberto[lt_cv_file_magic_cmd='$MAGIC_CMD'
2195182007Srobertolt_cv_file_magic_test_file=
2196182007Srobertolt_cv_deplibs_check_method='unknown'
2197182007Sroberto# Need to set the preceding variable on all platforms that support
2198182007Sroberto# interlibrary dependencies.
2199182007Sroberto# 'none' -- dependencies not supported.
2200182007Sroberto# `unknown' -- same as none, but documents that we really don't know.
2201182007Sroberto# 'pass_all' -- all dependencies passed with no checks.
2202182007Sroberto# 'test_compile' -- check by making test program.
2203182007Sroberto# 'file_magic [[regex]]' -- check by looking for files in library path
2204182007Sroberto# which responds to the $file_magic_cmd with a given extended regex.
2205182007Sroberto# If you have `file' or equivalent on your system and you're not sure
2206182007Sroberto# whether `pass_all' will *always* work, you probably want this one.
2207182007Sroberto
2208182007Srobertocase $host_os in
2209182007Srobertoaix4* | aix5*)
2210182007Sroberto  lt_cv_deplibs_check_method=pass_all
2211182007Sroberto  ;;
2212182007Sroberto
2213182007Srobertobeos*)
2214182007Sroberto  lt_cv_deplibs_check_method=pass_all
2215182007Sroberto  ;;
2216182007Sroberto
2217182007Srobertobsdi[[45]]*)
2218182007Sroberto  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2219182007Sroberto  lt_cv_file_magic_cmd='/usr/bin/file -L'
2220182007Sroberto  lt_cv_file_magic_test_file=/shlib/libc.so
2221182007Sroberto  ;;
2222182007Sroberto
2223182007Srobertocygwin*)
2224182007Sroberto  # func_win32_libid is a shell function defined in ltmain.sh
2225182007Sroberto  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2226182007Sroberto  lt_cv_file_magic_cmd='func_win32_libid'
2227182007Sroberto  ;;
2228182007Sroberto
2229182007Srobertomingw* | pw32*)
2230182007Sroberto  # Base MSYS/MinGW do not provide the 'file' command needed by
2231182007Sroberto  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2232182007Sroberto  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2233182007Sroberto  lt_cv_file_magic_cmd='$OBJDUMP -f'
2234182007Sroberto  ;;
2235182007Sroberto
2236182007Srobertodarwin* | rhapsody*)
2237182007Sroberto  lt_cv_deplibs_check_method=pass_all
2238182007Sroberto  ;;
2239182007Sroberto
2240182007Srobertofreebsd* | kfreebsd*-gnu | dragonfly*)
2241182007Sroberto  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2242182007Sroberto    case $host_cpu in
2243182007Sroberto    i*86 )
2244182007Sroberto      # Not sure whether the presence of OpenBSD here was a mistake.
2245182007Sroberto      # Let's accept both of them until this is cleared up.
2246182007Sroberto      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2247182007Sroberto      lt_cv_file_magic_cmd=/usr/bin/file
2248182007Sroberto      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2249182007Sroberto      ;;
2250182007Sroberto    esac
2251182007Sroberto  else
2252182007Sroberto    lt_cv_deplibs_check_method=pass_all
2253182007Sroberto  fi
2254182007Sroberto  ;;
2255182007Sroberto
2256182007Srobertognu*)
2257182007Sroberto  lt_cv_deplibs_check_method=pass_all
2258182007Sroberto  ;;
2259182007Sroberto
2260182007Srobertohpux10.20* | hpux11*)
2261182007Sroberto  lt_cv_file_magic_cmd=/usr/bin/file
2262182007Sroberto  case $host_cpu in
2263182007Sroberto  ia64*)
2264182007Sroberto    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2265182007Sroberto    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2266182007Sroberto    ;;
2267182007Sroberto  hppa*64*)
2268182007Sroberto    [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]']
2269182007Sroberto    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2270182007Sroberto    ;;
2271182007Sroberto  *)
2272182007Sroberto    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2273182007Sroberto    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2274182007Sroberto    ;;
2275182007Sroberto  esac
2276182007Sroberto  ;;
2277182007Sroberto
2278182007Srobertoirix5* | irix6* | nonstopux*)
2279182007Sroberto  case $LD in
2280182007Sroberto  *-32|*"-32 ") libmagic=32-bit;;
2281182007Sroberto  *-n32|*"-n32 ") libmagic=N32;;
2282182007Sroberto  *-64|*"-64 ") libmagic=64-bit;;
2283182007Sroberto  *) libmagic=never-match;;
2284182007Sroberto  esac
2285182007Sroberto  lt_cv_deplibs_check_method=pass_all
2286182007Sroberto  ;;
2287182007Sroberto
2288182007Sroberto# This must be Linux ELF.
2289182007Srobertolinux*)
2290182007Sroberto  lt_cv_deplibs_check_method=pass_all
2291182007Sroberto  ;;
2292182007Sroberto
2293182007Srobertonetbsd*)
2294182007Sroberto  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2295182007Sroberto    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2296182007Sroberto  else
2297182007Sroberto    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2298182007Sroberto  fi
2299182007Sroberto  ;;
2300182007Sroberto
2301182007Srobertonewos6*)
2302182007Sroberto  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2303182007Sroberto  lt_cv_file_magic_cmd=/usr/bin/file
2304182007Sroberto  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2305182007Sroberto  ;;
2306182007Sroberto
2307182007Srobertonto-qnx*)
2308182007Sroberto  lt_cv_deplibs_check_method=unknown
2309182007Sroberto  ;;
2310182007Sroberto
2311182007Srobertoopenbsd*)
2312182007Sroberto  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2313182007Sroberto    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2314182007Sroberto  else
2315182007Sroberto    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2316182007Sroberto  fi
2317182007Sroberto  ;;
2318182007Sroberto
2319182007Srobertoosf3* | osf4* | osf5*)
2320182007Sroberto  lt_cv_deplibs_check_method=pass_all
2321182007Sroberto  ;;
2322182007Sroberto
2323182007Srobertosco3.2v5*)
2324182007Sroberto  lt_cv_deplibs_check_method=pass_all
2325182007Sroberto  ;;
2326182007Sroberto
2327182007Srobertosolaris*)
2328182007Sroberto  lt_cv_deplibs_check_method=pass_all
2329182007Sroberto  ;;
2330182007Sroberto
2331182007Srobertosysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2332182007Sroberto  case $host_vendor in
2333182007Sroberto  motorola)
2334182007Sroberto    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]]'
2335182007Sroberto    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2336182007Sroberto    ;;
2337182007Sroberto  ncr)
2338182007Sroberto    lt_cv_deplibs_check_method=pass_all
2339182007Sroberto    ;;
2340182007Sroberto  sequent)
2341182007Sroberto    lt_cv_file_magic_cmd='/bin/file'
2342182007Sroberto    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2343182007Sroberto    ;;
2344182007Sroberto  sni)
2345182007Sroberto    lt_cv_file_magic_cmd='/bin/file'
2346182007Sroberto    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2347182007Sroberto    lt_cv_file_magic_test_file=/lib/libc.so
2348182007Sroberto    ;;
2349182007Sroberto  siemens)
2350182007Sroberto    lt_cv_deplibs_check_method=pass_all
2351182007Sroberto    ;;
2352182007Sroberto  esac
2353182007Sroberto  ;;
2354182007Sroberto
2355182007Srobertosysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2356182007Sroberto  lt_cv_deplibs_check_method=pass_all
2357182007Sroberto  ;;
2358182007Srobertoesac
2359182007Sroberto])
2360182007Srobertofile_magic_cmd=$lt_cv_file_magic_cmd
2361182007Srobertodeplibs_check_method=$lt_cv_deplibs_check_method
2362182007Srobertotest -z "$deplibs_check_method" && deplibs_check_method=unknown
2363182007Sroberto])# AC_DEPLIBS_CHECK_METHOD
2364182007Sroberto
2365182007Sroberto
2366182007Sroberto# AC_PROG_NM
2367182007Sroberto# ----------
2368182007Sroberto# find the pathname to a BSD-compatible name lister
2369182007SrobertoAC_DEFUN([AC_PROG_NM],
2370182007Sroberto[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2371182007Sroberto[if test -n "$NM"; then
2372182007Sroberto  # Let the user override the test.
2373182007Sroberto  lt_cv_path_NM="$NM"
2374182007Srobertoelse
2375182007Sroberto  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2376182007Sroberto  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2377182007Sroberto    IFS="$lt_save_ifs"
2378182007Sroberto    test -z "$ac_dir" && ac_dir=.
2379182007Sroberto    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2380182007Sroberto    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2381182007Sroberto      # Check to see if the nm accepts a BSD-compat flag.
2382182007Sroberto      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2383182007Sroberto      #   nm: unknown option "B" ignored
2384182007Sroberto      # Tru64's nm complains that /dev/null is an invalid object file
2385182007Sroberto      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2386182007Sroberto      */dev/null* | *'Invalid file or object type'*)
2387182007Sroberto	lt_cv_path_NM="$tmp_nm -B"
2388182007Sroberto	break
2389182007Sroberto        ;;
2390182007Sroberto      *)
2391182007Sroberto	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2392182007Sroberto	*/dev/null*)
2393182007Sroberto	  lt_cv_path_NM="$tmp_nm -p"
2394182007Sroberto	  break
2395182007Sroberto	  ;;
2396182007Sroberto	*)
2397182007Sroberto	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2398182007Sroberto	  continue # so that we can try to find one that supports BSD flags
2399182007Sroberto	  ;;
2400182007Sroberto	esac
2401182007Sroberto      esac
2402182007Sroberto    fi
2403182007Sroberto  done
2404182007Sroberto  IFS="$lt_save_ifs"
2405182007Sroberto  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2406182007Srobertofi])
2407182007SrobertoNM="$lt_cv_path_NM"
2408182007Sroberto])# AC_PROG_NM
2409182007Sroberto
2410182007Sroberto
2411182007Sroberto# AC_CHECK_LIBM
2412182007Sroberto# -------------
2413182007Sroberto# check for math library
2414182007SrobertoAC_DEFUN([AC_CHECK_LIBM],
2415182007Sroberto[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2416182007SrobertoLIBM=
2417182007Srobertocase $host in
2418182007Sroberto*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2419182007Sroberto  # These system don't have libm, or don't need it
2420182007Sroberto  ;;
2421182007Sroberto*-ncr-sysv4.3*)
2422182007Sroberto  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2423182007Sroberto  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2424182007Sroberto  ;;
2425182007Sroberto*)
2426182007Sroberto  AC_CHECK_LIB(m, cos, LIBM="-lm")
2427182007Sroberto  ;;
2428182007Srobertoesac
2429182007Sroberto])# AC_CHECK_LIBM
2430182007Sroberto
2431182007Sroberto
2432182007Sroberto# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2433182007Sroberto# -----------------------------------
2434182007Sroberto# sets LIBLTDL to the link flags for the libltdl convenience library and
2435182007Sroberto# LTDLINCL to the include flags for the libltdl header and adds
2436182007Sroberto# --enable-ltdl-convenience to the configure arguments.  Note that
2437182007Sroberto# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2438182007Sroberto# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2439182007Sroberto# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2440182007Sroberto# (note the single quotes!).  If your package is not flat and you're not
2441182007Sroberto# using automake, define top_builddir and top_srcdir appropriately in
2442182007Sroberto# the Makefiles.
2443182007SrobertoAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2444182007Sroberto[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2445182007Sroberto  case $enable_ltdl_convenience in
2446182007Sroberto  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2447182007Sroberto  "") enable_ltdl_convenience=yes
2448182007Sroberto      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2449182007Sroberto  esac
2450182007Sroberto  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2451182007Sroberto  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2452182007Sroberto  # For backwards non-gettext consistent compatibility...
2453182007Sroberto  INCLTDL="$LTDLINCL"
2454182007Sroberto])# AC_LIBLTDL_CONVENIENCE
2455182007Sroberto
2456182007Sroberto
2457182007Sroberto# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2458182007Sroberto# -----------------------------------
2459182007Sroberto# sets LIBLTDL to the link flags for the libltdl installable library and
2460182007Sroberto# LTDLINCL to the include flags for the libltdl header and adds
2461182007Sroberto# --enable-ltdl-install to the configure arguments.  Note that
2462182007Sroberto# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2463182007Sroberto# and an installed libltdl is not found, it is assumed to be `libltdl'.
2464182007Sroberto# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2465182007Sroberto# '${top_srcdir}/' (note the single quotes!).  If your package is not
2466182007Sroberto# flat and you're not using automake, define top_builddir and top_srcdir
2467182007Sroberto# appropriately in the Makefiles.
2468182007Sroberto# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2469182007SrobertoAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2470182007Sroberto[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2471182007Sroberto  AC_CHECK_LIB(ltdl, lt_dlinit,
2472182007Sroberto  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2473182007Sroberto  [if test x"$enable_ltdl_install" = xno; then
2474182007Sroberto     AC_MSG_WARN([libltdl not installed, but installation disabled])
2475182007Sroberto   else
2476182007Sroberto     enable_ltdl_install=yes
2477182007Sroberto   fi
2478182007Sroberto  ])
2479182007Sroberto  if test x"$enable_ltdl_install" = x"yes"; then
2480182007Sroberto    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2481182007Sroberto    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2482182007Sroberto    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2483182007Sroberto  else
2484182007Sroberto    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2485182007Sroberto    LIBLTDL="-lltdl"
2486182007Sroberto    LTDLINCL=
2487182007Sroberto  fi
2488182007Sroberto  # For backwards non-gettext consistent compatibility...
2489182007Sroberto  INCLTDL="$LTDLINCL"
2490182007Sroberto])# AC_LIBLTDL_INSTALLABLE
2491182007Sroberto
2492182007Sroberto
2493182007Sroberto# AC_LIBTOOL_CXX
2494182007Sroberto# --------------
2495182007Sroberto# enable support for C++ libraries
2496182007SrobertoAC_DEFUN([AC_LIBTOOL_CXX],
2497182007Sroberto[AC_REQUIRE([_LT_AC_LANG_CXX])
2498182007Sroberto])# AC_LIBTOOL_CXX
2499182007Sroberto
2500182007Sroberto
2501182007Sroberto# _LT_AC_LANG_CXX
2502182007Sroberto# ---------------
2503182007SrobertoAC_DEFUN([_LT_AC_LANG_CXX],
2504182007Sroberto[AC_REQUIRE([AC_PROG_CXX])
2505182007SrobertoAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2506182007Sroberto_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2507182007Sroberto])# _LT_AC_LANG_CXX
2508182007Sroberto
2509182007Sroberto# _LT_AC_PROG_CXXCPP
2510182007Sroberto# ---------------
2511182007SrobertoAC_DEFUN([_LT_AC_PROG_CXXCPP],
2512182007Sroberto[
2513182007SrobertoAC_REQUIRE([AC_PROG_CXX])
2514182007Srobertoif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2515182007Sroberto    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2516182007Sroberto    (test "X$CXX" != "Xg++"))) ; then
2517182007Sroberto  AC_PROG_CXXCPP
2518182007Srobertofi
2519182007Sroberto])# _LT_AC_PROG_CXXCPP
2520182007Sroberto
2521182007Sroberto# AC_LIBTOOL_F77
2522182007Sroberto# --------------
2523182007Sroberto# enable support for Fortran 77 libraries
2524182007SrobertoAC_DEFUN([AC_LIBTOOL_F77],
2525182007Sroberto[AC_REQUIRE([_LT_AC_LANG_F77])
2526182007Sroberto])# AC_LIBTOOL_F77
2527182007Sroberto
2528182007Sroberto
2529182007Sroberto# _LT_AC_LANG_F77
2530182007Sroberto# ---------------
2531182007SrobertoAC_DEFUN([_LT_AC_LANG_F77],
2532182007Sroberto[AC_REQUIRE([AC_PROG_F77])
2533182007Sroberto_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2534182007Sroberto])# _LT_AC_LANG_F77
2535182007Sroberto
2536182007Sroberto
2537182007Sroberto# AC_LIBTOOL_GCJ
2538182007Sroberto# --------------
2539182007Sroberto# enable support for GCJ libraries
2540182007SrobertoAC_DEFUN([AC_LIBTOOL_GCJ],
2541182007Sroberto[AC_REQUIRE([_LT_AC_LANG_GCJ])
2542182007Sroberto])# AC_LIBTOOL_GCJ
2543182007Sroberto
2544182007Sroberto
2545182007Sroberto# _LT_AC_LANG_GCJ
2546182007Sroberto# ---------------
2547182007SrobertoAC_DEFUN([_LT_AC_LANG_GCJ],
2548182007Sroberto[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2549182007Sroberto  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2550182007Sroberto    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2551182007Sroberto      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2552182007Sroberto	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2553182007Sroberto	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2554182007Sroberto_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2555182007Sroberto])# _LT_AC_LANG_GCJ
2556182007Sroberto
2557182007Sroberto
2558182007Sroberto# AC_LIBTOOL_RC
2559182007Sroberto# --------------
2560182007Sroberto# enable support for Windows resource files
2561182007SrobertoAC_DEFUN([AC_LIBTOOL_RC],
2562182007Sroberto[AC_REQUIRE([LT_AC_PROG_RC])
2563182007Sroberto_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2564182007Sroberto])# AC_LIBTOOL_RC
2565182007Sroberto
2566182007Sroberto
2567182007Sroberto# AC_LIBTOOL_LANG_C_CONFIG
2568182007Sroberto# ------------------------
2569182007Sroberto# Ensure that the configuration vars for the C compiler are
2570182007Sroberto# suitably defined.  Those variables are subsequently used by
2571182007Sroberto# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2572182007SrobertoAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2573182007SrobertoAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2574182007Sroberto[lt_save_CC="$CC"
2575182007SrobertoAC_LANG_PUSH(C)
2576182007Sroberto
2577182007Sroberto# Source file extension for C test sources.
2578182007Srobertoac_ext=c
2579182007Sroberto
2580182007Sroberto# Object file extension for compiled C test sources.
2581182007Srobertoobjext=o
2582182007Sroberto_LT_AC_TAGVAR(objext, $1)=$objext
2583182007Sroberto
2584182007Sroberto# Code to be used in simple compile tests
2585182007Srobertolt_simple_compile_test_code="int some_variable = 0;\n"
2586182007Sroberto
2587182007Sroberto# Code to be used in simple link tests
2588182007Srobertolt_simple_link_test_code='int main(){return(0);}\n'
2589182007Sroberto
2590182007Sroberto_LT_AC_SYS_COMPILER
2591182007Sroberto
2592182007Sroberto# save warnings/boilerplate of simple test code
2593182007Sroberto_LT_COMPILER_BOILERPLATE
2594182007Sroberto_LT_LINKER_BOILERPLATE
2595182007Sroberto
2596132451Sroberto#
2597182007Sroberto# Check for any special shared library compilation flags.
2598132451Sroberto#
2599182007Sroberto_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2600182007Srobertoif test "$GCC" = no; then
2601182007Sroberto  case $host_os in
2602182007Sroberto  sco3.2v5*)
2603182007Sroberto    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2604182007Sroberto    ;;
2605182007Sroberto  esac
2606182007Srobertofi
2607182007Srobertoif test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2608182007Sroberto  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2609182007Sroberto  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
2610182007Sroberto  else
2611182007Sroberto    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2612182007Sroberto    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2613182007Sroberto  fi
2614182007Srobertofi
2615132451Sroberto
2616132451Sroberto
2617182007Sroberto#
2618182007Sroberto# Check to make sure the static flag actually works.
2619182007Sroberto#
2620182007SrobertoAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2621182007Sroberto  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2622182007Sroberto  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2623182007Sroberto  [],
2624182007Sroberto  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2625132451Sroberto
2626132451Sroberto
2627182007SrobertoAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2628182007SrobertoAC_LIBTOOL_PROG_COMPILER_PIC($1)
2629182007SrobertoAC_LIBTOOL_PROG_CC_C_O($1)
2630182007SrobertoAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2631182007SrobertoAC_LIBTOOL_PROG_LD_SHLIBS($1)
2632182007SrobertoAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2633182007SrobertoAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2634182007SrobertoAC_LIBTOOL_SYS_LIB_STRIP
2635182007SrobertoAC_LIBTOOL_DLOPEN_SELF($1)
2636132451Sroberto
2637182007Sroberto# Report which librarie types wil actually be built
2638182007SrobertoAC_MSG_CHECKING([if libtool supports shared libraries])
2639182007SrobertoAC_MSG_RESULT([$can_build_shared])
2640132451Sroberto
2641182007SrobertoAC_MSG_CHECKING([whether to build shared libraries])
2642182007Srobertotest "$can_build_shared" = "no" && enable_shared=no
2643132451Sroberto
2644182007Sroberto# On AIX, shared libraries and static libraries use the same namespace, and
2645182007Sroberto# are all built from PIC.
2646182007Srobertocase $host_os in
2647182007Srobertoaix3*)
2648182007Sroberto  test "$enable_shared" = yes && enable_static=no
2649182007Sroberto  if test -n "$RANLIB"; then
2650182007Sroberto    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2651182007Sroberto    postinstall_cmds='$RANLIB $lib'
2652182007Sroberto  fi
2653182007Sroberto  ;;
2654132451Sroberto
2655182007Srobertoaix4* | aix5*)
2656182007Sroberto  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2657182007Sroberto    test "$enable_shared" = yes && enable_static=no
2658182007Sroberto  fi
2659182007Sroberto    ;;
2660182007Srobertoesac
2661182007SrobertoAC_MSG_RESULT([$enable_shared])
2662182007Sroberto
2663182007SrobertoAC_MSG_CHECKING([whether to build static libraries])
2664182007Sroberto# Make sure either enable_shared or enable_static is yes.
2665182007Srobertotest "$enable_shared" = yes || enable_static=yes
2666182007SrobertoAC_MSG_RESULT([$enable_static])
2667182007Sroberto
2668182007SrobertoAC_LIBTOOL_CONFIG($1)
2669182007Sroberto
2670182007SrobertoAC_LANG_POP
2671182007SrobertoCC="$lt_save_CC"
2672182007Sroberto])# AC_LIBTOOL_LANG_C_CONFIG
2673182007Sroberto
2674182007Sroberto
2675182007Sroberto# AC_LIBTOOL_LANG_CXX_CONFIG
2676182007Sroberto# --------------------------
2677182007Sroberto# Ensure that the configuration vars for the C compiler are
2678182007Sroberto# suitably defined.  Those variables are subsequently used by
2679182007Sroberto# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2680182007SrobertoAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2681182007SrobertoAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2682182007Sroberto[AC_LANG_PUSH(C++)
2683182007SrobertoAC_REQUIRE([AC_PROG_CXX])
2684182007SrobertoAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2685182007Sroberto
2686182007Sroberto_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2687182007Sroberto_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2688182007Sroberto_LT_AC_TAGVAR(always_export_symbols, $1)=no
2689182007Sroberto_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2690182007Sroberto_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2691182007Sroberto_LT_AC_TAGVAR(hardcode_direct, $1)=no
2692182007Sroberto_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2693182007Sroberto_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2694182007Sroberto_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2695182007Sroberto_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2696182007Sroberto_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2697182007Sroberto_LT_AC_TAGVAR(module_cmds, $1)=
2698182007Sroberto_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2699182007Sroberto_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2700182007Sroberto_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2701182007Sroberto_LT_AC_TAGVAR(no_undefined_flag, $1)=
2702182007Sroberto_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2703182007Sroberto_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2704182007Sroberto
2705182007Sroberto# Dependencies to place before and after the object being linked:
2706182007Sroberto_LT_AC_TAGVAR(predep_objects, $1)=
2707182007Sroberto_LT_AC_TAGVAR(postdep_objects, $1)=
2708182007Sroberto_LT_AC_TAGVAR(predeps, $1)=
2709182007Sroberto_LT_AC_TAGVAR(postdeps, $1)=
2710182007Sroberto_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2711182007Sroberto
2712182007Sroberto# Source file extension for C++ test sources.
2713182007Srobertoac_ext=cpp
2714182007Sroberto
2715182007Sroberto# Object file extension for compiled C++ test sources.
2716182007Srobertoobjext=o
2717182007Sroberto_LT_AC_TAGVAR(objext, $1)=$objext
2718182007Sroberto
2719182007Sroberto# Code to be used in simple compile tests
2720182007Srobertolt_simple_compile_test_code="int some_variable = 0;\n"
2721182007Sroberto
2722182007Sroberto# Code to be used in simple link tests
2723182007Srobertolt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2724182007Sroberto
2725182007Sroberto# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2726182007Sroberto_LT_AC_SYS_COMPILER
2727182007Sroberto
2728182007Sroberto# save warnings/boilerplate of simple test code
2729182007Sroberto_LT_COMPILER_BOILERPLATE
2730182007Sroberto_LT_LINKER_BOILERPLATE
2731182007Sroberto
2732182007Sroberto# Allow CC to be a program name with arguments.
2733182007Srobertolt_save_CC=$CC
2734182007Srobertolt_save_LD=$LD
2735182007Srobertolt_save_GCC=$GCC
2736182007SrobertoGCC=$GXX
2737182007Srobertolt_save_with_gnu_ld=$with_gnu_ld
2738182007Srobertolt_save_path_LD=$lt_cv_path_LD
2739182007Srobertoif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2740182007Sroberto  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2741132451Srobertoelse
2742182007Sroberto  unset lt_cv_prog_gnu_ld
2743132451Srobertofi
2744182007Srobertoif test -n "${lt_cv_path_LDCXX+set}"; then
2745182007Sroberto  lt_cv_path_LD=$lt_cv_path_LDCXX
2746182007Srobertoelse
2747182007Sroberto  unset lt_cv_path_LD
2748182007Srobertofi
2749182007Srobertotest -z "${LDCXX+set}" || LD=$LDCXX
2750182007SrobertoCC=${CXX-"c++"}
2751182007Srobertocompiler=$CC
2752182007Sroberto_LT_AC_TAGVAR(compiler, $1)=$CC
2753182007Sroberto_LT_CC_BASENAME([$compiler])
2754132451Sroberto
2755182007Sroberto# We don't want -fno-exception wen compiling C++ code, so set the
2756182007Sroberto# no_builtin_flag separately
2757182007Srobertoif test "$GXX" = yes; then
2758182007Sroberto  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2759182007Srobertoelse
2760182007Sroberto  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2761182007Srobertofi
2762132451Sroberto
2763182007Srobertoif test "$GXX" = yes; then
2764182007Sroberto  # Set up default GNU C++ configuration
2765132451Sroberto
2766182007Sroberto  AC_PROG_LD
2767132451Sroberto
2768182007Sroberto  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2769182007Sroberto  # archiving commands below assume that GNU ld is being used.
2770182007Sroberto  if test "$with_gnu_ld" = yes; then
2771182007Sroberto    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2772182007Sroberto    _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'
2773132451Sroberto
2774182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2775182007Sroberto    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2776132451Sroberto
2777182007Sroberto    # If archive_cmds runs LD, not CC, wlarc should be empty
2778182007Sroberto    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2779182007Sroberto    #     investigate it a little bit more. (MM)
2780182007Sroberto    wlarc='${wl}'
2781132451Sroberto
2782182007Sroberto    # ancient GNU ld didn't support --whole-archive et. al.
2783182007Sroberto    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2784182007Sroberto	grep 'no-whole-archive' > /dev/null; then
2785182007Sroberto      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2786182007Sroberto    else
2787182007Sroberto      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2788182007Sroberto    fi
2789182007Sroberto  else
2790182007Sroberto    with_gnu_ld=no
2791182007Sroberto    wlarc=
2792132451Sroberto
2793182007Sroberto    # A generic and very simple default shared library creation
2794182007Sroberto    # command for GNU C++ for the case where it uses the native
2795182007Sroberto    # linker, instead of GNU ld.  If possible, this setting should
2796182007Sroberto    # overridden to take advantage of the native linker features on
2797182007Sroberto    # the platform it is being used on.
2798182007Sroberto    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2799182007Sroberto  fi
2800132451Sroberto
2801182007Sroberto  # Commands to make compiler produce verbose output that lists
2802182007Sroberto  # what "hidden" libraries, object files and flags are used when
2803182007Sroberto  # linking a shared library.
2804182007Sroberto  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2805132451Sroberto
2806132451Srobertoelse
2807182007Sroberto  GXX=no
2808182007Sroberto  with_gnu_ld=no
2809182007Sroberto  wlarc=
2810132451Srobertofi
2811182007Sroberto
2812182007Sroberto# PORTME: fill in a description of your system's C++ link characteristics
2813182007SrobertoAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2814182007Sroberto_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2815182007Srobertocase $host_os in
2816182007Sroberto  aix3*)
2817182007Sroberto    # FIXME: insert proper C++ library support
2818182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2819182007Sroberto    ;;
2820182007Sroberto  aix4* | aix5*)
2821182007Sroberto    if test "$host_cpu" = ia64; then
2822182007Sroberto      # On IA64, the linker does run time linking by default, so we don't
2823182007Sroberto      # have to do anything special.
2824182007Sroberto      aix_use_runtimelinking=no
2825182007Sroberto      exp_sym_flag='-Bexport'
2826182007Sroberto      no_entry_flag=""
2827182007Sroberto    else
2828182007Sroberto      aix_use_runtimelinking=no
2829182007Sroberto
2830182007Sroberto      # Test if we are trying to use run time linking or normal
2831182007Sroberto      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2832182007Sroberto      # need to do runtime linking.
2833182007Sroberto      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2834182007Sroberto	for ld_flag in $LDFLAGS; do
2835182007Sroberto	  case $ld_flag in
2836182007Sroberto	  *-brtl*)
2837182007Sroberto	    aix_use_runtimelinking=yes
2838182007Sroberto	    break
2839182007Sroberto	    ;;
2840182007Sroberto	  esac
2841182007Sroberto	done
2842182007Sroberto      esac
2843182007Sroberto
2844182007Sroberto      exp_sym_flag='-bexport'
2845182007Sroberto      no_entry_flag='-bnoentry'
2846182007Sroberto    fi
2847182007Sroberto
2848182007Sroberto    # When large executables or shared objects are built, AIX ld can
2849182007Sroberto    # have problems creating the table of contents.  If linking a library
2850182007Sroberto    # or program results in "error TOC overflow" add -mminimal-toc to
2851182007Sroberto    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2852182007Sroberto    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2853182007Sroberto
2854182007Sroberto    _LT_AC_TAGVAR(archive_cmds, $1)=''
2855182007Sroberto    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2856182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2857182007Sroberto    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2858182007Sroberto
2859182007Sroberto    if test "$GXX" = yes; then
2860182007Sroberto      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2861182007Sroberto      # We only want to do this on AIX 4.2 and lower, the check
2862182007Sroberto      # below for broken collect2 doesn't work under 4.3+
2863182007Sroberto	collect2name=`${CC} -print-prog-name=collect2`
2864182007Sroberto	if test -f "$collect2name" && \
2865182007Sroberto	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2866182007Sroberto	then
2867182007Sroberto	  # We have reworked collect2
2868182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2869182007Sroberto	else
2870182007Sroberto	  # We have old collect2
2871182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2872182007Sroberto	  # It fails to find uninstalled libraries when the uninstalled
2873182007Sroberto	  # path is not listed in the libpath.  Setting hardcode_minus_L
2874182007Sroberto	  # to unsupported forces relinking
2875182007Sroberto	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2876182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2877182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2878182007Sroberto	fi
2879182007Sroberto      esac
2880182007Sroberto      shared_flag='-shared'
2881182007Sroberto      if test "$aix_use_runtimelinking" = yes; then
2882182007Sroberto	shared_flag="$shared_flag "'${wl}-G'
2883182007Sroberto      fi
2884182007Sroberto    else
2885182007Sroberto      # not using gcc
2886182007Sroberto      if test "$host_cpu" = ia64; then
2887182007Sroberto	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2888182007Sroberto	# chokes on -Wl,-G. The following line is correct:
2889182007Sroberto	shared_flag='-G'
2890182007Sroberto      else
2891182007Sroberto	if test "$aix_use_runtimelinking" = yes; then
2892182007Sroberto	  shared_flag='${wl}-G'
2893182007Sroberto	else
2894182007Sroberto	  shared_flag='${wl}-bM:SRE'
2895182007Sroberto	fi
2896182007Sroberto      fi
2897182007Sroberto    fi
2898182007Sroberto
2899182007Sroberto    # It seems that -bexpall does not export symbols beginning with
2900182007Sroberto    # underscore (_), so it is better to generate a list of symbols to export.
2901182007Sroberto    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2902182007Sroberto    if test "$aix_use_runtimelinking" = yes; then
2903182007Sroberto      # Warning - without using the other runtime loading flags (-brtl),
2904182007Sroberto      # -berok will link without error, but may produce a broken library.
2905182007Sroberto      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2906182007Sroberto      # Determine the default libpath from the value encoded in an empty executable.
2907182007Sroberto      _LT_AC_SYS_LIBPATH_AIX
2908182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2909182007Sroberto
2910182007Sroberto      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2911182007Sroberto     else
2912182007Sroberto      if test "$host_cpu" = ia64; then
2913182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2914182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2915182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2916182007Sroberto      else
2917182007Sroberto	# Determine the default libpath from the value encoded in an empty executable.
2918182007Sroberto	_LT_AC_SYS_LIBPATH_AIX
2919182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2920182007Sroberto	# Warning - without using the other run time loading flags,
2921182007Sroberto	# -berok will link without error, but may produce a broken library.
2922182007Sroberto	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2923182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2924182007Sroberto	# -bexpall does not export symbols beginning with underscore (_)
2925182007Sroberto	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
2926182007Sroberto	# Exported symbols can be pulled into shared objects from archives
2927182007Sroberto	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2928182007Sroberto	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2929182007Sroberto	# This is similar to how AIX traditionally builds its shared libraries.
2930182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2931182007Sroberto      fi
2932182007Sroberto    fi
2933182007Sroberto    ;;
2934182007Sroberto  chorus*)
2935182007Sroberto    case $cc_basename in
2936182007Sroberto      *)
2937182007Sroberto	# FIXME: insert proper C++ library support
2938182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
2939182007Sroberto	;;
2940182007Sroberto    esac
2941182007Sroberto    ;;
2942182007Sroberto
2943182007Sroberto
2944182007Sroberto  cygwin* | mingw* | pw32*)
2945182007Sroberto    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2946182007Sroberto    # as there is no search path for DLLs.
2947182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2948182007Sroberto    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2949182007Sroberto    _LT_AC_TAGVAR(always_export_symbols, $1)=no
2950182007Sroberto    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2951182007Sroberto
2952182007Sroberto    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2953182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2954182007Sroberto      # If the export-symbols file already is a .def file (1st line
2955182007Sroberto      # is EXPORTS), use it as is; otherwise, prepend...
2956182007Sroberto      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2957182007Sroberto	cp $export_symbols $output_objdir/$soname.def;
2958182007Sroberto      else
2959182007Sroberto	echo EXPORTS > $output_objdir/$soname.def;
2960182007Sroberto	cat $export_symbols >> $output_objdir/$soname.def;
2961182007Sroberto      fi~
2962182007Sroberto      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2963182007Sroberto    else
2964182007Sroberto      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2965182007Sroberto    fi
2966182007Sroberto  ;;
2967182007Sroberto      darwin* | rhapsody*)
2968182007Sroberto        case $host_os in
2969182007Sroberto        rhapsody* | darwin1.[[012]])
2970182007Sroberto         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
2971182007Sroberto         ;;
2972182007Sroberto       *) # Darwin 1.3 on
2973182007Sroberto         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2974182007Sroberto           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2975182007Sroberto         else
2976182007Sroberto           case ${MACOSX_DEPLOYMENT_TARGET} in
2977182007Sroberto             10.[[012]])
2978182007Sroberto               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2979182007Sroberto               ;;
2980182007Sroberto             10.*)
2981182007Sroberto               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
2982182007Sroberto               ;;
2983182007Sroberto           esac
2984182007Sroberto         fi
2985182007Sroberto         ;;
2986182007Sroberto        esac
2987182007Sroberto      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2988182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=no
2989182007Sroberto      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2990182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2991182007Sroberto      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
2992182007Sroberto      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2993182007Sroberto
2994182007Sroberto    if test "$GXX" = yes ; then
2995182007Sroberto      lt_int_apple_cc_single_mod=no
2996182007Sroberto      output_verbose_link_cmd='echo'
2997182007Sroberto      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
2998182007Sroberto       lt_int_apple_cc_single_mod=yes
2999182007Sroberto      fi
3000182007Sroberto      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3001182007Sroberto       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3002182007Sroberto      else
3003182007Sroberto          _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'
3004182007Sroberto        fi
3005182007Sroberto        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3006182007Sroberto        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3007182007Sroberto          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3008182007Sroberto            _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}'
3009182007Sroberto          else
3010182007Sroberto            _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}'
3011182007Sroberto          fi
3012182007Sroberto            _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}'
3013182007Sroberto      else
3014182007Sroberto      case $cc_basename in
3015182007Sroberto        xlc*)
3016182007Sroberto         output_verbose_link_cmd='echo'
3017182007Sroberto          _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'
3018182007Sroberto          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3019182007Sroberto          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3020182007Sroberto          _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}'
3021182007Sroberto          _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}'
3022182007Sroberto          ;;
3023182007Sroberto       *)
3024182007Sroberto         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3025182007Sroberto          ;;
3026182007Sroberto      esac
3027182007Sroberto      fi
3028182007Sroberto        ;;
3029182007Sroberto
3030182007Sroberto  dgux*)
3031182007Sroberto    case $cc_basename in
3032182007Sroberto      ec++*)
3033182007Sroberto	# FIXME: insert proper C++ library support
3034182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3035182007Sroberto	;;
3036182007Sroberto      ghcx*)
3037182007Sroberto	# Green Hills C++ Compiler
3038182007Sroberto	# FIXME: insert proper C++ library support
3039182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3040182007Sroberto	;;
3041182007Sroberto      *)
3042182007Sroberto	# FIXME: insert proper C++ library support
3043182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3044182007Sroberto	;;
3045182007Sroberto    esac
3046182007Sroberto    ;;
3047182007Sroberto  freebsd[[12]]*)
3048182007Sroberto    # C++ shared libraries reported to be fairly broken before switch to ELF
3049182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3050182007Sroberto    ;;
3051182007Sroberto  freebsd-elf*)
3052182007Sroberto    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3053182007Sroberto    ;;
3054182007Sroberto  freebsd* | kfreebsd*-gnu | dragonfly*)
3055182007Sroberto    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3056182007Sroberto    # conventions
3057182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3058182007Sroberto    ;;
3059182007Sroberto  gnu*)
3060182007Sroberto    ;;
3061182007Sroberto  hpux9*)
3062182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3063182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3064182007Sroberto    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3065182007Sroberto    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3066182007Sroberto    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3067182007Sroberto				# but as the default
3068182007Sroberto				# location of the library.
3069182007Sroberto
3070182007Sroberto    case $cc_basename in
3071182007Sroberto    CC*)
3072182007Sroberto      # FIXME: insert proper C++ library support
3073182007Sroberto      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3074182007Sroberto      ;;
3075182007Sroberto    aCC*)
3076182007Sroberto      _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'
3077182007Sroberto      # Commands to make compiler produce verbose output that lists
3078182007Sroberto      # what "hidden" libraries, object files and flags are used when
3079182007Sroberto      # linking a shared library.
3080182007Sroberto      #
3081182007Sroberto      # There doesn't appear to be a way to prevent this compiler from
3082182007Sroberto      # explicitly linking system object files so we need to strip them
3083182007Sroberto      # from the output so that they don't get included in the library
3084182007Sroberto      # dependencies.
3085182007Sroberto      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'
3086182007Sroberto      ;;
3087182007Sroberto    *)
3088182007Sroberto      if test "$GXX" = yes; then
3089182007Sroberto        _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'
3090182007Sroberto      else
3091182007Sroberto        # FIXME: insert proper C++ library support
3092182007Sroberto        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3093182007Sroberto      fi
3094182007Sroberto      ;;
3095182007Sroberto    esac
3096182007Sroberto    ;;
3097182007Sroberto  hpux10*|hpux11*)
3098182007Sroberto    if test $with_gnu_ld = no; then
3099182007Sroberto      case $host_cpu in
3100182007Sroberto      hppa*64*)
3101182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3102182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3103182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3104182007Sroberto        ;;
3105182007Sroberto      ia64*)
3106182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3107182007Sroberto        ;;
3108182007Sroberto      *)
3109182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3110182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3111182007Sroberto	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3112182007Sroberto        ;;
3113182007Sroberto      esac
3114182007Sroberto    fi
3115182007Sroberto    case $host_cpu in
3116182007Sroberto    hppa*64*)
3117182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3118182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3119182007Sroberto      ;;
3120182007Sroberto    ia64*)
3121182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3122182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3123182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3124182007Sroberto					      # but as the default
3125182007Sroberto					      # location of the library.
3126182007Sroberto      ;;
3127182007Sroberto    *)
3128182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3129182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3130182007Sroberto					      # but as the default
3131182007Sroberto					      # location of the library.
3132182007Sroberto      ;;
3133182007Sroberto    esac
3134182007Sroberto
3135182007Sroberto    case $cc_basename in
3136182007Sroberto      CC*)
3137182007Sroberto	# FIXME: insert proper C++ library support
3138182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3139182007Sroberto	;;
3140182007Sroberto      aCC*)
3141182007Sroberto	case $host_cpu in
3142182007Sroberto	hppa*64*|ia64*)
3143182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3144182007Sroberto	  ;;
3145182007Sroberto	*)
3146182007Sroberto	  _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'
3147182007Sroberto	  ;;
3148182007Sroberto	esac
3149182007Sroberto	# Commands to make compiler produce verbose output that lists
3150182007Sroberto	# what "hidden" libraries, object files and flags are used when
3151182007Sroberto	# linking a shared library.
3152182007Sroberto	#
3153182007Sroberto	# There doesn't appear to be a way to prevent this compiler from
3154182007Sroberto	# explicitly linking system object files so we need to strip them
3155182007Sroberto	# from the output so that they don't get included in the library
3156182007Sroberto	# dependencies.
3157182007Sroberto	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'
3158182007Sroberto	;;
3159182007Sroberto      *)
3160182007Sroberto	if test "$GXX" = yes; then
3161182007Sroberto	  if test $with_gnu_ld = no; then
3162182007Sroberto	    case $host_cpu in
3163182007Sroberto	    ia64*|hppa*64*)
3164182007Sroberto	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3165182007Sroberto	      ;;
3166182007Sroberto	    *)
3167182007Sroberto	      _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'
3168182007Sroberto	      ;;
3169182007Sroberto	    esac
3170182007Sroberto	  fi
3171182007Sroberto	else
3172182007Sroberto	  # FIXME: insert proper C++ library support
3173182007Sroberto	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3174182007Sroberto	fi
3175182007Sroberto	;;
3176182007Sroberto    esac
3177182007Sroberto    ;;
3178182007Sroberto  irix5* | irix6*)
3179182007Sroberto    case $cc_basename in
3180182007Sroberto      CC*)
3181182007Sroberto	# SGI C++
3182182007Sroberto	_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'
3183182007Sroberto
3184182007Sroberto	# Archives containing C++ object files must be created using
3185182007Sroberto	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3186182007Sroberto	# necessary to make sure instantiated templates are included
3187182007Sroberto	# in the archive.
3188182007Sroberto	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3189182007Sroberto	;;
3190182007Sroberto      *)
3191182007Sroberto	if test "$GXX" = yes; then
3192182007Sroberto	  if test "$with_gnu_ld" = no; then
3193182007Sroberto	    _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'
3194182007Sroberto	  else
3195182007Sroberto	    _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'
3196182007Sroberto	  fi
3197182007Sroberto	fi
3198182007Sroberto	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3199182007Sroberto	;;
3200182007Sroberto    esac
3201182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3202182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3203182007Sroberto    ;;
3204182007Sroberto  linux*)
3205182007Sroberto    case $cc_basename in
3206182007Sroberto      KCC*)
3207182007Sroberto	# Kuck and Associates, Inc. (KAI) C++ Compiler
3208182007Sroberto
3209182007Sroberto	# KCC will only create a shared library if the output file
3210182007Sroberto	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3211182007Sroberto	# to its proper name (with version) after linking.
3212182007Sroberto	_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'
3213182007Sroberto	_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'
3214182007Sroberto	# Commands to make compiler produce verbose output that lists
3215182007Sroberto	# what "hidden" libraries, object files and flags are used when
3216182007Sroberto	# linking a shared library.
3217182007Sroberto	#
3218182007Sroberto	# There doesn't appear to be a way to prevent this compiler from
3219182007Sroberto	# explicitly linking system object files so we need to strip them
3220182007Sroberto	# from the output so that they don't get included in the library
3221182007Sroberto	# dependencies.
3222182007Sroberto	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'
3223182007Sroberto
3224182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3225182007Sroberto	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3226182007Sroberto
3227182007Sroberto	# Archives containing C++ object files must be created using
3228182007Sroberto	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3229182007Sroberto	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3230182007Sroberto	;;
3231182007Sroberto      icpc*)
3232182007Sroberto	# Intel C++
3233182007Sroberto	with_gnu_ld=yes
3234182007Sroberto	# version 8.0 and above of icpc choke on multiply defined symbols
3235182007Sroberto	# if we add $predep_objects and $postdep_objects, however 7.1 and
3236182007Sroberto	# earlier do not add the objects themselves.
3237182007Sroberto	case `$CC -V 2>&1` in
3238182007Sroberto	*"Version 7."*)
3239182007Sroberto  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3240182007Sroberto  	  _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'
3241182007Sroberto	  ;;
3242182007Sroberto	*)  # Version 8.0 or newer
3243182007Sroberto	  tmp_idyn=
3244182007Sroberto	  case $host_cpu in
3245182007Sroberto	    ia64*) tmp_idyn=' -i_dynamic';;
3246182007Sroberto	  esac
3247182007Sroberto  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3248182007Sroberto	  _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'
3249182007Sroberto	  ;;
3250182007Sroberto	esac
3251182007Sroberto	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3252182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3253182007Sroberto	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3254182007Sroberto	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3255182007Sroberto	;;
3256182007Sroberto      pgCC*)
3257182007Sroberto        # Portland Group C++ compiler
3258182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3259182007Sroberto  	_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'
3260182007Sroberto
3261182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3262182007Sroberto	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3263182007Sroberto	_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'
3264182007Sroberto        ;;
3265182007Sroberto      cxx*)
3266182007Sroberto	# Compaq C++
3267182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3268182007Sroberto	_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'
3269182007Sroberto
3270182007Sroberto	runpath_var=LD_RUN_PATH
3271182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3272182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3273182007Sroberto
3274182007Sroberto	# Commands to make compiler produce verbose output that lists
3275182007Sroberto	# what "hidden" libraries, object files and flags are used when
3276182007Sroberto	# linking a shared library.
3277182007Sroberto	#
3278182007Sroberto	# There doesn't appear to be a way to prevent this compiler from
3279182007Sroberto	# explicitly linking system object files so we need to strip them
3280182007Sroberto	# from the output so that they don't get included in the library
3281182007Sroberto	# dependencies.
3282182007Sroberto	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'
3283182007Sroberto	;;
3284182007Sroberto    esac
3285182007Sroberto    ;;
3286182007Sroberto  lynxos*)
3287182007Sroberto    # FIXME: insert proper C++ library support
3288182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3289182007Sroberto    ;;
3290182007Sroberto  m88k*)
3291182007Sroberto    # FIXME: insert proper C++ library support
3292182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3293182007Sroberto    ;;
3294182007Sroberto  mvs*)
3295182007Sroberto    case $cc_basename in
3296182007Sroberto      cxx*)
3297182007Sroberto	# FIXME: insert proper C++ library support
3298182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3299182007Sroberto	;;
3300182007Sroberto      *)
3301182007Sroberto	# FIXME: insert proper C++ library support
3302182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3303182007Sroberto	;;
3304182007Sroberto    esac
3305182007Sroberto    ;;
3306182007Sroberto  netbsd*)
3307182007Sroberto    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3308182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3309182007Sroberto      wlarc=
3310182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3311182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3312182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3313182007Sroberto    fi
3314182007Sroberto    # Workaround some broken pre-1.5 toolchains
3315182007Sroberto    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3316182007Sroberto    ;;
3317182007Sroberto  openbsd2*)
3318182007Sroberto    # C++ shared libraries are fairly broken
3319182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3320182007Sroberto    ;;
3321182007Sroberto  openbsd*)
3322182007Sroberto    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3323182007Sroberto    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3324182007Sroberto    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3325182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3326182007Sroberto    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3327182007Sroberto      _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'
3328182007Sroberto      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3329182007Sroberto      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3330182007Sroberto    fi
3331182007Sroberto    output_verbose_link_cmd='echo'
3332182007Sroberto    ;;
3333182007Sroberto  osf3*)
3334182007Sroberto    case $cc_basename in
3335182007Sroberto      KCC*)
3336182007Sroberto	# Kuck and Associates, Inc. (KAI) C++ Compiler
3337182007Sroberto
3338182007Sroberto	# KCC will only create a shared library if the output file
3339182007Sroberto	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3340182007Sroberto	# to its proper name (with version) after linking.
3341182007Sroberto	_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'
3342182007Sroberto
3343182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3344182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3345182007Sroberto
3346182007Sroberto	# Archives containing C++ object files must be created using
3347182007Sroberto	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3348182007Sroberto	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3349182007Sroberto
3350182007Sroberto	;;
3351182007Sroberto      RCC*)
3352182007Sroberto	# Rational C++ 2.4.1
3353182007Sroberto	# FIXME: insert proper C++ library support
3354182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3355182007Sroberto	;;
3356182007Sroberto      cxx*)
3357182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3358182007Sroberto	_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'
3359182007Sroberto
3360182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3361182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3362182007Sroberto
3363182007Sroberto	# Commands to make compiler produce verbose output that lists
3364182007Sroberto	# what "hidden" libraries, object files and flags are used when
3365182007Sroberto	# linking a shared library.
3366182007Sroberto	#
3367182007Sroberto	# There doesn't appear to be a way to prevent this compiler from
3368182007Sroberto	# explicitly linking system object files so we need to strip them
3369182007Sroberto	# from the output so that they don't get included in the library
3370182007Sroberto	# dependencies.
3371182007Sroberto	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'
3372182007Sroberto	;;
3373182007Sroberto      *)
3374182007Sroberto	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3375182007Sroberto	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3376182007Sroberto	  _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'
3377182007Sroberto
3378182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3379182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3380182007Sroberto
3381182007Sroberto	  # Commands to make compiler produce verbose output that lists
3382182007Sroberto	  # what "hidden" libraries, object files and flags are used when
3383182007Sroberto	  # linking a shared library.
3384182007Sroberto	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3385182007Sroberto
3386182007Sroberto	else
3387182007Sroberto	  # FIXME: insert proper C++ library support
3388182007Sroberto	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3389182007Sroberto	fi
3390182007Sroberto	;;
3391182007Sroberto    esac
3392182007Sroberto    ;;
3393182007Sroberto  osf4* | osf5*)
3394182007Sroberto    case $cc_basename in
3395182007Sroberto      KCC*)
3396182007Sroberto	# Kuck and Associates, Inc. (KAI) C++ Compiler
3397182007Sroberto
3398182007Sroberto	# KCC will only create a shared library if the output file
3399182007Sroberto	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3400182007Sroberto	# to its proper name (with version) after linking.
3401182007Sroberto	_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'
3402182007Sroberto
3403182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3404182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3405182007Sroberto
3406182007Sroberto	# Archives containing C++ object files must be created using
3407182007Sroberto	# the KAI C++ compiler.
3408182007Sroberto	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3409182007Sroberto	;;
3410182007Sroberto      RCC*)
3411182007Sroberto	# Rational C++ 2.4.1
3412182007Sroberto	# FIXME: insert proper C++ library support
3413182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3414182007Sroberto	;;
3415182007Sroberto      cxx*)
3416182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3417182007Sroberto	_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'
3418182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3419182007Sroberto	  echo "-hidden">> $lib.exp~
3420182007Sroberto	  $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~
3421182007Sroberto	  $rm $lib.exp'
3422182007Sroberto
3423182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3424182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3425182007Sroberto
3426182007Sroberto	# Commands to make compiler produce verbose output that lists
3427182007Sroberto	# what "hidden" libraries, object files and flags are used when
3428182007Sroberto	# linking a shared library.
3429182007Sroberto	#
3430182007Sroberto	# There doesn't appear to be a way to prevent this compiler from
3431182007Sroberto	# explicitly linking system object files so we need to strip them
3432182007Sroberto	# from the output so that they don't get included in the library
3433182007Sroberto	# dependencies.
3434182007Sroberto	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'
3435182007Sroberto	;;
3436182007Sroberto      *)
3437182007Sroberto	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3438182007Sroberto	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3439182007Sroberto	 _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'
3440182007Sroberto
3441182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3442182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3443182007Sroberto
3444182007Sroberto	  # Commands to make compiler produce verbose output that lists
3445182007Sroberto	  # what "hidden" libraries, object files and flags are used when
3446182007Sroberto	  # linking a shared library.
3447182007Sroberto	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3448182007Sroberto
3449182007Sroberto	else
3450182007Sroberto	  # FIXME: insert proper C++ library support
3451182007Sroberto	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3452182007Sroberto	fi
3453182007Sroberto	;;
3454182007Sroberto    esac
3455182007Sroberto    ;;
3456182007Sroberto  psos*)
3457182007Sroberto    # FIXME: insert proper C++ library support
3458182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3459182007Sroberto    ;;
3460182007Sroberto  sco*)
3461182007Sroberto    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3462182007Sroberto    case $cc_basename in
3463182007Sroberto      CC*)
3464182007Sroberto	# FIXME: insert proper C++ library support
3465182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3466182007Sroberto	;;
3467182007Sroberto      *)
3468182007Sroberto	# FIXME: insert proper C++ library support
3469182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3470182007Sroberto	;;
3471182007Sroberto    esac
3472182007Sroberto    ;;
3473182007Sroberto  sunos4*)
3474182007Sroberto    case $cc_basename in
3475182007Sroberto      CC*)
3476182007Sroberto	# Sun C++ 4.x
3477182007Sroberto	# FIXME: insert proper C++ library support
3478182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3479182007Sroberto	;;
3480182007Sroberto      lcc*)
3481182007Sroberto	# Lucid
3482182007Sroberto	# FIXME: insert proper C++ library support
3483182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3484182007Sroberto	;;
3485182007Sroberto      *)
3486182007Sroberto	# FIXME: insert proper C++ library support
3487182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3488182007Sroberto	;;
3489182007Sroberto    esac
3490182007Sroberto    ;;
3491182007Sroberto  solaris*)
3492182007Sroberto    case $cc_basename in
3493182007Sroberto      CC*)
3494182007Sroberto	# Sun C++ 4.2, 5.x and Centerline C++
3495182007Sroberto        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3496182007Sroberto	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3497182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3498182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3499182007Sroberto	$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'
3500182007Sroberto
3501182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3502182007Sroberto	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3503182007Sroberto	case $host_os in
3504182007Sroberto	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3505182007Sroberto	  *)
3506182007Sroberto	    # The C++ compiler is used as linker so we must use $wl
3507182007Sroberto	    # flag to pass the commands to the underlying system
3508182007Sroberto	    # linker. We must also pass each convience library through
3509182007Sroberto	    # to the system linker between allextract/defaultextract.
3510182007Sroberto	    # The C++ compiler will combine linker options so we
3511182007Sroberto	    # cannot just pass the convience library names through
3512182007Sroberto	    # without $wl.
3513182007Sroberto	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3514182007Sroberto	    _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'
3515182007Sroberto	    ;;
3516182007Sroberto	esac
3517182007Sroberto	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3518182007Sroberto
3519182007Sroberto	output_verbose_link_cmd='echo'
3520182007Sroberto
3521182007Sroberto	# Archives containing C++ object files must be created using
3522182007Sroberto	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3523182007Sroberto	# necessary to make sure instantiated templates are included
3524182007Sroberto	# in the archive.
3525182007Sroberto	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3526182007Sroberto	;;
3527182007Sroberto      gcx*)
3528182007Sroberto	# Green Hills C++ Compiler
3529182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3530182007Sroberto
3531182007Sroberto	# The C++ compiler must be used to create the archive.
3532182007Sroberto	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3533182007Sroberto	;;
3534182007Sroberto      *)
3535182007Sroberto	# GNU C++ compiler with Solaris linker
3536182007Sroberto	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3537182007Sroberto	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3538182007Sroberto	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3539182007Sroberto	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3540182007Sroberto	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3541182007Sroberto		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3542182007Sroberto
3543182007Sroberto	    # Commands to make compiler produce verbose output that lists
3544182007Sroberto	    # what "hidden" libraries, object files and flags are used when
3545182007Sroberto	    # linking a shared library.
3546182007Sroberto	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3547182007Sroberto	  else
3548182007Sroberto	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3549182007Sroberto	    # platform.
3550182007Sroberto	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3551182007Sroberto	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3552182007Sroberto		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3553182007Sroberto
3554182007Sroberto	    # Commands to make compiler produce verbose output that lists
3555182007Sroberto	    # what "hidden" libraries, object files and flags are used when
3556182007Sroberto	    # linking a shared library.
3557182007Sroberto	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3558182007Sroberto	  fi
3559182007Sroberto
3560182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3561182007Sroberto	fi
3562182007Sroberto	;;
3563182007Sroberto    esac
3564182007Sroberto    ;;
3565182007Sroberto  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3566182007Sroberto    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3567182007Sroberto    ;;
3568182007Sroberto  tandem*)
3569182007Sroberto    case $cc_basename in
3570182007Sroberto      NCC*)
3571182007Sroberto	# NonStop-UX NCC 3.20
3572182007Sroberto	# FIXME: insert proper C++ library support
3573182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3574182007Sroberto	;;
3575182007Sroberto      *)
3576182007Sroberto	# FIXME: insert proper C++ library support
3577182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3578182007Sroberto	;;
3579182007Sroberto    esac
3580182007Sroberto    ;;
3581182007Sroberto  vxworks*)
3582182007Sroberto    # FIXME: insert proper C++ library support
3583182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3584182007Sroberto    ;;
3585182007Sroberto  *)
3586182007Sroberto    # FIXME: insert proper C++ library support
3587182007Sroberto    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3588182007Sroberto    ;;
3589182007Srobertoesac
3590182007SrobertoAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3591182007Srobertotest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3592182007Sroberto
3593182007Sroberto_LT_AC_TAGVAR(GCC, $1)="$GXX"
3594182007Sroberto_LT_AC_TAGVAR(LD, $1)="$LD"
3595182007Sroberto
3596182007SrobertoAC_LIBTOOL_POSTDEP_PREDEP($1)
3597182007SrobertoAC_LIBTOOL_PROG_COMPILER_PIC($1)
3598182007SrobertoAC_LIBTOOL_PROG_CC_C_O($1)
3599182007SrobertoAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3600182007SrobertoAC_LIBTOOL_PROG_LD_SHLIBS($1)
3601182007SrobertoAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3602182007SrobertoAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3603182007SrobertoAC_LIBTOOL_SYS_LIB_STRIP
3604182007SrobertoAC_LIBTOOL_DLOPEN_SELF($1)
3605182007Sroberto
3606182007SrobertoAC_LIBTOOL_CONFIG($1)
3607182007Sroberto
3608182007SrobertoAC_LANG_POP
3609182007SrobertoCC=$lt_save_CC
3610182007SrobertoLDCXX=$LD
3611182007SrobertoLD=$lt_save_LD
3612182007SrobertoGCC=$lt_save_GCC
3613182007Srobertowith_gnu_ldcxx=$with_gnu_ld
3614182007Srobertowith_gnu_ld=$lt_save_with_gnu_ld
3615182007Srobertolt_cv_path_LDCXX=$lt_cv_path_LD
3616182007Srobertolt_cv_path_LD=$lt_save_path_LD
3617182007Srobertolt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3618182007Srobertolt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3619182007Sroberto])# AC_LIBTOOL_LANG_CXX_CONFIG
3620182007Sroberto
3621182007Sroberto# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3622182007Sroberto# ------------------------
3623182007Sroberto# Figure out "hidden" library dependencies from verbose
3624182007Sroberto# compiler output when linking a shared library.
3625182007Sroberto# Parse the compiler output and extract the necessary
3626182007Sroberto# objects, libraries and library flags.
3627182007SrobertoAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3628182007Srobertodnl we can't use the lt_simple_compile_test_code here,
3629182007Srobertodnl because it contains code intended for an executable,
3630182007Srobertodnl not a library.  It's possible we should let each
3631182007Srobertodnl tag define a new lt_????_link_test_code variable,
3632182007Srobertodnl but it's only used here...
3633182007Srobertoifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3634182007Srobertoint a;
3635182007Srobertovoid foo (void) { a = 0; }
3636182007SrobertoEOF
3637182007Sroberto],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3638182007Srobertoclass Foo
3639182007Sroberto{
3640182007Srobertopublic:
3641182007Sroberto  Foo (void) { a = 0; }
3642182007Srobertoprivate:
3643182007Sroberto  int a;
3644182007Sroberto};
3645182007SrobertoEOF
3646182007Sroberto],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3647182007Sroberto      subroutine foo
3648182007Sroberto      implicit none
3649182007Sroberto      integer*4 a
3650182007Sroberto      a=0
3651182007Sroberto      return
3652182007Sroberto      end
3653182007SrobertoEOF
3654182007Sroberto],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3655182007Srobertopublic class foo {
3656182007Sroberto  private int a;
3657182007Sroberto  public void bar (void) {
3658182007Sroberto    a = 0;
3659182007Sroberto  }
3660182007Sroberto};
3661182007SrobertoEOF
3662132451Sroberto])
3663182007Srobertodnl Parse the compiler output and extract the necessary
3664182007Srobertodnl objects, libraries and library flags.
3665182007Srobertoif AC_TRY_EVAL(ac_compile); then
3666182007Sroberto  # Parse the compiler output and extract the necessary
3667182007Sroberto  # objects, libraries and library flags.
3668132451Sroberto
3669182007Sroberto  # Sentinel used to keep track of whether or not we are before
3670182007Sroberto  # the conftest object file.
3671182007Sroberto  pre_test_object_deps_done=no
3672132451Sroberto
3673182007Sroberto  # The `*' in the case matches for architectures that use `case' in
3674182007Sroberto  # $output_verbose_cmd can trigger glob expansion during the loop
3675182007Sroberto  # eval without this substitution.
3676182007Sroberto  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3677132451Sroberto
3678182007Sroberto  for p in `eval $output_verbose_link_cmd`; do
3679182007Sroberto    case $p in
3680182007Sroberto
3681182007Sroberto    -L* | -R* | -l*)
3682182007Sroberto       # Some compilers place space between "-{L,R}" and the path.
3683182007Sroberto       # Remove the space.
3684182007Sroberto       if test $p = "-L" \
3685182007Sroberto	  || test $p = "-R"; then
3686182007Sroberto	 prev=$p
3687182007Sroberto	 continue
3688182007Sroberto       else
3689182007Sroberto	 prev=
3690182007Sroberto       fi
3691182007Sroberto
3692182007Sroberto       if test "$pre_test_object_deps_done" = no; then
3693182007Sroberto	 case $p in
3694182007Sroberto	 -L* | -R*)
3695182007Sroberto	   # Internal compiler library paths should come after those
3696182007Sroberto	   # provided the user.  The postdeps already come after the
3697182007Sroberto	   # user supplied libs so there is no need to process them.
3698182007Sroberto	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3699182007Sroberto	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3700182007Sroberto	   else
3701182007Sroberto	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3702182007Sroberto	   fi
3703182007Sroberto	   ;;
3704182007Sroberto	 # The "-l" case would never come before the object being
3705182007Sroberto	 # linked, so don't bother handling this case.
3706182007Sroberto	 esac
3707182007Sroberto       else
3708182007Sroberto	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3709182007Sroberto	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3710182007Sroberto	 else
3711182007Sroberto	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3712182007Sroberto	 fi
3713182007Sroberto       fi
3714182007Sroberto       ;;
3715182007Sroberto
3716182007Sroberto    *.$objext)
3717182007Sroberto       # This assumes that the test object file only shows up
3718182007Sroberto       # once in the compiler output.
3719182007Sroberto       if test "$p" = "conftest.$objext"; then
3720182007Sroberto	 pre_test_object_deps_done=yes
3721182007Sroberto	 continue
3722182007Sroberto       fi
3723182007Sroberto
3724182007Sroberto       if test "$pre_test_object_deps_done" = no; then
3725182007Sroberto	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3726182007Sroberto	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3727182007Sroberto	 else
3728182007Sroberto	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3729182007Sroberto	 fi
3730182007Sroberto       else
3731182007Sroberto	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3732182007Sroberto	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3733182007Sroberto	 else
3734182007Sroberto	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3735182007Sroberto	 fi
3736182007Sroberto       fi
3737182007Sroberto       ;;
3738182007Sroberto
3739182007Sroberto    *) ;; # Ignore the rest.
3740182007Sroberto
3741182007Sroberto    esac
3742182007Sroberto  done
3743182007Sroberto
3744182007Sroberto  # Clean up.
3745182007Sroberto  rm -f a.out a.exe
3746182007Srobertoelse
3747182007Sroberto  echo "libtool.m4: error: problem compiling $1 test program"
3748182007Srobertofi
3749182007Sroberto
3750182007Sroberto$rm -f confest.$objext
3751182007Sroberto
3752182007Sroberto# PORTME: override above test on systems where it is broken
3753182007Srobertoifelse([$1],[CXX],
3754182007Sroberto[case $host_os in
3755182007Srobertosolaris*)
3756182007Sroberto  case $cc_basename in
3757182007Sroberto  CC*)
3758182007Sroberto    # Adding this requires a known-good setup of shared libraries for
3759182007Sroberto    # Sun compiler versions before 5.6, else PIC objects from an old
3760182007Sroberto    # archive will be linked into the output, leading to subtle bugs.
3761182007Sroberto    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3762182007Sroberto    ;;
3763182007Sroberto  esac
3764182007Srobertoesac
3765182007Sroberto])
3766182007Sroberto
3767182007Srobertocase " $_LT_AC_TAGVAR(postdeps, $1) " in
3768182007Sroberto*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3769182007Srobertoesac
3770182007Sroberto])# AC_LIBTOOL_POSTDEP_PREDEP
3771182007Sroberto
3772182007Sroberto# AC_LIBTOOL_LANG_F77_CONFIG
3773182007Sroberto# ------------------------
3774182007Sroberto# Ensure that the configuration vars for the C compiler are
3775182007Sroberto# suitably defined.  Those variables are subsequently used by
3776182007Sroberto# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3777182007SrobertoAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3778182007SrobertoAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3779182007Sroberto[AC_REQUIRE([AC_PROG_F77])
3780182007SrobertoAC_LANG_PUSH(Fortran 77)
3781182007Sroberto
3782182007Sroberto_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3783182007Sroberto_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3784182007Sroberto_LT_AC_TAGVAR(always_export_symbols, $1)=no
3785182007Sroberto_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3786182007Sroberto_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3787182007Sroberto_LT_AC_TAGVAR(hardcode_direct, $1)=no
3788182007Sroberto_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3789182007Sroberto_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3790182007Sroberto_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3791182007Sroberto_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3792182007Sroberto_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3793182007Sroberto_LT_AC_TAGVAR(module_cmds, $1)=
3794182007Sroberto_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3795182007Sroberto_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3796182007Sroberto_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3797182007Sroberto_LT_AC_TAGVAR(no_undefined_flag, $1)=
3798182007Sroberto_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3799182007Sroberto_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3800182007Sroberto
3801182007Sroberto# Source file extension for f77 test sources.
3802182007Srobertoac_ext=f
3803182007Sroberto
3804182007Sroberto# Object file extension for compiled f77 test sources.
3805182007Srobertoobjext=o
3806182007Sroberto_LT_AC_TAGVAR(objext, $1)=$objext
3807182007Sroberto
3808182007Sroberto# Code to be used in simple compile tests
3809182007Srobertolt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3810182007Sroberto
3811182007Sroberto# Code to be used in simple link tests
3812182007Srobertolt_simple_link_test_code="      program t\n      end\n"
3813182007Sroberto
3814182007Sroberto# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3815182007Sroberto_LT_AC_SYS_COMPILER
3816182007Sroberto
3817182007Sroberto# save warnings/boilerplate of simple test code
3818182007Sroberto_LT_COMPILER_BOILERPLATE
3819182007Sroberto_LT_LINKER_BOILERPLATE
3820182007Sroberto
3821182007Sroberto# Allow CC to be a program name with arguments.
3822182007Srobertolt_save_CC="$CC"
3823182007SrobertoCC=${F77-"f77"}
3824182007Srobertocompiler=$CC
3825182007Sroberto_LT_AC_TAGVAR(compiler, $1)=$CC
3826182007Sroberto_LT_CC_BASENAME([$compiler])
3827182007Sroberto
3828182007SrobertoAC_MSG_CHECKING([if libtool supports shared libraries])
3829182007SrobertoAC_MSG_RESULT([$can_build_shared])
3830182007Sroberto
3831182007SrobertoAC_MSG_CHECKING([whether to build shared libraries])
3832182007Srobertotest "$can_build_shared" = "no" && enable_shared=no
3833182007Sroberto
3834182007Sroberto# On AIX, shared libraries and static libraries use the same namespace, and
3835182007Sroberto# are all built from PIC.
3836182007Srobertocase $host_os in
3837182007Srobertoaix3*)
3838182007Sroberto  test "$enable_shared" = yes && enable_static=no
3839182007Sroberto  if test -n "$RANLIB"; then
3840182007Sroberto    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3841182007Sroberto    postinstall_cmds='$RANLIB $lib'
3842182007Sroberto  fi
3843182007Sroberto  ;;
3844182007Srobertoaix4* | aix5*)
3845182007Sroberto  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3846182007Sroberto    test "$enable_shared" = yes && enable_static=no
3847182007Sroberto  fi
3848182007Sroberto  ;;
3849182007Srobertoesac
3850182007SrobertoAC_MSG_RESULT([$enable_shared])
3851182007Sroberto
3852182007SrobertoAC_MSG_CHECKING([whether to build static libraries])
3853182007Sroberto# Make sure either enable_shared or enable_static is yes.
3854182007Srobertotest "$enable_shared" = yes || enable_static=yes
3855182007SrobertoAC_MSG_RESULT([$enable_static])
3856182007Sroberto
3857182007Srobertotest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3858182007Sroberto
3859182007Sroberto_LT_AC_TAGVAR(GCC, $1)="$G77"
3860182007Sroberto_LT_AC_TAGVAR(LD, $1)="$LD"
3861182007Sroberto
3862182007SrobertoAC_LIBTOOL_PROG_COMPILER_PIC($1)
3863182007SrobertoAC_LIBTOOL_PROG_CC_C_O($1)
3864182007SrobertoAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3865182007SrobertoAC_LIBTOOL_PROG_LD_SHLIBS($1)
3866182007SrobertoAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3867182007SrobertoAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3868182007SrobertoAC_LIBTOOL_SYS_LIB_STRIP
3869182007Sroberto
3870182007Sroberto
3871182007SrobertoAC_LIBTOOL_CONFIG($1)
3872182007Sroberto
3873182007SrobertoAC_LANG_POP
3874182007SrobertoCC="$lt_save_CC"
3875182007Sroberto])# AC_LIBTOOL_LANG_F77_CONFIG
3876182007Sroberto
3877182007Sroberto
3878182007Sroberto# AC_LIBTOOL_LANG_GCJ_CONFIG
3879182007Sroberto# --------------------------
3880182007Sroberto# Ensure that the configuration vars for the C compiler are
3881182007Sroberto# suitably defined.  Those variables are subsequently used by
3882182007Sroberto# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3883182007SrobertoAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3884182007SrobertoAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3885182007Sroberto[AC_LANG_SAVE
3886182007Sroberto
3887182007Sroberto# Source file extension for Java test sources.
3888182007Srobertoac_ext=java
3889182007Sroberto
3890182007Sroberto# Object file extension for compiled Java test sources.
3891182007Srobertoobjext=o
3892182007Sroberto_LT_AC_TAGVAR(objext, $1)=$objext
3893182007Sroberto
3894182007Sroberto# Code to be used in simple compile tests
3895182007Srobertolt_simple_compile_test_code="class foo {}\n"
3896182007Sroberto
3897182007Sroberto# Code to be used in simple link tests
3898182007Srobertolt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
3899182007Sroberto
3900182007Sroberto# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3901182007Sroberto_LT_AC_SYS_COMPILER
3902182007Sroberto
3903182007Sroberto# save warnings/boilerplate of simple test code
3904182007Sroberto_LT_COMPILER_BOILERPLATE
3905182007Sroberto_LT_LINKER_BOILERPLATE
3906182007Sroberto
3907182007Sroberto# Allow CC to be a program name with arguments.
3908182007Srobertolt_save_CC="$CC"
3909182007SrobertoCC=${GCJ-"gcj"}
3910182007Srobertocompiler=$CC
3911182007Sroberto_LT_AC_TAGVAR(compiler, $1)=$CC
3912182007Sroberto_LT_CC_BASENAME([$compiler])
3913182007Sroberto
3914182007Sroberto# GCJ did not exist at the time GCC didn't implicitly link libc in.
3915182007Sroberto_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3916182007Sroberto
3917182007Sroberto_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3918182007Sroberto
3919182007SrobertoAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3920182007SrobertoAC_LIBTOOL_PROG_COMPILER_PIC($1)
3921182007SrobertoAC_LIBTOOL_PROG_CC_C_O($1)
3922182007SrobertoAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3923182007SrobertoAC_LIBTOOL_PROG_LD_SHLIBS($1)
3924182007SrobertoAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3925182007SrobertoAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3926182007SrobertoAC_LIBTOOL_SYS_LIB_STRIP
3927182007SrobertoAC_LIBTOOL_DLOPEN_SELF($1)
3928182007Sroberto
3929182007SrobertoAC_LIBTOOL_CONFIG($1)
3930182007Sroberto
3931182007SrobertoAC_LANG_RESTORE
3932182007SrobertoCC="$lt_save_CC"
3933182007Sroberto])# AC_LIBTOOL_LANG_GCJ_CONFIG
3934182007Sroberto
3935182007Sroberto
3936182007Sroberto# AC_LIBTOOL_LANG_RC_CONFIG
3937182007Sroberto# --------------------------
3938182007Sroberto# Ensure that the configuration vars for the Windows resource compiler are
3939182007Sroberto# suitably defined.  Those variables are subsequently used by
3940182007Sroberto# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3941182007SrobertoAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3942182007SrobertoAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3943182007Sroberto[AC_LANG_SAVE
3944182007Sroberto
3945182007Sroberto# Source file extension for RC test sources.
3946182007Srobertoac_ext=rc
3947182007Sroberto
3948182007Sroberto# Object file extension for compiled RC test sources.
3949182007Srobertoobjext=o
3950182007Sroberto_LT_AC_TAGVAR(objext, $1)=$objext
3951182007Sroberto
3952182007Sroberto# Code to be used in simple compile tests
3953182007Srobertolt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3954182007Sroberto
3955182007Sroberto# Code to be used in simple link tests
3956182007Srobertolt_simple_link_test_code="$lt_simple_compile_test_code"
3957182007Sroberto
3958182007Sroberto# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3959182007Sroberto_LT_AC_SYS_COMPILER
3960182007Sroberto
3961182007Sroberto# save warnings/boilerplate of simple test code
3962182007Sroberto_LT_COMPILER_BOILERPLATE
3963182007Sroberto_LT_LINKER_BOILERPLATE
3964182007Sroberto
3965182007Sroberto# Allow CC to be a program name with arguments.
3966182007Srobertolt_save_CC="$CC"
3967182007SrobertoCC=${RC-"windres"}
3968182007Srobertocompiler=$CC
3969182007Sroberto_LT_AC_TAGVAR(compiler, $1)=$CC
3970182007Sroberto_LT_CC_BASENAME([$compiler])
3971182007Sroberto_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3972182007Sroberto
3973182007SrobertoAC_LIBTOOL_CONFIG($1)
3974182007Sroberto
3975182007SrobertoAC_LANG_RESTORE
3976182007SrobertoCC="$lt_save_CC"
3977182007Sroberto])# AC_LIBTOOL_LANG_RC_CONFIG
3978182007Sroberto
3979182007Sroberto
3980182007Sroberto# AC_LIBTOOL_CONFIG([TAGNAME])
3981182007Sroberto# ----------------------------
3982182007Sroberto# If TAGNAME is not passed, then create an initial libtool script
3983182007Sroberto# with a default configuration from the untagged config vars.  Otherwise
3984182007Sroberto# add code to config.status for appending the configuration named by
3985182007Sroberto# TAGNAME from the matching tagged config vars.
3986182007SrobertoAC_DEFUN([AC_LIBTOOL_CONFIG],
3987182007Sroberto[# The else clause should only fire when bootstrapping the
3988182007Sroberto# libtool distribution, otherwise you forgot to ship ltmain.sh
3989182007Sroberto# with your package, and you will get complaints that there are
3990182007Sroberto# no rules to generate ltmain.sh.
3991182007Srobertoif test -f "$ltmain"; then
3992182007Sroberto  # See if we are running on zsh, and set the options which allow our commands through
3993182007Sroberto  # without removal of \ escapes.
3994182007Sroberto  if test -n "${ZSH_VERSION+set}" ; then
3995182007Sroberto    setopt NO_GLOB_SUBST
3996182007Sroberto  fi
3997182007Sroberto  # Now quote all the things that may contain metacharacters while being
3998182007Sroberto  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3999182007Sroberto  # variables and quote the copies for generation of the libtool script.
4000182007Sroberto  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4001182007Sroberto    SED SHELL STRIP \
4002182007Sroberto    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4003182007Sroberto    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4004182007Sroberto    deplibs_check_method reload_flag reload_cmds need_locks \
4005182007Sroberto    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4006182007Sroberto    lt_cv_sys_global_symbol_to_c_name_address \
4007182007Sroberto    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4008182007Sroberto    old_postinstall_cmds old_postuninstall_cmds \
4009182007Sroberto    _LT_AC_TAGVAR(compiler, $1) \
4010182007Sroberto    _LT_AC_TAGVAR(CC, $1) \
4011182007Sroberto    _LT_AC_TAGVAR(LD, $1) \
4012182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4013182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4014182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4015182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4016182007Sroberto    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4017182007Sroberto    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4018182007Sroberto    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4019182007Sroberto    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4020182007Sroberto    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4021182007Sroberto    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4022182007Sroberto    _LT_AC_TAGVAR(predep_objects, $1) \
4023182007Sroberto    _LT_AC_TAGVAR(postdep_objects, $1) \
4024182007Sroberto    _LT_AC_TAGVAR(predeps, $1) \
4025182007Sroberto    _LT_AC_TAGVAR(postdeps, $1) \
4026182007Sroberto    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4027182007Sroberto    _LT_AC_TAGVAR(archive_cmds, $1) \
4028182007Sroberto    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4029182007Sroberto    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4030182007Sroberto    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4031182007Sroberto    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4032182007Sroberto    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4033182007Sroberto    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4034182007Sroberto    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4035182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4036182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4037182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4038182007Sroberto    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4039182007Sroberto    _LT_AC_TAGVAR(module_cmds, $1) \
4040182007Sroberto    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4041182007Sroberto    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4042182007Sroberto    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4043182007Sroberto    _LT_AC_TAGVAR(include_expsyms, $1); do
4044182007Sroberto
4045182007Sroberto    case $var in
4046182007Sroberto    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4047182007Sroberto    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4048182007Sroberto    _LT_AC_TAGVAR(archive_cmds, $1) | \
4049182007Sroberto    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4050182007Sroberto    _LT_AC_TAGVAR(module_cmds, $1) | \
4051182007Sroberto    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4052182007Sroberto    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4053182007Sroberto    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4054182007Sroberto    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4055182007Sroberto    postinstall_cmds | postuninstall_cmds | \
4056182007Sroberto    old_postinstall_cmds | old_postuninstall_cmds | \
4057182007Sroberto    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4058182007Sroberto      # Double-quote double-evaled strings.
4059182007Sroberto      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4060182007Sroberto      ;;
4061182007Sroberto    *)
4062182007Sroberto      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4063182007Sroberto      ;;
4064182007Sroberto    esac
4065182007Sroberto  done
4066182007Sroberto
4067182007Sroberto  case $lt_echo in
4068182007Sroberto  *'\[$]0 --fallback-echo"')
4069182007Sroberto    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4070182007Sroberto    ;;
4071182007Sroberto  esac
4072182007Sroberto
4073182007Srobertoifelse([$1], [],
4074182007Sroberto  [cfgfile="${ofile}T"
4075182007Sroberto  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4076182007Sroberto  $rm -f "$cfgfile"
4077182007Sroberto  AC_MSG_NOTICE([creating $ofile])],
4078182007Sroberto  [cfgfile="$ofile"])
4079182007Sroberto
4080182007Sroberto  cat <<__EOF__ >> "$cfgfile"
4081182007Srobertoifelse([$1], [],
4082182007Sroberto[#! $SHELL
4083182007Sroberto
4084182007Sroberto# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4085182007Sroberto# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4086182007Sroberto# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4087182007Sroberto#
4088182007Sroberto# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4089182007Sroberto# Free Software Foundation, Inc.
4090182007Sroberto#
4091182007Sroberto# This file is part of GNU Libtool:
4092182007Sroberto# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4093182007Sroberto#
4094132451Sroberto# This program is free software; you can redistribute it and/or modify
4095132451Sroberto# it under the terms of the GNU General Public License as published by
4096182007Sroberto# the Free Software Foundation; either version 2 of the License, or
4097182007Sroberto# (at your option) any later version.
4098182007Sroberto#
4099182007Sroberto# This program is distributed in the hope that it will be useful, but
4100182007Sroberto# WITHOUT ANY WARRANTY; without even the implied warranty of
4101182007Sroberto# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4102182007Sroberto# General Public License for more details.
4103182007Sroberto#
4104132451Sroberto# You should have received a copy of the GNU General Public License
4105132451Sroberto# along with this program; if not, write to the Free Software
4106182007Sroberto# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4107182007Sroberto#
4108182007Sroberto# As a special exception to the GNU General Public License, if you
4109182007Sroberto# distribute this file as part of a program that contains a
4110182007Sroberto# configuration script generated by Autoconf, you may include it under
4111182007Sroberto# the same distribution terms that you use for the rest of that program.
4112132451Sroberto
4113182007Sroberto# A sed program that does not truncate output.
4114182007SrobertoSED=$lt_SED
4115182007Sroberto
4116182007Sroberto# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4117182007SrobertoXsed="$SED -e 1s/^X//"
4118182007Sroberto
4119182007Sroberto# The HP-UX ksh and POSIX shell print the target directory to stdout
4120182007Sroberto# if CDPATH is set.
4121182007Sroberto(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4122182007Sroberto
4123182007Sroberto# The names of the tagged configurations supported by this script.
4124182007Srobertoavailable_tags=
4125182007Sroberto
4126182007Sroberto# ### BEGIN LIBTOOL CONFIG],
4127182007Sroberto[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4128182007Sroberto
4129182007Sroberto# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4130182007Sroberto
4131182007Sroberto# Shell to use when invoking shell scripts.
4132182007SrobertoSHELL=$lt_SHELL
4133182007Sroberto
4134182007Sroberto# Whether or not to build shared libraries.
4135182007Srobertobuild_libtool_libs=$enable_shared
4136182007Sroberto
4137182007Sroberto# Whether or not to build static libraries.
4138182007Srobertobuild_old_libs=$enable_static
4139182007Sroberto
4140182007Sroberto# Whether or not to add -lc for building shared libraries.
4141182007Srobertobuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4142182007Sroberto
4143182007Sroberto# Whether or not to disallow shared libs when runtime libs are static
4144182007Srobertoallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4145182007Sroberto
4146182007Sroberto# Whether or not to optimize for fast installation.
4147182007Srobertofast_install=$enable_fast_install
4148182007Sroberto
4149182007Sroberto# The host system.
4150182007Srobertohost_alias=$host_alias
4151182007Srobertohost=$host
4152182007Srobertohost_os=$host_os
4153182007Sroberto
4154182007Sroberto# The build system.
4155182007Srobertobuild_alias=$build_alias
4156182007Srobertobuild=$build
4157182007Srobertobuild_os=$build_os
4158182007Sroberto
4159182007Sroberto# An echo program that does not interpret backslashes.
4160182007Srobertoecho=$lt_echo
4161182007Sroberto
4162182007Sroberto# The archiver.
4163182007SrobertoAR=$lt_AR
4164182007SrobertoAR_FLAGS=$lt_AR_FLAGS
4165182007Sroberto
4166182007Sroberto# A C compiler.
4167182007SrobertoLTCC=$lt_LTCC
4168182007Sroberto
4169182007Sroberto# A language-specific compiler.
4170182007SrobertoCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4171182007Sroberto
4172182007Sroberto# Is the compiler the GNU C compiler?
4173182007Srobertowith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4174182007Sroberto
4175182007Sroberto# An ERE matcher.
4176182007SrobertoEGREP=$lt_EGREP
4177182007Sroberto
4178182007Sroberto# The linker used to build libraries.
4179182007SrobertoLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4180182007Sroberto
4181182007Sroberto# Whether we need hard or soft links.
4182182007SrobertoLN_S=$lt_LN_S
4183182007Sroberto
4184182007Sroberto# A BSD-compatible nm program.
4185182007SrobertoNM=$lt_NM
4186182007Sroberto
4187182007Sroberto# A symbol stripping program
4188182007SrobertoSTRIP=$lt_STRIP
4189182007Sroberto
4190182007Sroberto# Used to examine libraries when file_magic_cmd begins "file"
4191182007SrobertoMAGIC_CMD=$MAGIC_CMD
4192182007Sroberto
4193182007Sroberto# Used on cygwin: DLL creation program.
4194182007SrobertoDLLTOOL="$DLLTOOL"
4195182007Sroberto
4196182007Sroberto# Used on cygwin: object dumper.
4197182007SrobertoOBJDUMP="$OBJDUMP"
4198182007Sroberto
4199182007Sroberto# Used on cygwin: assembler.
4200182007SrobertoAS="$AS"
4201182007Sroberto
4202182007Sroberto# The name of the directory that contains temporary libtool files.
4203182007Srobertoobjdir=$objdir
4204182007Sroberto
4205182007Sroberto# How to create reloadable object files.
4206182007Srobertoreload_flag=$lt_reload_flag
4207182007Srobertoreload_cmds=$lt_reload_cmds
4208182007Sroberto
4209182007Sroberto# How to pass a linker flag through the compiler.
4210182007Srobertowl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4211182007Sroberto
4212182007Sroberto# Object file suffix (normally "o").
4213182007Srobertoobjext="$ac_objext"
4214182007Sroberto
4215182007Sroberto# Old archive suffix (normally "a").
4216182007Srobertolibext="$libext"
4217182007Sroberto
4218182007Sroberto# Shared library suffix (normally ".so").
4219182007Srobertoshrext_cmds='$shrext_cmds'
4220182007Sroberto
4221182007Sroberto# Executable file suffix (normally "").
4222182007Srobertoexeext="$exeext"
4223182007Sroberto
4224182007Sroberto# Additional compiler flags for building library objects.
4225182007Srobertopic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4226182007Srobertopic_mode=$pic_mode
4227182007Sroberto
4228182007Sroberto# What is the maximum length of a command?
4229182007Srobertomax_cmd_len=$lt_cv_sys_max_cmd_len
4230182007Sroberto
4231182007Sroberto# Does compiler simultaneously support -c and -o options?
4232182007Srobertocompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4233182007Sroberto
4234182007Sroberto# Must we lock files when doing compilation?
4235182007Srobertoneed_locks=$lt_need_locks
4236182007Sroberto
4237182007Sroberto# Do we need the lib prefix for modules?
4238182007Srobertoneed_lib_prefix=$need_lib_prefix
4239182007Sroberto
4240182007Sroberto# Do we need a version for libraries?
4241182007Srobertoneed_version=$need_version
4242182007Sroberto
4243182007Sroberto# Whether dlopen is supported.
4244182007Srobertodlopen_support=$enable_dlopen
4245182007Sroberto
4246182007Sroberto# Whether dlopen of programs is supported.
4247182007Srobertodlopen_self=$enable_dlopen_self
4248182007Sroberto
4249182007Sroberto# Whether dlopen of statically linked programs is supported.
4250182007Srobertodlopen_self_static=$enable_dlopen_self_static
4251182007Sroberto
4252182007Sroberto# Compiler flag to prevent dynamic linking.
4253182007Srobertolink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4254182007Sroberto
4255182007Sroberto# Compiler flag to turn off builtin functions.
4256182007Srobertono_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4257182007Sroberto
4258182007Sroberto# Compiler flag to allow reflexive dlopens.
4259182007Srobertoexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4260182007Sroberto
4261182007Sroberto# Compiler flag to generate shared objects directly from archives.
4262182007Srobertowhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4263182007Sroberto
4264182007Sroberto# Compiler flag to generate thread-safe objects.
4265182007Srobertothread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4266182007Sroberto
4267182007Sroberto# Library versioning type.
4268182007Srobertoversion_type=$version_type
4269182007Sroberto
4270182007Sroberto# Format of library name prefix.
4271182007Srobertolibname_spec=$lt_libname_spec
4272182007Sroberto
4273182007Sroberto# List of archive names.  First name is the real one, the rest are links.
4274182007Sroberto# The last name is the one that the linker finds with -lNAME.
4275182007Srobertolibrary_names_spec=$lt_library_names_spec
4276182007Sroberto
4277182007Sroberto# The coded name of the library, if different from the real name.
4278182007Srobertosoname_spec=$lt_soname_spec
4279182007Sroberto
4280182007Sroberto# Commands used to build and install an old-style archive.
4281182007SrobertoRANLIB=$lt_RANLIB
4282182007Srobertoold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4283182007Srobertoold_postinstall_cmds=$lt_old_postinstall_cmds
4284182007Srobertoold_postuninstall_cmds=$lt_old_postuninstall_cmds
4285182007Sroberto
4286182007Sroberto# Create an old-style archive from a shared archive.
4287182007Srobertoold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4288182007Sroberto
4289182007Sroberto# Create a temporary old-style archive to link instead of a shared archive.
4290182007Srobertoold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4291182007Sroberto
4292182007Sroberto# Commands used to build and install a shared archive.
4293182007Srobertoarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4294182007Srobertoarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4295182007Srobertopostinstall_cmds=$lt_postinstall_cmds
4296182007Srobertopostuninstall_cmds=$lt_postuninstall_cmds
4297182007Sroberto
4298182007Sroberto# Commands used to build a loadable module (assumed same as above if empty)
4299182007Srobertomodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4300182007Srobertomodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4301182007Sroberto
4302182007Sroberto# Commands to strip libraries.
4303182007Srobertoold_striplib=$lt_old_striplib
4304182007Srobertostriplib=$lt_striplib
4305182007Sroberto
4306182007Sroberto# Dependencies to place before the objects being linked to create a
4307182007Sroberto# shared library.
4308182007Srobertopredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4309182007Sroberto
4310182007Sroberto# Dependencies to place after the objects being linked to create a
4311182007Sroberto# shared library.
4312182007Srobertopostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4313182007Sroberto
4314182007Sroberto# Dependencies to place before the objects being linked to create a
4315182007Sroberto# shared library.
4316182007Srobertopredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4317182007Sroberto
4318182007Sroberto# Dependencies to place after the objects being linked to create a
4319182007Sroberto# shared library.
4320182007Srobertopostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4321182007Sroberto
4322182007Sroberto# The library search path used internally by the compiler when linking
4323182007Sroberto# a shared library.
4324182007Srobertocompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4325182007Sroberto
4326182007Sroberto# Method to check whether dependent libraries are shared objects.
4327182007Srobertodeplibs_check_method=$lt_deplibs_check_method
4328182007Sroberto
4329182007Sroberto# Command to use when deplibs_check_method == file_magic.
4330182007Srobertofile_magic_cmd=$lt_file_magic_cmd
4331182007Sroberto
4332182007Sroberto# Flag that allows shared libraries with undefined symbols to be built.
4333182007Srobertoallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4334182007Sroberto
4335182007Sroberto# Flag that forces no undefined symbols.
4336182007Srobertono_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4337182007Sroberto
4338182007Sroberto# Commands used to finish a libtool library installation in a directory.
4339182007Srobertofinish_cmds=$lt_finish_cmds
4340182007Sroberto
4341182007Sroberto# Same as above, but a single script fragment to be evaled but not shown.
4342182007Srobertofinish_eval=$lt_finish_eval
4343182007Sroberto
4344182007Sroberto# Take the output of nm and produce a listing of raw symbols and C names.
4345182007Srobertoglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4346182007Sroberto
4347182007Sroberto# Transform the output of nm in a proper C declaration
4348182007Srobertoglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4349182007Sroberto
4350182007Sroberto# Transform the output of nm in a C name address pair
4351182007Srobertoglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4352182007Sroberto
4353182007Sroberto# This is the shared library runtime path variable.
4354182007Srobertorunpath_var=$runpath_var
4355182007Sroberto
4356182007Sroberto# This is the shared library path variable.
4357182007Srobertoshlibpath_var=$shlibpath_var
4358182007Sroberto
4359182007Sroberto# Is shlibpath searched before the hard-coded library search path?
4360182007Srobertoshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4361182007Sroberto
4362182007Sroberto# How to hardcode a shared library path into an executable.
4363182007Srobertohardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4364182007Sroberto
4365182007Sroberto# Whether we should hardcode library paths into libraries.
4366182007Srobertohardcode_into_libs=$hardcode_into_libs
4367182007Sroberto
4368182007Sroberto# Flag to hardcode \$libdir into a binary during linking.
4369182007Sroberto# This must work even if \$libdir does not exist.
4370182007Srobertohardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4371182007Sroberto
4372182007Sroberto# If ld is used when linking, flag to hardcode \$libdir into
4373182007Sroberto# a binary during linking. This must work even if \$libdir does
4374182007Sroberto# not exist.
4375182007Srobertohardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4376182007Sroberto
4377182007Sroberto# Whether we need a single -rpath flag with a separated argument.
4378182007Srobertohardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4379182007Sroberto
4380182007Sroberto# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4381182007Sroberto# resulting binary.
4382182007Srobertohardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4383182007Sroberto
4384182007Sroberto# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4385182007Sroberto# resulting binary.
4386182007Srobertohardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4387182007Sroberto
4388182007Sroberto# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4389182007Sroberto# the resulting binary.
4390182007Srobertohardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4391182007Sroberto
4392182007Sroberto# Set to yes if building a shared library automatically hardcodes DIR into the library
4393182007Sroberto# and all subsequent libraries and executables linked against it.
4394182007Srobertohardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4395182007Sroberto
4396182007Sroberto# Variables whose values should be saved in libtool wrapper scripts and
4397182007Sroberto# restored at relink time.
4398182007Srobertovariables_saved_for_relink="$variables_saved_for_relink"
4399182007Sroberto
4400182007Sroberto# Whether libtool must link a program against all its dependency libraries.
4401182007Srobertolink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4402182007Sroberto
4403182007Sroberto# Compile-time system search path for libraries
4404182007Srobertosys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4405182007Sroberto
4406182007Sroberto# Run-time system search path for libraries
4407182007Srobertosys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4408182007Sroberto
4409182007Sroberto# Fix the shell variable \$srcfile for the compiler.
4410182007Srobertofix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4411182007Sroberto
4412182007Sroberto# Set to yes if exported symbols are required.
4413182007Srobertoalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4414182007Sroberto
4415182007Sroberto# The commands to list exported symbols.
4416182007Srobertoexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4417182007Sroberto
4418182007Sroberto# The commands to extract the exported symbol list from a shared archive.
4419182007Srobertoextract_expsyms_cmds=$lt_extract_expsyms_cmds
4420182007Sroberto
4421182007Sroberto# Symbols that should not be listed in the preloaded symbols.
4422182007Srobertoexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4423182007Sroberto
4424182007Sroberto# Symbols that must always be exported.
4425182007Srobertoinclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4426182007Sroberto
4427182007Srobertoifelse([$1],[],
4428182007Sroberto[# ### END LIBTOOL CONFIG],
4429182007Sroberto[# ### END LIBTOOL TAG CONFIG: $tagname])
4430182007Sroberto
4431182007Sroberto__EOF__
4432182007Sroberto
4433182007Srobertoifelse([$1],[], [
4434182007Sroberto  case $host_os in
4435182007Sroberto  aix3*)
4436182007Sroberto    cat <<\EOF >> "$cfgfile"
4437182007Sroberto
4438182007Sroberto# AIX sometimes has problems with the GCC collect2 program.  For some
4439182007Sroberto# reason, if we set the COLLECT_NAMES environment variable, the problems
4440182007Sroberto# vanish in a puff of smoke.
4441182007Srobertoif test "X${COLLECT_NAMES+set}" != Xset; then
4442182007Sroberto  COLLECT_NAMES=
4443182007Sroberto  export COLLECT_NAMES
4444182007Srobertofi
4445182007SrobertoEOF
4446182007Sroberto    ;;
4447182007Sroberto  esac
4448182007Sroberto
4449182007Sroberto  # We use sed instead of cat because bash on DJGPP gets confused if
4450182007Sroberto  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4451182007Sroberto  # text mode, it properly converts lines to CR/LF.  This bash problem
4452182007Sroberto  # is reportedly fixed, but why not run on old versions too?
4453182007Sroberto  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4454182007Sroberto
4455182007Sroberto  mv -f "$cfgfile" "$ofile" || \
4456182007Sroberto    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4457182007Sroberto  chmod +x "$ofile"
4458182007Sroberto])
4459182007Srobertoelse
4460182007Sroberto  # If there is no Makefile yet, we rely on a make rule to execute
4461182007Sroberto  # `config.status --recheck' to rerun these tests and create the
4462182007Sroberto  # libtool script then.
4463182007Sroberto  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4464182007Sroberto  if test -f "$ltmain_in"; then
4465182007Sroberto    test -f Makefile && make "$ltmain"
4466182007Sroberto  fi
4467182007Srobertofi
4468182007Sroberto])# AC_LIBTOOL_CONFIG
4469182007Sroberto
4470182007Sroberto
4471182007Sroberto# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4472182007Sroberto# -------------------------------------------
4473182007SrobertoAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4474182007Sroberto[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4475182007Sroberto
4476182007Sroberto_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4477182007Sroberto
4478182007Srobertoif test "$GCC" = yes; then
4479182007Sroberto  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4480182007Sroberto
4481182007Sroberto  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4482182007Sroberto    lt_cv_prog_compiler_rtti_exceptions,
4483182007Sroberto    [-fno-rtti -fno-exceptions], [],
4484182007Sroberto    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4485182007Srobertofi
4486182007Sroberto])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4487182007Sroberto
4488182007Sroberto
4489182007Sroberto# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4490182007Sroberto# ---------------------------------
4491182007SrobertoAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4492182007Sroberto[AC_REQUIRE([AC_CANONICAL_HOST])
4493182007SrobertoAC_REQUIRE([AC_PROG_NM])
4494182007SrobertoAC_REQUIRE([AC_OBJEXT])
4495182007Sroberto# Check for command to grab the raw symbol name followed by C symbol from nm.
4496182007SrobertoAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4497182007SrobertoAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4498182007Sroberto[
4499182007Sroberto# These are sane defaults that work on at least a few old systems.
4500182007Sroberto# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4501182007Sroberto
4502182007Sroberto# Character class describing NM global symbol codes.
4503182007Srobertosymcode='[[BCDEGRST]]'
4504182007Sroberto
4505182007Sroberto# Regexp to match symbols that can be accessed directly from C.
4506182007Srobertosympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4507182007Sroberto
4508182007Sroberto# Transform an extracted symbol line into a proper C declaration
4509182007Srobertolt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4510182007Sroberto
4511182007Sroberto# Transform an extracted symbol line into symbol name and symbol address
4512182007Srobertolt_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'"
4513182007Sroberto
4514182007Sroberto# Define system-specific variables.
4515182007Srobertocase $host_os in
4516182007Srobertoaix*)
4517182007Sroberto  symcode='[[BCDT]]'
4518182007Sroberto  ;;
4519182007Srobertocygwin* | mingw* | pw32*)
4520182007Sroberto  symcode='[[ABCDGISTW]]'
4521182007Sroberto  ;;
4522182007Srobertohpux*) # Its linker distinguishes data from code symbols
4523182007Sroberto  if test "$host_cpu" = ia64; then
4524182007Sroberto    symcode='[[ABCDEGRST]]'
4525182007Sroberto  fi
4526182007Sroberto  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4527182007Sroberto  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'"
4528182007Sroberto  ;;
4529182007Srobertolinux*)
4530182007Sroberto  if test "$host_cpu" = ia64; then
4531182007Sroberto    symcode='[[ABCDGIRSTW]]'
4532182007Sroberto    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4533182007Sroberto    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'"
4534182007Sroberto  fi
4535182007Sroberto  ;;
4536182007Srobertoirix* | nonstopux*)
4537182007Sroberto  symcode='[[BCDEGRST]]'
4538182007Sroberto  ;;
4539182007Srobertoosf*)
4540182007Sroberto  symcode='[[BCDEGQRST]]'
4541182007Sroberto  ;;
4542182007Srobertosolaris* | sysv5*)
4543182007Sroberto  symcode='[[BDRT]]'
4544182007Sroberto  ;;
4545182007Srobertosysv4)
4546182007Sroberto  symcode='[[DFNSTU]]'
4547182007Sroberto  ;;
4548182007Srobertoesac
4549182007Sroberto
4550182007Sroberto# Handle CRLF in mingw tool chain
4551182007Srobertoopt_cr=
4552182007Srobertocase $build_os in
4553182007Srobertomingw*)
4554182007Sroberto  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4555182007Sroberto  ;;
4556182007Srobertoesac
4557182007Sroberto
4558182007Sroberto# If we're using GNU nm, then use its standard symbol codes.
4559182007Srobertocase `$NM -V 2>&1` in
4560182007Sroberto*GNU* | *'with BFD'*)
4561182007Sroberto  symcode='[[ABCDGIRSTW]]' ;;
4562182007Srobertoesac
4563182007Sroberto
4564182007Sroberto# Try without a prefix undercore, then with it.
4565182007Srobertofor ac_symprfx in "" "_"; do
4566182007Sroberto
4567182007Sroberto  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4568182007Sroberto  symxfrm="\\1 $ac_symprfx\\2 \\2"
4569182007Sroberto
4570182007Sroberto  # Write the raw and C identifiers.
4571182007Sroberto  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4572182007Sroberto
4573182007Sroberto  # Check to see that the pipe works correctly.
4574182007Sroberto  pipe_works=no
4575182007Sroberto
4576182007Sroberto  rm -f conftest*
4577182007Sroberto  cat > conftest.$ac_ext <<EOF
4578182007Sroberto#ifdef __cplusplus
4579182007Srobertoextern "C" {
4580182007Sroberto#endif
4581182007Srobertochar nm_test_var;
4582182007Srobertovoid nm_test_func(){}
4583182007Sroberto#ifdef __cplusplus
4584182007Sroberto}
4585182007Sroberto#endif
4586182007Srobertoint main(){nm_test_var='a';nm_test_func();return(0);}
4587182007SrobertoEOF
4588182007Sroberto
4589182007Sroberto  if AC_TRY_EVAL(ac_compile); then
4590182007Sroberto    # Now try to grab the symbols.
4591182007Sroberto    nlist=conftest.nm
4592182007Sroberto    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4593182007Sroberto      # Try sorting and uniquifying the output.
4594182007Sroberto      if sort "$nlist" | uniq > "$nlist"T; then
4595182007Sroberto	mv -f "$nlist"T "$nlist"
4596182007Sroberto      else
4597182007Sroberto	rm -f "$nlist"T
4598182007Sroberto      fi
4599182007Sroberto
4600182007Sroberto      # Make sure that we snagged all the symbols we need.
4601182007Sroberto      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4602182007Sroberto	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4603182007Sroberto	  cat <<EOF > conftest.$ac_ext
4604182007Sroberto#ifdef __cplusplus
4605182007Srobertoextern "C" {
4606182007Sroberto#endif
4607182007Sroberto
4608182007SrobertoEOF
4609182007Sroberto	  # Now generate the symbol file.
4610182007Sroberto	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4611182007Sroberto
4612182007Sroberto	  cat <<EOF >> conftest.$ac_ext
4613182007Sroberto#if defined (__STDC__) && __STDC__
4614182007Sroberto# define lt_ptr_t void *
4615182007Sroberto#else
4616182007Sroberto# define lt_ptr_t char *
4617182007Sroberto# define const
4618182007Sroberto#endif
4619182007Sroberto
4620182007Sroberto/* The mapping between symbol names and symbols. */
4621182007Srobertoconst struct {
4622182007Sroberto  const char *name;
4623182007Sroberto  lt_ptr_t address;
4624182007Sroberto}
4625182007Srobertolt_preloaded_symbols[[]] =
4626182007Sroberto{
4627182007SrobertoEOF
4628182007Sroberto	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4629182007Sroberto	  cat <<\EOF >> conftest.$ac_ext
4630182007Sroberto  {0, (lt_ptr_t) 0}
4631182007Sroberto};
4632182007Sroberto
4633182007Sroberto#ifdef __cplusplus
4634182007Sroberto}
4635182007Sroberto#endif
4636182007SrobertoEOF
4637182007Sroberto	  # Now try linking the two files.
4638182007Sroberto	  mv conftest.$ac_objext conftstm.$ac_objext
4639182007Sroberto	  lt_save_LIBS="$LIBS"
4640182007Sroberto	  lt_save_CFLAGS="$CFLAGS"
4641182007Sroberto	  LIBS="conftstm.$ac_objext"
4642182007Sroberto	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4643182007Sroberto	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4644182007Sroberto	    pipe_works=yes
4645182007Sroberto	  fi
4646182007Sroberto	  LIBS="$lt_save_LIBS"
4647182007Sroberto	  CFLAGS="$lt_save_CFLAGS"
4648182007Sroberto	else
4649182007Sroberto	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4650182007Sroberto	fi
4651182007Sroberto      else
4652182007Sroberto	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4653182007Sroberto      fi
4654182007Sroberto    else
4655182007Sroberto      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4656182007Sroberto    fi
4657182007Sroberto  else
4658182007Sroberto    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4659182007Sroberto    cat conftest.$ac_ext >&5
4660182007Sroberto  fi
4661182007Sroberto  rm -f conftest* conftst*
4662182007Sroberto
4663182007Sroberto  # Do not use the global_symbol_pipe unless it works.
4664182007Sroberto  if test "$pipe_works" = yes; then
4665182007Sroberto    break
4666182007Sroberto  else
4667182007Sroberto    lt_cv_sys_global_symbol_pipe=
4668182007Sroberto  fi
4669182007Srobertodone
4670182007Sroberto])
4671182007Srobertoif test -z "$lt_cv_sys_global_symbol_pipe"; then
4672182007Sroberto  lt_cv_sys_global_symbol_to_cdecl=
4673182007Srobertofi
4674182007Srobertoif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4675182007Sroberto  AC_MSG_RESULT(failed)
4676182007Srobertoelse
4677182007Sroberto  AC_MSG_RESULT(ok)
4678182007Srobertofi
4679182007Sroberto]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4680182007Sroberto
4681182007Sroberto
4682182007Sroberto# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4683182007Sroberto# ---------------------------------------
4684182007SrobertoAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4685182007Sroberto[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4686182007Sroberto_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4687182007Sroberto_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4688182007Sroberto
4689182007SrobertoAC_MSG_CHECKING([for $compiler option to produce PIC])
4690182007Sroberto ifelse([$1],[CXX],[
4691182007Sroberto  # C++ specific cases for pic, static, wl, etc.
4692182007Sroberto  if test "$GXX" = yes; then
4693182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4694182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4695182007Sroberto
4696182007Sroberto    case $host_os in
4697182007Sroberto    aix*)
4698182007Sroberto      # All AIX code is PIC.
4699182007Sroberto      if test "$host_cpu" = ia64; then
4700182007Sroberto	# AIX 5 now supports IA64 processor
4701182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4702182007Sroberto      fi
4703182007Sroberto      ;;
4704182007Sroberto    amigaos*)
4705182007Sroberto      # FIXME: we need at least 68020 code to build shared libraries, but
4706182007Sroberto      # adding the `-m68020' flag to GCC prevents building anything better,
4707182007Sroberto      # like `-m68040'.
4708182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4709182007Sroberto      ;;
4710182007Sroberto    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4711182007Sroberto      # PIC is the default for these OSes.
4712182007Sroberto      ;;
4713182007Sroberto    mingw* | os2* | pw32*)
4714182007Sroberto      # This hack is so that the source file can tell whether it is being
4715182007Sroberto      # built for inclusion in a dll (and should export symbols for example).
4716182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4717182007Sroberto      ;;
4718182007Sroberto    darwin* | rhapsody*)
4719182007Sroberto      # PIC is the default on this platform
4720182007Sroberto      # Common symbols not allowed in MH_DYLIB files
4721182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4722182007Sroberto      ;;
4723182007Sroberto    *djgpp*)
4724182007Sroberto      # DJGPP does not support shared libraries at all
4725182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4726182007Sroberto      ;;
4727182007Sroberto    sysv4*MP*)
4728182007Sroberto      if test -d /usr/nec; then
4729182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4730182007Sroberto      fi
4731182007Sroberto      ;;
4732182007Sroberto    hpux*)
4733182007Sroberto      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4734182007Sroberto      # not for PA HP-UX.
4735182007Sroberto      case $host_cpu in
4736182007Sroberto      hppa*64*|ia64*)
4737182007Sroberto	;;
4738182007Sroberto      *)
4739182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4740182007Sroberto	;;
4741182007Sroberto      esac
4742182007Sroberto      ;;
4743182007Sroberto    *)
4744182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4745182007Sroberto      ;;
4746182007Sroberto    esac
4747182007Sroberto  else
4748182007Sroberto    case $host_os in
4749182007Sroberto      aix4* | aix5*)
4750182007Sroberto	# All AIX code is PIC.
4751182007Sroberto	if test "$host_cpu" = ia64; then
4752182007Sroberto	  # AIX 5 now supports IA64 processor
4753182007Sroberto	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4754182007Sroberto	else
4755182007Sroberto	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4756182007Sroberto	fi
4757182007Sroberto	;;
4758182007Sroberto      chorus*)
4759182007Sroberto	case $cc_basename in
4760182007Sroberto	cxch68*)
4761182007Sroberto	  # Green Hills C++ Compiler
4762182007Sroberto	  # _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"
4763182007Sroberto	  ;;
4764182007Sroberto	esac
4765182007Sroberto	;;
4766182007Sroberto       darwin*)
4767182007Sroberto         # PIC is the default on this platform
4768182007Sroberto         # Common symbols not allowed in MH_DYLIB files
4769182007Sroberto         case $cc_basename in
4770182007Sroberto           xlc*)
4771182007Sroberto           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4772182007Sroberto           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773182007Sroberto           ;;
4774182007Sroberto         esac
4775182007Sroberto       ;;
4776182007Sroberto      dgux*)
4777182007Sroberto	case $cc_basename in
4778182007Sroberto	  ec++*)
4779182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4780182007Sroberto	    ;;
4781182007Sroberto	  ghcx*)
4782182007Sroberto	    # Green Hills C++ Compiler
4783182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4784182007Sroberto	    ;;
4785182007Sroberto	  *)
4786182007Sroberto	    ;;
4787182007Sroberto	esac
4788182007Sroberto	;;
4789182007Sroberto      freebsd* | kfreebsd*-gnu | dragonfly*)
4790182007Sroberto	# FreeBSD uses GNU C++
4791182007Sroberto	;;
4792182007Sroberto      hpux9* | hpux10* | hpux11*)
4793182007Sroberto	case $cc_basename in
4794182007Sroberto	  CC*)
4795182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4797182007Sroberto	    if test "$host_cpu" != ia64; then
4798182007Sroberto	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4799182007Sroberto	    fi
4800182007Sroberto	    ;;
4801182007Sroberto	  aCC*)
4802182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4803182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4804182007Sroberto	    case $host_cpu in
4805182007Sroberto	    hppa*64*|ia64*)
4806182007Sroberto	      # +Z the default
4807182007Sroberto	      ;;
4808182007Sroberto	    *)
4809182007Sroberto	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4810182007Sroberto	      ;;
4811182007Sroberto	    esac
4812182007Sroberto	    ;;
4813182007Sroberto	  *)
4814182007Sroberto	    ;;
4815182007Sroberto	esac
4816182007Sroberto	;;
4817182007Sroberto      irix5* | irix6* | nonstopux*)
4818182007Sroberto	case $cc_basename in
4819182007Sroberto	  CC*)
4820182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4821182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4822182007Sroberto	    # CC pic flag -KPIC is the default.
4823182007Sroberto	    ;;
4824182007Sroberto	  *)
4825182007Sroberto	    ;;
4826182007Sroberto	esac
4827182007Sroberto	;;
4828182007Sroberto      linux*)
4829182007Sroberto	case $cc_basename in
4830182007Sroberto	  KCC*)
4831182007Sroberto	    # KAI C++ Compiler
4832182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4833182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4834182007Sroberto	    ;;
4835182007Sroberto	  icpc* | ecpc*)
4836182007Sroberto	    # Intel C++
4837182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4838182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4839182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4840182007Sroberto	    ;;
4841182007Sroberto	  pgCC*)
4842182007Sroberto	    # Portland Group C++ compiler.
4843182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4844182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4845182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4846182007Sroberto	    ;;
4847182007Sroberto	  cxx*)
4848182007Sroberto	    # Compaq C++
4849182007Sroberto	    # Make sure the PIC flag is empty.  It appears that all Alpha
4850182007Sroberto	    # Linux and Compaq Tru64 Unix objects are PIC.
4851182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4852182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4853182007Sroberto	    ;;
4854182007Sroberto	  *)
4855182007Sroberto	    ;;
4856182007Sroberto	esac
4857182007Sroberto	;;
4858182007Sroberto      lynxos*)
4859182007Sroberto	;;
4860182007Sroberto      m88k*)
4861182007Sroberto	;;
4862182007Sroberto      mvs*)
4863182007Sroberto	case $cc_basename in
4864182007Sroberto	  cxx*)
4865182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4866182007Sroberto	    ;;
4867182007Sroberto	  *)
4868182007Sroberto	    ;;
4869182007Sroberto	esac
4870182007Sroberto	;;
4871182007Sroberto      netbsd*)
4872182007Sroberto	;;
4873182007Sroberto      osf3* | osf4* | osf5*)
4874182007Sroberto	case $cc_basename in
4875182007Sroberto	  KCC*)
4876182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4877182007Sroberto	    ;;
4878182007Sroberto	  RCC*)
4879182007Sroberto	    # Rational C++ 2.4.1
4880182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4881182007Sroberto	    ;;
4882182007Sroberto	  cxx*)
4883182007Sroberto	    # Digital/Compaq C++
4884182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4885182007Sroberto	    # Make sure the PIC flag is empty.  It appears that all Alpha
4886182007Sroberto	    # Linux and Compaq Tru64 Unix objects are PIC.
4887182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4888182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4889182007Sroberto	    ;;
4890182007Sroberto	  *)
4891182007Sroberto	    ;;
4892182007Sroberto	esac
4893182007Sroberto	;;
4894182007Sroberto      psos*)
4895182007Sroberto	;;
4896182007Sroberto      sco*)
4897182007Sroberto	case $cc_basename in
4898182007Sroberto	  CC*)
4899182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4900182007Sroberto	    ;;
4901182007Sroberto	  *)
4902182007Sroberto	    ;;
4903182007Sroberto	esac
4904182007Sroberto	;;
4905182007Sroberto      solaris*)
4906182007Sroberto	case $cc_basename in
4907182007Sroberto	  CC*)
4908182007Sroberto	    # Sun C++ 4.2, 5.x and Centerline C++
4909182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4910182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4911182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4912182007Sroberto	    ;;
4913182007Sroberto	  gcx*)
4914182007Sroberto	    # Green Hills C++ Compiler
4915182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4916182007Sroberto	    ;;
4917182007Sroberto	  *)
4918182007Sroberto	    ;;
4919182007Sroberto	esac
4920182007Sroberto	;;
4921182007Sroberto      sunos4*)
4922182007Sroberto	case $cc_basename in
4923182007Sroberto	  CC*)
4924182007Sroberto	    # Sun C++ 4.x
4925182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4926182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4927182007Sroberto	    ;;
4928182007Sroberto	  lcc*)
4929182007Sroberto	    # Lucid
4930182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4931182007Sroberto	    ;;
4932182007Sroberto	  *)
4933182007Sroberto	    ;;
4934182007Sroberto	esac
4935182007Sroberto	;;
4936182007Sroberto      tandem*)
4937182007Sroberto	case $cc_basename in
4938182007Sroberto	  NCC*)
4939182007Sroberto	    # NonStop-UX NCC 3.20
4940182007Sroberto	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4941182007Sroberto	    ;;
4942182007Sroberto	  *)
4943182007Sroberto	    ;;
4944182007Sroberto	esac
4945182007Sroberto	;;
4946182007Sroberto      unixware*)
4947182007Sroberto	;;
4948182007Sroberto      vxworks*)
4949182007Sroberto	;;
4950182007Sroberto      *)
4951182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4952182007Sroberto	;;
4953182007Sroberto    esac
4954182007Sroberto  fi
4955182007Sroberto],
4956182007Sroberto[
4957182007Sroberto  if test "$GCC" = yes; then
4958182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4959182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4960182007Sroberto
4961182007Sroberto    case $host_os in
4962182007Sroberto      aix*)
4963182007Sroberto      # All AIX code is PIC.
4964182007Sroberto      if test "$host_cpu" = ia64; then
4965182007Sroberto	# AIX 5 now supports IA64 processor
4966182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4967182007Sroberto      fi
4968182007Sroberto      ;;
4969182007Sroberto
4970182007Sroberto    amigaos*)
4971182007Sroberto      # FIXME: we need at least 68020 code to build shared libraries, but
4972182007Sroberto      # adding the `-m68020' flag to GCC prevents building anything better,
4973182007Sroberto      # like `-m68040'.
4974182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4975182007Sroberto      ;;
4976182007Sroberto
4977182007Sroberto    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4978182007Sroberto      # PIC is the default for these OSes.
4979182007Sroberto      ;;
4980182007Sroberto
4981182007Sroberto    mingw* | pw32* | os2*)
4982182007Sroberto      # This hack is so that the source file can tell whether it is being
4983182007Sroberto      # built for inclusion in a dll (and should export symbols for example).
4984182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4985182007Sroberto      ;;
4986182007Sroberto
4987182007Sroberto    darwin* | rhapsody*)
4988182007Sroberto      # PIC is the default on this platform
4989182007Sroberto      # Common symbols not allowed in MH_DYLIB files
4990182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4991182007Sroberto      ;;
4992182007Sroberto
4993182007Sroberto    msdosdjgpp*)
4994182007Sroberto      # Just because we use GCC doesn't mean we suddenly get shared libraries
4995182007Sroberto      # on systems that don't support them.
4996182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4997182007Sroberto      enable_shared=no
4998182007Sroberto      ;;
4999182007Sroberto
5000182007Sroberto    sysv4*MP*)
5001182007Sroberto      if test -d /usr/nec; then
5002182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5003182007Sroberto      fi
5004182007Sroberto      ;;
5005182007Sroberto
5006182007Sroberto    hpux*)
5007182007Sroberto      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5008182007Sroberto      # not for PA HP-UX.
5009182007Sroberto      case $host_cpu in
5010182007Sroberto      hppa*64*|ia64*)
5011182007Sroberto	# +Z the default
5012182007Sroberto	;;
5013182007Sroberto      *)
5014182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5015182007Sroberto	;;
5016182007Sroberto      esac
5017182007Sroberto      ;;
5018182007Sroberto
5019182007Sroberto    *)
5020182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5021182007Sroberto      ;;
5022182007Sroberto    esac
5023182007Sroberto  else
5024182007Sroberto    # PORTME Check for flag to pass linker flags through the system compiler.
5025182007Sroberto    case $host_os in
5026182007Sroberto    aix*)
5027182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5028182007Sroberto      if test "$host_cpu" = ia64; then
5029182007Sroberto	# AIX 5 now supports IA64 processor
5030182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5031182007Sroberto      else
5032182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5033182007Sroberto      fi
5034182007Sroberto      ;;
5035182007Sroberto      darwin*)
5036182007Sroberto        # PIC is the default on this platform
5037182007Sroberto        # Common symbols not allowed in MH_DYLIB files
5038182007Sroberto       case $cc_basename in
5039182007Sroberto         xlc*)
5040182007Sroberto         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5041182007Sroberto         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5042182007Sroberto         ;;
5043182007Sroberto       esac
5044182007Sroberto       ;;
5045182007Sroberto
5046182007Sroberto    mingw* | pw32* | os2*)
5047182007Sroberto      # This hack is so that the source file can tell whether it is being
5048182007Sroberto      # built for inclusion in a dll (and should export symbols for example).
5049182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5050182007Sroberto      ;;
5051182007Sroberto
5052182007Sroberto    hpux9* | hpux10* | hpux11*)
5053182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5054182007Sroberto      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5055182007Sroberto      # not for PA HP-UX.
5056182007Sroberto      case $host_cpu in
5057182007Sroberto      hppa*64*|ia64*)
5058182007Sroberto	# +Z the default
5059182007Sroberto	;;
5060182007Sroberto      *)
5061182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5062182007Sroberto	;;
5063182007Sroberto      esac
5064182007Sroberto      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5065182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5066182007Sroberto      ;;
5067182007Sroberto
5068182007Sroberto    irix5* | irix6* | nonstopux*)
5069182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5070182007Sroberto      # PIC (with -KPIC) is the default.
5071182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5072182007Sroberto      ;;
5073182007Sroberto
5074182007Sroberto    newsos6)
5075182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5076182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5077182007Sroberto      ;;
5078182007Sroberto
5079182007Sroberto    linux*)
5080182007Sroberto      case $cc_basename in
5081182007Sroberto      icc* | ecc*)
5082182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5083182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5084182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5085182007Sroberto        ;;
5086182007Sroberto      pgcc* | pgf77* | pgf90* | pgf95*)
5087182007Sroberto        # Portland Group compilers (*not* the Pentium gcc compiler,
5088182007Sroberto	# which looks to be a dead project)
5089182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5090182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5091182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5092182007Sroberto        ;;
5093182007Sroberto      ccc*)
5094182007Sroberto        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5095182007Sroberto        # All Alpha code is PIC.
5096182007Sroberto        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5097182007Sroberto        ;;
5098182007Sroberto      esac
5099182007Sroberto      ;;
5100182007Sroberto
5101182007Sroberto    osf3* | osf4* | osf5*)
5102182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5103182007Sroberto      # All OSF/1 code is PIC.
5104182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5105182007Sroberto      ;;
5106182007Sroberto
5107182007Sroberto    sco3.2v5*)
5108182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5109182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5110182007Sroberto      ;;
5111182007Sroberto
5112182007Sroberto    solaris*)
5113182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5114182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5115182007Sroberto      case $cc_basename in
5116182007Sroberto      f77* | f90* | f95*)
5117182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5118182007Sroberto      *)
5119182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5120182007Sroberto      esac
5121182007Sroberto      ;;
5122182007Sroberto
5123182007Sroberto    sunos4*)
5124182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5125182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5126182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5127182007Sroberto      ;;
5128182007Sroberto
5129182007Sroberto    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5130182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5131182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5132182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5133182007Sroberto      ;;
5134182007Sroberto
5135182007Sroberto    sysv4*MP*)
5136182007Sroberto      if test -d /usr/nec ;then
5137182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5138182007Sroberto	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5139182007Sroberto      fi
5140182007Sroberto      ;;
5141182007Sroberto
5142182007Sroberto    unicos*)
5143182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5144182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5145182007Sroberto      ;;
5146182007Sroberto
5147182007Sroberto    uts4*)
5148182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5149182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5150182007Sroberto      ;;
5151182007Sroberto
5152182007Sroberto    *)
5153182007Sroberto      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5154182007Sroberto      ;;
5155182007Sroberto    esac
5156182007Sroberto  fi
5157182007Sroberto])
5158182007SrobertoAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5159182007Sroberto
5160182007Sroberto#
5161182007Sroberto# Check to make sure the PIC flag actually works.
5162182007Sroberto#
5163182007Srobertoif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5164182007Sroberto  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5165182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5166182007Sroberto    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5167182007Sroberto    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5168182007Sroberto     "" | " "*) ;;
5169182007Sroberto     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5170182007Sroberto     esac],
5171182007Sroberto    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5172182007Sroberto     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5173182007Srobertofi
5174182007Srobertocase $host_os in
5175182007Sroberto  # For platforms which do not support PIC, -DPIC is meaningless:
5176182007Sroberto  *djgpp*)
5177182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5178182007Sroberto    ;;
5179182007Sroberto  *)
5180182007Sroberto    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5181182007Sroberto    ;;
5182182007Srobertoesac
5183182007Sroberto])
5184182007Sroberto
5185182007Sroberto
5186182007Sroberto# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5187182007Sroberto# ------------------------------------
5188182007Sroberto# See if the linker supports building shared libraries.
5189182007SrobertoAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5190182007Sroberto[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5191182007Srobertoifelse([$1],[CXX],[
5192182007Sroberto  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5193182007Sroberto  case $host_os in
5194182007Sroberto  aix4* | aix5*)
5195182007Sroberto    # If we're using GNU nm, then we don't want the "-C" option.
5196182007Sroberto    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5197182007Sroberto    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5198182007Sroberto      _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'
5199182007Sroberto    else
5200182007Sroberto      _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'
5201182007Sroberto    fi
5202182007Sroberto    ;;
5203182007Sroberto  pw32*)
5204182007Sroberto    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5205182007Sroberto  ;;
5206182007Sroberto  cygwin* | mingw*)
5207182007Sroberto    _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'
5208182007Sroberto  ;;
5209182007Sroberto  *)
5210182007Sroberto    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5211182007Sroberto  ;;
5212182007Sroberto  esac
5213182007Sroberto],[
5214182007Sroberto  runpath_var=
5215182007Sroberto  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5216182007Sroberto  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5217182007Sroberto  _LT_AC_TAGVAR(archive_cmds, $1)=
5218182007Sroberto  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5219182007Sroberto  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5220182007Sroberto  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5221182007Sroberto  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5222182007Sroberto  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5223182007Sroberto  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5224182007Sroberto  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5225182007Sroberto  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5226182007Sroberto  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5227182007Sroberto  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5228182007Sroberto  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5229182007Sroberto  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5230182007Sroberto  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5231182007Sroberto  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5232182007Sroberto  _LT_AC_TAGVAR(module_cmds, $1)=
5233182007Sroberto  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5234182007Sroberto  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5235182007Sroberto  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5236182007Sroberto  # include_expsyms should be a list of space-separated symbols to be *always*
5237182007Sroberto  # included in the symbol list
5238182007Sroberto  _LT_AC_TAGVAR(include_expsyms, $1)=
5239182007Sroberto  # exclude_expsyms can be an extended regexp of symbols to exclude
5240182007Sroberto  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5241182007Sroberto  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5242182007Sroberto  # as well as any symbol that contains `d'.
5243182007Sroberto  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5244182007Sroberto  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5245182007Sroberto  # platforms (ab)use it in PIC code, but their linkers get confused if
5246182007Sroberto  # the symbol is explicitly referenced.  Since portable code cannot
5247182007Sroberto  # rely on this symbol name, it's probably fine to never include it in
5248182007Sroberto  # preloaded symbol tables.
5249182007Sroberto  extract_expsyms_cmds=
5250182007Sroberto  # Just being paranoid about ensuring that cc_basename is set.
5251182007Sroberto  _LT_CC_BASENAME([$compiler])
5252182007Sroberto  case $host_os in
5253182007Sroberto  cygwin* | mingw* | pw32*)
5254182007Sroberto    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5255182007Sroberto    # When not using gcc, we currently assume that we are using
5256182007Sroberto    # Microsoft Visual C++.
5257182007Sroberto    if test "$GCC" != yes; then
5258182007Sroberto      with_gnu_ld=no
5259182007Sroberto    fi
5260182007Sroberto    ;;
5261182007Sroberto  openbsd*)
5262182007Sroberto    with_gnu_ld=no
5263182007Sroberto    ;;
5264182007Sroberto  esac
5265182007Sroberto
5266182007Sroberto  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5267182007Sroberto  if test "$with_gnu_ld" = yes; then
5268182007Sroberto    # If archive_cmds runs LD, not CC, wlarc should be empty
5269182007Sroberto    wlarc='${wl}'
5270182007Sroberto
5271182007Sroberto    # Set some defaults for GNU ld with shared library support. These
5272182007Sroberto    # are reset later if shared libraries are not supported. Putting them
5273182007Sroberto    # here allows them to be overridden if necessary.
5274182007Sroberto    runpath_var=LD_RUN_PATH
5275182007Sroberto    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5276182007Sroberto    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5277182007Sroberto    # ancient GNU ld didn't support --whole-archive et. al.
5278182007Sroberto    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5279182007Sroberto	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5280182007Sroberto      else
5281182007Sroberto  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5282182007Sroberto    fi
5283182007Sroberto    supports_anon_versioning=no
5284182007Sroberto    case `$LD -v 2>/dev/null` in
5285182007Sroberto      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5286182007Sroberto      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5287182007Sroberto      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5288182007Sroberto      *\ 2.11.*) ;; # other 2.11 versions
5289182007Sroberto      *) supports_anon_versioning=yes ;;
5290182007Sroberto    esac
5291182007Sroberto
5292182007Sroberto    # See if GNU ld supports shared libraries.
5293182007Sroberto    case $host_os in
5294182007Sroberto    aix3* | aix4* | aix5*)
5295182007Sroberto      # On AIX/PPC, the GNU linker is very broken
5296182007Sroberto      if test "$host_cpu" != ia64; then
5297182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5298182007Sroberto	cat <<EOF 1>&2
5299182007Sroberto
5300182007Sroberto*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5301182007Sroberto*** to be unable to reliably create shared libraries on AIX.
5302182007Sroberto*** Therefore, libtool is disabling shared libraries support.  If you
5303182007Sroberto*** really care for shared libraries, you may want to modify your PATH
5304182007Sroberto*** so that a non-GNU linker is found, and then restart.
5305182007Sroberto
5306182007SrobertoEOF
5307182007Sroberto      fi
5308182007Sroberto      ;;
5309182007Sroberto
5310182007Sroberto    amigaos*)
5311182007Sroberto      _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)'
5312182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5313182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5314182007Sroberto
5315182007Sroberto      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5316182007Sroberto      # that the semantics of dynamic libraries on AmigaOS, at least up
5317182007Sroberto      # to version 4, is to share data among multiple programs linked
5318182007Sroberto      # with the same dynamic library.  Since this doesn't match the
5319182007Sroberto      # behavior of shared libraries on other platforms, we can't use
5320182007Sroberto      # them.
5321182007Sroberto      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5322182007Sroberto      ;;
5323182007Sroberto
5324182007Sroberto    beos*)
5325182007Sroberto      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5326182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5327182007Sroberto	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5328182007Sroberto	# support --undefined.  This deserves some investigation.  FIXME
5329182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5330182007Sroberto      else
5331182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5332182007Sroberto      fi
5333182007Sroberto      ;;
5334182007Sroberto
5335182007Sroberto    cygwin* | mingw* | pw32*)
5336182007Sroberto      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5337182007Sroberto      # as there is no search path for DLLs.
5338182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5339182007Sroberto      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5340182007Sroberto      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5341182007Sroberto      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5342182007Sroberto      _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'
5343182007Sroberto
5344182007Sroberto      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5345182007Sroberto        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5346182007Sroberto	# If the export-symbols file already is a .def file (1st line
5347182007Sroberto	# is EXPORTS), use it as is; otherwise, prepend...
5348182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5349182007Sroberto	  cp $export_symbols $output_objdir/$soname.def;
5350182007Sroberto	else
5351182007Sroberto	  echo EXPORTS > $output_objdir/$soname.def;
5352182007Sroberto	  cat $export_symbols >> $output_objdir/$soname.def;
5353182007Sroberto	fi~
5354182007Sroberto	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5355182007Sroberto      else
5356182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5357182007Sroberto      fi
5358182007Sroberto      ;;
5359182007Sroberto
5360182007Sroberto    linux*)
5361182007Sroberto      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5362182007Sroberto	tmp_addflag=
5363182007Sroberto	case $cc_basename,$host_cpu in
5364182007Sroberto	pgcc*)				# Portland Group C compiler
5365182007Sroberto	  _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'
5366182007Sroberto	  tmp_addflag=' $pic_flag'
5367182007Sroberto	  ;;
5368182007Sroberto	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5369182007Sroberto	  _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'
5370182007Sroberto	  tmp_addflag=' $pic_flag -Mnomain' ;;
5371182007Sroberto	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5372182007Sroberto	  tmp_addflag=' -i_dynamic' ;;
5373182007Sroberto	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5374182007Sroberto	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5375182007Sroberto	ifc* | ifort*)			# Intel Fortran compiler
5376182007Sroberto	  tmp_addflag=' -nofor_main' ;;
5377182007Sroberto	esac
5378182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5379182007Sroberto
5380182007Sroberto	if test $supports_anon_versioning = yes; then
5381182007Sroberto	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5382182007Sroberto  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5383182007Sroberto  $echo "local: *; };" >> $output_objdir/$libname.ver~
5384182007Sroberto	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5385182007Sroberto	fi
5386182007Sroberto      else
5387182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5388182007Sroberto      fi
5389182007Sroberto      ;;
5390182007Sroberto
5391182007Sroberto    netbsd*)
5392182007Sroberto      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5393182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5394182007Sroberto	wlarc=
5395182007Sroberto      else
5396182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5397182007Sroberto	_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'
5398182007Sroberto      fi
5399182007Sroberto      ;;
5400182007Sroberto
5401182007Sroberto    solaris* | sysv5*)
5402182007Sroberto      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5403182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5404182007Sroberto	cat <<EOF 1>&2
5405182007Sroberto
5406182007Sroberto*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5407182007Sroberto*** create shared libraries on Solaris systems.  Therefore, libtool
5408182007Sroberto*** is disabling shared libraries support.  We urge you to upgrade GNU
5409182007Sroberto*** binutils to release 2.9.1 or newer.  Another option is to modify
5410182007Sroberto*** your PATH or compiler configuration so that the native linker is
5411182007Sroberto*** used, and then restart.
5412182007Sroberto
5413182007SrobertoEOF
5414182007Sroberto      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5415182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5416182007Sroberto	_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'
5417182007Sroberto      else
5418182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5419182007Sroberto      fi
5420182007Sroberto      ;;
5421182007Sroberto
5422182007Sroberto    sunos4*)
5423182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5424182007Sroberto      wlarc=
5425182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5426182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5427182007Sroberto      ;;
5428182007Sroberto
5429182007Sroberto    *)
5430182007Sroberto      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5431182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5432182007Sroberto	_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'
5433182007Sroberto      else
5434182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5435182007Sroberto      fi
5436182007Sroberto      ;;
5437182007Sroberto    esac
5438182007Sroberto
5439182007Sroberto    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5440182007Sroberto      runpath_var=
5441182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5442182007Sroberto      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5443182007Sroberto      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5444182007Sroberto    fi
5445182007Sroberto  else
5446182007Sroberto    # PORTME fill in a description of your system's linker (not GNU ld)
5447182007Sroberto    case $host_os in
5448182007Sroberto    aix3*)
5449182007Sroberto      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5450182007Sroberto      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5451182007Sroberto      _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'
5452182007Sroberto      # Note: this linker hardcodes the directories in LIBPATH if there
5453182007Sroberto      # are no directories specified by -L.
5454182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5455182007Sroberto      if test "$GCC" = yes && test -z "$link_static_flag"; then
5456182007Sroberto	# Neither direct hardcoding nor static linking is supported with a
5457182007Sroberto	# broken collect2.
5458182007Sroberto	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5459182007Sroberto      fi
5460182007Sroberto      ;;
5461182007Sroberto
5462182007Sroberto    aix4* | aix5*)
5463182007Sroberto      if test "$host_cpu" = ia64; then
5464182007Sroberto	# On IA64, the linker does run time linking by default, so we don't
5465182007Sroberto	# have to do anything special.
5466182007Sroberto	aix_use_runtimelinking=no
5467182007Sroberto	exp_sym_flag='-Bexport'
5468182007Sroberto	no_entry_flag=""
5469182007Sroberto      else
5470182007Sroberto	# If we're using GNU nm, then we don't want the "-C" option.
5471182007Sroberto	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5472182007Sroberto	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5473182007Sroberto	  _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'
5474182007Sroberto	else
5475182007Sroberto	  _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'
5476182007Sroberto	fi
5477182007Sroberto	aix_use_runtimelinking=no
5478182007Sroberto
5479182007Sroberto	# Test if we are trying to use run time linking or normal
5480182007Sroberto	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5481182007Sroberto	# need to do runtime linking.
5482182007Sroberto	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5483182007Sroberto	  for ld_flag in $LDFLAGS; do
5484182007Sroberto  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5485182007Sroberto  	    aix_use_runtimelinking=yes
5486182007Sroberto  	    break
5487182007Sroberto  	  fi
5488182007Sroberto	  done
5489182007Sroberto	esac
5490182007Sroberto
5491182007Sroberto	exp_sym_flag='-bexport'
5492182007Sroberto	no_entry_flag='-bnoentry'
5493182007Sroberto      fi
5494182007Sroberto
5495182007Sroberto      # When large executables or shared objects are built, AIX ld can
5496182007Sroberto      # have problems creating the table of contents.  If linking a library
5497182007Sroberto      # or program results in "error TOC overflow" add -mminimal-toc to
5498182007Sroberto      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5499182007Sroberto      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5500182007Sroberto
5501182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)=''
5502182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5503182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5504182007Sroberto      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5505182007Sroberto
5506182007Sroberto      if test "$GCC" = yes; then
5507182007Sroberto	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5508182007Sroberto	# We only want to do this on AIX 4.2 and lower, the check
5509182007Sroberto	# below for broken collect2 doesn't work under 4.3+
5510182007Sroberto	  collect2name=`${CC} -print-prog-name=collect2`
5511182007Sroberto	  if test -f "$collect2name" && \
5512182007Sroberto  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5513182007Sroberto	  then
5514182007Sroberto  	  # We have reworked collect2
5515182007Sroberto  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5516182007Sroberto	  else
5517182007Sroberto  	  # We have old collect2
5518182007Sroberto  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5519182007Sroberto  	  # It fails to find uninstalled libraries when the uninstalled
5520182007Sroberto  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5521182007Sroberto  	  # to unsupported forces relinking
5522182007Sroberto  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5523182007Sroberto  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5524182007Sroberto  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5525182007Sroberto	  fi
5526182007Sroberto	esac
5527182007Sroberto	shared_flag='-shared'
5528182007Sroberto	if test "$aix_use_runtimelinking" = yes; then
5529182007Sroberto	  shared_flag="$shared_flag "'${wl}-G'
5530182007Sroberto	fi
5531182007Sroberto      else
5532182007Sroberto	# not using gcc
5533182007Sroberto	if test "$host_cpu" = ia64; then
5534182007Sroberto  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5535182007Sroberto  	# chokes on -Wl,-G. The following line is correct:
5536182007Sroberto	  shared_flag='-G'
5537182007Sroberto	else
5538182007Sroberto  	if test "$aix_use_runtimelinking" = yes; then
5539182007Sroberto	    shared_flag='${wl}-G'
5540182007Sroberto	  else
5541182007Sroberto	    shared_flag='${wl}-bM:SRE'
5542182007Sroberto  	fi
5543182007Sroberto	fi
5544182007Sroberto      fi
5545182007Sroberto
5546182007Sroberto      # It seems that -bexpall does not export symbols beginning with
5547182007Sroberto      # underscore (_), so it is better to generate a list of symbols to export.
5548182007Sroberto      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5549182007Sroberto      if test "$aix_use_runtimelinking" = yes; then
5550182007Sroberto	# Warning - without using the other runtime loading flags (-brtl),
5551182007Sroberto	# -berok will link without error, but may produce a broken library.
5552182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5553182007Sroberto       # Determine the default libpath from the value encoded in an empty executable.
5554182007Sroberto       _LT_AC_SYS_LIBPATH_AIX
5555182007Sroberto       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5556182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5557182007Sroberto       else
5558182007Sroberto	if test "$host_cpu" = ia64; then
5559182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5560182007Sroberto	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5561182007Sroberto	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5562182007Sroberto	else
5563182007Sroberto	 # Determine the default libpath from the value encoded in an empty executable.
5564182007Sroberto	 _LT_AC_SYS_LIBPATH_AIX
5565182007Sroberto	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5566182007Sroberto	  # Warning - without using the other run time loading flags,
5567182007Sroberto	  # -berok will link without error, but may produce a broken library.
5568182007Sroberto	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5569182007Sroberto	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5570182007Sroberto	  # -bexpall does not export symbols beginning with underscore (_)
5571182007Sroberto	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5572182007Sroberto	  # Exported symbols can be pulled into shared objects from archives
5573182007Sroberto	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5574182007Sroberto	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5575182007Sroberto	  # This is similar to how AIX traditionally builds its shared libraries.
5576182007Sroberto	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5577182007Sroberto	fi
5578182007Sroberto      fi
5579182007Sroberto      ;;
5580182007Sroberto
5581182007Sroberto    amigaos*)
5582182007Sroberto      _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)'
5583182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5584182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5585182007Sroberto      # see comment about different semantics on the GNU ld section
5586182007Sroberto      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5587182007Sroberto      ;;
5588182007Sroberto
5589182007Sroberto    bsdi[[45]]*)
5590182007Sroberto      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5591182007Sroberto      ;;
5592182007Sroberto
5593182007Sroberto    cygwin* | mingw* | pw32*)
5594182007Sroberto      # When not using gcc, we currently assume that we are using
5595182007Sroberto      # Microsoft Visual C++.
5596182007Sroberto      # hardcode_libdir_flag_spec is actually meaningless, as there is
5597182007Sroberto      # no search path for DLLs.
5598182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5599182007Sroberto      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5600182007Sroberto      # Tell ltmain to make .lib files, not .a files.
5601182007Sroberto      libext=lib
5602182007Sroberto      # Tell ltmain to make .dll files, not .so files.
5603182007Sroberto      shrext_cmds=".dll"
5604182007Sroberto      # FIXME: Setting linknames here is a bad hack.
5605182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5606182007Sroberto      # The linker will automatically build a .lib file if we build a DLL.
5607182007Sroberto      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5608182007Sroberto      # FIXME: Should let the user specify the lib program.
5609182007Sroberto      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5610182007Sroberto      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5611182007Sroberto      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5612182007Sroberto      ;;
5613182007Sroberto
5614182007Sroberto    darwin* | rhapsody*)
5615182007Sroberto      case $host_os in
5616182007Sroberto        rhapsody* | darwin1.[[012]])
5617182007Sroberto         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5618182007Sroberto         ;;
5619182007Sroberto       *) # Darwin 1.3 on
5620182007Sroberto         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5621182007Sroberto           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5622182007Sroberto         else
5623182007Sroberto           case ${MACOSX_DEPLOYMENT_TARGET} in
5624182007Sroberto             10.[[012]])
5625182007Sroberto               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5626182007Sroberto               ;;
5627182007Sroberto             10.*)
5628182007Sroberto               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5629182007Sroberto               ;;
5630182007Sroberto           esac
5631182007Sroberto         fi
5632182007Sroberto         ;;
5633182007Sroberto      esac
5634182007Sroberto      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5635182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5636182007Sroberto      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5637182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5638182007Sroberto      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5639182007Sroberto      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5640182007Sroberto    if test "$GCC" = yes ; then
5641182007Sroberto    	output_verbose_link_cmd='echo'
5642182007Sroberto        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5643182007Sroberto      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5644182007Sroberto      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5645182007Sroberto      _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}'
5646182007Sroberto      _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}'
5647182007Sroberto    else
5648182007Sroberto      case $cc_basename in
5649182007Sroberto        xlc*)
5650182007Sroberto         output_verbose_link_cmd='echo'
5651182007Sroberto         _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'
5652182007Sroberto         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5653182007Sroberto          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5654182007Sroberto         _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}'
5655182007Sroberto          _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}'
5656182007Sroberto          ;;
5657182007Sroberto       *)
5658182007Sroberto         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5659182007Sroberto          ;;
5660182007Sroberto      esac
5661182007Sroberto    fi
5662182007Sroberto      ;;
5663182007Sroberto
5664182007Sroberto    dgux*)
5665182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5666182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5667182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5668182007Sroberto      ;;
5669182007Sroberto
5670182007Sroberto    freebsd1*)
5671182007Sroberto      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5672182007Sroberto      ;;
5673182007Sroberto
5674182007Sroberto    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5675182007Sroberto    # support.  Future versions do this automatically, but an explicit c++rt0.o
5676182007Sroberto    # does not break anything, and helps significantly (at the cost of a little
5677182007Sroberto    # extra space).
5678182007Sroberto    freebsd2.2*)
5679182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5680182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5681182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5682182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5683182007Sroberto      ;;
5684182007Sroberto
5685182007Sroberto    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5686182007Sroberto    freebsd2*)
5687182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5688182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5689182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5690182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5691182007Sroberto      ;;
5692182007Sroberto
5693182007Sroberto    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5694182007Sroberto    freebsd* | kfreebsd*-gnu | dragonfly*)
5695182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5696182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5697182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5698182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5699182007Sroberto      ;;
5700182007Sroberto
5701182007Sroberto    hpux9*)
5702182007Sroberto      if test "$GCC" = yes; then
5703182007Sroberto	_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'
5704182007Sroberto      else
5705182007Sroberto	_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'
5706182007Sroberto      fi
5707182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5708182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5709182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5710182007Sroberto
5711182007Sroberto      # hardcode_minus_L: Not really in the search PATH,
5712182007Sroberto      # but as the default location of the library.
5713182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5714182007Sroberto      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5715182007Sroberto      ;;
5716182007Sroberto
5717182007Sroberto    hpux10* | hpux11*)
5718182007Sroberto      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5719182007Sroberto	case $host_cpu in
5720182007Sroberto	hppa*64*|ia64*)
5721182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5722182007Sroberto	  ;;
5723182007Sroberto	*)
5724182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5725182007Sroberto	  ;;
5726182007Sroberto	esac
5727182007Sroberto      else
5728182007Sroberto	case $host_cpu in
5729182007Sroberto	hppa*64*|ia64*)
5730182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5731182007Sroberto	  ;;
5732182007Sroberto	*)
5733182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5734182007Sroberto	  ;;
5735182007Sroberto	esac
5736182007Sroberto      fi
5737182007Sroberto      if test "$with_gnu_ld" = no; then
5738182007Sroberto	case $host_cpu in
5739182007Sroberto	hppa*64*)
5740182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5741182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5742182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5743182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5744182007Sroberto	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5745182007Sroberto	  ;;
5746182007Sroberto	ia64*)
5747182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5748182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5749182007Sroberto	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5750182007Sroberto
5751182007Sroberto	  # hardcode_minus_L: Not really in the search PATH,
5752182007Sroberto	  # but as the default location of the library.
5753182007Sroberto	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5754182007Sroberto	  ;;
5755182007Sroberto	*)
5756182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5757182007Sroberto	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5758182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5759182007Sroberto	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5760182007Sroberto
5761182007Sroberto	  # hardcode_minus_L: Not really in the search PATH,
5762182007Sroberto	  # but as the default location of the library.
5763182007Sroberto	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5764182007Sroberto	  ;;
5765182007Sroberto	esac
5766182007Sroberto      fi
5767182007Sroberto      ;;
5768182007Sroberto
5769182007Sroberto    irix5* | irix6* | nonstopux*)
5770182007Sroberto      if test "$GCC" = yes; then
5771182007Sroberto	_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'
5772182007Sroberto      else
5773182007Sroberto	_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'
5774182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5775182007Sroberto      fi
5776182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5777182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5778182007Sroberto      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5779182007Sroberto      ;;
5780182007Sroberto
5781182007Sroberto    netbsd*)
5782182007Sroberto      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5783182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5784182007Sroberto      else
5785182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5786182007Sroberto      fi
5787182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5788182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5789182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5790182007Sroberto      ;;
5791182007Sroberto
5792182007Sroberto    newsos6)
5793182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5794182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5795182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5796182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5797182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5798182007Sroberto      ;;
5799182007Sroberto
5800182007Sroberto    openbsd*)
5801182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5802182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5803182007Sroberto      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5804182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5805182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5806182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5807182007Sroberto	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5808182007Sroberto      else
5809182007Sroberto       case $host_os in
5810182007Sroberto	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5811182007Sroberto	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5812182007Sroberto	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5813182007Sroberto	   ;;
5814182007Sroberto	 *)
5815182007Sroberto	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5816182007Sroberto	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5817182007Sroberto	   ;;
5818182007Sroberto       esac
5819182007Sroberto      fi
5820182007Sroberto      ;;
5821182007Sroberto
5822182007Sroberto    os2*)
5823182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5824182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5825182007Sroberto      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5826182007Sroberto      _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'
5827182007Sroberto      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5828182007Sroberto      ;;
5829182007Sroberto
5830182007Sroberto    osf3*)
5831182007Sroberto      if test "$GCC" = yes; then
5832182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5833182007Sroberto	_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'
5834182007Sroberto      else
5835182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5836182007Sroberto	_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'
5837182007Sroberto      fi
5838182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5839182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5840182007Sroberto      ;;
5841182007Sroberto
5842182007Sroberto    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5843182007Sroberto      if test "$GCC" = yes; then
5844182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5845182007Sroberto	_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'
5846182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5847182007Sroberto      else
5848182007Sroberto	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5849182007Sroberto	_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'
5850182007Sroberto	_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~
5851182007Sroberto	$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'
5852182007Sroberto
5853182007Sroberto	# Both c and cxx compiler support -rpath directly
5854182007Sroberto	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5855182007Sroberto      fi
5856182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5857182007Sroberto      ;;
5858182007Sroberto
5859182007Sroberto    sco3.2v5*)
5860182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5861182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5862182007Sroberto      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5863182007Sroberto      runpath_var=LD_RUN_PATH
5864182007Sroberto      hardcode_runpath_var=yes
5865182007Sroberto      ;;
5866182007Sroberto
5867182007Sroberto    solaris*)
5868182007Sroberto      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5869182007Sroberto      if test "$GCC" = yes; then
5870182007Sroberto	wlarc='${wl}'
5871182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5872182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5873182007Sroberto	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5874182007Sroberto      else
5875182007Sroberto	wlarc=''
5876182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5877182007Sroberto	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5878182007Sroberto  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5879182007Sroberto      fi
5880182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5881182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5882182007Sroberto      case $host_os in
5883182007Sroberto      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5884182007Sroberto      *)
5885182007Sroberto 	# The compiler driver will combine linker options so we
5886182007Sroberto 	# cannot just pass the convience library names through
5887182007Sroberto 	# without $wl, iff we do not link with $LD.
5888182007Sroberto 	# Luckily, gcc supports the same syntax we need for Sun Studio.
5889182007Sroberto 	# Supported since Solaris 2.6 (maybe 2.5.1?)
5890182007Sroberto 	case $wlarc in
5891182007Sroberto 	'')
5892182007Sroberto 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5893182007Sroberto 	*)
5894182007Sroberto 	  _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' ;;
5895182007Sroberto 	esac ;;
5896182007Sroberto      esac
5897182007Sroberto      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5898182007Sroberto      ;;
5899182007Sroberto
5900182007Sroberto    sunos4*)
5901182007Sroberto      if test "x$host_vendor" = xsequent; then
5902182007Sroberto	# Use $CC to link under sequent, because it throws in some extra .o
5903182007Sroberto	# files that make .init and .fini sections work.
5904182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5905182007Sroberto      else
5906182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5907182007Sroberto      fi
5908182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5909182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5910182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5911182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5912182007Sroberto      ;;
5913182007Sroberto
5914182007Sroberto    sysv4)
5915182007Sroberto      case $host_vendor in
5916182007Sroberto	sni)
5917182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5919182007Sroberto	;;
5920182007Sroberto	siemens)
5921182007Sroberto	  ## LD is ld it makes a PLAMLIB
5922182007Sroberto	  ## CC just makes a GrossModule.
5923182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5924182007Sroberto	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5925182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5926182007Sroberto        ;;
5927182007Sroberto	motorola)
5928182007Sroberto	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5929182007Sroberto	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5930182007Sroberto	;;
5931182007Sroberto      esac
5932182007Sroberto      runpath_var='LD_RUN_PATH'
5933182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5934182007Sroberto      ;;
5935182007Sroberto
5936182007Sroberto    sysv4.3*)
5937182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5938182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5939182007Sroberto      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5940182007Sroberto      ;;
5941182007Sroberto
5942182007Sroberto    sysv4*MP*)
5943182007Sroberto      if test -d /usr/nec; then
5944182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5945182007Sroberto	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5946182007Sroberto	runpath_var=LD_RUN_PATH
5947182007Sroberto	hardcode_runpath_var=yes
5948182007Sroberto	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5949182007Sroberto      fi
5950182007Sroberto      ;;
5951182007Sroberto
5952182007Sroberto    sysv4.2uw2*)
5953182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5954182007Sroberto      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5955182007Sroberto      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5956182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5957182007Sroberto      hardcode_runpath_var=yes
5958182007Sroberto      runpath_var=LD_RUN_PATH
5959182007Sroberto      ;;
5960182007Sroberto
5961182007Sroberto   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
5962182007Sroberto      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5963182007Sroberto      if test "$GCC" = yes; then
5964182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5965182007Sroberto      else
5966182007Sroberto	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5967182007Sroberto      fi
5968182007Sroberto      runpath_var='LD_RUN_PATH'
5969182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5970182007Sroberto      ;;
5971182007Sroberto
5972182007Sroberto    sysv5*)
5973182007Sroberto      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5974182007Sroberto      # $CC -shared without GNU ld will not create a library from C++
5975182007Sroberto      # object files and a static libstdc++, better avoid it by now
5976182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977182007Sroberto      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5978182007Sroberto  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5979182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5980182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5981182007Sroberto      runpath_var='LD_RUN_PATH'
5982182007Sroberto      ;;
5983182007Sroberto
5984182007Sroberto    uts4*)
5985182007Sroberto      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986182007Sroberto      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5987182007Sroberto      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5988182007Sroberto      ;;
5989182007Sroberto
5990182007Sroberto    *)
5991182007Sroberto      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5992182007Sroberto      ;;
5993182007Sroberto    esac
5994182007Sroberto  fi
5995182007Sroberto])
5996182007SrobertoAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5997182007Srobertotest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5998182007Sroberto
5999182007Srobertovariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6000182007Srobertoif test "$GCC" = yes; then
6001182007Sroberto  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6002182007Srobertofi
6003182007Sroberto
6004182007Sroberto#
6005182007Sroberto# Do we need to explicitly link libc?
6006182007Sroberto#
6007182007Srobertocase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6008182007Srobertox|xyes)
6009182007Sroberto  # Assume -lc should be added
6010182007Sroberto  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6011182007Sroberto
6012182007Sroberto  if test "$enable_shared" = yes && test "$GCC" = yes; then
6013182007Sroberto    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6014182007Sroberto    *'~'*)
6015182007Sroberto      # FIXME: we may have to deal with multi-command sequences.
6016182007Sroberto      ;;
6017182007Sroberto    '$CC '*)
6018182007Sroberto      # Test whether the compiler implicitly links with -lc since on some
6019182007Sroberto      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6020182007Sroberto      # to ld, don't add -lc before -lgcc.
6021182007Sroberto      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6022182007Sroberto      $rm conftest*
6023182007Sroberto      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6024182007Sroberto
6025182007Sroberto      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6026182007Sroberto        soname=conftest
6027182007Sroberto        lib=conftest
6028182007Sroberto        libobjs=conftest.$ac_objext
6029182007Sroberto        deplibs=
6030182007Sroberto        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6031182007Sroberto        compiler_flags=-v
6032182007Sroberto        linker_flags=-v
6033182007Sroberto        verstring=
6034182007Sroberto        output_objdir=.
6035182007Sroberto        libname=conftest
6036182007Sroberto        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6037182007Sroberto        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6038182007Sroberto        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6039182007Sroberto        then
6040182007Sroberto	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6041182007Sroberto        else
6042182007Sroberto	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6043182007Sroberto        fi
6044182007Sroberto        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6045182007Sroberto      else
6046182007Sroberto        cat conftest.err 1>&5
6047182007Sroberto      fi
6048182007Sroberto      $rm conftest*
6049182007Sroberto      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6050182007Sroberto      ;;
6051182007Sroberto    esac
6052182007Sroberto  fi
6053182007Sroberto  ;;
6054182007Srobertoesac
6055182007Sroberto])# AC_LIBTOOL_PROG_LD_SHLIBS
6056182007Sroberto
6057182007Sroberto
6058182007Sroberto# _LT_AC_FILE_LTDLL_C
6059182007Sroberto# -------------------
6060182007Sroberto# Be careful that the start marker always follows a newline.
6061182007SrobertoAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6062182007Sroberto# /* ltdll.c starts here */
6063182007Sroberto# #define WIN32_LEAN_AND_MEAN
6064182007Sroberto# #include <windows.h>
6065182007Sroberto# #undef WIN32_LEAN_AND_MEAN
6066182007Sroberto# #include <stdio.h>
6067182007Sroberto#
6068182007Sroberto# #ifndef __CYGWIN__
6069182007Sroberto# #  ifdef __CYGWIN32__
6070182007Sroberto# #    define __CYGWIN__ __CYGWIN32__
6071182007Sroberto# #  endif
6072182007Sroberto# #endif
6073182007Sroberto#
6074182007Sroberto# #ifdef __cplusplus
6075182007Sroberto# extern "C" {
6076182007Sroberto# #endif
6077182007Sroberto# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6078182007Sroberto# #ifdef __cplusplus
6079182007Sroberto# }
6080182007Sroberto# #endif
6081182007Sroberto#
6082182007Sroberto# #ifdef __CYGWIN__
6083182007Sroberto# #include <cygwin/cygwin_dll.h>
6084182007Sroberto# DECLARE_CYGWIN_DLL( DllMain );
6085182007Sroberto# #endif
6086182007Sroberto# HINSTANCE __hDllInstance_base;
6087182007Sroberto#
6088182007Sroberto# BOOL APIENTRY
6089182007Sroberto# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6090182007Sroberto# {
6091182007Sroberto#   __hDllInstance_base = hInst;
6092182007Sroberto#   return TRUE;
6093182007Sroberto# }
6094182007Sroberto# /* ltdll.c ends here */
6095182007Sroberto])# _LT_AC_FILE_LTDLL_C
6096182007Sroberto
6097182007Sroberto
6098182007Sroberto# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6099182007Sroberto# ---------------------------------
6100182007SrobertoAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6101182007Sroberto
6102182007Sroberto
6103182007Sroberto# old names
6104182007SrobertoAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6105182007SrobertoAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6106182007SrobertoAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6107182007SrobertoAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6108182007SrobertoAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6109182007SrobertoAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6110182007SrobertoAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6111182007Sroberto
6112182007Sroberto# This is just to silence aclocal about the macro not being used
6113182007Srobertoifelse([AC_DISABLE_FAST_INSTALL])
6114182007Sroberto
6115182007SrobertoAC_DEFUN([LT_AC_PROG_GCJ],
6116182007Sroberto[AC_CHECK_TOOL(GCJ, gcj, no)
6117182007Sroberto  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6118182007Sroberto  AC_SUBST(GCJFLAGS)
6119182007Sroberto])
6120182007Sroberto
6121182007SrobertoAC_DEFUN([LT_AC_PROG_RC],
6122182007Sroberto[AC_CHECK_TOOL(RC, windres, no)
6123182007Sroberto])
6124182007Sroberto
6125182007Sroberto# NOTE: This macro has been submitted for inclusion into   #
6126182007Sroberto#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6127182007Sroberto#  a released version of Autoconf we should remove this    #
6128182007Sroberto#  macro and use it instead.                               #
6129182007Sroberto# LT_AC_PROG_SED
6130182007Sroberto# --------------
6131182007Sroberto# Check for a fully-functional sed program, that truncates
6132182007Sroberto# as few characters as possible.  Prefer GNU sed if found.
6133182007SrobertoAC_DEFUN([LT_AC_PROG_SED],
6134182007Sroberto[AC_MSG_CHECKING([for a sed that does not truncate output])
6135182007SrobertoAC_CACHE_VAL(lt_cv_path_SED,
6136182007Sroberto[# Loop through the user's path and test for sed and gsed.
6137182007Sroberto# Then use that list of sed's as ones to test for truncation.
6138182007Srobertoas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6139182007Srobertofor as_dir in $PATH
6140182007Srobertodo
6141182007Sroberto  IFS=$as_save_IFS
6142182007Sroberto  test -z "$as_dir" && as_dir=.
6143182007Sroberto  for lt_ac_prog in sed gsed; do
6144182007Sroberto    for ac_exec_ext in '' $ac_executable_extensions; do
6145182007Sroberto      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6146182007Sroberto        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6147182007Sroberto      fi
6148182007Sroberto    done
6149182007Sroberto  done
6150182007Srobertodone
6151182007Srobertolt_ac_max=0
6152182007Srobertolt_ac_count=0
6153182007Sroberto# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6154182007Sroberto# along with /bin/sed that truncates output.
6155182007Srobertofor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6156182007Sroberto  test ! -f $lt_ac_sed && continue
6157182007Sroberto  cat /dev/null > conftest.in
6158182007Sroberto  lt_ac_count=0
6159182007Sroberto  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6160182007Sroberto  # Check for GNU sed and select it if it is found.
6161182007Sroberto  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6162182007Sroberto    lt_cv_path_SED=$lt_ac_sed
6163182007Sroberto    break
6164182007Sroberto  fi
6165182007Sroberto  while true; do
6166182007Sroberto    cat conftest.in conftest.in >conftest.tmp
6167182007Sroberto    mv conftest.tmp conftest.in
6168182007Sroberto    cp conftest.in conftest.nl
6169182007Sroberto    echo >>conftest.nl
6170182007Sroberto    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6171182007Sroberto    cmp -s conftest.out conftest.nl || break
6172182007Sroberto    # 10000 chars as input seems more than enough
6173182007Sroberto    test $lt_ac_count -gt 10 && break
6174182007Sroberto    lt_ac_count=`expr $lt_ac_count + 1`
6175182007Sroberto    if test $lt_ac_count -gt $lt_ac_max; then
6176182007Sroberto      lt_ac_max=$lt_ac_count
6177182007Sroberto      lt_cv_path_SED=$lt_ac_sed
6178182007Sroberto    fi
6179182007Sroberto  done
6180182007Srobertodone
6181182007Sroberto])
6182182007SrobertoSED=$lt_cv_path_SED
6183182007SrobertoAC_MSG_RESULT([$SED])
6184182007Sroberto])
6185182007Sroberto
6186200576Sroberto# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
6187182007Sroberto#
6188182007Sroberto# This file is free software; the Free Software Foundation
6189182007Sroberto# gives unlimited permission to copy and/or distribute it,
6190182007Sroberto# with or without modifications, as long as this notice is preserved.
6191182007Sroberto
6192182007Sroberto# AM_AUTOMAKE_VERSION(VERSION)
6193182007Sroberto# ----------------------------
6194182007Sroberto# Automake X.Y traces this macro to ensure aclocal.m4 has been
6195182007Sroberto# generated from the m4 files accompanying Automake X.Y.
6196200576Sroberto# (This private macro should not be called outside this file.)
6197200576SrobertoAC_DEFUN([AM_AUTOMAKE_VERSION],
6198200576Sroberto[am__api_version='1.11'
6199200576Srobertodnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6200200576Srobertodnl require some minimum version.  Point them to the right macro.
6201200576Srobertom4_if([$1], [1.11], [],
6202200576Sroberto      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6203200576Sroberto])
6204182007Sroberto
6205200576Sroberto# _AM_AUTOCONF_VERSION(VERSION)
6206200576Sroberto# -----------------------------
6207200576Sroberto# aclocal traces this macro to find the Autoconf version.
6208200576Sroberto# This is a private macro too.  Using m4_define simplifies
6209200576Sroberto# the logic in aclocal, which can simply ignore this definition.
6210200576Srobertom4_define([_AM_AUTOCONF_VERSION], [])
6211200576Sroberto
6212182007Sroberto# AM_SET_CURRENT_AUTOMAKE_VERSION
6213182007Sroberto# -------------------------------
6214200576Sroberto# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6215200576Sroberto# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
6216182007SrobertoAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6217200576Sroberto[AM_AUTOMAKE_VERSION([1.11])dnl
6218200576Srobertom4_ifndef([AC_AUTOCONF_VERSION],
6219200576Sroberto  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
6220200576Sroberto_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
6221182007Sroberto
6222182007Sroberto# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6223182007Sroberto
6224182007Sroberto# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6225182007Sroberto#
6226182007Sroberto# This file is free software; the Free Software Foundation
6227182007Sroberto# gives unlimited permission to copy and/or distribute it,
6228182007Sroberto# with or without modifications, as long as this notice is preserved.
6229182007Sroberto
6230132451Sroberto# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6231132451Sroberto# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6232132451Sroberto# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6233132451Sroberto#
6234132451Sroberto# Of course, Automake must honor this variable whenever it calls a
6235132451Sroberto# tool from the auxiliary directory.  The problem is that $srcdir (and
6236132451Sroberto# therefore $ac_aux_dir as well) can be either absolute or relative,
6237132451Sroberto# depending on how configure is run.  This is pretty annoying, since
6238132451Sroberto# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6239132451Sroberto# source directory, any form will work fine, but in subdirectories a
6240132451Sroberto# relative path needs to be adjusted first.
6241132451Sroberto#
6242132451Sroberto# $ac_aux_dir/missing
6243132451Sroberto#    fails when called from a subdirectory if $ac_aux_dir is relative
6244132451Sroberto# $top_srcdir/$ac_aux_dir/missing
6245132451Sroberto#    fails if $ac_aux_dir is absolute,
6246132451Sroberto#    fails when called from a subdirectory in a VPATH build with
6247132451Sroberto#          a relative $ac_aux_dir
6248132451Sroberto#
6249132451Sroberto# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6250132451Sroberto# are both prefixed by $srcdir.  In an in-source build this is usually
6251132451Sroberto# harmless because $srcdir is `.', but things will broke when you
6252132451Sroberto# start a VPATH build or use an absolute $srcdir.
6253132451Sroberto#
6254132451Sroberto# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6255132451Sroberto# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6256132451Sroberto#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6257132451Sroberto# and then we would define $MISSING as
6258132451Sroberto#   MISSING="\${SHELL} $am_aux_dir/missing"
6259132451Sroberto# This will work as long as MISSING is not called from configure, because
6260132451Sroberto# unfortunately $(top_srcdir) has no meaning in configure.
6261132451Sroberto# However there are other variables, like CC, which are often used in
6262132451Sroberto# configure, and could therefore not use this "fixed" $ac_aux_dir.
6263132451Sroberto#
6264132451Sroberto# Another solution, used here, is to always expand $ac_aux_dir to an
6265132451Sroberto# absolute PATH.  The drawback is that using absolute paths prevent a
6266132451Sroberto# configured tree to be moved without reconfiguration.
6267132451Sroberto
6268182007SrobertoAC_DEFUN([AM_AUX_DIR_EXPAND],
6269182007Sroberto[dnl Rely on autoconf to set up CDPATH properly.
6270182007SrobertoAC_PREREQ([2.50])dnl
6271132451Sroberto# expand $ac_aux_dir to an absolute path
6272132451Srobertoam_aux_dir=`cd $ac_aux_dir && pwd`
6273132451Sroberto])
6274132451Sroberto
6275182007Sroberto# AM_CONDITIONAL                                            -*- Autoconf -*-
6276132451Sroberto
6277200576Sroberto# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
6278182007Sroberto# Free Software Foundation, Inc.
6279182007Sroberto#
6280182007Sroberto# This file is free software; the Free Software Foundation
6281182007Sroberto# gives unlimited permission to copy and/or distribute it,
6282182007Sroberto# with or without modifications, as long as this notice is preserved.
6283132451Sroberto
6284200576Sroberto# serial 9
6285132451Sroberto
6286182007Sroberto# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6287182007Sroberto# -------------------------------------
6288182007Sroberto# Define a conditional.
6289182007SrobertoAC_DEFUN([AM_CONDITIONAL],
6290182007Sroberto[AC_PREREQ(2.52)dnl
6291182007Sroberto ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6292182007Sroberto	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6293200576SrobertoAC_SUBST([$1_TRUE])dnl
6294200576SrobertoAC_SUBST([$1_FALSE])dnl
6295200576Sroberto_AM_SUBST_NOTMAKE([$1_TRUE])dnl
6296200576Sroberto_AM_SUBST_NOTMAKE([$1_FALSE])dnl
6297200576Srobertom4_define([_AM_COND_VALUE_$1], [$2])dnl
6298182007Srobertoif $2; then
6299182007Sroberto  $1_TRUE=
6300182007Sroberto  $1_FALSE='#'
6301132451Srobertoelse
6302182007Sroberto  $1_TRUE='#'
6303182007Sroberto  $1_FALSE=
6304132451Srobertofi
6305182007SrobertoAC_CONFIG_COMMANDS_PRE(
6306182007Sroberto[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6307182007Sroberto  AC_MSG_ERROR([[conditional "$1" was never defined.
6308182007SrobertoUsually this means the macro was only invoked conditionally.]])
6309182007Srobertofi])])
6310132451Sroberto
6311200576Sroberto# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
6312182007Sroberto# Free Software Foundation, Inc.
6313182007Sroberto#
6314182007Sroberto# This file is free software; the Free Software Foundation
6315182007Sroberto# gives unlimited permission to copy and/or distribute it,
6316182007Sroberto# with or without modifications, as long as this notice is preserved.
6317132451Sroberto
6318200576Sroberto# serial 10
6319132451Sroberto
6320132451Sroberto# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6321132451Sroberto# written in clear, in which case automake, when reading aclocal.m4,
6322132451Sroberto# will think it sees a *use*, and therefore will trigger all it's
6323132451Sroberto# C support machinery.  Also note that it means that autoscan, seeing
6324132451Sroberto# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6325132451Sroberto
6326132451Sroberto
6327132451Sroberto# _AM_DEPENDENCIES(NAME)
6328132451Sroberto# ----------------------
6329132451Sroberto# See how the compiler implements dependency checking.
6330132451Sroberto# NAME is "CC", "CXX", "GCJ", or "OBJC".
6331132451Sroberto# We try a few techniques and use that to set a single cache variable.
6332132451Sroberto#
6333132451Sroberto# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6334132451Sroberto# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6335132451Sroberto# dependency, and given that the user is not expected to run this macro,
6336132451Sroberto# just rely on AC_PROG_CC.
6337132451SrobertoAC_DEFUN([_AM_DEPENDENCIES],
6338132451Sroberto[AC_REQUIRE([AM_SET_DEPDIR])dnl
6339132451SrobertoAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6340132451SrobertoAC_REQUIRE([AM_MAKE_INCLUDE])dnl
6341132451SrobertoAC_REQUIRE([AM_DEP_TRACK])dnl
6342132451Sroberto
6343132451Srobertoifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6344132451Sroberto       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6345132451Sroberto       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6346200576Sroberto       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
6347132451Sroberto       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6348132451Sroberto                   [depcc="$$1"   am_compiler_list=])
6349132451Sroberto
6350132451SrobertoAC_CACHE_CHECK([dependency style of $depcc],
6351132451Sroberto               [am_cv_$1_dependencies_compiler_type],
6352132451Sroberto[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6353132451Sroberto  # We make a subdir and do the tests there.  Otherwise we can end up
6354132451Sroberto  # making bogus files that we don't know about and never remove.  For
6355132451Sroberto  # instance it was reported that on HP-UX the gcc test will end up
6356132451Sroberto  # making a dummy file named `D' -- because `-MD' means `put the output
6357132451Sroberto  # in D'.
6358132451Sroberto  mkdir conftest.dir
6359132451Sroberto  # Copy depcomp to subdir because otherwise we won't find it if we're
6360132451Sroberto  # using a relative directory.
6361132451Sroberto  cp "$am_depcomp" conftest.dir
6362132451Sroberto  cd conftest.dir
6363132451Sroberto  # We will build objects and dependencies in a subdirectory because
6364132451Sroberto  # it helps to detect inapplicable dependency modes.  For instance
6365132451Sroberto  # both Tru64's cc and ICC support -MD to output dependencies as a
6366132451Sroberto  # side effect of compilation, but ICC will put the dependencies in
6367132451Sroberto  # the current directory while Tru64 will put them in the object
6368132451Sroberto  # directory.
6369132451Sroberto  mkdir sub
6370132451Sroberto
6371132451Sroberto  am_cv_$1_dependencies_compiler_type=none
6372132451Sroberto  if test "$am_compiler_list" = ""; then
6373132451Sroberto     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6374132451Sroberto  fi
6375200576Sroberto  am__universal=false
6376200576Sroberto  m4_case([$1], [CC],
6377200576Sroberto    [case " $depcc " in #(
6378200576Sroberto     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6379200576Sroberto     esac],
6380200576Sroberto    [CXX],
6381200576Sroberto    [case " $depcc " in #(
6382200576Sroberto     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6383200576Sroberto     esac])
6384200576Sroberto
6385132451Sroberto  for depmode in $am_compiler_list; do
6386132451Sroberto    # Setup a source with many dependencies, because some compilers
6387132451Sroberto    # like to wrap large dependency lists on column 80 (with \), and
6388132451Sroberto    # we should not choose a depcomp mode which is confused by this.
6389132451Sroberto    #
6390132451Sroberto    # We need to recreate these files for each test, as the compiler may
6391132451Sroberto    # overwrite some of them when testing with obscure command lines.
6392132451Sroberto    # This happens at least with the AIX C compiler.
6393132451Sroberto    : > sub/conftest.c
6394132451Sroberto    for i in 1 2 3 4 5 6; do
6395132451Sroberto      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6396182007Sroberto      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6397182007Sroberto      # Solaris 8's {/usr,}/bin/sh.
6398182007Sroberto      touch sub/conftst$i.h
6399132451Sroberto    done
6400132451Sroberto    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6401132451Sroberto
6402200576Sroberto    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6403200576Sroberto    # mode.  It turns out that the SunPro C++ compiler does not properly
6404200576Sroberto    # handle `-M -o', and we need to detect this.  Also, some Intel
6405200576Sroberto    # versions had trouble with output in subdirs
6406200576Sroberto    am__obj=sub/conftest.${OBJEXT-o}
6407200576Sroberto    am__minus_obj="-o $am__obj"
6408132451Sroberto    case $depmode in
6409200576Sroberto    gcc)
6410200576Sroberto      # This depmode causes a compiler race in universal mode.
6411200576Sroberto      test "$am__universal" = false || continue
6412200576Sroberto      ;;
6413132451Sroberto    nosideeffect)
6414132451Sroberto      # after this tag, mechanisms are not by side-effect, so they'll
6415132451Sroberto      # only be used when explicitly requested
6416132451Sroberto      if test "x$enable_dependency_tracking" = xyes; then
6417132451Sroberto	continue
6418132451Sroberto      else
6419132451Sroberto	break
6420132451Sroberto      fi
6421132451Sroberto      ;;
6422200576Sroberto    msvisualcpp | msvcmsys)
6423200576Sroberto      # This compiler won't grok `-c -o', but also, the minuso test has
6424200576Sroberto      # not run yet.  These depmodes are late enough in the game, and
6425200576Sroberto      # so weak that their functioning should not be impacted.
6426200576Sroberto      am__obj=conftest.${OBJEXT-o}
6427200576Sroberto      am__minus_obj=
6428200576Sroberto      ;;
6429132451Sroberto    none) break ;;
6430132451Sroberto    esac
6431132451Sroberto    if depmode=$depmode \
6432200576Sroberto       source=sub/conftest.c object=$am__obj \
6433132451Sroberto       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6434200576Sroberto       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6435132451Sroberto         >/dev/null 2>conftest.err &&
6436200576Sroberto       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6437132451Sroberto       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6438200576Sroberto       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6439132451Sroberto       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6440132451Sroberto      # icc doesn't choke on unknown options, it will just issue warnings
6441182007Sroberto      # or remarks (even with -Werror).  So we grep stderr for any message
6442182007Sroberto      # that says an option was ignored or not supported.
6443182007Sroberto      # When given -MP, icc 7.0 and 7.1 complain thusly:
6444182007Sroberto      #   icc: Command line warning: ignoring option '-M'; no argument required
6445182007Sroberto      # The diagnosis changed in icc 8.0:
6446182007Sroberto      #   icc: Command line remark: option '-MP' not supported
6447182007Sroberto      if (grep 'ignoring option' conftest.err ||
6448182007Sroberto          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6449132451Sroberto        am_cv_$1_dependencies_compiler_type=$depmode
6450132451Sroberto        break
6451132451Sroberto      fi
6452132451Sroberto    fi
6453132451Sroberto  done
6454132451Sroberto
6455132451Sroberto  cd ..
6456132451Sroberto  rm -rf conftest.dir
6457132451Srobertoelse
6458132451Sroberto  am_cv_$1_dependencies_compiler_type=none
6459132451Srobertofi
6460132451Sroberto])
6461132451SrobertoAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6462132451SrobertoAM_CONDITIONAL([am__fastdep$1], [
6463132451Sroberto  test "x$enable_dependency_tracking" != xno \
6464132451Sroberto  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6465132451Sroberto])
6466132451Sroberto
6467132451Sroberto
6468132451Sroberto# AM_SET_DEPDIR
6469132451Sroberto# -------------
6470132451Sroberto# Choose a directory name for dependency files.
6471132451Sroberto# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6472132451SrobertoAC_DEFUN([AM_SET_DEPDIR],
6473132451Sroberto[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6474132451SrobertoAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6475132451Sroberto])
6476132451Sroberto
6477132451Sroberto
6478132451Sroberto# AM_DEP_TRACK
6479132451Sroberto# ------------
6480132451SrobertoAC_DEFUN([AM_DEP_TRACK],
6481132451Sroberto[AC_ARG_ENABLE(dependency-tracking,
6482182007Sroberto[  --disable-dependency-tracking  speeds up one-time build
6483182007Sroberto  --enable-dependency-tracking   do not reject slow dependency extractors])
6484132451Srobertoif test "x$enable_dependency_tracking" != xno; then
6485132451Sroberto  am_depcomp="$ac_aux_dir/depcomp"
6486132451Sroberto  AMDEPBACKSLASH='\'
6487132451Srobertofi
6488132451SrobertoAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6489200576SrobertoAC_SUBST([AMDEPBACKSLASH])dnl
6490200576Sroberto_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
6491132451Sroberto])
6492132451Sroberto
6493182007Sroberto# Generate code to set up dependency tracking.              -*- Autoconf -*-
6494132451Sroberto
6495200576Sroberto# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
6496182007Sroberto# Free Software Foundation, Inc.
6497182007Sroberto#
6498182007Sroberto# This file is free software; the Free Software Foundation
6499182007Sroberto# gives unlimited permission to copy and/or distribute it,
6500182007Sroberto# with or without modifications, as long as this notice is preserved.
6501132451Sroberto
6502200576Sroberto#serial 5
6503132451Sroberto
6504132451Sroberto# _AM_OUTPUT_DEPENDENCY_COMMANDS
6505132451Sroberto# ------------------------------
6506132451SrobertoAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6507200576Sroberto[{
6508200576Sroberto  # Autoconf 2.62 quotes --file arguments for eval, but not when files
6509200576Sroberto  # are listed without --file.  Let's play safe and only enable the eval
6510200576Sroberto  # if we detect the quoting.
6511200576Sroberto  case $CONFIG_FILES in
6512200576Sroberto  *\'*) eval set x "$CONFIG_FILES" ;;
6513200576Sroberto  *)   set x $CONFIG_FILES ;;
6514200576Sroberto  esac
6515200576Sroberto  shift
6516200576Sroberto  for mf
6517200576Sroberto  do
6518200576Sroberto    # Strip MF so we end up with the name of the file.
6519200576Sroberto    mf=`echo "$mf" | sed -e 's/:.*$//'`
6520200576Sroberto    # Check whether this is an Automake generated Makefile or not.
6521200576Sroberto    # We used to match only the files named `Makefile.in', but
6522200576Sroberto    # some people rename them; so instead we look at the file content.
6523200576Sroberto    # Grep'ing the first line is not enough: some people post-process
6524200576Sroberto    # each Makefile.in and add a new line on top of each file to say so.
6525200576Sroberto    # Grep'ing the whole file is not good either: AIX grep has a line
6526200576Sroberto    # limit of 2048, but all sed's we know have understand at least 4000.
6527200576Sroberto    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
6528200576Sroberto      dirpart=`AS_DIRNAME("$mf")`
6529200576Sroberto    else
6530200576Sroberto      continue
6531200576Sroberto    fi
6532200576Sroberto    # Extract the definition of DEPDIR, am__include, and am__quote
6533200576Sroberto    # from the Makefile without running `make'.
6534200576Sroberto    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6535200576Sroberto    test -z "$DEPDIR" && continue
6536200576Sroberto    am__include=`sed -n 's/^am__include = //p' < "$mf"`
6537200576Sroberto    test -z "am__include" && continue
6538200576Sroberto    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6539200576Sroberto    # When using ansi2knr, U may be empty or an underscore; expand it
6540200576Sroberto    U=`sed -n 's/^U = //p' < "$mf"`
6541200576Sroberto    # Find all dependency output files, they are included files with
6542200576Sroberto    # $(DEPDIR) in their names.  We invoke sed twice because it is the
6543200576Sroberto    # simplest approach to changing $(DEPDIR) to its actual value in the
6544200576Sroberto    # expansion.
6545200576Sroberto    for file in `sed -n "
6546200576Sroberto      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6547200576Sroberto	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6548200576Sroberto      # Make sure the directory exists.
6549200576Sroberto      test -f "$dirpart/$file" && continue
6550200576Sroberto      fdir=`AS_DIRNAME(["$file"])`
6551200576Sroberto      AS_MKDIR_P([$dirpart/$fdir])
6552200576Sroberto      # echo "creating $dirpart/$file"
6553200576Sroberto      echo '# dummy' > "$dirpart/$file"
6554200576Sroberto    done
6555132451Sroberto  done
6556200576Sroberto}
6557132451Sroberto])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6558132451Sroberto
6559132451Sroberto
6560132451Sroberto# AM_OUTPUT_DEPENDENCY_COMMANDS
6561132451Sroberto# -----------------------------
6562132451Sroberto# This macro should only be invoked once -- use via AC_REQUIRE.
6563132451Sroberto#
6564132451Sroberto# This code is only required when automatic dependency tracking
6565132451Sroberto# is enabled.  FIXME.  This creates each `.P' file that we will
6566132451Sroberto# need in order to bootstrap the dependency handling code.
6567132451SrobertoAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6568132451Sroberto[AC_CONFIG_COMMANDS([depfiles],
6569132451Sroberto     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6570132451Sroberto     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6571132451Sroberto])
6572132451Sroberto
6573182007Sroberto# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6574182007Sroberto# Free Software Foundation, Inc.
6575182007Sroberto#
6576182007Sroberto# This file is free software; the Free Software Foundation
6577182007Sroberto# gives unlimited permission to copy and/or distribute it,
6578182007Sroberto# with or without modifications, as long as this notice is preserved.
6579132451Sroberto
6580182007Sroberto# serial 8
6581132451Sroberto
6582182007Sroberto# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
6583182007SrobertoAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6584132451Sroberto
6585182007Sroberto# Do all the work for Automake.                             -*- Autoconf -*-
6586132451Sroberto
6587200576Sroberto# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
6588200576Sroberto# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
6589182007Sroberto#
6590182007Sroberto# This file is free software; the Free Software Foundation
6591182007Sroberto# gives unlimited permission to copy and/or distribute it,
6592182007Sroberto# with or without modifications, as long as this notice is preserved.
6593132451Sroberto
6594200576Sroberto# serial 16
6595182007Sroberto
6596182007Sroberto# This macro actually does too much.  Some checks are only needed if
6597182007Sroberto# your package does certain things.  But this isn't really a big deal.
6598182007Sroberto
6599182007Sroberto# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6600182007Sroberto# AM_INIT_AUTOMAKE([OPTIONS])
6601182007Sroberto# -----------------------------------------------
6602182007Sroberto# The call with PACKAGE and VERSION arguments is the old style
6603182007Sroberto# call (pre autoconf-2.50), which is being phased out.  PACKAGE
6604182007Sroberto# and VERSION should now be passed to AC_INIT and removed from
6605182007Sroberto# the call to AM_INIT_AUTOMAKE.
6606182007Sroberto# We support both call styles for the transition.  After
6607182007Sroberto# the next Automake release, Autoconf can make the AC_INIT
6608182007Sroberto# arguments mandatory, and then we can depend on a new Autoconf
6609182007Sroberto# release and drop the old call support.
6610182007SrobertoAC_DEFUN([AM_INIT_AUTOMAKE],
6611200576Sroberto[AC_PREREQ([2.62])dnl
6612182007Srobertodnl Autoconf wants to disallow AM_ names.  We explicitly allow
6613182007Srobertodnl the ones we care about.
6614182007Srobertom4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6615182007SrobertoAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6616182007SrobertoAC_REQUIRE([AC_PROG_INSTALL])dnl
6617200576Srobertoif test "`cd $srcdir && pwd`" != "`pwd`"; then
6618200576Sroberto  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6619200576Sroberto  # is not polluted with repeated "-I."
6620200576Sroberto  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
6621200576Sroberto  # test to see if srcdir already configured
6622200576Sroberto  if test -f $srcdir/config.status; then
6623200576Sroberto    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6624200576Sroberto  fi
6625182007Srobertofi
6626182007Sroberto
6627182007Sroberto# test whether we have cygpath
6628182007Srobertoif test -z "$CYGPATH_W"; then
6629182007Sroberto  if (cygpath --version) >/dev/null 2>/dev/null; then
6630182007Sroberto    CYGPATH_W='cygpath -w'
6631182007Sroberto  else
6632182007Sroberto    CYGPATH_W=echo
6633182007Sroberto  fi
6634182007Srobertofi
6635182007SrobertoAC_SUBST([CYGPATH_W])
6636182007Sroberto
6637182007Sroberto# Define the identity of the package.
6638182007Srobertodnl Distinguish between old-style and new-style calls.
6639182007Srobertom4_ifval([$2],
6640182007Sroberto[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6641182007Sroberto AC_SUBST([PACKAGE], [$1])dnl
6642182007Sroberto AC_SUBST([VERSION], [$2])],
6643182007Sroberto[_AM_SET_OPTIONS([$1])dnl
6644200576Srobertodnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
6645200576Srobertom4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
6646200576Sroberto  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
6647182007Sroberto AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6648182007Sroberto AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6649182007Sroberto
6650182007Sroberto_AM_IF_OPTION([no-define],,
6651182007Sroberto[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6652182007Sroberto AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6653182007Sroberto
6654182007Sroberto# Some tools Automake needs.
6655182007SrobertoAC_REQUIRE([AM_SANITY_CHECK])dnl
6656182007SrobertoAC_REQUIRE([AC_ARG_PROGRAM])dnl
6657182007SrobertoAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6658182007SrobertoAM_MISSING_PROG(AUTOCONF, autoconf)
6659182007SrobertoAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6660182007SrobertoAM_MISSING_PROG(AUTOHEADER, autoheader)
6661182007SrobertoAM_MISSING_PROG(MAKEINFO, makeinfo)
6662200576SrobertoAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
6663200576SrobertoAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
6664182007SrobertoAC_REQUIRE([AM_PROG_MKDIR_P])dnl
6665182007Sroberto# We need awk for the "check" target.  The system "awk" is bad on
6666182007Sroberto# some platforms.
6667182007SrobertoAC_REQUIRE([AC_PROG_AWK])dnl
6668182007SrobertoAC_REQUIRE([AC_PROG_MAKE_SET])dnl
6669182007SrobertoAC_REQUIRE([AM_SET_LEADING_DOT])dnl
6670182007Sroberto_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6671200576Sroberto	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6672200576Sroberto			     [_AM_PROG_TAR([v7])])])
6673182007Sroberto_AM_IF_OPTION([no-dependencies],,
6674182007Sroberto[AC_PROVIDE_IFELSE([AC_PROG_CC],
6675200576Sroberto		  [_AM_DEPENDENCIES(CC)],
6676200576Sroberto		  [define([AC_PROG_CC],
6677200576Sroberto			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6678182007SrobertoAC_PROVIDE_IFELSE([AC_PROG_CXX],
6679200576Sroberto		  [_AM_DEPENDENCIES(CXX)],
6680200576Sroberto		  [define([AC_PROG_CXX],
6681200576Sroberto			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6682200576SrobertoAC_PROVIDE_IFELSE([AC_PROG_OBJC],
6683200576Sroberto		  [_AM_DEPENDENCIES(OBJC)],
6684200576Sroberto		  [define([AC_PROG_OBJC],
6685200576Sroberto			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
6686182007Sroberto])
6687200576Sroberto_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
6688200576Srobertodnl The `parallel-tests' driver may need to know about EXEEXT, so add the
6689200576Srobertodnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
6690200576Srobertodnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
6691200576SrobertoAC_CONFIG_COMMANDS_PRE(dnl
6692200576Sroberto[m4_provide_if([_AM_COMPILER_EXEEXT],
6693200576Sroberto  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
6694182007Sroberto])
6695182007Sroberto
6696200576Srobertodnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
6697200576Srobertodnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
6698200576Srobertodnl mangled by Autoconf and run in a shell conditional statement.
6699200576Srobertom4_define([_AC_COMPILER_EXEEXT],
6700200576Srobertom4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
6701182007Sroberto
6702200576Sroberto
6703182007Sroberto# When config.status generates a header, we must update the stamp-h file.
6704182007Sroberto# This file resides in the same directory as the config header
6705182007Sroberto# that is generated.  The stamp files are numbered to have different names.
6706182007Sroberto
6707182007Sroberto# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6708182007Sroberto# loop where config.status creates the headers, so we can generate
6709182007Sroberto# our stamp files there.
6710182007SrobertoAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6711182007Sroberto[# Compute $1's index in $config_headers.
6712200576Sroberto_am_arg=$1
6713182007Sroberto_am_stamp_count=1
6714182007Srobertofor _am_header in $config_headers :; do
6715182007Sroberto  case $_am_header in
6716200576Sroberto    $_am_arg | $_am_arg:* )
6717182007Sroberto      break ;;
6718182007Sroberto    * )
6719182007Sroberto      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6720182007Sroberto  esac
6721182007Srobertodone
6722200576Srobertoecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
6723182007Sroberto
6724200576Sroberto# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
6725182007Sroberto#
6726182007Sroberto# This file is free software; the Free Software Foundation
6727182007Sroberto# gives unlimited permission to copy and/or distribute it,
6728182007Sroberto# with or without modifications, as long as this notice is preserved.
6729182007Sroberto
6730182007Sroberto# AM_PROG_INSTALL_SH
6731182007Sroberto# ------------------
6732182007Sroberto# Define $install_sh.
6733182007SrobertoAC_DEFUN([AM_PROG_INSTALL_SH],
6734182007Sroberto[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6735200576Srobertoif test x"${install_sh}" != xset; then
6736200576Sroberto  case $am_aux_dir in
6737200576Sroberto  *\ * | *\	*)
6738200576Sroberto    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6739200576Sroberto  *)
6740200576Sroberto    install_sh="\${SHELL} $am_aux_dir/install-sh"
6741200576Sroberto  esac
6742200576Srobertofi
6743182007SrobertoAC_SUBST(install_sh)])
6744182007Sroberto
6745182007Sroberto# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
6746182007Sroberto#
6747182007Sroberto# This file is free software; the Free Software Foundation
6748182007Sroberto# gives unlimited permission to copy and/or distribute it,
6749182007Sroberto# with or without modifications, as long as this notice is preserved.
6750182007Sroberto
6751132451Sroberto# serial 2
6752132451Sroberto
6753182007Sroberto# Check whether the underlying file-system supports filenames
6754182007Sroberto# with a leading dot.  For instance MS-DOS doesn't.
6755182007SrobertoAC_DEFUN([AM_SET_LEADING_DOT],
6756182007Sroberto[rm -rf .tst 2>/dev/null
6757182007Srobertomkdir .tst 2>/dev/null
6758182007Srobertoif test -d .tst; then
6759182007Sroberto  am__leading_dot=.
6760182007Srobertoelse
6761182007Sroberto  am__leading_dot=_
6762182007Srobertofi
6763182007Srobertormdir .tst 2>/dev/null
6764182007SrobertoAC_SUBST([am__leading_dot])])
6765182007Sroberto
6766182007Sroberto# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6767182007Sroberto
6768200576Sroberto# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
6769182007Sroberto#
6770182007Sroberto# This file is free software; the Free Software Foundation
6771182007Sroberto# gives unlimited permission to copy and/or distribute it,
6772182007Sroberto# with or without modifications, as long as this notice is preserved.
6773182007Sroberto
6774200576Sroberto# serial 4
6775182007Sroberto
6776132451Sroberto# AM_MAKE_INCLUDE()
6777132451Sroberto# -----------------
6778132451Sroberto# Check to see how make treats includes.
6779132451SrobertoAC_DEFUN([AM_MAKE_INCLUDE],
6780132451Sroberto[am_make=${MAKE-make}
6781132451Srobertocat > confinc << 'END'
6782132451Srobertoam__doit:
6783200576Sroberto	@echo this is the am__doit target
6784132451Sroberto.PHONY: am__doit
6785132451SrobertoEND
6786132451Sroberto# If we don't find an include directive, just comment out the code.
6787132451SrobertoAC_MSG_CHECKING([for style of include used by $am_make])
6788132451Srobertoam__include="#"
6789132451Srobertoam__quote=
6790132451Sroberto_am_result=none
6791132451Sroberto# First try GNU make style include.
6792132451Srobertoecho "include confinc" > confmf
6793200576Sroberto# Ignore all kinds of additional output from `make'.
6794200576Srobertocase `$am_make -s -f confmf 2> /dev/null` in #(
6795200576Sroberto*the\ am__doit\ target*)
6796200576Sroberto  am__include=include
6797200576Sroberto  am__quote=
6798200576Sroberto  _am_result=GNU
6799200576Sroberto  ;;
6800200576Srobertoesac
6801132451Sroberto# Now try BSD make style include.
6802132451Srobertoif test "$am__include" = "#"; then
6803132451Sroberto   echo '.include "confinc"' > confmf
6804200576Sroberto   case `$am_make -s -f confmf 2> /dev/null` in #(
6805200576Sroberto   *the\ am__doit\ target*)
6806200576Sroberto     am__include=.include
6807200576Sroberto     am__quote="\""
6808200576Sroberto     _am_result=BSD
6809200576Sroberto     ;;
6810200576Sroberto   esac
6811132451Srobertofi
6812132451SrobertoAC_SUBST([am__include])
6813132451SrobertoAC_SUBST([am__quote])
6814132451SrobertoAC_MSG_RESULT([$_am_result])
6815132451Srobertorm -f confinc confmf
6816132451Sroberto])
6817132451Sroberto
6818182007Sroberto# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6819132451Sroberto
6820200576Sroberto# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
6821182007Sroberto# Free Software Foundation, Inc.
6822182007Sroberto#
6823182007Sroberto# This file is free software; the Free Software Foundation
6824182007Sroberto# gives unlimited permission to copy and/or distribute it,
6825182007Sroberto# with or without modifications, as long as this notice is preserved.
6826132451Sroberto
6827200576Sroberto# serial 6
6828132451Sroberto
6829182007Sroberto# AM_MISSING_PROG(NAME, PROGRAM)
6830182007Sroberto# ------------------------------
6831182007SrobertoAC_DEFUN([AM_MISSING_PROG],
6832182007Sroberto[AC_REQUIRE([AM_MISSING_HAS_RUN])
6833182007Sroberto$1=${$1-"${am_missing_run}$2"}
6834182007SrobertoAC_SUBST($1)])
6835132451Sroberto
6836132451Sroberto
6837182007Sroberto# AM_MISSING_HAS_RUN
6838182007Sroberto# ------------------
6839182007Sroberto# Define MISSING if not defined so far and test if it supports --run.
6840182007Sroberto# If it does, set am_missing_run to use it, otherwise, to nothing.
6841182007SrobertoAC_DEFUN([AM_MISSING_HAS_RUN],
6842182007Sroberto[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6843200576SrobertoAC_REQUIRE_AUX_FILE([missing])dnl
6844200576Srobertoif test x"${MISSING+set}" != xset; then
6845200576Sroberto  case $am_aux_dir in
6846200576Sroberto  *\ * | *\	*)
6847200576Sroberto    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
6848200576Sroberto  *)
6849200576Sroberto    MISSING="\${SHELL} $am_aux_dir/missing" ;;
6850200576Sroberto  esac
6851200576Srobertofi
6852182007Sroberto# Use eval to expand $SHELL
6853182007Srobertoif eval "$MISSING --run true"; then
6854182007Sroberto  am_missing_run="$MISSING --run "
6855182007Srobertoelse
6856182007Sroberto  am_missing_run=
6857182007Sroberto  AC_MSG_WARN([`missing' script is too old or missing])
6858182007Srobertofi
6859182007Sroberto])
6860132451Sroberto
6861200576Sroberto# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
6862182007Sroberto#
6863182007Sroberto# This file is free software; the Free Software Foundation
6864182007Sroberto# gives unlimited permission to copy and/or distribute it,
6865182007Sroberto# with or without modifications, as long as this notice is preserved.
6866132451Sroberto
6867182007Sroberto# AM_PROG_MKDIR_P
6868182007Sroberto# ---------------
6869200576Sroberto# Check for `mkdir -p'.
6870182007SrobertoAC_DEFUN([AM_PROG_MKDIR_P],
6871200576Sroberto[AC_PREREQ([2.60])dnl
6872200576SrobertoAC_REQUIRE([AC_PROG_MKDIR_P])dnl
6873200576Srobertodnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
6874200576Srobertodnl while keeping a definition of mkdir_p for backward compatibility.
6875200576Srobertodnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
6876200576Srobertodnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
6877200576Srobertodnl Makefile.ins that do not define MKDIR_P, so we do our own
6878200576Srobertodnl adjustment using top_builddir (which is defined more often than
6879200576Srobertodnl MKDIR_P).
6880200576SrobertoAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
6881200576Srobertocase $mkdir_p in
6882200576Sroberto  [[\\/$]]* | ?:[[\\/]]*) ;;
6883200576Sroberto  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
6884200576Srobertoesac
6885200576Sroberto])
6886132451Sroberto
6887182007Sroberto# Helper functions for option handling.                     -*- Autoconf -*-
6888182007Sroberto
6889200576Sroberto# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
6890182007Sroberto#
6891182007Sroberto# This file is free software; the Free Software Foundation
6892182007Sroberto# gives unlimited permission to copy and/or distribute it,
6893182007Sroberto# with or without modifications, as long as this notice is preserved.
6894182007Sroberto
6895200576Sroberto# serial 4
6896182007Sroberto
6897182007Sroberto# _AM_MANGLE_OPTION(NAME)
6898182007Sroberto# -----------------------
6899182007SrobertoAC_DEFUN([_AM_MANGLE_OPTION],
6900182007Sroberto[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6901182007Sroberto
6902182007Sroberto# _AM_SET_OPTION(NAME)
6903182007Sroberto# ------------------------------
6904182007Sroberto# Set option NAME.  Presently that only means defining a flag for this option.
6905182007SrobertoAC_DEFUN([_AM_SET_OPTION],
6906182007Sroberto[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
6907182007Sroberto
6908182007Sroberto# _AM_SET_OPTIONS(OPTIONS)
6909182007Sroberto# ----------------------------------
6910182007Sroberto# OPTIONS is a space-separated list of Automake options.
6911182007SrobertoAC_DEFUN([_AM_SET_OPTIONS],
6912200576Sroberto[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6913182007Sroberto
6914182007Sroberto# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6915182007Sroberto# -------------------------------------------
6916182007Sroberto# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6917182007SrobertoAC_DEFUN([_AM_IF_OPTION],
6918182007Sroberto[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
6919182007Sroberto
6920182007Sroberto# Check to make sure that the build environment is sane.    -*- Autoconf -*-
6921182007Sroberto
6922200576Sroberto# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
6923182007Sroberto# Free Software Foundation, Inc.
6924182007Sroberto#
6925182007Sroberto# This file is free software; the Free Software Foundation
6926182007Sroberto# gives unlimited permission to copy and/or distribute it,
6927182007Sroberto# with or without modifications, as long as this notice is preserved.
6928182007Sroberto
6929200576Sroberto# serial 5
6930182007Sroberto
6931182007Sroberto# AM_SANITY_CHECK
6932182007Sroberto# ---------------
6933182007SrobertoAC_DEFUN([AM_SANITY_CHECK],
6934182007Sroberto[AC_MSG_CHECKING([whether build environment is sane])
6935182007Sroberto# Just in case
6936182007Srobertosleep 1
6937182007Srobertoecho timestamp > conftest.file
6938200576Sroberto# Reject unsafe characters in $srcdir or the absolute working directory
6939200576Sroberto# name.  Accept space and tab only in the latter.
6940200576Srobertoam_lf='
6941200576Sroberto'
6942200576Srobertocase `pwd` in
6943200576Sroberto  *[[\\\"\#\$\&\'\`$am_lf]]*)
6944200576Sroberto    AC_MSG_ERROR([unsafe absolute working directory name]);;
6945200576Srobertoesac
6946200576Srobertocase $srcdir in
6947200576Sroberto  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
6948200576Sroberto    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
6949200576Srobertoesac
6950200576Sroberto
6951182007Sroberto# Do `set' in a subshell so we don't clobber the current shell's
6952182007Sroberto# arguments.  Must try -L first in case configure is actually a
6953182007Sroberto# symlink; some systems play weird games with the mod time of symlinks
6954182007Sroberto# (eg FreeBSD returns the mod time of the symlink's containing
6955182007Sroberto# directory).
6956182007Srobertoif (
6957200576Sroberto   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
6958182007Sroberto   if test "$[*]" = "X"; then
6959182007Sroberto      # -L didn't work.
6960200576Sroberto      set X `ls -t "$srcdir/configure" conftest.file`
6961182007Sroberto   fi
6962182007Sroberto   rm -f conftest.file
6963182007Sroberto   if test "$[*]" != "X $srcdir/configure conftest.file" \
6964182007Sroberto      && test "$[*]" != "X conftest.file $srcdir/configure"; then
6965182007Sroberto
6966182007Sroberto      # If neither matched, then we have a broken ls.  This can happen
6967182007Sroberto      # if, for instance, CONFIG_SHELL is bash and it inherits a
6968182007Sroberto      # broken ls alias from the environment.  This has actually
6969182007Sroberto      # happened.  Such a system could not be considered "sane".
6970182007Sroberto      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
6971182007Srobertoalias in your environment])
6972182007Sroberto   fi
6973182007Sroberto
6974182007Sroberto   test "$[2]" = conftest.file
6975182007Sroberto   )
6976182007Srobertothen
6977182007Sroberto   # Ok.
6978182007Sroberto   :
6979182007Srobertoelse
6980182007Sroberto   AC_MSG_ERROR([newly created file is older than distributed files!
6981182007SrobertoCheck your system clock])
6982182007Srobertofi
6983182007SrobertoAC_MSG_RESULT(yes)])
6984182007Sroberto
6985182007Sroberto# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6986182007Sroberto#
6987182007Sroberto# This file is free software; the Free Software Foundation
6988182007Sroberto# gives unlimited permission to copy and/or distribute it,
6989182007Sroberto# with or without modifications, as long as this notice is preserved.
6990182007Sroberto
6991182007Sroberto# AM_PROG_INSTALL_STRIP
6992182007Sroberto# ---------------------
6993182007Sroberto# One issue with vendor `install' (even GNU) is that you can't
6994182007Sroberto# specify the program used to strip binaries.  This is especially
6995182007Sroberto# annoying in cross-compiling environments, where the build's strip
6996182007Sroberto# is unlikely to handle the host's binaries.
6997182007Sroberto# Fortunately install-sh will honor a STRIPPROG variable, so we
6998182007Sroberto# always use install-sh in `make install-strip', and initialize
6999182007Sroberto# STRIPPROG with the value of the STRIP variable (set by the user).
7000182007SrobertoAC_DEFUN([AM_PROG_INSTALL_STRIP],
7001182007Sroberto[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7002182007Sroberto# Installed binaries are usually stripped using `strip' when the user
7003182007Sroberto# run `make install-strip'.  However `strip' might not be the right
7004182007Sroberto# tool to use in cross-compilation environments, therefore Automake
7005182007Sroberto# will honor the `STRIP' environment variable to overrule this program.
7006182007Srobertodnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7007182007Srobertoif test "$cross_compiling" != no; then
7008182007Sroberto  AC_CHECK_TOOL([STRIP], [strip], :)
7009182007Srobertofi
7010200576SrobertoINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7011182007SrobertoAC_SUBST([INSTALL_STRIP_PROGRAM])])
7012182007Sroberto
7013200576Sroberto# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
7014200576Sroberto#
7015200576Sroberto# This file is free software; the Free Software Foundation
7016200576Sroberto# gives unlimited permission to copy and/or distribute it,
7017200576Sroberto# with or without modifications, as long as this notice is preserved.
7018200576Sroberto
7019200576Sroberto# serial 2
7020200576Sroberto
7021200576Sroberto# _AM_SUBST_NOTMAKE(VARIABLE)
7022200576Sroberto# ---------------------------
7023200576Sroberto# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
7024200576Sroberto# This macro is traced by Automake.
7025200576SrobertoAC_DEFUN([_AM_SUBST_NOTMAKE])
7026200576Sroberto
7027200576Sroberto# AM_SUBST_NOTMAKE(VARIABLE)
7028200576Sroberto# ---------------------------
7029200576Sroberto# Public sister of _AM_SUBST_NOTMAKE.
7030200576SrobertoAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
7031200576Sroberto
7032182007Sroberto# Check how to create a tarball.                            -*- Autoconf -*-
7033182007Sroberto
7034182007Sroberto# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7035182007Sroberto#
7036182007Sroberto# This file is free software; the Free Software Foundation
7037182007Sroberto# gives unlimited permission to copy and/or distribute it,
7038182007Sroberto# with or without modifications, as long as this notice is preserved.
7039182007Sroberto
7040182007Sroberto# serial 2
7041182007Sroberto
7042182007Sroberto# _AM_PROG_TAR(FORMAT)
7043182007Sroberto# --------------------
7044182007Sroberto# Check how to create a tarball in format FORMAT.
7045182007Sroberto# FORMAT should be one of `v7', `ustar', or `pax'.
7046182007Sroberto#
7047182007Sroberto# Substitute a variable $(am__tar) that is a command
7048182007Sroberto# writing to stdout a FORMAT-tarball containing the directory
7049182007Sroberto# $tardir.
7050182007Sroberto#     tardir=directory && $(am__tar) > result.tar
7051182007Sroberto#
7052182007Sroberto# Substitute a variable $(am__untar) that extract such
7053182007Sroberto# a tarball read from stdin.
7054182007Sroberto#     $(am__untar) < result.tar
7055182007SrobertoAC_DEFUN([_AM_PROG_TAR],
7056182007Sroberto[# Always define AMTAR for backward compatibility.
7057182007SrobertoAM_MISSING_PROG([AMTAR], [tar])
7058182007Srobertom4_if([$1], [v7],
7059182007Sroberto     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7060182007Sroberto     [m4_case([$1], [ustar],, [pax],,
7061182007Sroberto              [m4_fatal([Unknown tar format])])
7062182007SrobertoAC_MSG_CHECKING([how to create a $1 tar archive])
7063182007Sroberto# Loop over all known methods to create a tar archive until one works.
7064182007Sroberto_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7065182007Sroberto_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7066182007Sroberto# Do not fold the above two line into one, because Tru64 sh and
7067182007Sroberto# Solaris sh will not grok spaces in the rhs of `-'.
7068182007Srobertofor _am_tool in $_am_tools
7069182007Srobertodo
7070182007Sroberto  case $_am_tool in
7071182007Sroberto  gnutar)
7072182007Sroberto    for _am_tar in tar gnutar gtar;
7073182007Sroberto    do
7074182007Sroberto      AM_RUN_LOG([$_am_tar --version]) && break
7075182007Sroberto    done
7076182007Sroberto    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7077182007Sroberto    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7078182007Sroberto    am__untar="$_am_tar -xf -"
7079182007Sroberto    ;;
7080182007Sroberto  plaintar)
7081182007Sroberto    # Must skip GNU tar: if it does not support --format= it doesn't create
7082182007Sroberto    # ustar tarball either.
7083182007Sroberto    (tar --version) >/dev/null 2>&1 && continue
7084182007Sroberto    am__tar='tar chf - "$$tardir"'
7085182007Sroberto    am__tar_='tar chf - "$tardir"'
7086182007Sroberto    am__untar='tar xf -'
7087182007Sroberto    ;;
7088182007Sroberto  pax)
7089182007Sroberto    am__tar='pax -L -x $1 -w "$$tardir"'
7090182007Sroberto    am__tar_='pax -L -x $1 -w "$tardir"'
7091182007Sroberto    am__untar='pax -r'
7092182007Sroberto    ;;
7093182007Sroberto  cpio)
7094182007Sroberto    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7095182007Sroberto    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7096182007Sroberto    am__untar='cpio -i -H $1 -d'
7097182007Sroberto    ;;
7098182007Sroberto  none)
7099182007Sroberto    am__tar=false
7100182007Sroberto    am__tar_=false
7101182007Sroberto    am__untar=false
7102182007Sroberto    ;;
7103182007Sroberto  esac
7104182007Sroberto
7105182007Sroberto  # If the value was cached, stop now.  We just wanted to have am__tar
7106182007Sroberto  # and am__untar set.
7107182007Sroberto  test -n "${am_cv_prog_tar_$1}" && break
7108182007Sroberto
7109182007Sroberto  # tar/untar a dummy directory, and stop if the command works
7110182007Sroberto  rm -rf conftest.dir
7111182007Sroberto  mkdir conftest.dir
7112182007Sroberto  echo GrepMe > conftest.dir/file
7113182007Sroberto  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7114182007Sroberto  rm -rf conftest.dir
7115182007Sroberto  if test -s conftest.tar; then
7116182007Sroberto    AM_RUN_LOG([$am__untar <conftest.tar])
7117182007Sroberto    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7118182007Sroberto  fi
7119182007Srobertodone
7120182007Srobertorm -rf conftest.dir
7121182007Sroberto
7122182007SrobertoAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7123182007SrobertoAC_MSG_RESULT([$am_cv_prog_tar_$1])])
7124182007SrobertoAC_SUBST([am__tar])
7125182007SrobertoAC_SUBST([am__untar])
7126182007Sroberto]) # _AM_PROG_TAR
7127182007Sroberto
7128182007Srobertom4_include([libopts/m4/libopts.m4])
7129