aclocal.m4 revision 1c397cba
11c397cbaSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2dbbd9e4bSmacallan
3dbbd9e4bSmacallan# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
41c397cbaSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
6dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8dbbd9e4bSmacallan
9dbbd9e4bSmacallan# This program is distributed in the hope that it will be useful,
10dbbd9e4bSmacallan# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11dbbd9e4bSmacallan# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12dbbd9e4bSmacallan# PARTICULAR PURPOSE.
13dbbd9e4bSmacallan
14dbbd9e4bSmacallanm4_ifndef([AC_AUTOCONF_VERSION],
15dbbd9e4bSmacallan  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
161c397cbaSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
171c397cbaSmrg[m4_warning([this file was generated for autoconf 2.63.
18dbbd9e4bSmacallanYou have another version of autoconf.  It may work, but is not guaranteed to.
19dbbd9e4bSmacallanIf you have problems, you may need to regenerate the build system entirely.
20dbbd9e4bSmacallanTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21dbbd9e4bSmacallan
22dbbd9e4bSmacallan# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23dbbd9e4bSmacallan
24dbbd9e4bSmacallan# serial 52 AC_PROG_LIBTOOL
25dbbd9e4bSmacallan
26dbbd9e4bSmacallan
27dbbd9e4bSmacallan# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28dbbd9e4bSmacallan# -----------------------------------------------------------
29dbbd9e4bSmacallan# If this macro is not defined by Autoconf, define it here.
30dbbd9e4bSmacallanm4_ifdef([AC_PROVIDE_IFELSE],
31dbbd9e4bSmacallan         [],
32dbbd9e4bSmacallan         [m4_define([AC_PROVIDE_IFELSE],
33dbbd9e4bSmacallan	         [m4_ifdef([AC_PROVIDE_$1],
34dbbd9e4bSmacallan		           [$2], [$3])])])
35dbbd9e4bSmacallan
36dbbd9e4bSmacallan
37dbbd9e4bSmacallan# AC_PROG_LIBTOOL
38dbbd9e4bSmacallan# ---------------
39dbbd9e4bSmacallanAC_DEFUN([AC_PROG_LIBTOOL],
40dbbd9e4bSmacallan[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41dbbd9e4bSmacallandnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42dbbd9e4bSmacallandnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43dbbd9e4bSmacallan  AC_PROVIDE_IFELSE([AC_PROG_CXX],
44dbbd9e4bSmacallan    [AC_LIBTOOL_CXX],
45dbbd9e4bSmacallan    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46dbbd9e4bSmacallan  ])])
47dbbd9e4bSmacallandnl And a similar setup for Fortran 77 support
48dbbd9e4bSmacallan  AC_PROVIDE_IFELSE([AC_PROG_F77],
49dbbd9e4bSmacallan    [AC_LIBTOOL_F77],
50dbbd9e4bSmacallan    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
51dbbd9e4bSmacallan])])
52dbbd9e4bSmacallan
53dbbd9e4bSmacallandnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54dbbd9e4bSmacallandnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55dbbd9e4bSmacallandnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56dbbd9e4bSmacallan  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
57dbbd9e4bSmacallan    [AC_LIBTOOL_GCJ],
58dbbd9e4bSmacallan    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
59dbbd9e4bSmacallan      [AC_LIBTOOL_GCJ],
60dbbd9e4bSmacallan      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
61dbbd9e4bSmacallan	[AC_LIBTOOL_GCJ],
62dbbd9e4bSmacallan      [ifdef([AC_PROG_GCJ],
63dbbd9e4bSmacallan	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64dbbd9e4bSmacallan       ifdef([A][M_PROG_GCJ],
65dbbd9e4bSmacallan	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66dbbd9e4bSmacallan       ifdef([LT_AC_PROG_GCJ],
67dbbd9e4bSmacallan	     [define([LT_AC_PROG_GCJ],
68dbbd9e4bSmacallan		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
69dbbd9e4bSmacallan])])# AC_PROG_LIBTOOL
70dbbd9e4bSmacallan
71dbbd9e4bSmacallan
72dbbd9e4bSmacallan# _AC_PROG_LIBTOOL
73dbbd9e4bSmacallan# ----------------
74dbbd9e4bSmacallanAC_DEFUN([_AC_PROG_LIBTOOL],
75dbbd9e4bSmacallan[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76dbbd9e4bSmacallanAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77dbbd9e4bSmacallanAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78dbbd9e4bSmacallanAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79dbbd9e4bSmacallan
80dbbd9e4bSmacallan# This can be used to rebuild libtool when needed
81dbbd9e4bSmacallanLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
82dbbd9e4bSmacallan
83dbbd9e4bSmacallan# Always use our own libtool.
84dbbd9e4bSmacallanLIBTOOL='$(SHELL) $(top_builddir)/libtool'
85dbbd9e4bSmacallanAC_SUBST(LIBTOOL)dnl
86dbbd9e4bSmacallan
87dbbd9e4bSmacallan# Prevent multiple expansion
88dbbd9e4bSmacallandefine([AC_PROG_LIBTOOL], [])
89dbbd9e4bSmacallan])# _AC_PROG_LIBTOOL
90dbbd9e4bSmacallan
91dbbd9e4bSmacallan
92dbbd9e4bSmacallan# AC_LIBTOOL_SETUP
93dbbd9e4bSmacallan# ----------------
94dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_SETUP],
95dbbd9e4bSmacallan[AC_PREREQ(2.50)dnl
96dbbd9e4bSmacallanAC_REQUIRE([AC_ENABLE_SHARED])dnl
97dbbd9e4bSmacallanAC_REQUIRE([AC_ENABLE_STATIC])dnl
98dbbd9e4bSmacallanAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_HOST])dnl
100dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_BUILD])dnl
101dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CC])dnl
102dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_LD])dnl
103dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_NM])dnl
105dbbd9e4bSmacallan
106dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_LN_S])dnl
107dbbd9e4bSmacallanAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108dbbd9e4bSmacallan# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109dbbd9e4bSmacallanAC_REQUIRE([AC_OBJEXT])dnl
110dbbd9e4bSmacallanAC_REQUIRE([AC_EXEEXT])dnl
111dbbd9e4bSmacallandnl
112dbbd9e4bSmacallanAC_LIBTOOL_SYS_MAX_CMD_LEN
113dbbd9e4bSmacallanAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
114dbbd9e4bSmacallanAC_LIBTOOL_OBJDIR
115dbbd9e4bSmacallan
116dbbd9e4bSmacallanAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
117dbbd9e4bSmacallan_LT_AC_PROG_ECHO_BACKSLASH
118dbbd9e4bSmacallan
119dbbd9e4bSmacallancase $host_os in
120dbbd9e4bSmacallanaix3*)
121dbbd9e4bSmacallan  # AIX sometimes has problems with the GCC collect2 program.  For some
122dbbd9e4bSmacallan  # reason, if we set the COLLECT_NAMES environment variable, the problems
123dbbd9e4bSmacallan  # vanish in a puff of smoke.
124dbbd9e4bSmacallan  if test "X${COLLECT_NAMES+set}" != Xset; then
125dbbd9e4bSmacallan    COLLECT_NAMES=
126dbbd9e4bSmacallan    export COLLECT_NAMES
127dbbd9e4bSmacallan  fi
128dbbd9e4bSmacallan  ;;
129dbbd9e4bSmacallanesac
130dbbd9e4bSmacallan
131dbbd9e4bSmacallan# Sed substitution that helps us do robust quoting.  It backslashifies
132dbbd9e4bSmacallan# metacharacters that are still active within double-quoted strings.
133dbbd9e4bSmacallanXsed='sed -e 1s/^X//'
134dbbd9e4bSmacallan[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
135dbbd9e4bSmacallan
136dbbd9e4bSmacallan# Same as above, but do not quote variable references.
137dbbd9e4bSmacallan[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
138dbbd9e4bSmacallan
139dbbd9e4bSmacallan# Sed substitution to delay expansion of an escaped shell variable in a
140dbbd9e4bSmacallan# double_quote_subst'ed string.
141dbbd9e4bSmacallandelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
142dbbd9e4bSmacallan
143dbbd9e4bSmacallan# Sed substitution to avoid accidental globbing in evaled expressions
144dbbd9e4bSmacallanno_glob_subst='s/\*/\\\*/g'
145dbbd9e4bSmacallan
146dbbd9e4bSmacallan# Constants:
147dbbd9e4bSmacallanrm="rm -f"
148dbbd9e4bSmacallan
149dbbd9e4bSmacallan# Global variables:
150dbbd9e4bSmacallandefault_ofile=libtool
151dbbd9e4bSmacallancan_build_shared=yes
152dbbd9e4bSmacallan
153dbbd9e4bSmacallan# All known linkers require a `.a' archive for static linking (except MSVC,
154dbbd9e4bSmacallan# which needs '.lib').
155dbbd9e4bSmacallanlibext=a
156dbbd9e4bSmacallanltmain="$ac_aux_dir/ltmain.sh"
157dbbd9e4bSmacallanofile="$default_ofile"
158dbbd9e4bSmacallanwith_gnu_ld="$lt_cv_prog_gnu_ld"
159dbbd9e4bSmacallan
160dbbd9e4bSmacallanAC_CHECK_TOOL(AR, ar, false)
161dbbd9e4bSmacallanAC_CHECK_TOOL(RANLIB, ranlib, :)
162dbbd9e4bSmacallanAC_CHECK_TOOL(STRIP, strip, :)
163dbbd9e4bSmacallan
164dbbd9e4bSmacallanold_CC="$CC"
165dbbd9e4bSmacallanold_CFLAGS="$CFLAGS"
166dbbd9e4bSmacallan
167dbbd9e4bSmacallan# Set sane defaults for various variables
168dbbd9e4bSmacallantest -z "$AR" && AR=ar
169dbbd9e4bSmacallantest -z "$AR_FLAGS" && AR_FLAGS=cru
170dbbd9e4bSmacallantest -z "$AS" && AS=as
171dbbd9e4bSmacallantest -z "$CC" && CC=cc
172dbbd9e4bSmacallantest -z "$LTCC" && LTCC=$CC
173dbbd9e4bSmacallantest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
174dbbd9e4bSmacallantest -z "$DLLTOOL" && DLLTOOL=dlltool
175dbbd9e4bSmacallantest -z "$LD" && LD=ld
176dbbd9e4bSmacallantest -z "$LN_S" && LN_S="ln -s"
177dbbd9e4bSmacallantest -z "$MAGIC_CMD" && MAGIC_CMD=file
178dbbd9e4bSmacallantest -z "$NM" && NM=nm
179dbbd9e4bSmacallantest -z "$SED" && SED=sed
180dbbd9e4bSmacallantest -z "$OBJDUMP" && OBJDUMP=objdump
181dbbd9e4bSmacallantest -z "$RANLIB" && RANLIB=:
182dbbd9e4bSmacallantest -z "$STRIP" && STRIP=:
183dbbd9e4bSmacallantest -z "$ac_objext" && ac_objext=o
184dbbd9e4bSmacallan
185dbbd9e4bSmacallan# Determine commands to create old-style static archives.
186dbbd9e4bSmacallanold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
187dbbd9e4bSmacallanold_postinstall_cmds='chmod 644 $oldlib'
188dbbd9e4bSmacallanold_postuninstall_cmds=
189dbbd9e4bSmacallan
190dbbd9e4bSmacallanif test -n "$RANLIB"; then
191dbbd9e4bSmacallan  case $host_os in
192dbbd9e4bSmacallan  openbsd*)
193dbbd9e4bSmacallan    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
194dbbd9e4bSmacallan    ;;
195dbbd9e4bSmacallan  *)
196dbbd9e4bSmacallan    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
197dbbd9e4bSmacallan    ;;
198dbbd9e4bSmacallan  esac
199dbbd9e4bSmacallan  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
200dbbd9e4bSmacallanfi
201dbbd9e4bSmacallan
202dbbd9e4bSmacallan_LT_CC_BASENAME([$compiler])
203dbbd9e4bSmacallan
204dbbd9e4bSmacallan# Only perform the check for file, if the check method requires it
205dbbd9e4bSmacallancase $deplibs_check_method in
206dbbd9e4bSmacallanfile_magic*)
207dbbd9e4bSmacallan  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
208dbbd9e4bSmacallan    AC_PATH_MAGIC
209dbbd9e4bSmacallan  fi
210dbbd9e4bSmacallan  ;;
211dbbd9e4bSmacallanesac
212dbbd9e4bSmacallan
213dbbd9e4bSmacallan_LT_REQUIRED_DARWIN_CHECKS
214dbbd9e4bSmacallan
215dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
216dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
217dbbd9e4bSmacallanenable_win32_dll=yes, enable_win32_dll=no)
218dbbd9e4bSmacallan
219dbbd9e4bSmacallanAC_ARG_ENABLE([libtool-lock],
220dbbd9e4bSmacallan    [AC_HELP_STRING([--disable-libtool-lock],
221dbbd9e4bSmacallan	[avoid locking (might break parallel builds)])])
222dbbd9e4bSmacallantest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
223dbbd9e4bSmacallan
224dbbd9e4bSmacallanAC_ARG_WITH([pic],
225dbbd9e4bSmacallan    [AC_HELP_STRING([--with-pic],
226dbbd9e4bSmacallan	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
227dbbd9e4bSmacallan    [pic_mode="$withval"],
228dbbd9e4bSmacallan    [pic_mode=default])
229dbbd9e4bSmacallantest -z "$pic_mode" && pic_mode=default
230dbbd9e4bSmacallan
231dbbd9e4bSmacallan# Use C for the default configuration in the libtool script
232dbbd9e4bSmacallantagname=
233dbbd9e4bSmacallanAC_LIBTOOL_LANG_C_CONFIG
234dbbd9e4bSmacallan_LT_AC_TAGCONFIG
235dbbd9e4bSmacallan])# AC_LIBTOOL_SETUP
236dbbd9e4bSmacallan
237dbbd9e4bSmacallan
238dbbd9e4bSmacallan# _LT_AC_SYS_COMPILER
239dbbd9e4bSmacallan# -------------------
240dbbd9e4bSmacallanAC_DEFUN([_LT_AC_SYS_COMPILER],
241dbbd9e4bSmacallan[AC_REQUIRE([AC_PROG_CC])dnl
242dbbd9e4bSmacallan
243dbbd9e4bSmacallan# If no C compiler was specified, use CC.
244dbbd9e4bSmacallanLTCC=${LTCC-"$CC"}
245dbbd9e4bSmacallan
246dbbd9e4bSmacallan# If no C compiler flags were specified, use CFLAGS.
247dbbd9e4bSmacallanLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
248dbbd9e4bSmacallan
249dbbd9e4bSmacallan# Allow CC to be a program name with arguments.
250dbbd9e4bSmacallancompiler=$CC
251dbbd9e4bSmacallan])# _LT_AC_SYS_COMPILER
252dbbd9e4bSmacallan
253dbbd9e4bSmacallan
254dbbd9e4bSmacallan# _LT_CC_BASENAME(CC)
255dbbd9e4bSmacallan# -------------------
256dbbd9e4bSmacallan# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
257dbbd9e4bSmacallanAC_DEFUN([_LT_CC_BASENAME],
258dbbd9e4bSmacallan[for cc_temp in $1""; do
259dbbd9e4bSmacallan  case $cc_temp in
260dbbd9e4bSmacallan    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
261dbbd9e4bSmacallan    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
262dbbd9e4bSmacallan    \-*) ;;
263dbbd9e4bSmacallan    *) break;;
264dbbd9e4bSmacallan  esac
265dbbd9e4bSmacallandone
266dbbd9e4bSmacallancc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
267dbbd9e4bSmacallan])
268dbbd9e4bSmacallan
269dbbd9e4bSmacallan
270dbbd9e4bSmacallan# _LT_COMPILER_BOILERPLATE
271dbbd9e4bSmacallan# ------------------------
272dbbd9e4bSmacallan# Check for compiler boilerplate output or warnings with
273dbbd9e4bSmacallan# the simple compiler test code.
274dbbd9e4bSmacallanAC_DEFUN([_LT_COMPILER_BOILERPLATE],
275dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
276dbbd9e4bSmacallanac_outfile=conftest.$ac_objext
277dbbd9e4bSmacallanecho "$lt_simple_compile_test_code" >conftest.$ac_ext
278dbbd9e4bSmacallaneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
279dbbd9e4bSmacallan_lt_compiler_boilerplate=`cat conftest.err`
280dbbd9e4bSmacallan$rm conftest*
281dbbd9e4bSmacallan])# _LT_COMPILER_BOILERPLATE
282dbbd9e4bSmacallan
283dbbd9e4bSmacallan
284dbbd9e4bSmacallan# _LT_LINKER_BOILERPLATE
285dbbd9e4bSmacallan# ----------------------
286dbbd9e4bSmacallan# Check for linker boilerplate output or warnings with
287dbbd9e4bSmacallan# the simple link test code.
288dbbd9e4bSmacallanAC_DEFUN([_LT_LINKER_BOILERPLATE],
289dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
290dbbd9e4bSmacallanac_outfile=conftest.$ac_objext
291dbbd9e4bSmacallanecho "$lt_simple_link_test_code" >conftest.$ac_ext
292dbbd9e4bSmacallaneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
293dbbd9e4bSmacallan_lt_linker_boilerplate=`cat conftest.err`
294dbbd9e4bSmacallan$rm -r conftest*
295dbbd9e4bSmacallan])# _LT_LINKER_BOILERPLATE
296dbbd9e4bSmacallan
297dbbd9e4bSmacallan# _LT_REQUIRED_DARWIN_CHECKS
298dbbd9e4bSmacallan# --------------------------
299dbbd9e4bSmacallan# Check for some things on darwin
300dbbd9e4bSmacallanAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
301dbbd9e4bSmacallan  case $host_os in
302dbbd9e4bSmacallan    rhapsody* | darwin*)
303dbbd9e4bSmacallan    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
304dbbd9e4bSmacallan    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
305dbbd9e4bSmacallan
306dbbd9e4bSmacallan    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
307dbbd9e4bSmacallan      [lt_cv_apple_cc_single_mod=no
308dbbd9e4bSmacallan      if test -z "${LT_MULTI_MODULE}"; then
309dbbd9e4bSmacallan   # By default we will add the -single_module flag. You can override
310dbbd9e4bSmacallan   # by either setting the environment variable LT_MULTI_MODULE
311dbbd9e4bSmacallan   # non-empty at configure time, or by adding -multi_module to the
312dbbd9e4bSmacallan   # link flags.
313dbbd9e4bSmacallan   echo "int foo(void){return 1;}" > conftest.c
314dbbd9e4bSmacallan   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
315dbbd9e4bSmacallan     -dynamiclib ${wl}-single_module conftest.c
316dbbd9e4bSmacallan   if test -f libconftest.dylib; then
317dbbd9e4bSmacallan     lt_cv_apple_cc_single_mod=yes
318dbbd9e4bSmacallan     rm -rf libconftest.dylib*
319dbbd9e4bSmacallan   fi
320dbbd9e4bSmacallan   rm conftest.c
321dbbd9e4bSmacallan      fi])
322dbbd9e4bSmacallan    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
323dbbd9e4bSmacallan      [lt_cv_ld_exported_symbols_list],
324dbbd9e4bSmacallan      [lt_cv_ld_exported_symbols_list=no
325dbbd9e4bSmacallan      save_LDFLAGS=$LDFLAGS
326dbbd9e4bSmacallan      echo "_main" > conftest.sym
327dbbd9e4bSmacallan      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
328dbbd9e4bSmacallan      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
329dbbd9e4bSmacallan   [lt_cv_ld_exported_symbols_list=yes],
330dbbd9e4bSmacallan   [lt_cv_ld_exported_symbols_list=no])
331dbbd9e4bSmacallan   LDFLAGS="$save_LDFLAGS"
332dbbd9e4bSmacallan    ])
333dbbd9e4bSmacallan    case $host_os in
334dbbd9e4bSmacallan    rhapsody* | darwin1.[[0123]])
335dbbd9e4bSmacallan      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
336dbbd9e4bSmacallan    darwin1.*)
337dbbd9e4bSmacallan     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
338dbbd9e4bSmacallan    darwin*)
339dbbd9e4bSmacallan      # if running on 10.5 or later, the deployment target defaults
340dbbd9e4bSmacallan      # to the OS version, if on x86, and 10.4, the deployment
341dbbd9e4bSmacallan      # target defaults to 10.4. Don't you love it?
342dbbd9e4bSmacallan      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
343dbbd9e4bSmacallan   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
344dbbd9e4bSmacallan     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
345dbbd9e4bSmacallan   10.[[012]]*)
346dbbd9e4bSmacallan     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
347dbbd9e4bSmacallan   10.*)
348dbbd9e4bSmacallan     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
349dbbd9e4bSmacallan      esac
350dbbd9e4bSmacallan    ;;
351dbbd9e4bSmacallan  esac
352dbbd9e4bSmacallan    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
353dbbd9e4bSmacallan      _lt_dar_single_mod='$single_module'
354dbbd9e4bSmacallan    fi
355dbbd9e4bSmacallan    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
356dbbd9e4bSmacallan      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
357dbbd9e4bSmacallan    else
358dbbd9e4bSmacallan      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
359dbbd9e4bSmacallan    fi
360dbbd9e4bSmacallan    if test "$DSYMUTIL" != ":"; then
361dbbd9e4bSmacallan      _lt_dsymutil="~$DSYMUTIL \$lib || :"
362dbbd9e4bSmacallan    else
363dbbd9e4bSmacallan      _lt_dsymutil=
364dbbd9e4bSmacallan    fi
365dbbd9e4bSmacallan    ;;
366dbbd9e4bSmacallan  esac
367dbbd9e4bSmacallan])
368dbbd9e4bSmacallan
369dbbd9e4bSmacallan# _LT_AC_SYS_LIBPATH_AIX
370dbbd9e4bSmacallan# ----------------------
371dbbd9e4bSmacallan# Links a minimal program and checks the executable
372dbbd9e4bSmacallan# for the system default hardcoded library path. In most cases,
373dbbd9e4bSmacallan# this is /usr/lib:/lib, but when the MPI compilers are used
374dbbd9e4bSmacallan# the location of the communication and MPI libs are included too.
375dbbd9e4bSmacallan# If we don't find anything, use the default library path according
376dbbd9e4bSmacallan# to the aix ld manual.
377dbbd9e4bSmacallanAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
378dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
379dbbd9e4bSmacallanAC_LINK_IFELSE(AC_LANG_PROGRAM,[
380dbbd9e4bSmacallanlt_aix_libpath_sed='
381dbbd9e4bSmacallan    /Import File Strings/,/^$/ {
382dbbd9e4bSmacallan	/^0/ {
383dbbd9e4bSmacallan	    s/^0  *\(.*\)$/\1/
384dbbd9e4bSmacallan	    p
385dbbd9e4bSmacallan	}
386dbbd9e4bSmacallan    }'
387dbbd9e4bSmacallanaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
388dbbd9e4bSmacallan# Check for a 64-bit object if we didn't find anything.
389dbbd9e4bSmacallanif test -z "$aix_libpath"; then
390dbbd9e4bSmacallan  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
391dbbd9e4bSmacallanfi],[])
392dbbd9e4bSmacallanif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
393dbbd9e4bSmacallan])# _LT_AC_SYS_LIBPATH_AIX
394dbbd9e4bSmacallan
395dbbd9e4bSmacallan
396dbbd9e4bSmacallan# _LT_AC_SHELL_INIT(ARG)
397dbbd9e4bSmacallan# ----------------------
398dbbd9e4bSmacallanAC_DEFUN([_LT_AC_SHELL_INIT],
399dbbd9e4bSmacallan[ifdef([AC_DIVERSION_NOTICE],
400dbbd9e4bSmacallan	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
401dbbd9e4bSmacallan	 [AC_DIVERT_PUSH(NOTICE)])
402dbbd9e4bSmacallan$1
403dbbd9e4bSmacallanAC_DIVERT_POP
404dbbd9e4bSmacallan])# _LT_AC_SHELL_INIT
405dbbd9e4bSmacallan
406dbbd9e4bSmacallan
407dbbd9e4bSmacallan# _LT_AC_PROG_ECHO_BACKSLASH
408dbbd9e4bSmacallan# --------------------------
409dbbd9e4bSmacallan# Add some code to the start of the generated configure script which
410dbbd9e4bSmacallan# will find an echo command which doesn't interpret backslashes.
411dbbd9e4bSmacallanAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
412dbbd9e4bSmacallan[_LT_AC_SHELL_INIT([
413dbbd9e4bSmacallan# Check that we are running under the correct shell.
414dbbd9e4bSmacallanSHELL=${CONFIG_SHELL-/bin/sh}
415dbbd9e4bSmacallan
416dbbd9e4bSmacallancase X$ECHO in
417dbbd9e4bSmacallanX*--fallback-echo)
418dbbd9e4bSmacallan  # Remove one level of quotation (which was required for Make).
419dbbd9e4bSmacallan  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
420dbbd9e4bSmacallan  ;;
421dbbd9e4bSmacallanesac
422dbbd9e4bSmacallan
423dbbd9e4bSmacallanecho=${ECHO-echo}
424dbbd9e4bSmacallanif test "X[$]1" = X--no-reexec; then
425dbbd9e4bSmacallan  # Discard the --no-reexec flag, and continue.
426dbbd9e4bSmacallan  shift
427dbbd9e4bSmacallanelif test "X[$]1" = X--fallback-echo; then
428dbbd9e4bSmacallan  # Avoid inline document here, it may be left over
429dbbd9e4bSmacallan  :
430dbbd9e4bSmacallanelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
431dbbd9e4bSmacallan  # Yippee, $echo works!
432dbbd9e4bSmacallan  :
433dbbd9e4bSmacallanelse
434dbbd9e4bSmacallan  # Restart under the correct shell.
435dbbd9e4bSmacallan  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
436dbbd9e4bSmacallanfi
437dbbd9e4bSmacallan
438dbbd9e4bSmacallanif test "X[$]1" = X--fallback-echo; then
439dbbd9e4bSmacallan  # used as fallback echo
440dbbd9e4bSmacallan  shift
441dbbd9e4bSmacallan  cat <<EOF
442dbbd9e4bSmacallan[$]*
443dbbd9e4bSmacallanEOF
444dbbd9e4bSmacallan  exit 0
445dbbd9e4bSmacallanfi
446dbbd9e4bSmacallan
447dbbd9e4bSmacallan# The HP-UX ksh and POSIX shell print the target directory to stdout
448dbbd9e4bSmacallan# if CDPATH is set.
449dbbd9e4bSmacallan(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
450dbbd9e4bSmacallan
451dbbd9e4bSmacallanif test -z "$ECHO"; then
452dbbd9e4bSmacallanif test "X${echo_test_string+set}" != Xset; then
453dbbd9e4bSmacallan# find a string as large as possible, as long as the shell can cope with it
454dbbd9e4bSmacallan  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
455dbbd9e4bSmacallan    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
456dbbd9e4bSmacallan    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
457dbbd9e4bSmacallan       echo_test_string=`eval $cmd` &&
458dbbd9e4bSmacallan       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
459dbbd9e4bSmacallan    then
460dbbd9e4bSmacallan      break
461dbbd9e4bSmacallan    fi
462dbbd9e4bSmacallan  done
463dbbd9e4bSmacallanfi
464dbbd9e4bSmacallan
465dbbd9e4bSmacallanif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
466dbbd9e4bSmacallan   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
467dbbd9e4bSmacallan   test "X$echo_testing_string" = "X$echo_test_string"; then
468dbbd9e4bSmacallan  :
469dbbd9e4bSmacallanelse
470dbbd9e4bSmacallan  # The Solaris, AIX, and Digital Unix default echo programs unquote
471dbbd9e4bSmacallan  # backslashes.  This makes it impossible to quote backslashes using
472dbbd9e4bSmacallan  #   echo "$something" | sed 's/\\/\\\\/g'
473dbbd9e4bSmacallan  #
474dbbd9e4bSmacallan  # So, first we look for a working echo in the user's PATH.
475dbbd9e4bSmacallan
476dbbd9e4bSmacallan  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
477dbbd9e4bSmacallan  for dir in $PATH /usr/ucb; do
478dbbd9e4bSmacallan    IFS="$lt_save_ifs"
479dbbd9e4bSmacallan    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
480dbbd9e4bSmacallan       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
481dbbd9e4bSmacallan       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
482dbbd9e4bSmacallan       test "X$echo_testing_string" = "X$echo_test_string"; then
483dbbd9e4bSmacallan      echo="$dir/echo"
484dbbd9e4bSmacallan      break
485dbbd9e4bSmacallan    fi
486dbbd9e4bSmacallan  done
487dbbd9e4bSmacallan  IFS="$lt_save_ifs"
488dbbd9e4bSmacallan
489dbbd9e4bSmacallan  if test "X$echo" = Xecho; then
490dbbd9e4bSmacallan    # We didn't find a better echo, so look for alternatives.
491dbbd9e4bSmacallan    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
492dbbd9e4bSmacallan       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
493dbbd9e4bSmacallan       test "X$echo_testing_string" = "X$echo_test_string"; then
494dbbd9e4bSmacallan      # This shell has a builtin print -r that does the trick.
495dbbd9e4bSmacallan      echo='print -r'
496dbbd9e4bSmacallan    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
497dbbd9e4bSmacallan	 test "X$CONFIG_SHELL" != X/bin/ksh; then
498dbbd9e4bSmacallan      # If we have ksh, try running configure again with it.
499dbbd9e4bSmacallan      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
500dbbd9e4bSmacallan      export ORIGINAL_CONFIG_SHELL
501dbbd9e4bSmacallan      CONFIG_SHELL=/bin/ksh
502dbbd9e4bSmacallan      export CONFIG_SHELL
503dbbd9e4bSmacallan      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
504dbbd9e4bSmacallan    else
505dbbd9e4bSmacallan      # Try using printf.
506dbbd9e4bSmacallan      echo='printf %s\n'
507dbbd9e4bSmacallan      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
508dbbd9e4bSmacallan	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
509dbbd9e4bSmacallan	 test "X$echo_testing_string" = "X$echo_test_string"; then
510dbbd9e4bSmacallan	# Cool, printf works
511dbbd9e4bSmacallan	:
512dbbd9e4bSmacallan      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
513dbbd9e4bSmacallan	   test "X$echo_testing_string" = 'X\t' &&
514dbbd9e4bSmacallan	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
515dbbd9e4bSmacallan	   test "X$echo_testing_string" = "X$echo_test_string"; then
516dbbd9e4bSmacallan	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
517dbbd9e4bSmacallan	export CONFIG_SHELL
518dbbd9e4bSmacallan	SHELL="$CONFIG_SHELL"
519dbbd9e4bSmacallan	export SHELL
520dbbd9e4bSmacallan	echo="$CONFIG_SHELL [$]0 --fallback-echo"
521dbbd9e4bSmacallan      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
522dbbd9e4bSmacallan	   test "X$echo_testing_string" = 'X\t' &&
523dbbd9e4bSmacallan	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
524dbbd9e4bSmacallan	   test "X$echo_testing_string" = "X$echo_test_string"; then
525dbbd9e4bSmacallan	echo="$CONFIG_SHELL [$]0 --fallback-echo"
526dbbd9e4bSmacallan      else
527dbbd9e4bSmacallan	# maybe with a smaller string...
528dbbd9e4bSmacallan	prev=:
529dbbd9e4bSmacallan
530dbbd9e4bSmacallan	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
531dbbd9e4bSmacallan	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
532dbbd9e4bSmacallan	  then
533dbbd9e4bSmacallan	    break
534dbbd9e4bSmacallan	  fi
535dbbd9e4bSmacallan	  prev="$cmd"
536dbbd9e4bSmacallan	done
537dbbd9e4bSmacallan
538dbbd9e4bSmacallan	if test "$prev" != 'sed 50q "[$]0"'; then
539dbbd9e4bSmacallan	  echo_test_string=`eval $prev`
540dbbd9e4bSmacallan	  export echo_test_string
541dbbd9e4bSmacallan	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
542dbbd9e4bSmacallan	else
543dbbd9e4bSmacallan	  # Oops.  We lost completely, so just stick with echo.
544dbbd9e4bSmacallan	  echo=echo
545dbbd9e4bSmacallan	fi
546dbbd9e4bSmacallan      fi
547dbbd9e4bSmacallan    fi
548dbbd9e4bSmacallan  fi
549dbbd9e4bSmacallanfi
550dbbd9e4bSmacallanfi
551dbbd9e4bSmacallan
552dbbd9e4bSmacallan# Copy echo and quote the copy suitably for passing to libtool from
553dbbd9e4bSmacallan# the Makefile, instead of quoting the original, which is used later.
554dbbd9e4bSmacallanECHO=$echo
555dbbd9e4bSmacallanif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
556dbbd9e4bSmacallan   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
557dbbd9e4bSmacallanfi
558dbbd9e4bSmacallan
559dbbd9e4bSmacallanAC_SUBST(ECHO)
560dbbd9e4bSmacallan])])# _LT_AC_PROG_ECHO_BACKSLASH
561dbbd9e4bSmacallan
562dbbd9e4bSmacallan
563dbbd9e4bSmacallan# _LT_AC_LOCK
564dbbd9e4bSmacallan# -----------
565dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LOCK],
566dbbd9e4bSmacallan[AC_ARG_ENABLE([libtool-lock],
567dbbd9e4bSmacallan    [AC_HELP_STRING([--disable-libtool-lock],
568dbbd9e4bSmacallan	[avoid locking (might break parallel builds)])])
569dbbd9e4bSmacallantest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
570dbbd9e4bSmacallan
571dbbd9e4bSmacallan# Some flags need to be propagated to the compiler or linker for good
572dbbd9e4bSmacallan# libtool support.
573dbbd9e4bSmacallancase $host in
574dbbd9e4bSmacallania64-*-hpux*)
575dbbd9e4bSmacallan  # Find out which ABI we are using.
576dbbd9e4bSmacallan  echo 'int i;' > conftest.$ac_ext
577dbbd9e4bSmacallan  if AC_TRY_EVAL(ac_compile); then
578dbbd9e4bSmacallan    case `/usr/bin/file conftest.$ac_objext` in
579dbbd9e4bSmacallan    *ELF-32*)
580dbbd9e4bSmacallan      HPUX_IA64_MODE="32"
581dbbd9e4bSmacallan      ;;
582dbbd9e4bSmacallan    *ELF-64*)
583dbbd9e4bSmacallan      HPUX_IA64_MODE="64"
584dbbd9e4bSmacallan      ;;
585dbbd9e4bSmacallan    esac
586dbbd9e4bSmacallan  fi
587dbbd9e4bSmacallan  rm -rf conftest*
588dbbd9e4bSmacallan  ;;
589dbbd9e4bSmacallan*-*-irix6*)
590dbbd9e4bSmacallan  # Find out which ABI we are using.
591dbbd9e4bSmacallan  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
592dbbd9e4bSmacallan  if AC_TRY_EVAL(ac_compile); then
593dbbd9e4bSmacallan   if test "$lt_cv_prog_gnu_ld" = yes; then
594dbbd9e4bSmacallan    case `/usr/bin/file conftest.$ac_objext` in
595dbbd9e4bSmacallan    *32-bit*)
596dbbd9e4bSmacallan      LD="${LD-ld} -melf32bsmip"
597dbbd9e4bSmacallan      ;;
598dbbd9e4bSmacallan    *N32*)
599dbbd9e4bSmacallan      LD="${LD-ld} -melf32bmipn32"
600dbbd9e4bSmacallan      ;;
601dbbd9e4bSmacallan    *64-bit*)
602dbbd9e4bSmacallan      LD="${LD-ld} -melf64bmip"
603dbbd9e4bSmacallan      ;;
604dbbd9e4bSmacallan    esac
605dbbd9e4bSmacallan   else
606dbbd9e4bSmacallan    case `/usr/bin/file conftest.$ac_objext` in
607dbbd9e4bSmacallan    *32-bit*)
608dbbd9e4bSmacallan      LD="${LD-ld} -32"
609dbbd9e4bSmacallan      ;;
610dbbd9e4bSmacallan    *N32*)
611dbbd9e4bSmacallan      LD="${LD-ld} -n32"
612dbbd9e4bSmacallan      ;;
613dbbd9e4bSmacallan    *64-bit*)
614dbbd9e4bSmacallan      LD="${LD-ld} -64"
615dbbd9e4bSmacallan      ;;
616dbbd9e4bSmacallan    esac
617dbbd9e4bSmacallan   fi
618dbbd9e4bSmacallan  fi
619dbbd9e4bSmacallan  rm -rf conftest*
620dbbd9e4bSmacallan  ;;
621dbbd9e4bSmacallan
622dbbd9e4bSmacallanx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
623dbbd9e4bSmacallans390*-*linux*|sparc*-*linux*)
624dbbd9e4bSmacallan  # Find out which ABI we are using.
625dbbd9e4bSmacallan  echo 'int i;' > conftest.$ac_ext
626dbbd9e4bSmacallan  if AC_TRY_EVAL(ac_compile); then
627dbbd9e4bSmacallan    case `/usr/bin/file conftest.o` in
628dbbd9e4bSmacallan    *32-bit*)
629dbbd9e4bSmacallan      case $host in
630dbbd9e4bSmacallan        x86_64-*kfreebsd*-gnu)
631dbbd9e4bSmacallan          LD="${LD-ld} -m elf_i386_fbsd"
632dbbd9e4bSmacallan          ;;
633dbbd9e4bSmacallan        x86_64-*linux*)
634dbbd9e4bSmacallan          LD="${LD-ld} -m elf_i386"
635dbbd9e4bSmacallan          ;;
636dbbd9e4bSmacallan        ppc64-*linux*|powerpc64-*linux*)
637dbbd9e4bSmacallan          LD="${LD-ld} -m elf32ppclinux"
638dbbd9e4bSmacallan          ;;
639dbbd9e4bSmacallan        s390x-*linux*)
640dbbd9e4bSmacallan          LD="${LD-ld} -m elf_s390"
641dbbd9e4bSmacallan          ;;
642dbbd9e4bSmacallan        sparc64-*linux*)
643dbbd9e4bSmacallan          LD="${LD-ld} -m elf32_sparc"
644dbbd9e4bSmacallan          ;;
645dbbd9e4bSmacallan      esac
646dbbd9e4bSmacallan      ;;
647dbbd9e4bSmacallan    *64-bit*)
648dbbd9e4bSmacallan      libsuff=64
649dbbd9e4bSmacallan      case $host in
650dbbd9e4bSmacallan        x86_64-*kfreebsd*-gnu)
651dbbd9e4bSmacallan          LD="${LD-ld} -m elf_x86_64_fbsd"
652dbbd9e4bSmacallan          ;;
653dbbd9e4bSmacallan        x86_64-*linux*)
654dbbd9e4bSmacallan          LD="${LD-ld} -m elf_x86_64"
655dbbd9e4bSmacallan          ;;
656dbbd9e4bSmacallan        ppc*-*linux*|powerpc*-*linux*)
657dbbd9e4bSmacallan          LD="${LD-ld} -m elf64ppc"
658dbbd9e4bSmacallan          ;;
659dbbd9e4bSmacallan        s390*-*linux*)
660dbbd9e4bSmacallan          LD="${LD-ld} -m elf64_s390"
661dbbd9e4bSmacallan          ;;
662dbbd9e4bSmacallan        sparc*-*linux*)
663dbbd9e4bSmacallan          LD="${LD-ld} -m elf64_sparc"
664dbbd9e4bSmacallan          ;;
665dbbd9e4bSmacallan      esac
666dbbd9e4bSmacallan      ;;
667dbbd9e4bSmacallan    esac
668dbbd9e4bSmacallan  fi
669dbbd9e4bSmacallan  rm -rf conftest*
670dbbd9e4bSmacallan  ;;
671dbbd9e4bSmacallan
672dbbd9e4bSmacallan*-*-sco3.2v5*)
673dbbd9e4bSmacallan  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
674dbbd9e4bSmacallan  SAVE_CFLAGS="$CFLAGS"
675dbbd9e4bSmacallan  CFLAGS="$CFLAGS -belf"
676dbbd9e4bSmacallan  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
677dbbd9e4bSmacallan    [AC_LANG_PUSH(C)
678dbbd9e4bSmacallan     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
679dbbd9e4bSmacallan     AC_LANG_POP])
680dbbd9e4bSmacallan  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
681dbbd9e4bSmacallan    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
682dbbd9e4bSmacallan    CFLAGS="$SAVE_CFLAGS"
683dbbd9e4bSmacallan  fi
684dbbd9e4bSmacallan  ;;
685dbbd9e4bSmacallansparc*-*solaris*)
686dbbd9e4bSmacallan  # Find out which ABI we are using.
687dbbd9e4bSmacallan  echo 'int i;' > conftest.$ac_ext
688dbbd9e4bSmacallan  if AC_TRY_EVAL(ac_compile); then
689dbbd9e4bSmacallan    case `/usr/bin/file conftest.o` in
690dbbd9e4bSmacallan    *64-bit*)
691dbbd9e4bSmacallan      case $lt_cv_prog_gnu_ld in
692dbbd9e4bSmacallan      yes*) LD="${LD-ld} -m elf64_sparc" ;;
693dbbd9e4bSmacallan      *)
694dbbd9e4bSmacallan        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
695dbbd9e4bSmacallan	  LD="${LD-ld} -64"
696dbbd9e4bSmacallan	fi
697dbbd9e4bSmacallan	;;
698dbbd9e4bSmacallan      esac
699dbbd9e4bSmacallan      ;;
700dbbd9e4bSmacallan    esac
701dbbd9e4bSmacallan  fi
702dbbd9e4bSmacallan  rm -rf conftest*
703dbbd9e4bSmacallan  ;;
704dbbd9e4bSmacallan
705dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
706dbbd9e4bSmacallan[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
707dbbd9e4bSmacallan  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
708dbbd9e4bSmacallan  AC_CHECK_TOOL(AS, as, false)
709dbbd9e4bSmacallan  AC_CHECK_TOOL(OBJDUMP, objdump, false)
710dbbd9e4bSmacallan  ;;
711dbbd9e4bSmacallan  ])
712dbbd9e4bSmacallanesac
713dbbd9e4bSmacallan
714dbbd9e4bSmacallanneed_locks="$enable_libtool_lock"
715dbbd9e4bSmacallan
716dbbd9e4bSmacallan])# _LT_AC_LOCK
717dbbd9e4bSmacallan
718dbbd9e4bSmacallan
719dbbd9e4bSmacallan# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
720dbbd9e4bSmacallan#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
721dbbd9e4bSmacallan# ----------------------------------------------------------------
722dbbd9e4bSmacallan# Check whether the given compiler option works
723dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
724dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])
725dbbd9e4bSmacallanAC_CACHE_CHECK([$1], [$2],
726dbbd9e4bSmacallan  [$2=no
727dbbd9e4bSmacallan  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
728dbbd9e4bSmacallan   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
729dbbd9e4bSmacallan   lt_compiler_flag="$3"
730dbbd9e4bSmacallan   # Insert the option either (1) after the last *FLAGS variable, or
731dbbd9e4bSmacallan   # (2) before a word containing "conftest.", or (3) at the end.
732dbbd9e4bSmacallan   # Note that $ac_compile itself does not contain backslashes and begins
733dbbd9e4bSmacallan   # with a dollar sign (not a hyphen), so the echo should work correctly.
734dbbd9e4bSmacallan   # The option is referenced via a variable to avoid confusing sed.
735dbbd9e4bSmacallan   lt_compile=`echo "$ac_compile" | $SED \
736dbbd9e4bSmacallan   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
737dbbd9e4bSmacallan   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
738dbbd9e4bSmacallan   -e 's:$: $lt_compiler_flag:'`
739dbbd9e4bSmacallan   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
740dbbd9e4bSmacallan   (eval "$lt_compile" 2>conftest.err)
741dbbd9e4bSmacallan   ac_status=$?
742dbbd9e4bSmacallan   cat conftest.err >&AS_MESSAGE_LOG_FD
743dbbd9e4bSmacallan   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
744dbbd9e4bSmacallan   if (exit $ac_status) && test -s "$ac_outfile"; then
745dbbd9e4bSmacallan     # The compiler can only warn and ignore the option if not recognized
746dbbd9e4bSmacallan     # So say no if there are warnings other than the usual output.
747dbbd9e4bSmacallan     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
748dbbd9e4bSmacallan     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
749dbbd9e4bSmacallan     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
750dbbd9e4bSmacallan       $2=yes
751dbbd9e4bSmacallan     fi
752dbbd9e4bSmacallan   fi
753dbbd9e4bSmacallan   $rm conftest*
754dbbd9e4bSmacallan])
755dbbd9e4bSmacallan
756dbbd9e4bSmacallanif test x"[$]$2" = xyes; then
757dbbd9e4bSmacallan    ifelse([$5], , :, [$5])
758dbbd9e4bSmacallanelse
759dbbd9e4bSmacallan    ifelse([$6], , :, [$6])
760dbbd9e4bSmacallanfi
761dbbd9e4bSmacallan])# AC_LIBTOOL_COMPILER_OPTION
762dbbd9e4bSmacallan
763dbbd9e4bSmacallan
764dbbd9e4bSmacallan# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
765dbbd9e4bSmacallan#                          [ACTION-SUCCESS], [ACTION-FAILURE])
766dbbd9e4bSmacallan# ------------------------------------------------------------
767dbbd9e4bSmacallan# Check whether the given compiler option works
768dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
769dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
770dbbd9e4bSmacallanAC_CACHE_CHECK([$1], [$2],
771dbbd9e4bSmacallan  [$2=no
772dbbd9e4bSmacallan   save_LDFLAGS="$LDFLAGS"
773dbbd9e4bSmacallan   LDFLAGS="$LDFLAGS $3"
774dbbd9e4bSmacallan   echo "$lt_simple_link_test_code" > conftest.$ac_ext
775dbbd9e4bSmacallan   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
776dbbd9e4bSmacallan     # The linker can only warn and ignore the option if not recognized
777dbbd9e4bSmacallan     # So say no if there are warnings
778dbbd9e4bSmacallan     if test -s conftest.err; then
779dbbd9e4bSmacallan       # Append any errors to the config.log.
780dbbd9e4bSmacallan       cat conftest.err 1>&AS_MESSAGE_LOG_FD
781dbbd9e4bSmacallan       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
782dbbd9e4bSmacallan       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
783dbbd9e4bSmacallan       if diff conftest.exp conftest.er2 >/dev/null; then
784dbbd9e4bSmacallan         $2=yes
785dbbd9e4bSmacallan       fi
786dbbd9e4bSmacallan     else
787dbbd9e4bSmacallan       $2=yes
788dbbd9e4bSmacallan     fi
789dbbd9e4bSmacallan   fi
790dbbd9e4bSmacallan   $rm -r conftest*
791dbbd9e4bSmacallan   LDFLAGS="$save_LDFLAGS"
792dbbd9e4bSmacallan])
793dbbd9e4bSmacallan
794dbbd9e4bSmacallanif test x"[$]$2" = xyes; then
795dbbd9e4bSmacallan    ifelse([$4], , :, [$4])
796dbbd9e4bSmacallanelse
797dbbd9e4bSmacallan    ifelse([$5], , :, [$5])
798dbbd9e4bSmacallanfi
799dbbd9e4bSmacallan])# AC_LIBTOOL_LINKER_OPTION
800dbbd9e4bSmacallan
801dbbd9e4bSmacallan
802dbbd9e4bSmacallan# AC_LIBTOOL_SYS_MAX_CMD_LEN
803dbbd9e4bSmacallan# --------------------------
804dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
805dbbd9e4bSmacallan[# find the maximum length of command line arguments
806dbbd9e4bSmacallanAC_MSG_CHECKING([the maximum length of command line arguments])
807dbbd9e4bSmacallanAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
808dbbd9e4bSmacallan  i=0
809dbbd9e4bSmacallan  teststring="ABCD"
810dbbd9e4bSmacallan
811dbbd9e4bSmacallan  case $build_os in
812dbbd9e4bSmacallan  msdosdjgpp*)
813dbbd9e4bSmacallan    # On DJGPP, this test can blow up pretty badly due to problems in libc
814dbbd9e4bSmacallan    # (any single argument exceeding 2000 bytes causes a buffer overrun
815dbbd9e4bSmacallan    # during glob expansion).  Even if it were fixed, the result of this
816dbbd9e4bSmacallan    # check would be larger than it should be.
817dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
818dbbd9e4bSmacallan    ;;
819dbbd9e4bSmacallan
820dbbd9e4bSmacallan  gnu*)
821dbbd9e4bSmacallan    # Under GNU Hurd, this test is not required because there is
822dbbd9e4bSmacallan    # no limit to the length of command line arguments.
823dbbd9e4bSmacallan    # Libtool will interpret -1 as no limit whatsoever
824dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=-1;
825dbbd9e4bSmacallan    ;;
826dbbd9e4bSmacallan
827dbbd9e4bSmacallan  cygwin* | mingw*)
828dbbd9e4bSmacallan    # On Win9x/ME, this test blows up -- it succeeds, but takes
829dbbd9e4bSmacallan    # about 5 minutes as the teststring grows exponentially.
830dbbd9e4bSmacallan    # Worse, since 9x/ME are not pre-emptively multitasking,
831dbbd9e4bSmacallan    # you end up with a "frozen" computer, even though with patience
832dbbd9e4bSmacallan    # the test eventually succeeds (with a max line length of 256k).
833dbbd9e4bSmacallan    # Instead, let's just punt: use the minimum linelength reported by
834dbbd9e4bSmacallan    # all of the supported platforms: 8192 (on NT/2K/XP).
835dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=8192;
836dbbd9e4bSmacallan    ;;
837dbbd9e4bSmacallan
838dbbd9e4bSmacallan  amigaos*)
839dbbd9e4bSmacallan    # On AmigaOS with pdksh, this test takes hours, literally.
840dbbd9e4bSmacallan    # So we just punt and use a minimum line length of 8192.
841dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=8192;
842dbbd9e4bSmacallan    ;;
843dbbd9e4bSmacallan
844dbbd9e4bSmacallan  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
845dbbd9e4bSmacallan    # This has been around since 386BSD, at least.  Likely further.
846dbbd9e4bSmacallan    if test -x /sbin/sysctl; then
847dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
848dbbd9e4bSmacallan    elif test -x /usr/sbin/sysctl; then
849dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
850dbbd9e4bSmacallan    else
851dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
852dbbd9e4bSmacallan    fi
853dbbd9e4bSmacallan    # And add a safety zone
854dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
855dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
856dbbd9e4bSmacallan    ;;
857dbbd9e4bSmacallan
858dbbd9e4bSmacallan  interix*)
859dbbd9e4bSmacallan    # We know the value 262144 and hardcode it with a safety zone (like BSD)
860dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=196608
861dbbd9e4bSmacallan    ;;
862dbbd9e4bSmacallan
863dbbd9e4bSmacallan  osf*)
864dbbd9e4bSmacallan    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
865dbbd9e4bSmacallan    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
866dbbd9e4bSmacallan    # nice to cause kernel panics so lets avoid the loop below.
867dbbd9e4bSmacallan    # First set a reasonable default.
868dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=16384
869dbbd9e4bSmacallan    #
870dbbd9e4bSmacallan    if test -x /sbin/sysconfig; then
871dbbd9e4bSmacallan      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
872dbbd9e4bSmacallan        *1*) lt_cv_sys_max_cmd_len=-1 ;;
873dbbd9e4bSmacallan      esac
874dbbd9e4bSmacallan    fi
875dbbd9e4bSmacallan    ;;
876dbbd9e4bSmacallan  sco3.2v5*)
877dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=102400
878dbbd9e4bSmacallan    ;;
879dbbd9e4bSmacallan  sysv5* | sco5v6* | sysv4.2uw2*)
880dbbd9e4bSmacallan    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
881dbbd9e4bSmacallan    if test -n "$kargmax"; then
882dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
883dbbd9e4bSmacallan    else
884dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=32768
885dbbd9e4bSmacallan    fi
886dbbd9e4bSmacallan    ;;
887dbbd9e4bSmacallan  *)
888dbbd9e4bSmacallan    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
889dbbd9e4bSmacallan    if test -n "$lt_cv_sys_max_cmd_len"; then
890dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
891dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
892dbbd9e4bSmacallan    else
893dbbd9e4bSmacallan      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
894dbbd9e4bSmacallan      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
895dbbd9e4bSmacallan	       = "XX$teststring") >/dev/null 2>&1 &&
896dbbd9e4bSmacallan	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
897dbbd9e4bSmacallan	      lt_cv_sys_max_cmd_len=$new_result &&
898dbbd9e4bSmacallan	      test $i != 17 # 1/2 MB should be enough
899dbbd9e4bSmacallan      do
900dbbd9e4bSmacallan        i=`expr $i + 1`
901dbbd9e4bSmacallan        teststring=$teststring$teststring
902dbbd9e4bSmacallan      done
903dbbd9e4bSmacallan      teststring=
904dbbd9e4bSmacallan      # Add a significant safety factor because C++ compilers can tack on massive
905dbbd9e4bSmacallan      # amounts of additional arguments before passing them to the linker.
906dbbd9e4bSmacallan      # It appears as though 1/2 is a usable value.
907dbbd9e4bSmacallan      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
908dbbd9e4bSmacallan    fi
909dbbd9e4bSmacallan    ;;
910dbbd9e4bSmacallan  esac
911dbbd9e4bSmacallan])
912dbbd9e4bSmacallanif test -n $lt_cv_sys_max_cmd_len ; then
913dbbd9e4bSmacallan  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
914dbbd9e4bSmacallanelse
915dbbd9e4bSmacallan  AC_MSG_RESULT(none)
916dbbd9e4bSmacallanfi
917dbbd9e4bSmacallan])# AC_LIBTOOL_SYS_MAX_CMD_LEN
918dbbd9e4bSmacallan
919dbbd9e4bSmacallan
920dbbd9e4bSmacallan# _LT_AC_CHECK_DLFCN
921dbbd9e4bSmacallan# ------------------
922dbbd9e4bSmacallanAC_DEFUN([_LT_AC_CHECK_DLFCN],
923dbbd9e4bSmacallan[AC_CHECK_HEADERS(dlfcn.h)dnl
924dbbd9e4bSmacallan])# _LT_AC_CHECK_DLFCN
925dbbd9e4bSmacallan
926dbbd9e4bSmacallan
927dbbd9e4bSmacallan# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
928dbbd9e4bSmacallan#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
929dbbd9e4bSmacallan# ---------------------------------------------------------------------
930dbbd9e4bSmacallanAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
931dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
932dbbd9e4bSmacallanif test "$cross_compiling" = yes; then :
933dbbd9e4bSmacallan  [$4]
934dbbd9e4bSmacallanelse
935dbbd9e4bSmacallan  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
936dbbd9e4bSmacallan  lt_status=$lt_dlunknown
937dbbd9e4bSmacallan  cat > conftest.$ac_ext <<EOF
938dbbd9e4bSmacallan[#line __oline__ "configure"
939dbbd9e4bSmacallan#include "confdefs.h"
940dbbd9e4bSmacallan
941dbbd9e4bSmacallan#if HAVE_DLFCN_H
942dbbd9e4bSmacallan#include <dlfcn.h>
943dbbd9e4bSmacallan#endif
944dbbd9e4bSmacallan
945dbbd9e4bSmacallan#include <stdio.h>
946dbbd9e4bSmacallan
947dbbd9e4bSmacallan#ifdef RTLD_GLOBAL
948dbbd9e4bSmacallan#  define LT_DLGLOBAL		RTLD_GLOBAL
949dbbd9e4bSmacallan#else
950dbbd9e4bSmacallan#  ifdef DL_GLOBAL
951dbbd9e4bSmacallan#    define LT_DLGLOBAL		DL_GLOBAL
952dbbd9e4bSmacallan#  else
953dbbd9e4bSmacallan#    define LT_DLGLOBAL		0
954dbbd9e4bSmacallan#  endif
955dbbd9e4bSmacallan#endif
956dbbd9e4bSmacallan
957dbbd9e4bSmacallan/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
958dbbd9e4bSmacallan   find out it does not work in some platform. */
959dbbd9e4bSmacallan#ifndef LT_DLLAZY_OR_NOW
960dbbd9e4bSmacallan#  ifdef RTLD_LAZY
961dbbd9e4bSmacallan#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
962dbbd9e4bSmacallan#  else
963dbbd9e4bSmacallan#    ifdef DL_LAZY
964dbbd9e4bSmacallan#      define LT_DLLAZY_OR_NOW		DL_LAZY
965dbbd9e4bSmacallan#    else
966dbbd9e4bSmacallan#      ifdef RTLD_NOW
967dbbd9e4bSmacallan#        define LT_DLLAZY_OR_NOW	RTLD_NOW
968dbbd9e4bSmacallan#      else
969dbbd9e4bSmacallan#        ifdef DL_NOW
970dbbd9e4bSmacallan#          define LT_DLLAZY_OR_NOW	DL_NOW
971dbbd9e4bSmacallan#        else
972dbbd9e4bSmacallan#          define LT_DLLAZY_OR_NOW	0
973dbbd9e4bSmacallan#        endif
974dbbd9e4bSmacallan#      endif
975dbbd9e4bSmacallan#    endif
976dbbd9e4bSmacallan#  endif
977dbbd9e4bSmacallan#endif
978dbbd9e4bSmacallan
979dbbd9e4bSmacallan#ifdef __cplusplus
980dbbd9e4bSmacallanextern "C" void exit (int);
981dbbd9e4bSmacallan#endif
982dbbd9e4bSmacallan
983dbbd9e4bSmacallanvoid fnord() { int i=42;}
984dbbd9e4bSmacallanint main ()
985dbbd9e4bSmacallan{
986dbbd9e4bSmacallan  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
987dbbd9e4bSmacallan  int status = $lt_dlunknown;
988dbbd9e4bSmacallan
989dbbd9e4bSmacallan  if (self)
990dbbd9e4bSmacallan    {
991dbbd9e4bSmacallan      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
992dbbd9e4bSmacallan      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
993dbbd9e4bSmacallan      /* dlclose (self); */
994dbbd9e4bSmacallan    }
995dbbd9e4bSmacallan  else
996dbbd9e4bSmacallan    puts (dlerror ());
997dbbd9e4bSmacallan
998dbbd9e4bSmacallan    exit (status);
999dbbd9e4bSmacallan}]
1000dbbd9e4bSmacallanEOF
1001dbbd9e4bSmacallan  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1002dbbd9e4bSmacallan    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1003dbbd9e4bSmacallan    lt_status=$?
1004dbbd9e4bSmacallan    case x$lt_status in
1005dbbd9e4bSmacallan      x$lt_dlno_uscore) $1 ;;
1006dbbd9e4bSmacallan      x$lt_dlneed_uscore) $2 ;;
1007dbbd9e4bSmacallan      x$lt_dlunknown|x*) $3 ;;
1008dbbd9e4bSmacallan    esac
1009dbbd9e4bSmacallan  else :
1010dbbd9e4bSmacallan    # compilation failed
1011dbbd9e4bSmacallan    $3
1012dbbd9e4bSmacallan  fi
1013dbbd9e4bSmacallanfi
1014dbbd9e4bSmacallanrm -fr conftest*
1015dbbd9e4bSmacallan])# _LT_AC_TRY_DLOPEN_SELF
1016dbbd9e4bSmacallan
1017dbbd9e4bSmacallan
1018dbbd9e4bSmacallan# AC_LIBTOOL_DLOPEN_SELF
1019dbbd9e4bSmacallan# ----------------------
1020dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1021dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1022dbbd9e4bSmacallanif test "x$enable_dlopen" != xyes; then
1023dbbd9e4bSmacallan  enable_dlopen=unknown
1024dbbd9e4bSmacallan  enable_dlopen_self=unknown
1025dbbd9e4bSmacallan  enable_dlopen_self_static=unknown
1026dbbd9e4bSmacallanelse
1027dbbd9e4bSmacallan  lt_cv_dlopen=no
1028dbbd9e4bSmacallan  lt_cv_dlopen_libs=
1029dbbd9e4bSmacallan
1030dbbd9e4bSmacallan  case $host_os in
1031dbbd9e4bSmacallan  beos*)
1032dbbd9e4bSmacallan    lt_cv_dlopen="load_add_on"
1033dbbd9e4bSmacallan    lt_cv_dlopen_libs=
1034dbbd9e4bSmacallan    lt_cv_dlopen_self=yes
1035dbbd9e4bSmacallan    ;;
1036dbbd9e4bSmacallan
1037dbbd9e4bSmacallan  mingw* | pw32*)
1038dbbd9e4bSmacallan    lt_cv_dlopen="LoadLibrary"
1039dbbd9e4bSmacallan    lt_cv_dlopen_libs=
1040dbbd9e4bSmacallan   ;;
1041dbbd9e4bSmacallan
1042dbbd9e4bSmacallan  cygwin*)
1043dbbd9e4bSmacallan    lt_cv_dlopen="dlopen"
1044dbbd9e4bSmacallan    lt_cv_dlopen_libs=
1045dbbd9e4bSmacallan   ;;
1046dbbd9e4bSmacallan
1047dbbd9e4bSmacallan  darwin*)
1048dbbd9e4bSmacallan  # if libdl is installed we need to link against it
1049dbbd9e4bSmacallan    AC_CHECK_LIB([dl], [dlopen],
1050dbbd9e4bSmacallan		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1051dbbd9e4bSmacallan    lt_cv_dlopen="dyld"
1052dbbd9e4bSmacallan    lt_cv_dlopen_libs=
1053dbbd9e4bSmacallan    lt_cv_dlopen_self=yes
1054dbbd9e4bSmacallan    ])
1055dbbd9e4bSmacallan   ;;
1056dbbd9e4bSmacallan
1057dbbd9e4bSmacallan  *)
1058dbbd9e4bSmacallan    AC_CHECK_FUNC([shl_load],
1059dbbd9e4bSmacallan	  [lt_cv_dlopen="shl_load"],
1060dbbd9e4bSmacallan      [AC_CHECK_LIB([dld], [shl_load],
1061dbbd9e4bSmacallan	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1062dbbd9e4bSmacallan	[AC_CHECK_FUNC([dlopen],
1063dbbd9e4bSmacallan	      [lt_cv_dlopen="dlopen"],
1064dbbd9e4bSmacallan	  [AC_CHECK_LIB([dl], [dlopen],
1065dbbd9e4bSmacallan		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1066dbbd9e4bSmacallan	    [AC_CHECK_LIB([svld], [dlopen],
1067dbbd9e4bSmacallan		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1068dbbd9e4bSmacallan	      [AC_CHECK_LIB([dld], [dld_link],
1069dbbd9e4bSmacallan		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1070dbbd9e4bSmacallan	      ])
1071dbbd9e4bSmacallan	    ])
1072dbbd9e4bSmacallan	  ])
1073dbbd9e4bSmacallan	])
1074dbbd9e4bSmacallan      ])
1075dbbd9e4bSmacallan    ;;
1076dbbd9e4bSmacallan  esac
1077dbbd9e4bSmacallan
1078dbbd9e4bSmacallan  if test "x$lt_cv_dlopen" != xno; then
1079dbbd9e4bSmacallan    enable_dlopen=yes
1080dbbd9e4bSmacallan  else
1081dbbd9e4bSmacallan    enable_dlopen=no
1082dbbd9e4bSmacallan  fi
1083dbbd9e4bSmacallan
1084dbbd9e4bSmacallan  case $lt_cv_dlopen in
1085dbbd9e4bSmacallan  dlopen)
1086dbbd9e4bSmacallan    save_CPPFLAGS="$CPPFLAGS"
1087dbbd9e4bSmacallan    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1088dbbd9e4bSmacallan
1089dbbd9e4bSmacallan    save_LDFLAGS="$LDFLAGS"
1090dbbd9e4bSmacallan    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1091dbbd9e4bSmacallan
1092dbbd9e4bSmacallan    save_LIBS="$LIBS"
1093dbbd9e4bSmacallan    LIBS="$lt_cv_dlopen_libs $LIBS"
1094dbbd9e4bSmacallan
1095dbbd9e4bSmacallan    AC_CACHE_CHECK([whether a program can dlopen itself],
1096dbbd9e4bSmacallan	  lt_cv_dlopen_self, [dnl
1097dbbd9e4bSmacallan	  _LT_AC_TRY_DLOPEN_SELF(
1098dbbd9e4bSmacallan	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1099dbbd9e4bSmacallan	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1100dbbd9e4bSmacallan    ])
1101dbbd9e4bSmacallan
1102dbbd9e4bSmacallan    if test "x$lt_cv_dlopen_self" = xyes; then
1103dbbd9e4bSmacallan      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1104dbbd9e4bSmacallan      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1105dbbd9e4bSmacallan    	  lt_cv_dlopen_self_static, [dnl
1106dbbd9e4bSmacallan	  _LT_AC_TRY_DLOPEN_SELF(
1107dbbd9e4bSmacallan	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1108dbbd9e4bSmacallan	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1109dbbd9e4bSmacallan      ])
1110dbbd9e4bSmacallan    fi
1111dbbd9e4bSmacallan
1112dbbd9e4bSmacallan    CPPFLAGS="$save_CPPFLAGS"
1113dbbd9e4bSmacallan    LDFLAGS="$save_LDFLAGS"
1114dbbd9e4bSmacallan    LIBS="$save_LIBS"
1115dbbd9e4bSmacallan    ;;
1116dbbd9e4bSmacallan  esac
1117dbbd9e4bSmacallan
1118dbbd9e4bSmacallan  case $lt_cv_dlopen_self in
1119dbbd9e4bSmacallan  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1120dbbd9e4bSmacallan  *) enable_dlopen_self=unknown ;;
1121dbbd9e4bSmacallan  esac
1122dbbd9e4bSmacallan
1123dbbd9e4bSmacallan  case $lt_cv_dlopen_self_static in
1124dbbd9e4bSmacallan  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1125dbbd9e4bSmacallan  *) enable_dlopen_self_static=unknown ;;
1126dbbd9e4bSmacallan  esac
1127dbbd9e4bSmacallanfi
1128dbbd9e4bSmacallan])# AC_LIBTOOL_DLOPEN_SELF
1129dbbd9e4bSmacallan
1130dbbd9e4bSmacallan
1131dbbd9e4bSmacallan# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1132dbbd9e4bSmacallan# ---------------------------------
1133dbbd9e4bSmacallan# Check to see if options -c and -o are simultaneously supported by compiler
1134dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1135dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
1136dbbd9e4bSmacallanAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1137dbbd9e4bSmacallanAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1138dbbd9e4bSmacallan  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1139dbbd9e4bSmacallan  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1140dbbd9e4bSmacallan   $rm -r conftest 2>/dev/null
1141dbbd9e4bSmacallan   mkdir conftest
1142dbbd9e4bSmacallan   cd conftest
1143dbbd9e4bSmacallan   mkdir out
1144dbbd9e4bSmacallan   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1145dbbd9e4bSmacallan
1146dbbd9e4bSmacallan   lt_compiler_flag="-o out/conftest2.$ac_objext"
1147dbbd9e4bSmacallan   # Insert the option either (1) after the last *FLAGS variable, or
1148dbbd9e4bSmacallan   # (2) before a word containing "conftest.", or (3) at the end.
1149dbbd9e4bSmacallan   # Note that $ac_compile itself does not contain backslashes and begins
1150dbbd9e4bSmacallan   # with a dollar sign (not a hyphen), so the echo should work correctly.
1151dbbd9e4bSmacallan   lt_compile=`echo "$ac_compile" | $SED \
1152dbbd9e4bSmacallan   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1153dbbd9e4bSmacallan   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1154dbbd9e4bSmacallan   -e 's:$: $lt_compiler_flag:'`
1155dbbd9e4bSmacallan   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1156dbbd9e4bSmacallan   (eval "$lt_compile" 2>out/conftest.err)
1157dbbd9e4bSmacallan   ac_status=$?
1158dbbd9e4bSmacallan   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1159dbbd9e4bSmacallan   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1160dbbd9e4bSmacallan   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1161dbbd9e4bSmacallan   then
1162dbbd9e4bSmacallan     # The compiler can only warn and ignore the option if not recognized
1163dbbd9e4bSmacallan     # So say no if there are warnings
1164dbbd9e4bSmacallan     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1165dbbd9e4bSmacallan     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1166dbbd9e4bSmacallan     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1167dbbd9e4bSmacallan       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1168dbbd9e4bSmacallan     fi
1169dbbd9e4bSmacallan   fi
1170dbbd9e4bSmacallan   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1171dbbd9e4bSmacallan   $rm conftest*
1172dbbd9e4bSmacallan   # SGI C++ compiler will create directory out/ii_files/ for
1173dbbd9e4bSmacallan   # template instantiation
1174dbbd9e4bSmacallan   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1175dbbd9e4bSmacallan   $rm out/* && rmdir out
1176dbbd9e4bSmacallan   cd ..
1177dbbd9e4bSmacallan   rmdir conftest
1178dbbd9e4bSmacallan   $rm conftest*
1179dbbd9e4bSmacallan])
1180dbbd9e4bSmacallan])# AC_LIBTOOL_PROG_CC_C_O
1181dbbd9e4bSmacallan
1182dbbd9e4bSmacallan
1183dbbd9e4bSmacallan# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1184dbbd9e4bSmacallan# -----------------------------------------
1185dbbd9e4bSmacallan# Check to see if we can do hard links to lock some files if needed
1186dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1187dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_LOCK])dnl
1188dbbd9e4bSmacallan
1189dbbd9e4bSmacallanhard_links="nottested"
1190dbbd9e4bSmacallanif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1191dbbd9e4bSmacallan  # do not overwrite the value of need_locks provided by the user
1192dbbd9e4bSmacallan  AC_MSG_CHECKING([if we can lock with hard links])
1193dbbd9e4bSmacallan  hard_links=yes
1194dbbd9e4bSmacallan  $rm conftest*
1195dbbd9e4bSmacallan  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1196dbbd9e4bSmacallan  touch conftest.a
1197dbbd9e4bSmacallan  ln conftest.a conftest.b 2>&5 || hard_links=no
1198dbbd9e4bSmacallan  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1199dbbd9e4bSmacallan  AC_MSG_RESULT([$hard_links])
1200dbbd9e4bSmacallan  if test "$hard_links" = no; then
1201dbbd9e4bSmacallan    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1202dbbd9e4bSmacallan    need_locks=warn
1203dbbd9e4bSmacallan  fi
1204dbbd9e4bSmacallanelse
1205dbbd9e4bSmacallan  need_locks=no
1206dbbd9e4bSmacallanfi
1207dbbd9e4bSmacallan])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1208dbbd9e4bSmacallan
1209dbbd9e4bSmacallan
1210dbbd9e4bSmacallan# AC_LIBTOOL_OBJDIR
1211dbbd9e4bSmacallan# -----------------
1212dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_OBJDIR],
1213dbbd9e4bSmacallan[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1214dbbd9e4bSmacallan[rm -f .libs 2>/dev/null
1215dbbd9e4bSmacallanmkdir .libs 2>/dev/null
1216dbbd9e4bSmacallanif test -d .libs; then
1217dbbd9e4bSmacallan  lt_cv_objdir=.libs
1218dbbd9e4bSmacallanelse
1219dbbd9e4bSmacallan  # MS-DOS does not allow filenames that begin with a dot.
1220dbbd9e4bSmacallan  lt_cv_objdir=_libs
1221dbbd9e4bSmacallanfi
1222dbbd9e4bSmacallanrmdir .libs 2>/dev/null])
1223dbbd9e4bSmacallanobjdir=$lt_cv_objdir
1224dbbd9e4bSmacallan])# AC_LIBTOOL_OBJDIR
1225dbbd9e4bSmacallan
1226dbbd9e4bSmacallan
1227dbbd9e4bSmacallan# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1228dbbd9e4bSmacallan# ----------------------------------------------
1229dbbd9e4bSmacallan# Check hardcoding attributes.
1230dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1231dbbd9e4bSmacallan[AC_MSG_CHECKING([how to hardcode library paths into programs])
1232dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_action, $1)=
1233dbbd9e4bSmacallanif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1234dbbd9e4bSmacallan   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1235dbbd9e4bSmacallan   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1236dbbd9e4bSmacallan
1237dbbd9e4bSmacallan  # We can hardcode non-existant directories.
1238dbbd9e4bSmacallan  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1239dbbd9e4bSmacallan     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1240dbbd9e4bSmacallan     # have to relink, otherwise we might link with an installed library
1241dbbd9e4bSmacallan     # when we should be linking with a yet-to-be-installed one
1242dbbd9e4bSmacallan     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1243dbbd9e4bSmacallan     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1244dbbd9e4bSmacallan    # Linking always hardcodes the temporary library directory.
1245dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1246dbbd9e4bSmacallan  else
1247dbbd9e4bSmacallan    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1248dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1249dbbd9e4bSmacallan  fi
1250dbbd9e4bSmacallanelse
1251dbbd9e4bSmacallan  # We cannot hardcode anything, or else we can only hardcode existing
1252dbbd9e4bSmacallan  # directories.
1253dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1254dbbd9e4bSmacallanfi
1255dbbd9e4bSmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1256dbbd9e4bSmacallan
1257dbbd9e4bSmacallanif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1258dbbd9e4bSmacallan  # Fast installation is not supported
1259dbbd9e4bSmacallan  enable_fast_install=no
1260dbbd9e4bSmacallanelif test "$shlibpath_overrides_runpath" = yes ||
1261dbbd9e4bSmacallan     test "$enable_shared" = no; then
1262dbbd9e4bSmacallan  # Fast installation is not necessary
1263dbbd9e4bSmacallan  enable_fast_install=needless
1264dbbd9e4bSmacallanfi
1265dbbd9e4bSmacallan])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1266dbbd9e4bSmacallan
1267dbbd9e4bSmacallan
1268dbbd9e4bSmacallan# AC_LIBTOOL_SYS_LIB_STRIP
1269dbbd9e4bSmacallan# ------------------------
1270dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1271dbbd9e4bSmacallan[striplib=
1272dbbd9e4bSmacallanold_striplib=
1273dbbd9e4bSmacallanAC_MSG_CHECKING([whether stripping libraries is possible])
1274dbbd9e4bSmacallanif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1275dbbd9e4bSmacallan  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1276dbbd9e4bSmacallan  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1277dbbd9e4bSmacallan  AC_MSG_RESULT([yes])
1278dbbd9e4bSmacallanelse
1279dbbd9e4bSmacallan# FIXME - insert some real tests, host_os isn't really good enough
1280dbbd9e4bSmacallan  case $host_os in
1281dbbd9e4bSmacallan   darwin*)
1282dbbd9e4bSmacallan       if test -n "$STRIP" ; then
1283dbbd9e4bSmacallan         striplib="$STRIP -x"
1284dbbd9e4bSmacallan         old_striplib="$STRIP -S"
1285dbbd9e4bSmacallan         AC_MSG_RESULT([yes])
1286dbbd9e4bSmacallan       else
1287dbbd9e4bSmacallan  AC_MSG_RESULT([no])
1288dbbd9e4bSmacallanfi
1289dbbd9e4bSmacallan       ;;
1290dbbd9e4bSmacallan   *)
1291dbbd9e4bSmacallan  AC_MSG_RESULT([no])
1292dbbd9e4bSmacallan    ;;
1293dbbd9e4bSmacallan  esac
1294dbbd9e4bSmacallanfi
1295dbbd9e4bSmacallan])# AC_LIBTOOL_SYS_LIB_STRIP
1296dbbd9e4bSmacallan
1297dbbd9e4bSmacallan
1298dbbd9e4bSmacallan# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1299dbbd9e4bSmacallan# -----------------------------
1300dbbd9e4bSmacallan# PORTME Fill in your ld.so characteristics
1301dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1302dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
1303dbbd9e4bSmacallanAC_MSG_CHECKING([dynamic linker characteristics])
1304dbbd9e4bSmacallanlibrary_names_spec=
1305dbbd9e4bSmacallanlibname_spec='lib$name'
1306dbbd9e4bSmacallansoname_spec=
1307dbbd9e4bSmacallanshrext_cmds=".so"
1308dbbd9e4bSmacallanpostinstall_cmds=
1309dbbd9e4bSmacallanpostuninstall_cmds=
1310dbbd9e4bSmacallanfinish_cmds=
1311dbbd9e4bSmacallanfinish_eval=
1312dbbd9e4bSmacallanshlibpath_var=
1313dbbd9e4bSmacallanshlibpath_overrides_runpath=unknown
1314dbbd9e4bSmacallanversion_type=none
1315dbbd9e4bSmacallandynamic_linker="$host_os ld.so"
1316dbbd9e4bSmacallansys_lib_dlsearch_path_spec="/lib /usr/lib"
1317dbbd9e4bSmacallanm4_if($1,[],[
1318dbbd9e4bSmacallanif test "$GCC" = yes; then
1319dbbd9e4bSmacallan  case $host_os in
1320dbbd9e4bSmacallan    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1321dbbd9e4bSmacallan    *) lt_awk_arg="/^libraries:/" ;;
1322dbbd9e4bSmacallan  esac
1323dbbd9e4bSmacallan  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1324dbbd9e4bSmacallan  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1325dbbd9e4bSmacallan    # if the path contains ";" then we assume it to be the separator
1326dbbd9e4bSmacallan    # otherwise default to the standard path separator (i.e. ":") - it is
1327dbbd9e4bSmacallan    # assumed that no part of a normal pathname contains ";" but that should
1328dbbd9e4bSmacallan    # okay in the real world where ";" in dirpaths is itself problematic.
1329dbbd9e4bSmacallan    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1330dbbd9e4bSmacallan  else
1331dbbd9e4bSmacallan    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1332dbbd9e4bSmacallan  fi
1333dbbd9e4bSmacallan  # Ok, now we have the path, separated by spaces, we can step through it
1334dbbd9e4bSmacallan  # and add multilib dir if necessary.
1335dbbd9e4bSmacallan  lt_tmp_lt_search_path_spec=
1336dbbd9e4bSmacallan  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1337dbbd9e4bSmacallan  for lt_sys_path in $lt_search_path_spec; do
1338dbbd9e4bSmacallan    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1339dbbd9e4bSmacallan      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1340dbbd9e4bSmacallan    else
1341dbbd9e4bSmacallan      test -d "$lt_sys_path" && \
1342dbbd9e4bSmacallan	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1343dbbd9e4bSmacallan    fi
1344dbbd9e4bSmacallan  done
1345dbbd9e4bSmacallan  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1346dbbd9e4bSmacallanBEGIN {RS=" "; FS="/|\n";} {
1347dbbd9e4bSmacallan  lt_foo="";
1348dbbd9e4bSmacallan  lt_count=0;
1349dbbd9e4bSmacallan  for (lt_i = NF; lt_i > 0; lt_i--) {
1350dbbd9e4bSmacallan    if ($lt_i != "" && $lt_i != ".") {
1351dbbd9e4bSmacallan      if ($lt_i == "..") {
1352dbbd9e4bSmacallan        lt_count++;
1353dbbd9e4bSmacallan      } else {
1354dbbd9e4bSmacallan        if (lt_count == 0) {
1355dbbd9e4bSmacallan          lt_foo="/" $lt_i lt_foo;
1356dbbd9e4bSmacallan        } else {
1357dbbd9e4bSmacallan          lt_count--;
1358dbbd9e4bSmacallan        }
1359dbbd9e4bSmacallan      }
1360dbbd9e4bSmacallan    }
1361dbbd9e4bSmacallan  }
1362dbbd9e4bSmacallan  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1363dbbd9e4bSmacallan  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1364dbbd9e4bSmacallan}'`
1365dbbd9e4bSmacallan  sys_lib_search_path_spec=`echo $lt_search_path_spec`
1366dbbd9e4bSmacallanelse
1367dbbd9e4bSmacallan  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1368dbbd9e4bSmacallanfi])
1369dbbd9e4bSmacallanneed_lib_prefix=unknown
1370dbbd9e4bSmacallanhardcode_into_libs=no
1371dbbd9e4bSmacallan
1372dbbd9e4bSmacallan# when you set need_version to no, make sure it does not cause -set_version
1373dbbd9e4bSmacallan# flags to be left without arguments
1374dbbd9e4bSmacallanneed_version=unknown
1375dbbd9e4bSmacallan
1376dbbd9e4bSmacallancase $host_os in
1377dbbd9e4bSmacallanaix3*)
1378dbbd9e4bSmacallan  version_type=linux
1379dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1380dbbd9e4bSmacallan  shlibpath_var=LIBPATH
1381dbbd9e4bSmacallan
1382dbbd9e4bSmacallan  # AIX 3 has no versioning support, so we append a major version to the name.
1383dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1384dbbd9e4bSmacallan  ;;
1385dbbd9e4bSmacallan
1386dbbd9e4bSmacallanaix[[4-9]]*)
1387dbbd9e4bSmacallan  version_type=linux
1388dbbd9e4bSmacallan  need_lib_prefix=no
1389dbbd9e4bSmacallan  need_version=no
1390dbbd9e4bSmacallan  hardcode_into_libs=yes
1391dbbd9e4bSmacallan  if test "$host_cpu" = ia64; then
1392dbbd9e4bSmacallan    # AIX 5 supports IA64
1393dbbd9e4bSmacallan    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1394dbbd9e4bSmacallan    shlibpath_var=LD_LIBRARY_PATH
1395dbbd9e4bSmacallan  else
1396dbbd9e4bSmacallan    # With GCC up to 2.95.x, collect2 would create an import file
1397dbbd9e4bSmacallan    # for dependence libraries.  The import file would start with
1398dbbd9e4bSmacallan    # the line `#! .'.  This would cause the generated library to
1399dbbd9e4bSmacallan    # depend on `.', always an invalid library.  This was fixed in
1400dbbd9e4bSmacallan    # development snapshots of GCC prior to 3.0.
1401dbbd9e4bSmacallan    case $host_os in
1402dbbd9e4bSmacallan      aix4 | aix4.[[01]] | aix4.[[01]].*)
1403dbbd9e4bSmacallan      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1404dbbd9e4bSmacallan	   echo ' yes '
1405dbbd9e4bSmacallan	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1406dbbd9e4bSmacallan	:
1407dbbd9e4bSmacallan      else
1408dbbd9e4bSmacallan	can_build_shared=no
1409dbbd9e4bSmacallan      fi
1410dbbd9e4bSmacallan      ;;
1411dbbd9e4bSmacallan    esac
1412dbbd9e4bSmacallan    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1413dbbd9e4bSmacallan    # soname into executable. Probably we can add versioning support to
1414dbbd9e4bSmacallan    # collect2, so additional links can be useful in future.
1415dbbd9e4bSmacallan    if test "$aix_use_runtimelinking" = yes; then
1416dbbd9e4bSmacallan      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1417dbbd9e4bSmacallan      # instead of lib<name>.a to let people know that these are not
1418dbbd9e4bSmacallan      # typical AIX shared libraries.
1419dbbd9e4bSmacallan      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1420dbbd9e4bSmacallan    else
1421dbbd9e4bSmacallan      # We preserve .a as extension for shared libraries through AIX4.2
1422dbbd9e4bSmacallan      # and later when we are not doing run time linking.
1423dbbd9e4bSmacallan      library_names_spec='${libname}${release}.a $libname.a'
1424dbbd9e4bSmacallan      soname_spec='${libname}${release}${shared_ext}$major'
1425dbbd9e4bSmacallan    fi
1426dbbd9e4bSmacallan    shlibpath_var=LIBPATH
1427dbbd9e4bSmacallan  fi
1428dbbd9e4bSmacallan  ;;
1429dbbd9e4bSmacallan
1430dbbd9e4bSmacallanamigaos*)
1431dbbd9e4bSmacallan  library_names_spec='$libname.ixlibrary $libname.a'
1432dbbd9e4bSmacallan  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1433dbbd9e4bSmacallan  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'
1434dbbd9e4bSmacallan  ;;
1435dbbd9e4bSmacallan
1436dbbd9e4bSmacallanbeos*)
1437dbbd9e4bSmacallan  library_names_spec='${libname}${shared_ext}'
1438dbbd9e4bSmacallan  dynamic_linker="$host_os ld.so"
1439dbbd9e4bSmacallan  shlibpath_var=LIBRARY_PATH
1440dbbd9e4bSmacallan  ;;
1441dbbd9e4bSmacallan
1442dbbd9e4bSmacallanbsdi[[45]]*)
1443dbbd9e4bSmacallan  version_type=linux
1444dbbd9e4bSmacallan  need_version=no
1445dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1446dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1447dbbd9e4bSmacallan  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1448dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1449dbbd9e4bSmacallan  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1450dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1451dbbd9e4bSmacallan  # the default ld.so.conf also contains /usr/contrib/lib and
1452dbbd9e4bSmacallan  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1453dbbd9e4bSmacallan  # libtool to hard-code these into programs
1454dbbd9e4bSmacallan  ;;
1455dbbd9e4bSmacallan
1456dbbd9e4bSmacallancygwin* | mingw* | pw32*)
1457dbbd9e4bSmacallan  version_type=windows
1458dbbd9e4bSmacallan  shrext_cmds=".dll"
1459dbbd9e4bSmacallan  need_version=no
1460dbbd9e4bSmacallan  need_lib_prefix=no
1461dbbd9e4bSmacallan
1462dbbd9e4bSmacallan  case $GCC,$host_os in
1463dbbd9e4bSmacallan  yes,cygwin* | yes,mingw* | yes,pw32*)
1464dbbd9e4bSmacallan    library_names_spec='$libname.dll.a'
1465dbbd9e4bSmacallan    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1466dbbd9e4bSmacallan    postinstall_cmds='base_file=`basename \${file}`~
1467dbbd9e4bSmacallan      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1468dbbd9e4bSmacallan      dldir=$destdir/`dirname \$dlpath`~
1469dbbd9e4bSmacallan      test -d \$dldir || mkdir -p \$dldir~
1470dbbd9e4bSmacallan      $install_prog $dir/$dlname \$dldir/$dlname~
1471dbbd9e4bSmacallan      chmod a+x \$dldir/$dlname'
1472dbbd9e4bSmacallan    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1473dbbd9e4bSmacallan      dlpath=$dir/\$dldll~
1474dbbd9e4bSmacallan       $rm \$dlpath'
1475dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes
1476dbbd9e4bSmacallan
1477dbbd9e4bSmacallan    case $host_os in
1478dbbd9e4bSmacallan    cygwin*)
1479dbbd9e4bSmacallan      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1480dbbd9e4bSmacallan      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1481dbbd9e4bSmacallan      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1482dbbd9e4bSmacallan      ;;
1483dbbd9e4bSmacallan    mingw*)
1484dbbd9e4bSmacallan      # MinGW DLLs use traditional 'lib' prefix
1485dbbd9e4bSmacallan      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1486dbbd9e4bSmacallan      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1487dbbd9e4bSmacallan      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1488dbbd9e4bSmacallan        # It is most probably a Windows format PATH printed by
1489dbbd9e4bSmacallan        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1490dbbd9e4bSmacallan        # path with ; separators, and with drive letters. We can handle the
1491dbbd9e4bSmacallan        # drive letters (cygwin fileutils understands them), so leave them,
1492dbbd9e4bSmacallan        # especially as we might pass files found there to a mingw objdump,
1493dbbd9e4bSmacallan        # which wouldn't understand a cygwinified path. Ahh.
1494dbbd9e4bSmacallan        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1495dbbd9e4bSmacallan      else
1496dbbd9e4bSmacallan        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1497dbbd9e4bSmacallan      fi
1498dbbd9e4bSmacallan      ;;
1499dbbd9e4bSmacallan    pw32*)
1500dbbd9e4bSmacallan      # pw32 DLLs use 'pw' prefix rather than 'lib'
1501dbbd9e4bSmacallan      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1502dbbd9e4bSmacallan      ;;
1503dbbd9e4bSmacallan    esac
1504dbbd9e4bSmacallan    ;;
1505dbbd9e4bSmacallan
1506dbbd9e4bSmacallan  *)
1507dbbd9e4bSmacallan    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1508dbbd9e4bSmacallan    ;;
1509dbbd9e4bSmacallan  esac
1510dbbd9e4bSmacallan  dynamic_linker='Win32 ld.exe'
1511dbbd9e4bSmacallan  # FIXME: first we should search . and the directory the executable is in
1512dbbd9e4bSmacallan  shlibpath_var=PATH
1513dbbd9e4bSmacallan  ;;
1514dbbd9e4bSmacallan
1515dbbd9e4bSmacallandarwin* | rhapsody*)
1516dbbd9e4bSmacallan  dynamic_linker="$host_os dyld"
1517dbbd9e4bSmacallan  version_type=darwin
1518dbbd9e4bSmacallan  need_lib_prefix=no
1519dbbd9e4bSmacallan  need_version=no
1520dbbd9e4bSmacallan  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1521dbbd9e4bSmacallan  soname_spec='${libname}${release}${major}$shared_ext'
1522dbbd9e4bSmacallan  shlibpath_overrides_runpath=yes
1523dbbd9e4bSmacallan  shlibpath_var=DYLD_LIBRARY_PATH
1524dbbd9e4bSmacallan  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1525dbbd9e4bSmacallan  m4_if([$1], [],[
1526dbbd9e4bSmacallan  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
1527dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1528dbbd9e4bSmacallan  ;;
1529dbbd9e4bSmacallan
1530dbbd9e4bSmacallandgux*)
1531dbbd9e4bSmacallan  version_type=linux
1532dbbd9e4bSmacallan  need_lib_prefix=no
1533dbbd9e4bSmacallan  need_version=no
1534dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1535dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1536dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1537dbbd9e4bSmacallan  ;;
1538dbbd9e4bSmacallan
1539dbbd9e4bSmacallanfreebsd1*)
1540dbbd9e4bSmacallan  dynamic_linker=no
1541dbbd9e4bSmacallan  ;;
1542dbbd9e4bSmacallan
1543dbbd9e4bSmacallanfreebsd* | dragonfly*)
1544dbbd9e4bSmacallan  # DragonFly does not have aout.  When/if they implement a new
1545dbbd9e4bSmacallan  # versioning mechanism, adjust this.
1546dbbd9e4bSmacallan  if test -x /usr/bin/objformat; then
1547dbbd9e4bSmacallan    objformat=`/usr/bin/objformat`
1548dbbd9e4bSmacallan  else
1549dbbd9e4bSmacallan    case $host_os in
1550dbbd9e4bSmacallan    freebsd[[123]]*) objformat=aout ;;
1551dbbd9e4bSmacallan    *) objformat=elf ;;
1552dbbd9e4bSmacallan    esac
1553dbbd9e4bSmacallan  fi
1554dbbd9e4bSmacallan  version_type=freebsd-$objformat
1555dbbd9e4bSmacallan  case $version_type in
1556dbbd9e4bSmacallan    freebsd-elf*)
1557dbbd9e4bSmacallan      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1558dbbd9e4bSmacallan      need_version=no
1559dbbd9e4bSmacallan      need_lib_prefix=no
1560dbbd9e4bSmacallan      ;;
1561dbbd9e4bSmacallan    freebsd-*)
1562dbbd9e4bSmacallan      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1563dbbd9e4bSmacallan      need_version=yes
1564dbbd9e4bSmacallan      ;;
1565dbbd9e4bSmacallan  esac
1566dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1567dbbd9e4bSmacallan  case $host_os in
1568dbbd9e4bSmacallan  freebsd2*)
1569dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes
1570dbbd9e4bSmacallan    ;;
1571dbbd9e4bSmacallan  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1572dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes
1573dbbd9e4bSmacallan    hardcode_into_libs=yes
1574dbbd9e4bSmacallan    ;;
1575dbbd9e4bSmacallan  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1576dbbd9e4bSmacallan  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1577dbbd9e4bSmacallan    shlibpath_overrides_runpath=no
1578dbbd9e4bSmacallan    hardcode_into_libs=yes
1579dbbd9e4bSmacallan    ;;
1580dbbd9e4bSmacallan  *) # from 4.6 on, and DragonFly
1581dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes
1582dbbd9e4bSmacallan    hardcode_into_libs=yes
1583dbbd9e4bSmacallan    ;;
1584dbbd9e4bSmacallan  esac
1585dbbd9e4bSmacallan  ;;
1586dbbd9e4bSmacallan
1587dbbd9e4bSmacallangnu*)
1588dbbd9e4bSmacallan  version_type=linux
1589dbbd9e4bSmacallan  need_lib_prefix=no
1590dbbd9e4bSmacallan  need_version=no
1591dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1592dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1593dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1594dbbd9e4bSmacallan  hardcode_into_libs=yes
1595dbbd9e4bSmacallan  ;;
1596dbbd9e4bSmacallan
1597dbbd9e4bSmacallanhpux9* | hpux10* | hpux11*)
1598dbbd9e4bSmacallan  # Give a soname corresponding to the major version so that dld.sl refuses to
1599dbbd9e4bSmacallan  # link against other versions.
1600dbbd9e4bSmacallan  version_type=sunos
1601dbbd9e4bSmacallan  need_lib_prefix=no
1602dbbd9e4bSmacallan  need_version=no
1603dbbd9e4bSmacallan  case $host_cpu in
1604dbbd9e4bSmacallan  ia64*)
1605dbbd9e4bSmacallan    shrext_cmds='.so'
1606dbbd9e4bSmacallan    hardcode_into_libs=yes
1607dbbd9e4bSmacallan    dynamic_linker="$host_os dld.so"
1608dbbd9e4bSmacallan    shlibpath_var=LD_LIBRARY_PATH
1609dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1610dbbd9e4bSmacallan    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1611dbbd9e4bSmacallan    soname_spec='${libname}${release}${shared_ext}$major'
1612dbbd9e4bSmacallan    if test "X$HPUX_IA64_MODE" = X32; then
1613dbbd9e4bSmacallan      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1614dbbd9e4bSmacallan    else
1615dbbd9e4bSmacallan      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1616dbbd9e4bSmacallan    fi
1617dbbd9e4bSmacallan    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1618dbbd9e4bSmacallan    ;;
1619dbbd9e4bSmacallan   hppa*64*)
1620dbbd9e4bSmacallan     shrext_cmds='.sl'
1621dbbd9e4bSmacallan     hardcode_into_libs=yes
1622dbbd9e4bSmacallan     dynamic_linker="$host_os dld.sl"
1623dbbd9e4bSmacallan     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1624dbbd9e4bSmacallan     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1625dbbd9e4bSmacallan     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1626dbbd9e4bSmacallan     soname_spec='${libname}${release}${shared_ext}$major'
1627dbbd9e4bSmacallan     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1628dbbd9e4bSmacallan     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1629dbbd9e4bSmacallan     ;;
1630dbbd9e4bSmacallan   *)
1631dbbd9e4bSmacallan    shrext_cmds='.sl'
1632dbbd9e4bSmacallan    dynamic_linker="$host_os dld.sl"
1633dbbd9e4bSmacallan    shlibpath_var=SHLIB_PATH
1634dbbd9e4bSmacallan    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1635dbbd9e4bSmacallan    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1636dbbd9e4bSmacallan    soname_spec='${libname}${release}${shared_ext}$major'
1637dbbd9e4bSmacallan    ;;
1638dbbd9e4bSmacallan  esac
1639dbbd9e4bSmacallan  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1640dbbd9e4bSmacallan  postinstall_cmds='chmod 555 $lib'
1641dbbd9e4bSmacallan  ;;
1642dbbd9e4bSmacallan
1643dbbd9e4bSmacallaninterix[[3-9]]*)
1644dbbd9e4bSmacallan  version_type=linux
1645dbbd9e4bSmacallan  need_lib_prefix=no
1646dbbd9e4bSmacallan  need_version=no
1647dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1648dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1649dbbd9e4bSmacallan  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1650dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1651dbbd9e4bSmacallan  shlibpath_overrides_runpath=no
1652dbbd9e4bSmacallan  hardcode_into_libs=yes
1653dbbd9e4bSmacallan  ;;
1654dbbd9e4bSmacallan
1655dbbd9e4bSmacallanirix5* | irix6* | nonstopux*)
1656dbbd9e4bSmacallan  case $host_os in
1657dbbd9e4bSmacallan    nonstopux*) version_type=nonstopux ;;
1658dbbd9e4bSmacallan    *)
1659dbbd9e4bSmacallan	if test "$lt_cv_prog_gnu_ld" = yes; then
1660dbbd9e4bSmacallan		version_type=linux
1661dbbd9e4bSmacallan	else
1662dbbd9e4bSmacallan		version_type=irix
1663dbbd9e4bSmacallan	fi ;;
1664dbbd9e4bSmacallan  esac
1665dbbd9e4bSmacallan  need_lib_prefix=no
1666dbbd9e4bSmacallan  need_version=no
1667dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1668dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1669dbbd9e4bSmacallan  case $host_os in
1670dbbd9e4bSmacallan  irix5* | nonstopux*)
1671dbbd9e4bSmacallan    libsuff= shlibsuff=
1672dbbd9e4bSmacallan    ;;
1673dbbd9e4bSmacallan  *)
1674dbbd9e4bSmacallan    case $LD in # libtool.m4 will add one of these switches to LD
1675dbbd9e4bSmacallan    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1676dbbd9e4bSmacallan      libsuff= shlibsuff= libmagic=32-bit;;
1677dbbd9e4bSmacallan    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1678dbbd9e4bSmacallan      libsuff=32 shlibsuff=N32 libmagic=N32;;
1679dbbd9e4bSmacallan    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1680dbbd9e4bSmacallan      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1681dbbd9e4bSmacallan    *) libsuff= shlibsuff= libmagic=never-match;;
1682dbbd9e4bSmacallan    esac
1683dbbd9e4bSmacallan    ;;
1684dbbd9e4bSmacallan  esac
1685dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1686dbbd9e4bSmacallan  shlibpath_overrides_runpath=no
1687dbbd9e4bSmacallan  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1688dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1689dbbd9e4bSmacallan  hardcode_into_libs=yes
1690dbbd9e4bSmacallan  ;;
1691dbbd9e4bSmacallan
1692dbbd9e4bSmacallan# No shared lib support for Linux oldld, aout, or coff.
1693dbbd9e4bSmacallanlinux*oldld* | linux*aout* | linux*coff*)
1694dbbd9e4bSmacallan  dynamic_linker=no
1695dbbd9e4bSmacallan  ;;
1696dbbd9e4bSmacallan
1697dbbd9e4bSmacallan# This must be Linux ELF.
1698dbbd9e4bSmacallanlinux* | k*bsd*-gnu)
1699dbbd9e4bSmacallan  version_type=linux
1700dbbd9e4bSmacallan  need_lib_prefix=no
1701dbbd9e4bSmacallan  need_version=no
1702dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1703dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1704dbbd9e4bSmacallan  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1705dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1706dbbd9e4bSmacallan  shlibpath_overrides_runpath=no
1707dbbd9e4bSmacallan  # This implies no fast_install, which is unacceptable.
1708dbbd9e4bSmacallan  # Some rework will be needed to allow for fast_install
1709dbbd9e4bSmacallan  # before this can be enabled.
1710dbbd9e4bSmacallan  hardcode_into_libs=yes
1711dbbd9e4bSmacallan  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1712dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1713dbbd9e4bSmacallan
1714dbbd9e4bSmacallan  # Append ld.so.conf contents to the search path
1715dbbd9e4bSmacallan  if test -f /etc/ld.so.conf; then
1716dbbd9e4bSmacallan    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1717dbbd9e4bSmacallan    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1718dbbd9e4bSmacallan  fi
1719dbbd9e4bSmacallan
1720dbbd9e4bSmacallan  # We used to test for /lib/ld.so.1 and disable shared libraries on
1721dbbd9e4bSmacallan  # powerpc, because MkLinux only supported shared libraries with the
1722dbbd9e4bSmacallan  # GNU dynamic linker.  Since this was broken with cross compilers,
1723dbbd9e4bSmacallan  # most powerpc-linux boxes support dynamic linking these days and
1724dbbd9e4bSmacallan  # people can always --disable-shared, the test was removed, and we
1725dbbd9e4bSmacallan  # assume the GNU/Linux dynamic linker is in use.
1726dbbd9e4bSmacallan  dynamic_linker='GNU/Linux ld.so'
1727dbbd9e4bSmacallan  ;;
1728dbbd9e4bSmacallan
1729dbbd9e4bSmacallannetbsd*)
1730dbbd9e4bSmacallan  version_type=sunos
1731dbbd9e4bSmacallan  need_lib_prefix=no
1732dbbd9e4bSmacallan  need_version=no
1733dbbd9e4bSmacallan  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1734dbbd9e4bSmacallan    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1735dbbd9e4bSmacallan    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1736dbbd9e4bSmacallan    dynamic_linker='NetBSD (a.out) ld.so'
1737dbbd9e4bSmacallan  else
1738dbbd9e4bSmacallan    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1739dbbd9e4bSmacallan    soname_spec='${libname}${release}${shared_ext}$major'
1740dbbd9e4bSmacallan    dynamic_linker='NetBSD ld.elf_so'
1741dbbd9e4bSmacallan  fi
1742dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1743dbbd9e4bSmacallan  shlibpath_overrides_runpath=yes
1744dbbd9e4bSmacallan  hardcode_into_libs=yes
1745dbbd9e4bSmacallan  ;;
1746dbbd9e4bSmacallan
1747dbbd9e4bSmacallannewsos6)
1748dbbd9e4bSmacallan  version_type=linux
1749dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1750dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1751dbbd9e4bSmacallan  shlibpath_overrides_runpath=yes
1752dbbd9e4bSmacallan  ;;
1753dbbd9e4bSmacallan
1754dbbd9e4bSmacallannto-qnx*)
1755dbbd9e4bSmacallan  version_type=linux
1756dbbd9e4bSmacallan  need_lib_prefix=no
1757dbbd9e4bSmacallan  need_version=no
1758dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1759dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1760dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1761dbbd9e4bSmacallan  shlibpath_overrides_runpath=yes
1762dbbd9e4bSmacallan  ;;
1763dbbd9e4bSmacallan
1764dbbd9e4bSmacallanopenbsd*)
1765dbbd9e4bSmacallan  version_type=sunos
1766dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec="/usr/lib"
1767dbbd9e4bSmacallan  need_lib_prefix=no
1768dbbd9e4bSmacallan  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1769dbbd9e4bSmacallan  case $host_os in
1770dbbd9e4bSmacallan    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1771dbbd9e4bSmacallan    *)                         need_version=no  ;;
1772dbbd9e4bSmacallan  esac
1773dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1774dbbd9e4bSmacallan  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1775dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1776dbbd9e4bSmacallan  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1777dbbd9e4bSmacallan    case $host_os in
1778dbbd9e4bSmacallan      openbsd2.[[89]] | openbsd2.[[89]].*)
1779dbbd9e4bSmacallan	shlibpath_overrides_runpath=no
1780dbbd9e4bSmacallan	;;
1781dbbd9e4bSmacallan      *)
1782dbbd9e4bSmacallan	shlibpath_overrides_runpath=yes
1783dbbd9e4bSmacallan	;;
1784dbbd9e4bSmacallan      esac
1785dbbd9e4bSmacallan  else
1786dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes
1787dbbd9e4bSmacallan  fi
1788dbbd9e4bSmacallan  ;;
1789dbbd9e4bSmacallan
1790dbbd9e4bSmacallanos2*)
1791dbbd9e4bSmacallan  libname_spec='$name'
1792dbbd9e4bSmacallan  shrext_cmds=".dll"
1793dbbd9e4bSmacallan  need_lib_prefix=no
1794dbbd9e4bSmacallan  library_names_spec='$libname${shared_ext} $libname.a'
1795dbbd9e4bSmacallan  dynamic_linker='OS/2 ld.exe'
1796dbbd9e4bSmacallan  shlibpath_var=LIBPATH
1797dbbd9e4bSmacallan  ;;
1798dbbd9e4bSmacallan
1799dbbd9e4bSmacallanosf3* | osf4* | osf5*)
1800dbbd9e4bSmacallan  version_type=osf
1801dbbd9e4bSmacallan  need_lib_prefix=no
1802dbbd9e4bSmacallan  need_version=no
1803dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1804dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1805dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1806dbbd9e4bSmacallan  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1807dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1808dbbd9e4bSmacallan  ;;
1809dbbd9e4bSmacallan
1810dbbd9e4bSmacallanrdos*)
1811dbbd9e4bSmacallan  dynamic_linker=no
1812dbbd9e4bSmacallan  ;;
1813dbbd9e4bSmacallan
1814dbbd9e4bSmacallansolaris*)
1815dbbd9e4bSmacallan  version_type=linux
1816dbbd9e4bSmacallan  need_lib_prefix=no
1817dbbd9e4bSmacallan  need_version=no
1818dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1819dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1820dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1821dbbd9e4bSmacallan  shlibpath_overrides_runpath=yes
1822dbbd9e4bSmacallan  hardcode_into_libs=yes
1823dbbd9e4bSmacallan  # ldd complains unless libraries are executable
1824dbbd9e4bSmacallan  postinstall_cmds='chmod +x $lib'
1825dbbd9e4bSmacallan  ;;
1826dbbd9e4bSmacallan
1827dbbd9e4bSmacallansunos4*)
1828dbbd9e4bSmacallan  version_type=sunos
1829dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1830dbbd9e4bSmacallan  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1831dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1832dbbd9e4bSmacallan  shlibpath_overrides_runpath=yes
1833dbbd9e4bSmacallan  if test "$with_gnu_ld" = yes; then
1834dbbd9e4bSmacallan    need_lib_prefix=no
1835dbbd9e4bSmacallan  fi
1836dbbd9e4bSmacallan  need_version=yes
1837dbbd9e4bSmacallan  ;;
1838dbbd9e4bSmacallan
1839dbbd9e4bSmacallansysv4 | sysv4.3*)
1840dbbd9e4bSmacallan  version_type=linux
1841dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1842dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1843dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1844dbbd9e4bSmacallan  case $host_vendor in
1845dbbd9e4bSmacallan    sni)
1846dbbd9e4bSmacallan      shlibpath_overrides_runpath=no
1847dbbd9e4bSmacallan      need_lib_prefix=no
1848dbbd9e4bSmacallan      export_dynamic_flag_spec='${wl}-Blargedynsym'
1849dbbd9e4bSmacallan      runpath_var=LD_RUN_PATH
1850dbbd9e4bSmacallan      ;;
1851dbbd9e4bSmacallan    siemens)
1852dbbd9e4bSmacallan      need_lib_prefix=no
1853dbbd9e4bSmacallan      ;;
1854dbbd9e4bSmacallan    motorola)
1855dbbd9e4bSmacallan      need_lib_prefix=no
1856dbbd9e4bSmacallan      need_version=no
1857dbbd9e4bSmacallan      shlibpath_overrides_runpath=no
1858dbbd9e4bSmacallan      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1859dbbd9e4bSmacallan      ;;
1860dbbd9e4bSmacallan  esac
1861dbbd9e4bSmacallan  ;;
1862dbbd9e4bSmacallan
1863dbbd9e4bSmacallansysv4*MP*)
1864dbbd9e4bSmacallan  if test -d /usr/nec ;then
1865dbbd9e4bSmacallan    version_type=linux
1866dbbd9e4bSmacallan    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1867dbbd9e4bSmacallan    soname_spec='$libname${shared_ext}.$major'
1868dbbd9e4bSmacallan    shlibpath_var=LD_LIBRARY_PATH
1869dbbd9e4bSmacallan  fi
1870dbbd9e4bSmacallan  ;;
1871dbbd9e4bSmacallan
1872dbbd9e4bSmacallansysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1873dbbd9e4bSmacallan  version_type=freebsd-elf
1874dbbd9e4bSmacallan  need_lib_prefix=no
1875dbbd9e4bSmacallan  need_version=no
1876dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1877dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1878dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1879dbbd9e4bSmacallan  hardcode_into_libs=yes
1880dbbd9e4bSmacallan  if test "$with_gnu_ld" = yes; then
1881dbbd9e4bSmacallan    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1882dbbd9e4bSmacallan    shlibpath_overrides_runpath=no
1883dbbd9e4bSmacallan  else
1884dbbd9e4bSmacallan    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1885dbbd9e4bSmacallan    shlibpath_overrides_runpath=yes
1886dbbd9e4bSmacallan    case $host_os in
1887dbbd9e4bSmacallan      sco3.2v5*)
1888dbbd9e4bSmacallan        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1889dbbd9e4bSmacallan	;;
1890dbbd9e4bSmacallan    esac
1891dbbd9e4bSmacallan  fi
1892dbbd9e4bSmacallan  sys_lib_dlsearch_path_spec='/usr/lib'
1893dbbd9e4bSmacallan  ;;
1894dbbd9e4bSmacallan
1895dbbd9e4bSmacallanuts4*)
1896dbbd9e4bSmacallan  version_type=linux
1897dbbd9e4bSmacallan  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1898dbbd9e4bSmacallan  soname_spec='${libname}${release}${shared_ext}$major'
1899dbbd9e4bSmacallan  shlibpath_var=LD_LIBRARY_PATH
1900dbbd9e4bSmacallan  ;;
1901dbbd9e4bSmacallan
1902dbbd9e4bSmacallan*)
1903dbbd9e4bSmacallan  dynamic_linker=no
1904dbbd9e4bSmacallan  ;;
1905dbbd9e4bSmacallanesac
1906dbbd9e4bSmacallanAC_MSG_RESULT([$dynamic_linker])
1907dbbd9e4bSmacallantest "$dynamic_linker" = no && can_build_shared=no
1908dbbd9e4bSmacallan
1909dbbd9e4bSmacallanAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
1910dbbd9e4bSmacallan[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
1911dbbd9e4bSmacallansys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
1912dbbd9e4bSmacallanAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
1913dbbd9e4bSmacallan[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
1914dbbd9e4bSmacallansys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
1915dbbd9e4bSmacallan
1916dbbd9e4bSmacallanvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1917dbbd9e4bSmacallanif test "$GCC" = yes; then
1918dbbd9e4bSmacallan  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1919dbbd9e4bSmacallanfi
1920dbbd9e4bSmacallan])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1921dbbd9e4bSmacallan
1922dbbd9e4bSmacallan
1923dbbd9e4bSmacallan# _LT_AC_TAGCONFIG
1924dbbd9e4bSmacallan# ----------------
1925dbbd9e4bSmacallanAC_DEFUN([_LT_AC_TAGCONFIG],
1926dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
1927dbbd9e4bSmacallanAC_ARG_WITH([tags],
1928dbbd9e4bSmacallan    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1929dbbd9e4bSmacallan        [include additional configurations @<:@automatic@:>@])],
1930dbbd9e4bSmacallan    [tagnames="$withval"])
1931dbbd9e4bSmacallan
1932dbbd9e4bSmacallanif test -f "$ltmain" && test -n "$tagnames"; then
1933dbbd9e4bSmacallan  if test ! -f "${ofile}"; then
1934dbbd9e4bSmacallan    AC_MSG_WARN([output file `$ofile' does not exist])
1935dbbd9e4bSmacallan  fi
1936dbbd9e4bSmacallan
1937dbbd9e4bSmacallan  if test -z "$LTCC"; then
1938dbbd9e4bSmacallan    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1939dbbd9e4bSmacallan    if test -z "$LTCC"; then
1940dbbd9e4bSmacallan      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1941dbbd9e4bSmacallan    else
1942dbbd9e4bSmacallan      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1943dbbd9e4bSmacallan    fi
1944dbbd9e4bSmacallan  fi
1945dbbd9e4bSmacallan  if test -z "$LTCFLAGS"; then
1946dbbd9e4bSmacallan    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1947dbbd9e4bSmacallan  fi
1948dbbd9e4bSmacallan
1949dbbd9e4bSmacallan  # Extract list of available tagged configurations in $ofile.
1950dbbd9e4bSmacallan  # Note that this assumes the entire list is on one line.
1951dbbd9e4bSmacallan  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1952dbbd9e4bSmacallan
1953dbbd9e4bSmacallan  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1954dbbd9e4bSmacallan  for tagname in $tagnames; do
1955dbbd9e4bSmacallan    IFS="$lt_save_ifs"
1956dbbd9e4bSmacallan    # Check whether tagname contains only valid characters
1957dbbd9e4bSmacallan    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1958dbbd9e4bSmacallan    "") ;;
1959dbbd9e4bSmacallan    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1960dbbd9e4bSmacallan	;;
1961dbbd9e4bSmacallan    esac
1962dbbd9e4bSmacallan
1963dbbd9e4bSmacallan    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1964dbbd9e4bSmacallan    then
1965dbbd9e4bSmacallan      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1966dbbd9e4bSmacallan    fi
1967dbbd9e4bSmacallan
1968dbbd9e4bSmacallan    # Update the list of available tags.
1969dbbd9e4bSmacallan    if test -n "$tagname"; then
1970dbbd9e4bSmacallan      echo appending configuration tag \"$tagname\" to $ofile
1971dbbd9e4bSmacallan
1972dbbd9e4bSmacallan      case $tagname in
1973dbbd9e4bSmacallan      CXX)
1974dbbd9e4bSmacallan	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1975dbbd9e4bSmacallan	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1976dbbd9e4bSmacallan	    (test "X$CXX" != "Xg++"))) ; then
1977dbbd9e4bSmacallan	  AC_LIBTOOL_LANG_CXX_CONFIG
1978dbbd9e4bSmacallan	else
1979dbbd9e4bSmacallan	  tagname=""
1980dbbd9e4bSmacallan	fi
1981dbbd9e4bSmacallan	;;
1982dbbd9e4bSmacallan
1983dbbd9e4bSmacallan      F77)
1984dbbd9e4bSmacallan	if test -n "$F77" && test "X$F77" != "Xno"; then
1985dbbd9e4bSmacallan	  AC_LIBTOOL_LANG_F77_CONFIG
1986dbbd9e4bSmacallan	else
1987dbbd9e4bSmacallan	  tagname=""
1988dbbd9e4bSmacallan	fi
1989dbbd9e4bSmacallan	;;
1990dbbd9e4bSmacallan
1991dbbd9e4bSmacallan      GCJ)
1992dbbd9e4bSmacallan	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1993dbbd9e4bSmacallan	  AC_LIBTOOL_LANG_GCJ_CONFIG
1994dbbd9e4bSmacallan	else
1995dbbd9e4bSmacallan	  tagname=""
1996dbbd9e4bSmacallan	fi
1997dbbd9e4bSmacallan	;;
1998dbbd9e4bSmacallan
1999dbbd9e4bSmacallan      RC)
2000dbbd9e4bSmacallan	AC_LIBTOOL_LANG_RC_CONFIG
2001dbbd9e4bSmacallan	;;
2002dbbd9e4bSmacallan
2003dbbd9e4bSmacallan      *)
2004dbbd9e4bSmacallan	AC_MSG_ERROR([Unsupported tag name: $tagname])
2005dbbd9e4bSmacallan	;;
2006dbbd9e4bSmacallan      esac
2007dbbd9e4bSmacallan
2008dbbd9e4bSmacallan      # Append the new tag name to the list of available tags.
2009dbbd9e4bSmacallan      if test -n "$tagname" ; then
2010dbbd9e4bSmacallan      available_tags="$available_tags $tagname"
2011dbbd9e4bSmacallan    fi
2012dbbd9e4bSmacallan    fi
2013dbbd9e4bSmacallan  done
2014dbbd9e4bSmacallan  IFS="$lt_save_ifs"
2015dbbd9e4bSmacallan
2016dbbd9e4bSmacallan  # Now substitute the updated list of available tags.
2017dbbd9e4bSmacallan  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2018dbbd9e4bSmacallan    mv "${ofile}T" "$ofile"
2019dbbd9e4bSmacallan    chmod +x "$ofile"
2020dbbd9e4bSmacallan  else
2021dbbd9e4bSmacallan    rm -f "${ofile}T"
2022dbbd9e4bSmacallan    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2023dbbd9e4bSmacallan  fi
2024dbbd9e4bSmacallanfi
2025dbbd9e4bSmacallan])# _LT_AC_TAGCONFIG
2026dbbd9e4bSmacallan
2027dbbd9e4bSmacallan
2028dbbd9e4bSmacallan# AC_LIBTOOL_DLOPEN
2029dbbd9e4bSmacallan# -----------------
2030dbbd9e4bSmacallan# enable checks for dlopen support
2031dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_DLOPEN],
2032dbbd9e4bSmacallan [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2033dbbd9e4bSmacallan])# AC_LIBTOOL_DLOPEN
2034dbbd9e4bSmacallan
2035dbbd9e4bSmacallan
2036dbbd9e4bSmacallan# AC_LIBTOOL_WIN32_DLL
2037dbbd9e4bSmacallan# --------------------
2038dbbd9e4bSmacallan# declare package support for building win32 DLLs
2039dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2040dbbd9e4bSmacallan[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2041dbbd9e4bSmacallan])# AC_LIBTOOL_WIN32_DLL
2042dbbd9e4bSmacallan
2043dbbd9e4bSmacallan
2044dbbd9e4bSmacallan# AC_ENABLE_SHARED([DEFAULT])
2045dbbd9e4bSmacallan# ---------------------------
2046dbbd9e4bSmacallan# implement the --enable-shared flag
2047dbbd9e4bSmacallan# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2048dbbd9e4bSmacallanAC_DEFUN([AC_ENABLE_SHARED],
2049dbbd9e4bSmacallan[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2050dbbd9e4bSmacallanAC_ARG_ENABLE([shared],
2051dbbd9e4bSmacallan    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2052dbbd9e4bSmacallan	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2053dbbd9e4bSmacallan    [p=${PACKAGE-default}
2054dbbd9e4bSmacallan    case $enableval in
2055dbbd9e4bSmacallan    yes) enable_shared=yes ;;
2056dbbd9e4bSmacallan    no) enable_shared=no ;;
2057dbbd9e4bSmacallan    *)
2058dbbd9e4bSmacallan      enable_shared=no
2059dbbd9e4bSmacallan      # Look at the argument we got.  We use all the common list separators.
2060dbbd9e4bSmacallan      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2061dbbd9e4bSmacallan      for pkg in $enableval; do
2062dbbd9e4bSmacallan	IFS="$lt_save_ifs"
2063dbbd9e4bSmacallan	if test "X$pkg" = "X$p"; then
2064dbbd9e4bSmacallan	  enable_shared=yes
2065dbbd9e4bSmacallan	fi
2066dbbd9e4bSmacallan      done
2067dbbd9e4bSmacallan      IFS="$lt_save_ifs"
2068dbbd9e4bSmacallan      ;;
2069dbbd9e4bSmacallan    esac],
2070dbbd9e4bSmacallan    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2071dbbd9e4bSmacallan])# AC_ENABLE_SHARED
2072dbbd9e4bSmacallan
2073dbbd9e4bSmacallan
2074dbbd9e4bSmacallan# AC_DISABLE_SHARED
2075dbbd9e4bSmacallan# -----------------
2076dbbd9e4bSmacallan# set the default shared flag to --disable-shared
2077dbbd9e4bSmacallanAC_DEFUN([AC_DISABLE_SHARED],
2078dbbd9e4bSmacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2079dbbd9e4bSmacallanAC_ENABLE_SHARED(no)
2080dbbd9e4bSmacallan])# AC_DISABLE_SHARED
2081dbbd9e4bSmacallan
2082dbbd9e4bSmacallan
2083dbbd9e4bSmacallan# AC_ENABLE_STATIC([DEFAULT])
2084dbbd9e4bSmacallan# ---------------------------
2085dbbd9e4bSmacallan# implement the --enable-static flag
2086dbbd9e4bSmacallan# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2087dbbd9e4bSmacallanAC_DEFUN([AC_ENABLE_STATIC],
2088dbbd9e4bSmacallan[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2089dbbd9e4bSmacallanAC_ARG_ENABLE([static],
2090dbbd9e4bSmacallan    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2091dbbd9e4bSmacallan	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2092dbbd9e4bSmacallan    [p=${PACKAGE-default}
2093dbbd9e4bSmacallan    case $enableval in
2094dbbd9e4bSmacallan    yes) enable_static=yes ;;
2095dbbd9e4bSmacallan    no) enable_static=no ;;
2096dbbd9e4bSmacallan    *)
2097dbbd9e4bSmacallan     enable_static=no
2098dbbd9e4bSmacallan      # Look at the argument we got.  We use all the common list separators.
2099dbbd9e4bSmacallan      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2100dbbd9e4bSmacallan      for pkg in $enableval; do
2101dbbd9e4bSmacallan	IFS="$lt_save_ifs"
2102dbbd9e4bSmacallan	if test "X$pkg" = "X$p"; then
2103dbbd9e4bSmacallan	  enable_static=yes
2104dbbd9e4bSmacallan	fi
2105dbbd9e4bSmacallan      done
2106dbbd9e4bSmacallan      IFS="$lt_save_ifs"
2107dbbd9e4bSmacallan      ;;
2108dbbd9e4bSmacallan    esac],
2109dbbd9e4bSmacallan    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2110dbbd9e4bSmacallan])# AC_ENABLE_STATIC
2111dbbd9e4bSmacallan
2112dbbd9e4bSmacallan
2113dbbd9e4bSmacallan# AC_DISABLE_STATIC
2114dbbd9e4bSmacallan# -----------------
2115dbbd9e4bSmacallan# set the default static flag to --disable-static
2116dbbd9e4bSmacallanAC_DEFUN([AC_DISABLE_STATIC],
2117dbbd9e4bSmacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2118dbbd9e4bSmacallanAC_ENABLE_STATIC(no)
2119dbbd9e4bSmacallan])# AC_DISABLE_STATIC
2120dbbd9e4bSmacallan
2121dbbd9e4bSmacallan
2122dbbd9e4bSmacallan# AC_ENABLE_FAST_INSTALL([DEFAULT])
2123dbbd9e4bSmacallan# ---------------------------------
2124dbbd9e4bSmacallan# implement the --enable-fast-install flag
2125dbbd9e4bSmacallan# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2126dbbd9e4bSmacallanAC_DEFUN([AC_ENABLE_FAST_INSTALL],
2127dbbd9e4bSmacallan[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2128dbbd9e4bSmacallanAC_ARG_ENABLE([fast-install],
2129dbbd9e4bSmacallan    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2130dbbd9e4bSmacallan    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2131dbbd9e4bSmacallan    [p=${PACKAGE-default}
2132dbbd9e4bSmacallan    case $enableval in
2133dbbd9e4bSmacallan    yes) enable_fast_install=yes ;;
2134dbbd9e4bSmacallan    no) enable_fast_install=no ;;
2135dbbd9e4bSmacallan    *)
2136dbbd9e4bSmacallan      enable_fast_install=no
2137dbbd9e4bSmacallan      # Look at the argument we got.  We use all the common list separators.
2138dbbd9e4bSmacallan      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2139dbbd9e4bSmacallan      for pkg in $enableval; do
2140dbbd9e4bSmacallan	IFS="$lt_save_ifs"
2141dbbd9e4bSmacallan	if test "X$pkg" = "X$p"; then
2142dbbd9e4bSmacallan	  enable_fast_install=yes
2143dbbd9e4bSmacallan	fi
2144dbbd9e4bSmacallan      done
2145dbbd9e4bSmacallan      IFS="$lt_save_ifs"
2146dbbd9e4bSmacallan      ;;
2147dbbd9e4bSmacallan    esac],
2148dbbd9e4bSmacallan    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2149dbbd9e4bSmacallan])# AC_ENABLE_FAST_INSTALL
2150dbbd9e4bSmacallan
2151dbbd9e4bSmacallan
2152dbbd9e4bSmacallan# AC_DISABLE_FAST_INSTALL
2153dbbd9e4bSmacallan# -----------------------
2154dbbd9e4bSmacallan# set the default to --disable-fast-install
2155dbbd9e4bSmacallanAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2156dbbd9e4bSmacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2157dbbd9e4bSmacallanAC_ENABLE_FAST_INSTALL(no)
2158dbbd9e4bSmacallan])# AC_DISABLE_FAST_INSTALL
2159dbbd9e4bSmacallan
2160dbbd9e4bSmacallan
2161dbbd9e4bSmacallan# AC_LIBTOOL_PICMODE([MODE])
2162dbbd9e4bSmacallan# --------------------------
2163dbbd9e4bSmacallan# implement the --with-pic flag
2164dbbd9e4bSmacallan# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2165dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_PICMODE],
2166dbbd9e4bSmacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2167dbbd9e4bSmacallanpic_mode=ifelse($#,1,$1,default)
2168dbbd9e4bSmacallan])# AC_LIBTOOL_PICMODE
2169dbbd9e4bSmacallan
2170dbbd9e4bSmacallan
2171dbbd9e4bSmacallan# AC_PROG_EGREP
2172dbbd9e4bSmacallan# -------------
2173dbbd9e4bSmacallan# This is predefined starting with Autoconf 2.54, so this conditional
2174dbbd9e4bSmacallan# definition can be removed once we require Autoconf 2.54 or later.
2175dbbd9e4bSmacallanm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2176dbbd9e4bSmacallan[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2177dbbd9e4bSmacallan   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2178dbbd9e4bSmacallan    then ac_cv_prog_egrep='grep -E'
2179dbbd9e4bSmacallan    else ac_cv_prog_egrep='egrep'
2180dbbd9e4bSmacallan    fi])
2181dbbd9e4bSmacallan EGREP=$ac_cv_prog_egrep
2182dbbd9e4bSmacallan AC_SUBST([EGREP])
2183dbbd9e4bSmacallan])])
2184dbbd9e4bSmacallan
2185dbbd9e4bSmacallan
2186dbbd9e4bSmacallan# AC_PATH_TOOL_PREFIX
2187dbbd9e4bSmacallan# -------------------
2188dbbd9e4bSmacallan# find a file program which can recognize shared library
2189dbbd9e4bSmacallanAC_DEFUN([AC_PATH_TOOL_PREFIX],
2190dbbd9e4bSmacallan[AC_REQUIRE([AC_PROG_EGREP])dnl
2191dbbd9e4bSmacallanAC_MSG_CHECKING([for $1])
2192dbbd9e4bSmacallanAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2193dbbd9e4bSmacallan[case $MAGIC_CMD in
2194dbbd9e4bSmacallan[[\\/*] |  ?:[\\/]*])
2195dbbd9e4bSmacallan  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2196dbbd9e4bSmacallan  ;;
2197dbbd9e4bSmacallan*)
2198dbbd9e4bSmacallan  lt_save_MAGIC_CMD="$MAGIC_CMD"
2199dbbd9e4bSmacallan  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2200dbbd9e4bSmacallandnl $ac_dummy forces splitting on constant user-supplied paths.
2201dbbd9e4bSmacallandnl POSIX.2 word splitting is done only on the output of word expansions,
2202dbbd9e4bSmacallandnl not every word.  This closes a longstanding sh security hole.
2203dbbd9e4bSmacallan  ac_dummy="ifelse([$2], , $PATH, [$2])"
2204dbbd9e4bSmacallan  for ac_dir in $ac_dummy; do
2205dbbd9e4bSmacallan    IFS="$lt_save_ifs"
2206dbbd9e4bSmacallan    test -z "$ac_dir" && ac_dir=.
2207dbbd9e4bSmacallan    if test -f $ac_dir/$1; then
2208dbbd9e4bSmacallan      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2209dbbd9e4bSmacallan      if test -n "$file_magic_test_file"; then
2210dbbd9e4bSmacallan	case $deplibs_check_method in
2211dbbd9e4bSmacallan	"file_magic "*)
2212dbbd9e4bSmacallan	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2213dbbd9e4bSmacallan	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2214dbbd9e4bSmacallan	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2215dbbd9e4bSmacallan	    $EGREP "$file_magic_regex" > /dev/null; then
2216dbbd9e4bSmacallan	    :
2217dbbd9e4bSmacallan	  else
2218dbbd9e4bSmacallan	    cat <<EOF 1>&2
2219dbbd9e4bSmacallan
2220dbbd9e4bSmacallan*** Warning: the command libtool uses to detect shared libraries,
2221dbbd9e4bSmacallan*** $file_magic_cmd, produces output that libtool cannot recognize.
2222dbbd9e4bSmacallan*** The result is that libtool may fail to recognize shared libraries
2223dbbd9e4bSmacallan*** as such.  This will affect the creation of libtool libraries that
2224dbbd9e4bSmacallan*** depend on shared libraries, but programs linked with such libtool
2225dbbd9e4bSmacallan*** libraries will work regardless of this problem.  Nevertheless, you
2226dbbd9e4bSmacallan*** may want to report the problem to your system manager and/or to
2227dbbd9e4bSmacallan*** bug-libtool@gnu.org
2228dbbd9e4bSmacallan
2229dbbd9e4bSmacallanEOF
2230dbbd9e4bSmacallan	  fi ;;
2231dbbd9e4bSmacallan	esac
2232dbbd9e4bSmacallan      fi
2233dbbd9e4bSmacallan      break
2234dbbd9e4bSmacallan    fi
2235dbbd9e4bSmacallan  done
2236dbbd9e4bSmacallan  IFS="$lt_save_ifs"
2237dbbd9e4bSmacallan  MAGIC_CMD="$lt_save_MAGIC_CMD"
2238dbbd9e4bSmacallan  ;;
2239dbbd9e4bSmacallanesac])
2240dbbd9e4bSmacallanMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2241dbbd9e4bSmacallanif test -n "$MAGIC_CMD"; then
2242dbbd9e4bSmacallan  AC_MSG_RESULT($MAGIC_CMD)
2243dbbd9e4bSmacallanelse
2244dbbd9e4bSmacallan  AC_MSG_RESULT(no)
2245dbbd9e4bSmacallanfi
2246dbbd9e4bSmacallan])# AC_PATH_TOOL_PREFIX
2247dbbd9e4bSmacallan
2248dbbd9e4bSmacallan
2249dbbd9e4bSmacallan# AC_PATH_MAGIC
2250dbbd9e4bSmacallan# -------------
2251dbbd9e4bSmacallan# find a file program which can recognize a shared library
2252dbbd9e4bSmacallanAC_DEFUN([AC_PATH_MAGIC],
2253dbbd9e4bSmacallan[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2254dbbd9e4bSmacallanif test -z "$lt_cv_path_MAGIC_CMD"; then
2255dbbd9e4bSmacallan  if test -n "$ac_tool_prefix"; then
2256dbbd9e4bSmacallan    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2257dbbd9e4bSmacallan  else
2258dbbd9e4bSmacallan    MAGIC_CMD=:
2259dbbd9e4bSmacallan  fi
2260dbbd9e4bSmacallanfi
2261dbbd9e4bSmacallan])# AC_PATH_MAGIC
2262dbbd9e4bSmacallan
2263dbbd9e4bSmacallan
2264dbbd9e4bSmacallan# AC_PROG_LD
2265dbbd9e4bSmacallan# ----------
2266dbbd9e4bSmacallan# find the pathname to the GNU or non-GNU linker
2267dbbd9e4bSmacallanAC_DEFUN([AC_PROG_LD],
2268dbbd9e4bSmacallan[AC_ARG_WITH([gnu-ld],
2269dbbd9e4bSmacallan    [AC_HELP_STRING([--with-gnu-ld],
2270dbbd9e4bSmacallan	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2271dbbd9e4bSmacallan    [test "$withval" = no || with_gnu_ld=yes],
2272dbbd9e4bSmacallan    [with_gnu_ld=no])
2273dbbd9e4bSmacallanAC_REQUIRE([LT_AC_PROG_SED])dnl
2274dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CC])dnl
2275dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_HOST])dnl
2276dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2277dbbd9e4bSmacallanac_prog=ld
2278dbbd9e4bSmacallanif test "$GCC" = yes; then
2279dbbd9e4bSmacallan  # Check if gcc -print-prog-name=ld gives a path.
2280dbbd9e4bSmacallan  AC_MSG_CHECKING([for ld used by $CC])
2281dbbd9e4bSmacallan  case $host in
2282dbbd9e4bSmacallan  *-*-mingw*)
2283dbbd9e4bSmacallan    # gcc leaves a trailing carriage return which upsets mingw
2284dbbd9e4bSmacallan    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2285dbbd9e4bSmacallan  *)
2286dbbd9e4bSmacallan    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2287dbbd9e4bSmacallan  esac
2288dbbd9e4bSmacallan  case $ac_prog in
2289dbbd9e4bSmacallan    # Accept absolute paths.
2290dbbd9e4bSmacallan    [[\\/]]* | ?:[[\\/]]*)
2291dbbd9e4bSmacallan      re_direlt='/[[^/]][[^/]]*/\.\./'
2292dbbd9e4bSmacallan      # Canonicalize the pathname of ld
2293dbbd9e4bSmacallan      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2294dbbd9e4bSmacallan      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2295dbbd9e4bSmacallan	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2296dbbd9e4bSmacallan      done
2297dbbd9e4bSmacallan      test -z "$LD" && LD="$ac_prog"
2298dbbd9e4bSmacallan      ;;
2299dbbd9e4bSmacallan  "")
2300dbbd9e4bSmacallan    # If it fails, then pretend we aren't using GCC.
2301dbbd9e4bSmacallan    ac_prog=ld
2302dbbd9e4bSmacallan    ;;
2303dbbd9e4bSmacallan  *)
2304dbbd9e4bSmacallan    # If it is relative, then search for the first ld in PATH.
2305dbbd9e4bSmacallan    with_gnu_ld=unknown
2306dbbd9e4bSmacallan    ;;
2307dbbd9e4bSmacallan  esac
2308dbbd9e4bSmacallanelif test "$with_gnu_ld" = yes; then
2309dbbd9e4bSmacallan  AC_MSG_CHECKING([for GNU ld])
2310dbbd9e4bSmacallanelse
2311dbbd9e4bSmacallan  AC_MSG_CHECKING([for non-GNU ld])
2312dbbd9e4bSmacallanfi
2313dbbd9e4bSmacallanAC_CACHE_VAL(lt_cv_path_LD,
2314dbbd9e4bSmacallan[if test -z "$LD"; then
2315dbbd9e4bSmacallan  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2316dbbd9e4bSmacallan  for ac_dir in $PATH; do
2317dbbd9e4bSmacallan    IFS="$lt_save_ifs"
2318dbbd9e4bSmacallan    test -z "$ac_dir" && ac_dir=.
2319dbbd9e4bSmacallan    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2320dbbd9e4bSmacallan      lt_cv_path_LD="$ac_dir/$ac_prog"
2321dbbd9e4bSmacallan      # Check to see if the program is GNU ld.  I'd rather use --version,
2322dbbd9e4bSmacallan      # but apparently some variants of GNU ld only accept -v.
2323dbbd9e4bSmacallan      # Break only if it was the GNU/non-GNU ld that we prefer.
2324dbbd9e4bSmacallan      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2325dbbd9e4bSmacallan      *GNU* | *'with BFD'*)
2326dbbd9e4bSmacallan	test "$with_gnu_ld" != no && break
2327dbbd9e4bSmacallan	;;
2328dbbd9e4bSmacallan      *)
2329dbbd9e4bSmacallan	test "$with_gnu_ld" != yes && break
2330dbbd9e4bSmacallan	;;
2331dbbd9e4bSmacallan      esac
2332dbbd9e4bSmacallan    fi
2333dbbd9e4bSmacallan  done
2334dbbd9e4bSmacallan  IFS="$lt_save_ifs"
2335dbbd9e4bSmacallanelse
2336dbbd9e4bSmacallan  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2337dbbd9e4bSmacallanfi])
2338dbbd9e4bSmacallanLD="$lt_cv_path_LD"
2339dbbd9e4bSmacallanif test -n "$LD"; then
2340dbbd9e4bSmacallan  AC_MSG_RESULT($LD)
2341dbbd9e4bSmacallanelse
2342dbbd9e4bSmacallan  AC_MSG_RESULT(no)
2343dbbd9e4bSmacallanfi
2344dbbd9e4bSmacallantest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2345dbbd9e4bSmacallanAC_PROG_LD_GNU
2346dbbd9e4bSmacallan])# AC_PROG_LD
2347dbbd9e4bSmacallan
2348dbbd9e4bSmacallan
2349dbbd9e4bSmacallan# AC_PROG_LD_GNU
2350dbbd9e4bSmacallan# --------------
2351dbbd9e4bSmacallanAC_DEFUN([AC_PROG_LD_GNU],
2352dbbd9e4bSmacallan[AC_REQUIRE([AC_PROG_EGREP])dnl
2353dbbd9e4bSmacallanAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2354dbbd9e4bSmacallan[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2355dbbd9e4bSmacallancase `$LD -v 2>&1 </dev/null` in
2356dbbd9e4bSmacallan*GNU* | *'with BFD'*)
2357dbbd9e4bSmacallan  lt_cv_prog_gnu_ld=yes
2358dbbd9e4bSmacallan  ;;
2359dbbd9e4bSmacallan*)
2360dbbd9e4bSmacallan  lt_cv_prog_gnu_ld=no
2361dbbd9e4bSmacallan  ;;
2362dbbd9e4bSmacallanesac])
2363dbbd9e4bSmacallanwith_gnu_ld=$lt_cv_prog_gnu_ld
2364dbbd9e4bSmacallan])# AC_PROG_LD_GNU
2365dbbd9e4bSmacallan
2366dbbd9e4bSmacallan
2367dbbd9e4bSmacallan# AC_PROG_LD_RELOAD_FLAG
2368dbbd9e4bSmacallan# ----------------------
2369dbbd9e4bSmacallan# find reload flag for linker
2370dbbd9e4bSmacallan#   -- PORTME Some linkers may need a different reload flag.
2371dbbd9e4bSmacallanAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2372dbbd9e4bSmacallan[AC_CACHE_CHECK([for $LD option to reload object files],
2373dbbd9e4bSmacallan  lt_cv_ld_reload_flag,
2374dbbd9e4bSmacallan  [lt_cv_ld_reload_flag='-r'])
2375dbbd9e4bSmacallanreload_flag=$lt_cv_ld_reload_flag
2376dbbd9e4bSmacallancase $reload_flag in
2377dbbd9e4bSmacallan"" | " "*) ;;
2378dbbd9e4bSmacallan*) reload_flag=" $reload_flag" ;;
2379dbbd9e4bSmacallanesac
2380dbbd9e4bSmacallanreload_cmds='$LD$reload_flag -o $output$reload_objs'
2381dbbd9e4bSmacallancase $host_os in
2382dbbd9e4bSmacallan  darwin*)
2383dbbd9e4bSmacallan    if test "$GCC" = yes; then
2384dbbd9e4bSmacallan      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2385dbbd9e4bSmacallan    else
2386dbbd9e4bSmacallan      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2387dbbd9e4bSmacallan    fi
2388dbbd9e4bSmacallan    ;;
2389dbbd9e4bSmacallanesac
2390dbbd9e4bSmacallan])# AC_PROG_LD_RELOAD_FLAG
2391dbbd9e4bSmacallan
2392dbbd9e4bSmacallan
2393dbbd9e4bSmacallan# AC_DEPLIBS_CHECK_METHOD
2394dbbd9e4bSmacallan# -----------------------
2395dbbd9e4bSmacallan# how to check for library dependencies
2396dbbd9e4bSmacallan#  -- PORTME fill in with the dynamic library characteristics
2397dbbd9e4bSmacallanAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2398dbbd9e4bSmacallan[AC_CACHE_CHECK([how to recognize dependent libraries],
2399dbbd9e4bSmacallanlt_cv_deplibs_check_method,
2400dbbd9e4bSmacallan[lt_cv_file_magic_cmd='$MAGIC_CMD'
2401dbbd9e4bSmacallanlt_cv_file_magic_test_file=
2402dbbd9e4bSmacallanlt_cv_deplibs_check_method='unknown'
2403dbbd9e4bSmacallan# Need to set the preceding variable on all platforms that support
2404dbbd9e4bSmacallan# interlibrary dependencies.
2405dbbd9e4bSmacallan# 'none' -- dependencies not supported.
2406dbbd9e4bSmacallan# `unknown' -- same as none, but documents that we really don't know.
2407dbbd9e4bSmacallan# 'pass_all' -- all dependencies passed with no checks.
2408dbbd9e4bSmacallan# 'test_compile' -- check by making test program.
2409dbbd9e4bSmacallan# 'file_magic [[regex]]' -- check by looking for files in library path
2410dbbd9e4bSmacallan# which responds to the $file_magic_cmd with a given extended regex.
2411dbbd9e4bSmacallan# If you have `file' or equivalent on your system and you're not sure
2412dbbd9e4bSmacallan# whether `pass_all' will *always* work, you probably want this one.
2413dbbd9e4bSmacallan
2414dbbd9e4bSmacallancase $host_os in
2415dbbd9e4bSmacallanaix[[4-9]]*)
2416dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2417dbbd9e4bSmacallan  ;;
2418dbbd9e4bSmacallan
2419dbbd9e4bSmacallanbeos*)
2420dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2421dbbd9e4bSmacallan  ;;
2422dbbd9e4bSmacallan
2423dbbd9e4bSmacallanbsdi[[45]]*)
2424dbbd9e4bSmacallan  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2425dbbd9e4bSmacallan  lt_cv_file_magic_cmd='/usr/bin/file -L'
2426dbbd9e4bSmacallan  lt_cv_file_magic_test_file=/shlib/libc.so
2427dbbd9e4bSmacallan  ;;
2428dbbd9e4bSmacallan
2429dbbd9e4bSmacallancygwin*)
2430dbbd9e4bSmacallan  # func_win32_libid is a shell function defined in ltmain.sh
2431dbbd9e4bSmacallan  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2432dbbd9e4bSmacallan  lt_cv_file_magic_cmd='func_win32_libid'
2433dbbd9e4bSmacallan  ;;
2434dbbd9e4bSmacallan
2435dbbd9e4bSmacallanmingw* | pw32*)
2436dbbd9e4bSmacallan  # Base MSYS/MinGW do not provide the 'file' command needed by
2437dbbd9e4bSmacallan  # func_win32_libid shell function, so use a weaker test based on 'objdump',
2438dbbd9e4bSmacallan  # unless we find 'file', for example because we are cross-compiling.
2439dbbd9e4bSmacallan  if ( file / ) >/dev/null 2>&1; then
2440dbbd9e4bSmacallan    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2441dbbd9e4bSmacallan    lt_cv_file_magic_cmd='func_win32_libid'
2442dbbd9e4bSmacallan  else
2443dbbd9e4bSmacallan    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2444dbbd9e4bSmacallan    lt_cv_file_magic_cmd='$OBJDUMP -f'
2445dbbd9e4bSmacallan  fi
2446dbbd9e4bSmacallan  ;;
2447dbbd9e4bSmacallan
2448dbbd9e4bSmacallandarwin* | rhapsody*)
2449dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2450dbbd9e4bSmacallan  ;;
2451dbbd9e4bSmacallan
2452dbbd9e4bSmacallanfreebsd* | dragonfly*)
2453dbbd9e4bSmacallan  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2454dbbd9e4bSmacallan    case $host_cpu in
2455dbbd9e4bSmacallan    i*86 )
2456dbbd9e4bSmacallan      # Not sure whether the presence of OpenBSD here was a mistake.
2457dbbd9e4bSmacallan      # Let's accept both of them until this is cleared up.
2458dbbd9e4bSmacallan      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2459dbbd9e4bSmacallan      lt_cv_file_magic_cmd=/usr/bin/file
2460dbbd9e4bSmacallan      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2461dbbd9e4bSmacallan      ;;
2462dbbd9e4bSmacallan    esac
2463dbbd9e4bSmacallan  else
2464dbbd9e4bSmacallan    lt_cv_deplibs_check_method=pass_all
2465dbbd9e4bSmacallan  fi
2466dbbd9e4bSmacallan  ;;
2467dbbd9e4bSmacallan
2468dbbd9e4bSmacallangnu*)
2469dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2470dbbd9e4bSmacallan  ;;
2471dbbd9e4bSmacallan
2472dbbd9e4bSmacallanhpux10.20* | hpux11*)
2473dbbd9e4bSmacallan  lt_cv_file_magic_cmd=/usr/bin/file
2474dbbd9e4bSmacallan  case $host_cpu in
2475dbbd9e4bSmacallan  ia64*)
2476dbbd9e4bSmacallan    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2477dbbd9e4bSmacallan    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2478dbbd9e4bSmacallan    ;;
2479dbbd9e4bSmacallan  hppa*64*)
2480dbbd9e4bSmacallan    [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]']
2481dbbd9e4bSmacallan    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2482dbbd9e4bSmacallan    ;;
2483dbbd9e4bSmacallan  *)
2484dbbd9e4bSmacallan    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2485dbbd9e4bSmacallan    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2486dbbd9e4bSmacallan    ;;
2487dbbd9e4bSmacallan  esac
2488dbbd9e4bSmacallan  ;;
2489dbbd9e4bSmacallan
2490dbbd9e4bSmacallaninterix[[3-9]]*)
2491dbbd9e4bSmacallan  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2492dbbd9e4bSmacallan  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2493dbbd9e4bSmacallan  ;;
2494dbbd9e4bSmacallan
2495dbbd9e4bSmacallanirix5* | irix6* | nonstopux*)
2496dbbd9e4bSmacallan  case $LD in
2497dbbd9e4bSmacallan  *-32|*"-32 ") libmagic=32-bit;;
2498dbbd9e4bSmacallan  *-n32|*"-n32 ") libmagic=N32;;
2499dbbd9e4bSmacallan  *-64|*"-64 ") libmagic=64-bit;;
2500dbbd9e4bSmacallan  *) libmagic=never-match;;
2501dbbd9e4bSmacallan  esac
2502dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2503dbbd9e4bSmacallan  ;;
2504dbbd9e4bSmacallan
2505dbbd9e4bSmacallan# This must be Linux ELF.
2506dbbd9e4bSmacallanlinux* | k*bsd*-gnu)
2507dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2508dbbd9e4bSmacallan  ;;
2509dbbd9e4bSmacallan
2510dbbd9e4bSmacallannetbsd*)
2511dbbd9e4bSmacallan  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2512dbbd9e4bSmacallan    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2513dbbd9e4bSmacallan  else
2514dbbd9e4bSmacallan    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2515dbbd9e4bSmacallan  fi
2516dbbd9e4bSmacallan  ;;
2517dbbd9e4bSmacallan
2518dbbd9e4bSmacallannewos6*)
2519dbbd9e4bSmacallan  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2520dbbd9e4bSmacallan  lt_cv_file_magic_cmd=/usr/bin/file
2521dbbd9e4bSmacallan  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2522dbbd9e4bSmacallan  ;;
2523dbbd9e4bSmacallan
2524dbbd9e4bSmacallannto-qnx*)
2525dbbd9e4bSmacallan  lt_cv_deplibs_check_method=unknown
2526dbbd9e4bSmacallan  ;;
2527dbbd9e4bSmacallan
2528dbbd9e4bSmacallanopenbsd*)
2529dbbd9e4bSmacallan  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2530dbbd9e4bSmacallan    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2531dbbd9e4bSmacallan  else
2532dbbd9e4bSmacallan    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2533dbbd9e4bSmacallan  fi
2534dbbd9e4bSmacallan  ;;
2535dbbd9e4bSmacallan
2536dbbd9e4bSmacallanosf3* | osf4* | osf5*)
2537dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2538dbbd9e4bSmacallan  ;;
2539dbbd9e4bSmacallan
2540dbbd9e4bSmacallanrdos*)
2541dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2542dbbd9e4bSmacallan  ;;
2543dbbd9e4bSmacallan
2544dbbd9e4bSmacallansolaris*)
2545dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2546dbbd9e4bSmacallan  ;;
2547dbbd9e4bSmacallan
2548dbbd9e4bSmacallansysv4 | sysv4.3*)
2549dbbd9e4bSmacallan  case $host_vendor in
2550dbbd9e4bSmacallan  motorola)
2551dbbd9e4bSmacallan    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]]'
2552dbbd9e4bSmacallan    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2553dbbd9e4bSmacallan    ;;
2554dbbd9e4bSmacallan  ncr)
2555dbbd9e4bSmacallan    lt_cv_deplibs_check_method=pass_all
2556dbbd9e4bSmacallan    ;;
2557dbbd9e4bSmacallan  sequent)
2558dbbd9e4bSmacallan    lt_cv_file_magic_cmd='/bin/file'
2559dbbd9e4bSmacallan    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2560dbbd9e4bSmacallan    ;;
2561dbbd9e4bSmacallan  sni)
2562dbbd9e4bSmacallan    lt_cv_file_magic_cmd='/bin/file'
2563dbbd9e4bSmacallan    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2564dbbd9e4bSmacallan    lt_cv_file_magic_test_file=/lib/libc.so
2565dbbd9e4bSmacallan    ;;
2566dbbd9e4bSmacallan  siemens)
2567dbbd9e4bSmacallan    lt_cv_deplibs_check_method=pass_all
2568dbbd9e4bSmacallan    ;;
2569dbbd9e4bSmacallan  pc)
2570dbbd9e4bSmacallan    lt_cv_deplibs_check_method=pass_all
2571dbbd9e4bSmacallan    ;;
2572dbbd9e4bSmacallan  esac
2573dbbd9e4bSmacallan  ;;
2574dbbd9e4bSmacallan
2575dbbd9e4bSmacallansysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2576dbbd9e4bSmacallan  lt_cv_deplibs_check_method=pass_all
2577dbbd9e4bSmacallan  ;;
2578dbbd9e4bSmacallanesac
2579dbbd9e4bSmacallan])
2580dbbd9e4bSmacallanfile_magic_cmd=$lt_cv_file_magic_cmd
2581dbbd9e4bSmacallandeplibs_check_method=$lt_cv_deplibs_check_method
2582dbbd9e4bSmacallantest -z "$deplibs_check_method" && deplibs_check_method=unknown
2583dbbd9e4bSmacallan])# AC_DEPLIBS_CHECK_METHOD
2584dbbd9e4bSmacallan
2585dbbd9e4bSmacallan
2586dbbd9e4bSmacallan# AC_PROG_NM
2587dbbd9e4bSmacallan# ----------
2588dbbd9e4bSmacallan# find the pathname to a BSD-compatible name lister
2589dbbd9e4bSmacallanAC_DEFUN([AC_PROG_NM],
2590dbbd9e4bSmacallan[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2591dbbd9e4bSmacallan[if test -n "$NM"; then
2592dbbd9e4bSmacallan  # Let the user override the test.
2593dbbd9e4bSmacallan  lt_cv_path_NM="$NM"
2594dbbd9e4bSmacallanelse
2595dbbd9e4bSmacallan  lt_nm_to_check="${ac_tool_prefix}nm"
2596dbbd9e4bSmacallan  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2597dbbd9e4bSmacallan    lt_nm_to_check="$lt_nm_to_check nm"
2598dbbd9e4bSmacallan  fi
2599dbbd9e4bSmacallan  for lt_tmp_nm in $lt_nm_to_check; do
2600dbbd9e4bSmacallan    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2601dbbd9e4bSmacallan    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2602dbbd9e4bSmacallan      IFS="$lt_save_ifs"
2603dbbd9e4bSmacallan      test -z "$ac_dir" && ac_dir=.
2604dbbd9e4bSmacallan      tmp_nm="$ac_dir/$lt_tmp_nm"
2605dbbd9e4bSmacallan      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2606dbbd9e4bSmacallan	# Check to see if the nm accepts a BSD-compat flag.
2607dbbd9e4bSmacallan	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2608dbbd9e4bSmacallan	#   nm: unknown option "B" ignored
2609dbbd9e4bSmacallan	# Tru64's nm complains that /dev/null is an invalid object file
2610dbbd9e4bSmacallan	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2611dbbd9e4bSmacallan	*/dev/null* | *'Invalid file or object type'*)
2612dbbd9e4bSmacallan	  lt_cv_path_NM="$tmp_nm -B"
2613dbbd9e4bSmacallan	  break
2614dbbd9e4bSmacallan	  ;;
2615dbbd9e4bSmacallan	*)
2616dbbd9e4bSmacallan	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2617dbbd9e4bSmacallan	  */dev/null*)
2618dbbd9e4bSmacallan	    lt_cv_path_NM="$tmp_nm -p"
2619dbbd9e4bSmacallan	    break
2620dbbd9e4bSmacallan	    ;;
2621dbbd9e4bSmacallan	  *)
2622dbbd9e4bSmacallan	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2623dbbd9e4bSmacallan	    continue # so that we can try to find one that supports BSD flags
2624dbbd9e4bSmacallan	    ;;
2625dbbd9e4bSmacallan	  esac
2626dbbd9e4bSmacallan	  ;;
2627dbbd9e4bSmacallan	esac
2628dbbd9e4bSmacallan      fi
2629dbbd9e4bSmacallan    done
2630dbbd9e4bSmacallan    IFS="$lt_save_ifs"
2631dbbd9e4bSmacallan  done
2632dbbd9e4bSmacallan  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2633dbbd9e4bSmacallanfi])
2634dbbd9e4bSmacallanNM="$lt_cv_path_NM"
2635dbbd9e4bSmacallan])# AC_PROG_NM
2636dbbd9e4bSmacallan
2637dbbd9e4bSmacallan
2638dbbd9e4bSmacallan# AC_CHECK_LIBM
2639dbbd9e4bSmacallan# -------------
2640dbbd9e4bSmacallan# check for math library
2641dbbd9e4bSmacallanAC_DEFUN([AC_CHECK_LIBM],
2642dbbd9e4bSmacallan[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2643dbbd9e4bSmacallanLIBM=
2644dbbd9e4bSmacallancase $host in
2645dbbd9e4bSmacallan*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2646dbbd9e4bSmacallan  # These system don't have libm, or don't need it
2647dbbd9e4bSmacallan  ;;
2648dbbd9e4bSmacallan*-ncr-sysv4.3*)
2649dbbd9e4bSmacallan  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2650dbbd9e4bSmacallan  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2651dbbd9e4bSmacallan  ;;
2652dbbd9e4bSmacallan*)
2653dbbd9e4bSmacallan  AC_CHECK_LIB(m, cos, LIBM="-lm")
2654dbbd9e4bSmacallan  ;;
2655dbbd9e4bSmacallanesac
2656dbbd9e4bSmacallan])# AC_CHECK_LIBM
2657dbbd9e4bSmacallan
2658dbbd9e4bSmacallan
2659dbbd9e4bSmacallan# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2660dbbd9e4bSmacallan# -----------------------------------
2661dbbd9e4bSmacallan# sets LIBLTDL to the link flags for the libltdl convenience library and
2662dbbd9e4bSmacallan# LTDLINCL to the include flags for the libltdl header and adds
2663dbbd9e4bSmacallan# --enable-ltdl-convenience to the configure arguments.  Note that
2664dbbd9e4bSmacallan# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2665dbbd9e4bSmacallan# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2666dbbd9e4bSmacallan# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2667dbbd9e4bSmacallan# (note the single quotes!).  If your package is not flat and you're not
2668dbbd9e4bSmacallan# using automake, define top_builddir and top_srcdir appropriately in
2669dbbd9e4bSmacallan# the Makefiles.
2670dbbd9e4bSmacallanAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2671dbbd9e4bSmacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2672dbbd9e4bSmacallan  case $enable_ltdl_convenience in
2673dbbd9e4bSmacallan  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2674dbbd9e4bSmacallan  "") enable_ltdl_convenience=yes
2675dbbd9e4bSmacallan      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2676dbbd9e4bSmacallan  esac
2677dbbd9e4bSmacallan  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2678dbbd9e4bSmacallan  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2679dbbd9e4bSmacallan  # For backwards non-gettext consistent compatibility...
2680dbbd9e4bSmacallan  INCLTDL="$LTDLINCL"
2681dbbd9e4bSmacallan])# AC_LIBLTDL_CONVENIENCE
2682dbbd9e4bSmacallan
2683dbbd9e4bSmacallan
2684dbbd9e4bSmacallan# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2685dbbd9e4bSmacallan# -----------------------------------
2686dbbd9e4bSmacallan# sets LIBLTDL to the link flags for the libltdl installable library and
2687dbbd9e4bSmacallan# LTDLINCL to the include flags for the libltdl header and adds
2688dbbd9e4bSmacallan# --enable-ltdl-install to the configure arguments.  Note that
2689dbbd9e4bSmacallan# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2690dbbd9e4bSmacallan# and an installed libltdl is not found, it is assumed to be `libltdl'.
2691dbbd9e4bSmacallan# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2692dbbd9e4bSmacallan# '${top_srcdir}/' (note the single quotes!).  If your package is not
2693dbbd9e4bSmacallan# flat and you're not using automake, define top_builddir and top_srcdir
2694dbbd9e4bSmacallan# appropriately in the Makefiles.
2695dbbd9e4bSmacallan# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2696dbbd9e4bSmacallanAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2697dbbd9e4bSmacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2698dbbd9e4bSmacallan  AC_CHECK_LIB(ltdl, lt_dlinit,
2699dbbd9e4bSmacallan  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2700dbbd9e4bSmacallan  [if test x"$enable_ltdl_install" = xno; then
2701dbbd9e4bSmacallan     AC_MSG_WARN([libltdl not installed, but installation disabled])
2702dbbd9e4bSmacallan   else
2703dbbd9e4bSmacallan     enable_ltdl_install=yes
2704dbbd9e4bSmacallan   fi
2705dbbd9e4bSmacallan  ])
2706dbbd9e4bSmacallan  if test x"$enable_ltdl_install" = x"yes"; then
2707dbbd9e4bSmacallan    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2708dbbd9e4bSmacallan    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2709dbbd9e4bSmacallan    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2710dbbd9e4bSmacallan  else
2711dbbd9e4bSmacallan    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2712dbbd9e4bSmacallan    LIBLTDL="-lltdl"
2713dbbd9e4bSmacallan    LTDLINCL=
2714dbbd9e4bSmacallan  fi
2715dbbd9e4bSmacallan  # For backwards non-gettext consistent compatibility...
2716dbbd9e4bSmacallan  INCLTDL="$LTDLINCL"
2717dbbd9e4bSmacallan])# AC_LIBLTDL_INSTALLABLE
2718dbbd9e4bSmacallan
2719dbbd9e4bSmacallan
2720dbbd9e4bSmacallan# AC_LIBTOOL_CXX
2721dbbd9e4bSmacallan# --------------
2722dbbd9e4bSmacallan# enable support for C++ libraries
2723dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_CXX],
2724dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_LANG_CXX])
2725dbbd9e4bSmacallan])# AC_LIBTOOL_CXX
2726dbbd9e4bSmacallan
2727dbbd9e4bSmacallan
2728dbbd9e4bSmacallan# _LT_AC_LANG_CXX
2729dbbd9e4bSmacallan# ---------------
2730dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_CXX],
2731dbbd9e4bSmacallan[AC_REQUIRE([AC_PROG_CXX])
2732dbbd9e4bSmacallanAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2733dbbd9e4bSmacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2734dbbd9e4bSmacallan])# _LT_AC_LANG_CXX
2735dbbd9e4bSmacallan
2736dbbd9e4bSmacallan# _LT_AC_PROG_CXXCPP
2737dbbd9e4bSmacallan# ------------------
2738dbbd9e4bSmacallanAC_DEFUN([_LT_AC_PROG_CXXCPP],
2739dbbd9e4bSmacallan[
2740dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CXX])
2741dbbd9e4bSmacallanif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2742dbbd9e4bSmacallan    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2743dbbd9e4bSmacallan    (test "X$CXX" != "Xg++"))) ; then
2744dbbd9e4bSmacallan  AC_PROG_CXXCPP
2745dbbd9e4bSmacallanfi
2746dbbd9e4bSmacallan])# _LT_AC_PROG_CXXCPP
2747dbbd9e4bSmacallan
2748dbbd9e4bSmacallan# AC_LIBTOOL_F77
2749dbbd9e4bSmacallan# --------------
2750dbbd9e4bSmacallan# enable support for Fortran 77 libraries
2751dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_F77],
2752dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_LANG_F77])
2753dbbd9e4bSmacallan])# AC_LIBTOOL_F77
2754dbbd9e4bSmacallan
2755dbbd9e4bSmacallan
2756dbbd9e4bSmacallan# _LT_AC_LANG_F77
2757dbbd9e4bSmacallan# ---------------
2758dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_F77],
2759dbbd9e4bSmacallan[AC_REQUIRE([AC_PROG_F77])
2760dbbd9e4bSmacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2761dbbd9e4bSmacallan])# _LT_AC_LANG_F77
2762dbbd9e4bSmacallan
2763dbbd9e4bSmacallan
2764dbbd9e4bSmacallan# AC_LIBTOOL_GCJ
2765dbbd9e4bSmacallan# --------------
2766dbbd9e4bSmacallan# enable support for GCJ libraries
2767dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_GCJ],
2768dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_LANG_GCJ])
2769dbbd9e4bSmacallan])# AC_LIBTOOL_GCJ
2770dbbd9e4bSmacallan
2771dbbd9e4bSmacallan
2772dbbd9e4bSmacallan# _LT_AC_LANG_GCJ
2773dbbd9e4bSmacallan# ---------------
2774dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_GCJ],
2775dbbd9e4bSmacallan[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2776dbbd9e4bSmacallan  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2777dbbd9e4bSmacallan    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2778dbbd9e4bSmacallan      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2779dbbd9e4bSmacallan	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2780dbbd9e4bSmacallan	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2781dbbd9e4bSmacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2782dbbd9e4bSmacallan])# _LT_AC_LANG_GCJ
2783dbbd9e4bSmacallan
2784dbbd9e4bSmacallan
2785dbbd9e4bSmacallan# AC_LIBTOOL_RC
2786dbbd9e4bSmacallan# -------------
2787dbbd9e4bSmacallan# enable support for Windows resource files
2788dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_RC],
2789dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_RC])
2790dbbd9e4bSmacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2791dbbd9e4bSmacallan])# AC_LIBTOOL_RC
2792dbbd9e4bSmacallan
2793dbbd9e4bSmacallan
2794dbbd9e4bSmacallan# AC_LIBTOOL_LANG_C_CONFIG
2795dbbd9e4bSmacallan# ------------------------
2796dbbd9e4bSmacallan# Ensure that the configuration vars for the C compiler are
2797dbbd9e4bSmacallan# suitably defined.  Those variables are subsequently used by
2798dbbd9e4bSmacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2799dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2800dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2801dbbd9e4bSmacallan[lt_save_CC="$CC"
2802dbbd9e4bSmacallanAC_LANG_PUSH(C)
2803dbbd9e4bSmacallan
2804dbbd9e4bSmacallan# Source file extension for C test sources.
2805dbbd9e4bSmacallanac_ext=c
2806dbbd9e4bSmacallan
2807dbbd9e4bSmacallan# Object file extension for compiled C test sources.
2808dbbd9e4bSmacallanobjext=o
2809dbbd9e4bSmacallan_LT_AC_TAGVAR(objext, $1)=$objext
2810dbbd9e4bSmacallan
2811dbbd9e4bSmacallan# Code to be used in simple compile tests
2812dbbd9e4bSmacallanlt_simple_compile_test_code="int some_variable = 0;"
2813dbbd9e4bSmacallan
2814dbbd9e4bSmacallan# Code to be used in simple link tests
2815dbbd9e4bSmacallanlt_simple_link_test_code='int main(){return(0);}'
2816dbbd9e4bSmacallan
2817dbbd9e4bSmacallan_LT_AC_SYS_COMPILER
2818dbbd9e4bSmacallan
2819dbbd9e4bSmacallan# save warnings/boilerplate of simple test code
2820dbbd9e4bSmacallan_LT_COMPILER_BOILERPLATE
2821dbbd9e4bSmacallan_LT_LINKER_BOILERPLATE
2822dbbd9e4bSmacallan
2823dbbd9e4bSmacallanAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2824dbbd9e4bSmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1)
2825dbbd9e4bSmacallanAC_LIBTOOL_PROG_CC_C_O($1)
2826dbbd9e4bSmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2827dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1)
2828dbbd9e4bSmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2829dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2830dbbd9e4bSmacallanAC_LIBTOOL_SYS_LIB_STRIP
2831dbbd9e4bSmacallanAC_LIBTOOL_DLOPEN_SELF
2832dbbd9e4bSmacallan
2833dbbd9e4bSmacallan# Report which library types will actually be built
2834dbbd9e4bSmacallanAC_MSG_CHECKING([if libtool supports shared libraries])
2835dbbd9e4bSmacallanAC_MSG_RESULT([$can_build_shared])
2836dbbd9e4bSmacallan
2837dbbd9e4bSmacallanAC_MSG_CHECKING([whether to build shared libraries])
2838dbbd9e4bSmacallantest "$can_build_shared" = "no" && enable_shared=no
2839dbbd9e4bSmacallan
2840dbbd9e4bSmacallan# On AIX, shared libraries and static libraries use the same namespace, and
2841dbbd9e4bSmacallan# are all built from PIC.
2842dbbd9e4bSmacallancase $host_os in
2843dbbd9e4bSmacallanaix3*)
2844dbbd9e4bSmacallan  test "$enable_shared" = yes && enable_static=no
2845dbbd9e4bSmacallan  if test -n "$RANLIB"; then
2846dbbd9e4bSmacallan    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2847dbbd9e4bSmacallan    postinstall_cmds='$RANLIB $lib'
2848dbbd9e4bSmacallan  fi
2849dbbd9e4bSmacallan  ;;
2850dbbd9e4bSmacallan
2851dbbd9e4bSmacallanaix[[4-9]]*)
2852dbbd9e4bSmacallan  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2853dbbd9e4bSmacallan    test "$enable_shared" = yes && enable_static=no
2854dbbd9e4bSmacallan  fi
2855dbbd9e4bSmacallan    ;;
2856dbbd9e4bSmacallanesac
2857dbbd9e4bSmacallanAC_MSG_RESULT([$enable_shared])
2858dbbd9e4bSmacallan
2859dbbd9e4bSmacallanAC_MSG_CHECKING([whether to build static libraries])
2860dbbd9e4bSmacallan# Make sure either enable_shared or enable_static is yes.
2861dbbd9e4bSmacallantest "$enable_shared" = yes || enable_static=yes
2862dbbd9e4bSmacallanAC_MSG_RESULT([$enable_static])
2863dbbd9e4bSmacallan
2864dbbd9e4bSmacallanAC_LIBTOOL_CONFIG($1)
2865dbbd9e4bSmacallan
2866dbbd9e4bSmacallanAC_LANG_POP
2867dbbd9e4bSmacallanCC="$lt_save_CC"
2868dbbd9e4bSmacallan])# AC_LIBTOOL_LANG_C_CONFIG
2869dbbd9e4bSmacallan
2870dbbd9e4bSmacallan
2871dbbd9e4bSmacallan# AC_LIBTOOL_LANG_CXX_CONFIG
2872dbbd9e4bSmacallan# --------------------------
2873dbbd9e4bSmacallan# Ensure that the configuration vars for the C compiler are
2874dbbd9e4bSmacallan# suitably defined.  Those variables are subsequently used by
2875dbbd9e4bSmacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2876dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2877dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2878dbbd9e4bSmacallan[AC_LANG_PUSH(C++)
2879dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CXX])
2880dbbd9e4bSmacallanAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2881dbbd9e4bSmacallan
2882dbbd9e4bSmacallan_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2883dbbd9e4bSmacallan_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2884dbbd9e4bSmacallan_LT_AC_TAGVAR(always_export_symbols, $1)=no
2885dbbd9e4bSmacallan_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2886dbbd9e4bSmacallan_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2887dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_direct, $1)=no
2888dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2889dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2890dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2891dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2892dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2893dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2894dbbd9e4bSmacallan_LT_AC_TAGVAR(module_cmds, $1)=
2895dbbd9e4bSmacallan_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2896dbbd9e4bSmacallan_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2897dbbd9e4bSmacallan_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2898dbbd9e4bSmacallan_LT_AC_TAGVAR(no_undefined_flag, $1)=
2899dbbd9e4bSmacallan_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2900dbbd9e4bSmacallan_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2901dbbd9e4bSmacallan
2902dbbd9e4bSmacallan# Dependencies to place before and after the object being linked:
2903dbbd9e4bSmacallan_LT_AC_TAGVAR(predep_objects, $1)=
2904dbbd9e4bSmacallan_LT_AC_TAGVAR(postdep_objects, $1)=
2905dbbd9e4bSmacallan_LT_AC_TAGVAR(predeps, $1)=
2906dbbd9e4bSmacallan_LT_AC_TAGVAR(postdeps, $1)=
2907dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2908dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
2909dbbd9e4bSmacallan
2910dbbd9e4bSmacallan# Source file extension for C++ test sources.
2911dbbd9e4bSmacallanac_ext=cpp
2912dbbd9e4bSmacallan
2913dbbd9e4bSmacallan# Object file extension for compiled C++ test sources.
2914dbbd9e4bSmacallanobjext=o
2915dbbd9e4bSmacallan_LT_AC_TAGVAR(objext, $1)=$objext
2916dbbd9e4bSmacallan
2917dbbd9e4bSmacallan# Code to be used in simple compile tests
2918dbbd9e4bSmacallanlt_simple_compile_test_code="int some_variable = 0;"
2919dbbd9e4bSmacallan
2920dbbd9e4bSmacallan# Code to be used in simple link tests
2921dbbd9e4bSmacallanlt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2922dbbd9e4bSmacallan
2923dbbd9e4bSmacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2924dbbd9e4bSmacallan_LT_AC_SYS_COMPILER
2925dbbd9e4bSmacallan
2926dbbd9e4bSmacallan# save warnings/boilerplate of simple test code
2927dbbd9e4bSmacallan_LT_COMPILER_BOILERPLATE
2928dbbd9e4bSmacallan_LT_LINKER_BOILERPLATE
2929dbbd9e4bSmacallan
2930dbbd9e4bSmacallan# Allow CC to be a program name with arguments.
2931dbbd9e4bSmacallanlt_save_CC=$CC
2932dbbd9e4bSmacallanlt_save_LD=$LD
2933dbbd9e4bSmacallanlt_save_GCC=$GCC
2934dbbd9e4bSmacallanGCC=$GXX
2935dbbd9e4bSmacallanlt_save_with_gnu_ld=$with_gnu_ld
2936dbbd9e4bSmacallanlt_save_path_LD=$lt_cv_path_LD
2937dbbd9e4bSmacallanif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2938dbbd9e4bSmacallan  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2939dbbd9e4bSmacallanelse
2940dbbd9e4bSmacallan  $as_unset lt_cv_prog_gnu_ld
2941dbbd9e4bSmacallanfi
2942dbbd9e4bSmacallanif test -n "${lt_cv_path_LDCXX+set}"; then
2943dbbd9e4bSmacallan  lt_cv_path_LD=$lt_cv_path_LDCXX
2944dbbd9e4bSmacallanelse
2945dbbd9e4bSmacallan  $as_unset lt_cv_path_LD
2946dbbd9e4bSmacallanfi
2947dbbd9e4bSmacallantest -z "${LDCXX+set}" || LD=$LDCXX
2948dbbd9e4bSmacallanCC=${CXX-"c++"}
2949dbbd9e4bSmacallancompiler=$CC
2950dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler, $1)=$CC
2951dbbd9e4bSmacallan_LT_CC_BASENAME([$compiler])
2952dbbd9e4bSmacallan
2953dbbd9e4bSmacallan# We don't want -fno-exception wen compiling C++ code, so set the
2954dbbd9e4bSmacallan# no_builtin_flag separately
2955dbbd9e4bSmacallanif test "$GXX" = yes; then
2956dbbd9e4bSmacallan  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2957dbbd9e4bSmacallanelse
2958dbbd9e4bSmacallan  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2959dbbd9e4bSmacallanfi
2960dbbd9e4bSmacallan
2961dbbd9e4bSmacallanif test "$GXX" = yes; then
2962dbbd9e4bSmacallan  # Set up default GNU C++ configuration
2963dbbd9e4bSmacallan
2964dbbd9e4bSmacallan  AC_PROG_LD
2965dbbd9e4bSmacallan
2966dbbd9e4bSmacallan  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2967dbbd9e4bSmacallan  # archiving commands below assume that GNU ld is being used.
2968dbbd9e4bSmacallan  if test "$with_gnu_ld" = yes; then
2969dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2970dbbd9e4bSmacallan    _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'
2971dbbd9e4bSmacallan
2972dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2973dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2974dbbd9e4bSmacallan
2975dbbd9e4bSmacallan    # If archive_cmds runs LD, not CC, wlarc should be empty
2976dbbd9e4bSmacallan    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2977dbbd9e4bSmacallan    #     investigate it a little bit more. (MM)
2978dbbd9e4bSmacallan    wlarc='${wl}'
2979dbbd9e4bSmacallan
2980dbbd9e4bSmacallan    # ancient GNU ld didn't support --whole-archive et. al.
2981dbbd9e4bSmacallan    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2982dbbd9e4bSmacallan	grep 'no-whole-archive' > /dev/null; then
2983dbbd9e4bSmacallan      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2984dbbd9e4bSmacallan    else
2985dbbd9e4bSmacallan      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2986dbbd9e4bSmacallan    fi
2987dbbd9e4bSmacallan  else
2988dbbd9e4bSmacallan    with_gnu_ld=no
2989dbbd9e4bSmacallan    wlarc=
2990dbbd9e4bSmacallan
2991dbbd9e4bSmacallan    # A generic and very simple default shared library creation
2992dbbd9e4bSmacallan    # command for GNU C++ for the case where it uses the native
2993dbbd9e4bSmacallan    # linker, instead of GNU ld.  If possible, this setting should
2994dbbd9e4bSmacallan    # overridden to take advantage of the native linker features on
2995dbbd9e4bSmacallan    # the platform it is being used on.
2996dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2997dbbd9e4bSmacallan  fi
2998dbbd9e4bSmacallan
2999dbbd9e4bSmacallan  # Commands to make compiler produce verbose output that lists
3000dbbd9e4bSmacallan  # what "hidden" libraries, object files and flags are used when
3001dbbd9e4bSmacallan  # linking a shared library.
3002dbbd9e4bSmacallan  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3003dbbd9e4bSmacallan
3004dbbd9e4bSmacallanelse
3005dbbd9e4bSmacallan  GXX=no
3006dbbd9e4bSmacallan  with_gnu_ld=no
3007dbbd9e4bSmacallan  wlarc=
3008dbbd9e4bSmacallanfi
3009dbbd9e4bSmacallan
3010dbbd9e4bSmacallan# PORTME: fill in a description of your system's C++ link characteristics
3011dbbd9e4bSmacallanAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3012dbbd9e4bSmacallan_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3013dbbd9e4bSmacallancase $host_os in
3014dbbd9e4bSmacallan  aix3*)
3015dbbd9e4bSmacallan    # FIXME: insert proper C++ library support
3016dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3017dbbd9e4bSmacallan    ;;
3018dbbd9e4bSmacallan  aix[[4-9]]*)
3019dbbd9e4bSmacallan    if test "$host_cpu" = ia64; then
3020dbbd9e4bSmacallan      # On IA64, the linker does run time linking by default, so we don't
3021dbbd9e4bSmacallan      # have to do anything special.
3022dbbd9e4bSmacallan      aix_use_runtimelinking=no
3023dbbd9e4bSmacallan      exp_sym_flag='-Bexport'
3024dbbd9e4bSmacallan      no_entry_flag=""
3025dbbd9e4bSmacallan    else
3026dbbd9e4bSmacallan      aix_use_runtimelinking=no
3027dbbd9e4bSmacallan
3028dbbd9e4bSmacallan      # Test if we are trying to use run time linking or normal
3029dbbd9e4bSmacallan      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3030dbbd9e4bSmacallan      # need to do runtime linking.
3031dbbd9e4bSmacallan      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3032dbbd9e4bSmacallan	for ld_flag in $LDFLAGS; do
3033dbbd9e4bSmacallan	  case $ld_flag in
3034dbbd9e4bSmacallan	  *-brtl*)
3035dbbd9e4bSmacallan	    aix_use_runtimelinking=yes
3036dbbd9e4bSmacallan	    break
3037dbbd9e4bSmacallan	    ;;
3038dbbd9e4bSmacallan	  esac
3039dbbd9e4bSmacallan	done
3040dbbd9e4bSmacallan	;;
3041dbbd9e4bSmacallan      esac
3042dbbd9e4bSmacallan
3043dbbd9e4bSmacallan      exp_sym_flag='-bexport'
3044dbbd9e4bSmacallan      no_entry_flag='-bnoentry'
3045dbbd9e4bSmacallan    fi
3046dbbd9e4bSmacallan
3047dbbd9e4bSmacallan    # When large executables or shared objects are built, AIX ld can
3048dbbd9e4bSmacallan    # have problems creating the table of contents.  If linking a library
3049dbbd9e4bSmacallan    # or program results in "error TOC overflow" add -mminimal-toc to
3050dbbd9e4bSmacallan    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3051dbbd9e4bSmacallan    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3052dbbd9e4bSmacallan
3053dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds, $1)=''
3054dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3055dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3056dbbd9e4bSmacallan    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3057dbbd9e4bSmacallan
3058dbbd9e4bSmacallan    if test "$GXX" = yes; then
3059dbbd9e4bSmacallan      case $host_os in aix4.[[012]]|aix4.[[012]].*)
3060dbbd9e4bSmacallan      # We only want to do this on AIX 4.2 and lower, the check
3061dbbd9e4bSmacallan      # below for broken collect2 doesn't work under 4.3+
3062dbbd9e4bSmacallan	collect2name=`${CC} -print-prog-name=collect2`
3063dbbd9e4bSmacallan	if test -f "$collect2name" && \
3064dbbd9e4bSmacallan	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3065dbbd9e4bSmacallan	then
3066dbbd9e4bSmacallan	  # We have reworked collect2
3067dbbd9e4bSmacallan	  :
3068dbbd9e4bSmacallan	else
3069dbbd9e4bSmacallan	  # We have old collect2
3070dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3071dbbd9e4bSmacallan	  # It fails to find uninstalled libraries when the uninstalled
3072dbbd9e4bSmacallan	  # path is not listed in the libpath.  Setting hardcode_minus_L
3073dbbd9e4bSmacallan	  # to unsupported forces relinking
3074dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3075dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3076dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3077dbbd9e4bSmacallan	fi
3078dbbd9e4bSmacallan	;;
3079dbbd9e4bSmacallan      esac
3080dbbd9e4bSmacallan      shared_flag='-shared'
3081dbbd9e4bSmacallan      if test "$aix_use_runtimelinking" = yes; then
3082dbbd9e4bSmacallan	shared_flag="$shared_flag "'${wl}-G'
3083dbbd9e4bSmacallan      fi
3084dbbd9e4bSmacallan    else
3085dbbd9e4bSmacallan      # not using gcc
3086dbbd9e4bSmacallan      if test "$host_cpu" = ia64; then
3087dbbd9e4bSmacallan	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3088dbbd9e4bSmacallan	# chokes on -Wl,-G. The following line is correct:
3089dbbd9e4bSmacallan	shared_flag='-G'
3090dbbd9e4bSmacallan      else
3091dbbd9e4bSmacallan	if test "$aix_use_runtimelinking" = yes; then
3092dbbd9e4bSmacallan	  shared_flag='${wl}-G'
3093dbbd9e4bSmacallan	else
3094dbbd9e4bSmacallan	  shared_flag='${wl}-bM:SRE'
3095dbbd9e4bSmacallan	fi
3096dbbd9e4bSmacallan      fi
3097dbbd9e4bSmacallan    fi
3098dbbd9e4bSmacallan
3099dbbd9e4bSmacallan    # It seems that -bexpall does not export symbols beginning with
3100dbbd9e4bSmacallan    # underscore (_), so it is better to generate a list of symbols to export.
3101dbbd9e4bSmacallan    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3102dbbd9e4bSmacallan    if test "$aix_use_runtimelinking" = yes; then
3103dbbd9e4bSmacallan      # Warning - without using the other runtime loading flags (-brtl),
3104dbbd9e4bSmacallan      # -berok will link without error, but may produce a broken library.
3105dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3106dbbd9e4bSmacallan      # Determine the default libpath from the value encoded in an empty executable.
3107dbbd9e4bSmacallan      _LT_AC_SYS_LIBPATH_AIX
3108dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3109dbbd9e4bSmacallan
3110dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3111dbbd9e4bSmacallan     else
3112dbbd9e4bSmacallan      if test "$host_cpu" = ia64; then
3113dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3114dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3115dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3116dbbd9e4bSmacallan      else
3117dbbd9e4bSmacallan	# Determine the default libpath from the value encoded in an empty executable.
3118dbbd9e4bSmacallan	_LT_AC_SYS_LIBPATH_AIX
3119dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3120dbbd9e4bSmacallan	# Warning - without using the other run time loading flags,
3121dbbd9e4bSmacallan	# -berok will link without error, but may produce a broken library.
3122dbbd9e4bSmacallan	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3123dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3124dbbd9e4bSmacallan	# Exported symbols can be pulled into shared objects from archives
3125dbbd9e4bSmacallan	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3126dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3127dbbd9e4bSmacallan	# This is similar to how AIX traditionally builds its shared libraries.
3128dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3129dbbd9e4bSmacallan      fi
3130dbbd9e4bSmacallan    fi
3131dbbd9e4bSmacallan    ;;
3132dbbd9e4bSmacallan
3133dbbd9e4bSmacallan  beos*)
3134dbbd9e4bSmacallan    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3135dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3136dbbd9e4bSmacallan      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3137dbbd9e4bSmacallan      # support --undefined.  This deserves some investigation.  FIXME
3138dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3139dbbd9e4bSmacallan    else
3140dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3141dbbd9e4bSmacallan    fi
3142dbbd9e4bSmacallan    ;;
3143dbbd9e4bSmacallan
3144dbbd9e4bSmacallan  chorus*)
3145dbbd9e4bSmacallan    case $cc_basename in
3146dbbd9e4bSmacallan      *)
3147dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3148dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3149dbbd9e4bSmacallan	;;
3150dbbd9e4bSmacallan    esac
3151dbbd9e4bSmacallan    ;;
3152dbbd9e4bSmacallan
3153dbbd9e4bSmacallan  cygwin* | mingw* | pw32*)
3154dbbd9e4bSmacallan    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3155dbbd9e4bSmacallan    # as there is no search path for DLLs.
3156dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3157dbbd9e4bSmacallan    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3158dbbd9e4bSmacallan    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3159dbbd9e4bSmacallan    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3160dbbd9e4bSmacallan
3161dbbd9e4bSmacallan    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3162dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3163dbbd9e4bSmacallan      # If the export-symbols file already is a .def file (1st line
3164dbbd9e4bSmacallan      # is EXPORTS), use it as is; otherwise, prepend...
3165dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3166dbbd9e4bSmacallan	cp $export_symbols $output_objdir/$soname.def;
3167dbbd9e4bSmacallan      else
3168dbbd9e4bSmacallan	echo EXPORTS > $output_objdir/$soname.def;
3169dbbd9e4bSmacallan	cat $export_symbols >> $output_objdir/$soname.def;
3170dbbd9e4bSmacallan      fi~
3171dbbd9e4bSmacallan      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3172dbbd9e4bSmacallan    else
3173dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3174dbbd9e4bSmacallan    fi
3175dbbd9e4bSmacallan  ;;
3176dbbd9e4bSmacallan      darwin* | rhapsody*)
3177dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3178dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3179dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3180dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3181dbbd9e4bSmacallan      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3182dbbd9e4bSmacallan      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3183dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3184dbbd9e4bSmacallan      if test "$GXX" = yes ; then
3185dbbd9e4bSmacallan      output_verbose_link_cmd='echo'
3186dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3187dbbd9e4bSmacallan      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3188dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3189dbbd9e4bSmacallan      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3190dbbd9e4bSmacallan      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3191dbbd9e4bSmacallan        _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${_lt_dsymutil}"
3192dbbd9e4bSmacallan        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
3193dbbd9e4bSmacallan      fi
3194dbbd9e4bSmacallan      else
3195dbbd9e4bSmacallan      case $cc_basename in
3196dbbd9e4bSmacallan        xlc*)
3197dbbd9e4bSmacallan         output_verbose_link_cmd='echo'
3198dbbd9e4bSmacallan          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3199dbbd9e4bSmacallan          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3200dbbd9e4bSmacallan          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3201dbbd9e4bSmacallan          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3202dbbd9e4bSmacallan          _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}'
3203dbbd9e4bSmacallan          ;;
3204dbbd9e4bSmacallan       *)
3205dbbd9e4bSmacallan         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3206dbbd9e4bSmacallan          ;;
3207dbbd9e4bSmacallan      esac
3208dbbd9e4bSmacallan      fi
3209dbbd9e4bSmacallan        ;;
3210dbbd9e4bSmacallan
3211dbbd9e4bSmacallan  dgux*)
3212dbbd9e4bSmacallan    case $cc_basename in
3213dbbd9e4bSmacallan      ec++*)
3214dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3215dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3216dbbd9e4bSmacallan	;;
3217dbbd9e4bSmacallan      ghcx*)
3218dbbd9e4bSmacallan	# Green Hills C++ Compiler
3219dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3220dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3221dbbd9e4bSmacallan	;;
3222dbbd9e4bSmacallan      *)
3223dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3224dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3225dbbd9e4bSmacallan	;;
3226dbbd9e4bSmacallan    esac
3227dbbd9e4bSmacallan    ;;
3228dbbd9e4bSmacallan  freebsd[[12]]*)
3229dbbd9e4bSmacallan    # C++ shared libraries reported to be fairly broken before switch to ELF
3230dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3231dbbd9e4bSmacallan    ;;
3232dbbd9e4bSmacallan  freebsd-elf*)
3233dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3234dbbd9e4bSmacallan    ;;
3235dbbd9e4bSmacallan  freebsd* | dragonfly*)
3236dbbd9e4bSmacallan    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3237dbbd9e4bSmacallan    # conventions
3238dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3239dbbd9e4bSmacallan    ;;
3240dbbd9e4bSmacallan  gnu*)
3241dbbd9e4bSmacallan    ;;
3242dbbd9e4bSmacallan  hpux9*)
3243dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3244dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3245dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3246dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3247dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3248dbbd9e4bSmacallan				# but as the default
3249dbbd9e4bSmacallan				# location of the library.
3250dbbd9e4bSmacallan
3251dbbd9e4bSmacallan    case $cc_basename in
3252dbbd9e4bSmacallan    CC*)
3253dbbd9e4bSmacallan      # FIXME: insert proper C++ library support
3254dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3255dbbd9e4bSmacallan      ;;
3256dbbd9e4bSmacallan    aCC*)
3257dbbd9e4bSmacallan      _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'
3258dbbd9e4bSmacallan      # Commands to make compiler produce verbose output that lists
3259dbbd9e4bSmacallan      # what "hidden" libraries, object files and flags are used when
3260dbbd9e4bSmacallan      # linking a shared library.
3261dbbd9e4bSmacallan      #
3262dbbd9e4bSmacallan      # There doesn't appear to be a way to prevent this compiler from
3263dbbd9e4bSmacallan      # explicitly linking system object files so we need to strip them
3264dbbd9e4bSmacallan      # from the output so that they don't get included in the library
3265dbbd9e4bSmacallan      # dependencies.
3266dbbd9e4bSmacallan      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'
3267dbbd9e4bSmacallan      ;;
3268dbbd9e4bSmacallan    *)
3269dbbd9e4bSmacallan      if test "$GXX" = yes; then
3270dbbd9e4bSmacallan        _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'
3271dbbd9e4bSmacallan      else
3272dbbd9e4bSmacallan        # FIXME: insert proper C++ library support
3273dbbd9e4bSmacallan        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3274dbbd9e4bSmacallan      fi
3275dbbd9e4bSmacallan      ;;
3276dbbd9e4bSmacallan    esac
3277dbbd9e4bSmacallan    ;;
3278dbbd9e4bSmacallan  hpux10*|hpux11*)
3279dbbd9e4bSmacallan    if test $with_gnu_ld = no; then
3280dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3281dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3282dbbd9e4bSmacallan
3283dbbd9e4bSmacallan      case $host_cpu in
3284dbbd9e4bSmacallan      hppa*64*|ia64*) ;;
3285dbbd9e4bSmacallan      *)
3286dbbd9e4bSmacallan	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3287dbbd9e4bSmacallan        ;;
3288dbbd9e4bSmacallan      esac
3289dbbd9e4bSmacallan    fi
3290dbbd9e4bSmacallan    case $host_cpu in
3291dbbd9e4bSmacallan    hppa*64*|ia64*)
3292dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3293dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3294dbbd9e4bSmacallan      ;;
3295dbbd9e4bSmacallan    *)
3296dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3297dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3298dbbd9e4bSmacallan					      # but as the default
3299dbbd9e4bSmacallan					      # location of the library.
3300dbbd9e4bSmacallan      ;;
3301dbbd9e4bSmacallan    esac
3302dbbd9e4bSmacallan
3303dbbd9e4bSmacallan    case $cc_basename in
3304dbbd9e4bSmacallan      CC*)
3305dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3306dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3307dbbd9e4bSmacallan	;;
3308dbbd9e4bSmacallan      aCC*)
3309dbbd9e4bSmacallan	case $host_cpu in
3310dbbd9e4bSmacallan	hppa*64*)
3311dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3312dbbd9e4bSmacallan	  ;;
3313dbbd9e4bSmacallan	ia64*)
3314dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3315dbbd9e4bSmacallan	  ;;
3316dbbd9e4bSmacallan	*)
3317dbbd9e4bSmacallan	  _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'
3318dbbd9e4bSmacallan	  ;;
3319dbbd9e4bSmacallan	esac
3320dbbd9e4bSmacallan	# Commands to make compiler produce verbose output that lists
3321dbbd9e4bSmacallan	# what "hidden" libraries, object files and flags are used when
3322dbbd9e4bSmacallan	# linking a shared library.
3323dbbd9e4bSmacallan	#
3324dbbd9e4bSmacallan	# There doesn't appear to be a way to prevent this compiler from
3325dbbd9e4bSmacallan	# explicitly linking system object files so we need to strip them
3326dbbd9e4bSmacallan	# from the output so that they don't get included in the library
3327dbbd9e4bSmacallan	# dependencies.
3328dbbd9e4bSmacallan	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'
3329dbbd9e4bSmacallan	;;
3330dbbd9e4bSmacallan      *)
3331dbbd9e4bSmacallan	if test "$GXX" = yes; then
3332dbbd9e4bSmacallan	  if test $with_gnu_ld = no; then
3333dbbd9e4bSmacallan	    case $host_cpu in
3334dbbd9e4bSmacallan	    hppa*64*)
3335dbbd9e4bSmacallan	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3336dbbd9e4bSmacallan	      ;;
3337dbbd9e4bSmacallan	    ia64*)
3338dbbd9e4bSmacallan	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3339dbbd9e4bSmacallan	      ;;
3340dbbd9e4bSmacallan	    *)
3341dbbd9e4bSmacallan	      _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'
3342dbbd9e4bSmacallan	      ;;
3343dbbd9e4bSmacallan	    esac
3344dbbd9e4bSmacallan	  fi
3345dbbd9e4bSmacallan	else
3346dbbd9e4bSmacallan	  # FIXME: insert proper C++ library support
3347dbbd9e4bSmacallan	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3348dbbd9e4bSmacallan	fi
3349dbbd9e4bSmacallan	;;
3350dbbd9e4bSmacallan    esac
3351dbbd9e4bSmacallan    ;;
3352dbbd9e4bSmacallan  interix[[3-9]]*)
3353dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3354dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3355dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3356dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3357dbbd9e4bSmacallan    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3358dbbd9e4bSmacallan    # Instead, shared libraries are loaded at an image base (0x10000000 by
3359dbbd9e4bSmacallan    # default) and relocated if they conflict, which is a slow very memory
3360dbbd9e4bSmacallan    # consuming and fragmenting process.  To avoid this, we pick a random,
3361dbbd9e4bSmacallan    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3362dbbd9e4bSmacallan    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3363dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3364dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3365dbbd9e4bSmacallan    ;;
3366dbbd9e4bSmacallan  irix5* | irix6*)
3367dbbd9e4bSmacallan    case $cc_basename in
3368dbbd9e4bSmacallan      CC*)
3369dbbd9e4bSmacallan	# SGI C++
3370dbbd9e4bSmacallan	_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'
3371dbbd9e4bSmacallan
3372dbbd9e4bSmacallan	# Archives containing C++ object files must be created using
3373dbbd9e4bSmacallan	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3374dbbd9e4bSmacallan	# necessary to make sure instantiated templates are included
3375dbbd9e4bSmacallan	# in the archive.
3376dbbd9e4bSmacallan	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3377dbbd9e4bSmacallan	;;
3378dbbd9e4bSmacallan      *)
3379dbbd9e4bSmacallan	if test "$GXX" = yes; then
3380dbbd9e4bSmacallan	  if test "$with_gnu_ld" = no; then
3381dbbd9e4bSmacallan	    _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'
3382dbbd9e4bSmacallan	  else
3383dbbd9e4bSmacallan	    _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'
3384dbbd9e4bSmacallan	  fi
3385dbbd9e4bSmacallan	fi
3386dbbd9e4bSmacallan	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3387dbbd9e4bSmacallan	;;
3388dbbd9e4bSmacallan    esac
3389dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3390dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3391dbbd9e4bSmacallan    ;;
3392dbbd9e4bSmacallan  linux* | k*bsd*-gnu)
3393dbbd9e4bSmacallan    case $cc_basename in
3394dbbd9e4bSmacallan      KCC*)
3395dbbd9e4bSmacallan	# Kuck and Associates, Inc. (KAI) C++ Compiler
3396dbbd9e4bSmacallan
3397dbbd9e4bSmacallan	# KCC will only create a shared library if the output file
3398dbbd9e4bSmacallan	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3399dbbd9e4bSmacallan	# to its proper name (with version) after linking.
3400dbbd9e4bSmacallan	_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'
3401dbbd9e4bSmacallan	_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'
3402dbbd9e4bSmacallan	# Commands to make compiler produce verbose output that lists
3403dbbd9e4bSmacallan	# what "hidden" libraries, object files and flags are used when
3404dbbd9e4bSmacallan	# linking a shared library.
3405dbbd9e4bSmacallan	#
3406dbbd9e4bSmacallan	# There doesn't appear to be a way to prevent this compiler from
3407dbbd9e4bSmacallan	# explicitly linking system object files so we need to strip them
3408dbbd9e4bSmacallan	# from the output so that they don't get included in the library
3409dbbd9e4bSmacallan	# dependencies.
3410dbbd9e4bSmacallan	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'
3411dbbd9e4bSmacallan
3412dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3413dbbd9e4bSmacallan	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3414dbbd9e4bSmacallan
3415dbbd9e4bSmacallan	# Archives containing C++ object files must be created using
3416dbbd9e4bSmacallan	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3417dbbd9e4bSmacallan	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3418dbbd9e4bSmacallan	;;
3419dbbd9e4bSmacallan      icpc*)
3420dbbd9e4bSmacallan	# Intel C++
3421dbbd9e4bSmacallan	with_gnu_ld=yes
3422dbbd9e4bSmacallan	# version 8.0 and above of icpc choke on multiply defined symbols
3423dbbd9e4bSmacallan	# if we add $predep_objects and $postdep_objects, however 7.1 and
3424dbbd9e4bSmacallan	# earlier do not add the objects themselves.
3425dbbd9e4bSmacallan	case `$CC -V 2>&1` in
3426dbbd9e4bSmacallan	*"Version 7."*)
3427dbbd9e4bSmacallan  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3428dbbd9e4bSmacallan  	  _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'
3429dbbd9e4bSmacallan	  ;;
3430dbbd9e4bSmacallan	*)  # Version 8.0 or newer
3431dbbd9e4bSmacallan	  tmp_idyn=
3432dbbd9e4bSmacallan	  case $host_cpu in
3433dbbd9e4bSmacallan	    ia64*) tmp_idyn=' -i_dynamic';;
3434dbbd9e4bSmacallan	  esac
3435dbbd9e4bSmacallan  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3436dbbd9e4bSmacallan	  _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'
3437dbbd9e4bSmacallan	  ;;
3438dbbd9e4bSmacallan	esac
3439dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3440dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3441dbbd9e4bSmacallan	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3442dbbd9e4bSmacallan	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3443dbbd9e4bSmacallan	;;
3444dbbd9e4bSmacallan      pgCC* | pgcpp*)
3445dbbd9e4bSmacallan        # Portland Group C++ compiler
3446dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3447dbbd9e4bSmacallan  	_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'
3448dbbd9e4bSmacallan
3449dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3450dbbd9e4bSmacallan	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3451dbbd9e4bSmacallan	_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'
3452dbbd9e4bSmacallan        ;;
3453dbbd9e4bSmacallan      cxx*)
3454dbbd9e4bSmacallan	# Compaq C++
3455dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3456dbbd9e4bSmacallan	_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'
3457dbbd9e4bSmacallan
3458dbbd9e4bSmacallan	runpath_var=LD_RUN_PATH
3459dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3460dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3461dbbd9e4bSmacallan
3462dbbd9e4bSmacallan	# Commands to make compiler produce verbose output that lists
3463dbbd9e4bSmacallan	# what "hidden" libraries, object files and flags are used when
3464dbbd9e4bSmacallan	# linking a shared library.
3465dbbd9e4bSmacallan	#
3466dbbd9e4bSmacallan	# There doesn't appear to be a way to prevent this compiler from
3467dbbd9e4bSmacallan	# explicitly linking system object files so we need to strip them
3468dbbd9e4bSmacallan	# from the output so that they don't get included in the library
3469dbbd9e4bSmacallan	# dependencies.
3470dbbd9e4bSmacallan	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'
3471dbbd9e4bSmacallan	;;
3472dbbd9e4bSmacallan      *)
3473dbbd9e4bSmacallan	case `$CC -V 2>&1 | sed 5q` in
3474dbbd9e4bSmacallan	*Sun\ C*)
3475dbbd9e4bSmacallan	  # Sun C++ 5.9
3476dbbd9e4bSmacallan	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3477dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3478dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3479dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3480dbbd9e4bSmacallan	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3481dbbd9e4bSmacallan
3482dbbd9e4bSmacallan	  # Not sure whether something based on
3483dbbd9e4bSmacallan	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3484dbbd9e4bSmacallan	  # would be better.
3485dbbd9e4bSmacallan	  output_verbose_link_cmd='echo'
3486dbbd9e4bSmacallan
3487dbbd9e4bSmacallan	  # Archives containing C++ object files must be created using
3488dbbd9e4bSmacallan	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3489dbbd9e4bSmacallan	  # necessary to make sure instantiated templates are included
3490dbbd9e4bSmacallan	  # in the archive.
3491dbbd9e4bSmacallan	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3492dbbd9e4bSmacallan	  ;;
3493dbbd9e4bSmacallan	esac
3494dbbd9e4bSmacallan	;;
3495dbbd9e4bSmacallan    esac
3496dbbd9e4bSmacallan    ;;
3497dbbd9e4bSmacallan  lynxos*)
3498dbbd9e4bSmacallan    # FIXME: insert proper C++ library support
3499dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3500dbbd9e4bSmacallan    ;;
3501dbbd9e4bSmacallan  m88k*)
3502dbbd9e4bSmacallan    # FIXME: insert proper C++ library support
3503dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3504dbbd9e4bSmacallan    ;;
3505dbbd9e4bSmacallan  mvs*)
3506dbbd9e4bSmacallan    case $cc_basename in
3507dbbd9e4bSmacallan      cxx*)
3508dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3509dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3510dbbd9e4bSmacallan	;;
3511dbbd9e4bSmacallan      *)
3512dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3513dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3514dbbd9e4bSmacallan	;;
3515dbbd9e4bSmacallan    esac
3516dbbd9e4bSmacallan    ;;
3517dbbd9e4bSmacallan  netbsd*)
3518dbbd9e4bSmacallan    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3519dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3520dbbd9e4bSmacallan      wlarc=
3521dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3522dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3523dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3524dbbd9e4bSmacallan    fi
3525dbbd9e4bSmacallan    # Workaround some broken pre-1.5 toolchains
3526dbbd9e4bSmacallan    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3527dbbd9e4bSmacallan    ;;
3528dbbd9e4bSmacallan  openbsd2*)
3529dbbd9e4bSmacallan    # C++ shared libraries are fairly broken
3530dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3531dbbd9e4bSmacallan    ;;
3532dbbd9e4bSmacallan  openbsd*)
3533dbbd9e4bSmacallan    if test -f /usr/libexec/ld.so; then
3534dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3535dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3536dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3537dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3538dbbd9e4bSmacallan      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3539dbbd9e4bSmacallan	_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'
3540dbbd9e4bSmacallan	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3541dbbd9e4bSmacallan	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3542dbbd9e4bSmacallan      fi
3543dbbd9e4bSmacallan      output_verbose_link_cmd='echo'
3544dbbd9e4bSmacallan    else
3545dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3546dbbd9e4bSmacallan    fi
3547dbbd9e4bSmacallan    ;;
3548dbbd9e4bSmacallan  osf3*)
3549dbbd9e4bSmacallan    case $cc_basename in
3550dbbd9e4bSmacallan      KCC*)
3551dbbd9e4bSmacallan	# Kuck and Associates, Inc. (KAI) C++ Compiler
3552dbbd9e4bSmacallan
3553dbbd9e4bSmacallan	# KCC will only create a shared library if the output file
3554dbbd9e4bSmacallan	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3555dbbd9e4bSmacallan	# to its proper name (with version) after linking.
3556dbbd9e4bSmacallan	_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'
3557dbbd9e4bSmacallan
3558dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3559dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3560dbbd9e4bSmacallan
3561dbbd9e4bSmacallan	# Archives containing C++ object files must be created using
3562dbbd9e4bSmacallan	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3563dbbd9e4bSmacallan	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3564dbbd9e4bSmacallan
3565dbbd9e4bSmacallan	;;
3566dbbd9e4bSmacallan      RCC*)
3567dbbd9e4bSmacallan	# Rational C++ 2.4.1
3568dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3569dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3570dbbd9e4bSmacallan	;;
3571dbbd9e4bSmacallan      cxx*)
3572dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3573dbbd9e4bSmacallan	_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'
3574dbbd9e4bSmacallan
3575dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3576dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3577dbbd9e4bSmacallan
3578dbbd9e4bSmacallan	# Commands to make compiler produce verbose output that lists
3579dbbd9e4bSmacallan	# what "hidden" libraries, object files and flags are used when
3580dbbd9e4bSmacallan	# linking a shared library.
3581dbbd9e4bSmacallan	#
3582dbbd9e4bSmacallan	# There doesn't appear to be a way to prevent this compiler from
3583dbbd9e4bSmacallan	# explicitly linking system object files so we need to strip them
3584dbbd9e4bSmacallan	# from the output so that they don't get included in the library
3585dbbd9e4bSmacallan	# dependencies.
3586dbbd9e4bSmacallan	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'
3587dbbd9e4bSmacallan	;;
3588dbbd9e4bSmacallan      *)
3589dbbd9e4bSmacallan	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3590dbbd9e4bSmacallan	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3591dbbd9e4bSmacallan	  _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'
3592dbbd9e4bSmacallan
3593dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3594dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3595dbbd9e4bSmacallan
3596dbbd9e4bSmacallan	  # Commands to make compiler produce verbose output that lists
3597dbbd9e4bSmacallan	  # what "hidden" libraries, object files and flags are used when
3598dbbd9e4bSmacallan	  # linking a shared library.
3599dbbd9e4bSmacallan	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3600dbbd9e4bSmacallan
3601dbbd9e4bSmacallan	else
3602dbbd9e4bSmacallan	  # FIXME: insert proper C++ library support
3603dbbd9e4bSmacallan	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3604dbbd9e4bSmacallan	fi
3605dbbd9e4bSmacallan	;;
3606dbbd9e4bSmacallan    esac
3607dbbd9e4bSmacallan    ;;
3608dbbd9e4bSmacallan  osf4* | osf5*)
3609dbbd9e4bSmacallan    case $cc_basename in
3610dbbd9e4bSmacallan      KCC*)
3611dbbd9e4bSmacallan	# Kuck and Associates, Inc. (KAI) C++ Compiler
3612dbbd9e4bSmacallan
3613dbbd9e4bSmacallan	# KCC will only create a shared library if the output file
3614dbbd9e4bSmacallan	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3615dbbd9e4bSmacallan	# to its proper name (with version) after linking.
3616dbbd9e4bSmacallan	_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'
3617dbbd9e4bSmacallan
3618dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3619dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3620dbbd9e4bSmacallan
3621dbbd9e4bSmacallan	# Archives containing C++ object files must be created using
3622dbbd9e4bSmacallan	# the KAI C++ compiler.
3623dbbd9e4bSmacallan	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3624dbbd9e4bSmacallan	;;
3625dbbd9e4bSmacallan      RCC*)
3626dbbd9e4bSmacallan	# Rational C++ 2.4.1
3627dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3628dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3629dbbd9e4bSmacallan	;;
3630dbbd9e4bSmacallan      cxx*)
3631dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3632dbbd9e4bSmacallan	_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'
3633dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3634dbbd9e4bSmacallan	  echo "-hidden">> $lib.exp~
3635dbbd9e4bSmacallan	  $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~
3636dbbd9e4bSmacallan	  $rm $lib.exp'
3637dbbd9e4bSmacallan
3638dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3639dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3640dbbd9e4bSmacallan
3641dbbd9e4bSmacallan	# Commands to make compiler produce verbose output that lists
3642dbbd9e4bSmacallan	# what "hidden" libraries, object files and flags are used when
3643dbbd9e4bSmacallan	# linking a shared library.
3644dbbd9e4bSmacallan	#
3645dbbd9e4bSmacallan	# There doesn't appear to be a way to prevent this compiler from
3646dbbd9e4bSmacallan	# explicitly linking system object files so we need to strip them
3647dbbd9e4bSmacallan	# from the output so that they don't get included in the library
3648dbbd9e4bSmacallan	# dependencies.
3649dbbd9e4bSmacallan	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'
3650dbbd9e4bSmacallan	;;
3651dbbd9e4bSmacallan      *)
3652dbbd9e4bSmacallan	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3653dbbd9e4bSmacallan	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3654dbbd9e4bSmacallan	 _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'
3655dbbd9e4bSmacallan
3656dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3657dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3658dbbd9e4bSmacallan
3659dbbd9e4bSmacallan	  # Commands to make compiler produce verbose output that lists
3660dbbd9e4bSmacallan	  # what "hidden" libraries, object files and flags are used when
3661dbbd9e4bSmacallan	  # linking a shared library.
3662dbbd9e4bSmacallan	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3663dbbd9e4bSmacallan
3664dbbd9e4bSmacallan	else
3665dbbd9e4bSmacallan	  # FIXME: insert proper C++ library support
3666dbbd9e4bSmacallan	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3667dbbd9e4bSmacallan	fi
3668dbbd9e4bSmacallan	;;
3669dbbd9e4bSmacallan    esac
3670dbbd9e4bSmacallan    ;;
3671dbbd9e4bSmacallan  psos*)
3672dbbd9e4bSmacallan    # FIXME: insert proper C++ library support
3673dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3674dbbd9e4bSmacallan    ;;
3675dbbd9e4bSmacallan  sunos4*)
3676dbbd9e4bSmacallan    case $cc_basename in
3677dbbd9e4bSmacallan      CC*)
3678dbbd9e4bSmacallan	# Sun C++ 4.x
3679dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3680dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3681dbbd9e4bSmacallan	;;
3682dbbd9e4bSmacallan      lcc*)
3683dbbd9e4bSmacallan	# Lucid
3684dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3685dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3686dbbd9e4bSmacallan	;;
3687dbbd9e4bSmacallan      *)
3688dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3689dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3690dbbd9e4bSmacallan	;;
3691dbbd9e4bSmacallan    esac
3692dbbd9e4bSmacallan    ;;
3693dbbd9e4bSmacallan  solaris*)
3694dbbd9e4bSmacallan    case $cc_basename in
3695dbbd9e4bSmacallan      CC*)
3696dbbd9e4bSmacallan	# Sun C++ 4.2, 5.x and Centerline C++
3697dbbd9e4bSmacallan        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3698dbbd9e4bSmacallan	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3699dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3700dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3701dbbd9e4bSmacallan	$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'
3702dbbd9e4bSmacallan
3703dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3704dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3705dbbd9e4bSmacallan	case $host_os in
3706dbbd9e4bSmacallan	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3707dbbd9e4bSmacallan	  *)
3708dbbd9e4bSmacallan	    # The compiler driver will combine and reorder linker options,
3709dbbd9e4bSmacallan	    # but understands `-z linker_flag'.
3710dbbd9e4bSmacallan	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3711dbbd9e4bSmacallan	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3712dbbd9e4bSmacallan	    ;;
3713dbbd9e4bSmacallan	esac
3714dbbd9e4bSmacallan	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3715dbbd9e4bSmacallan
3716dbbd9e4bSmacallan	output_verbose_link_cmd='echo'
3717dbbd9e4bSmacallan
3718dbbd9e4bSmacallan	# Archives containing C++ object files must be created using
3719dbbd9e4bSmacallan	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3720dbbd9e4bSmacallan	# necessary to make sure instantiated templates are included
3721dbbd9e4bSmacallan	# in the archive.
3722dbbd9e4bSmacallan	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3723dbbd9e4bSmacallan	;;
3724dbbd9e4bSmacallan      gcx*)
3725dbbd9e4bSmacallan	# Green Hills C++ Compiler
3726dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3727dbbd9e4bSmacallan
3728dbbd9e4bSmacallan	# The C++ compiler must be used to create the archive.
3729dbbd9e4bSmacallan	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3730dbbd9e4bSmacallan	;;
3731dbbd9e4bSmacallan      *)
3732dbbd9e4bSmacallan	# GNU C++ compiler with Solaris linker
3733dbbd9e4bSmacallan	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3734dbbd9e4bSmacallan	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3735dbbd9e4bSmacallan	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3736dbbd9e4bSmacallan	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3737dbbd9e4bSmacallan	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3738dbbd9e4bSmacallan		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3739dbbd9e4bSmacallan
3740dbbd9e4bSmacallan	    # Commands to make compiler produce verbose output that lists
3741dbbd9e4bSmacallan	    # what "hidden" libraries, object files and flags are used when
3742dbbd9e4bSmacallan	    # linking a shared library.
3743dbbd9e4bSmacallan	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3744dbbd9e4bSmacallan	  else
3745dbbd9e4bSmacallan	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3746dbbd9e4bSmacallan	    # platform.
3747dbbd9e4bSmacallan	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3748dbbd9e4bSmacallan	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3749dbbd9e4bSmacallan		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3750dbbd9e4bSmacallan
3751dbbd9e4bSmacallan	    # Commands to make compiler produce verbose output that lists
3752dbbd9e4bSmacallan	    # what "hidden" libraries, object files and flags are used when
3753dbbd9e4bSmacallan	    # linking a shared library.
3754dbbd9e4bSmacallan	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3755dbbd9e4bSmacallan	  fi
3756dbbd9e4bSmacallan
3757dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3758dbbd9e4bSmacallan	  case $host_os in
3759dbbd9e4bSmacallan	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3760dbbd9e4bSmacallan	  *)
3761dbbd9e4bSmacallan	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3762dbbd9e4bSmacallan	    ;;
3763dbbd9e4bSmacallan	  esac
3764dbbd9e4bSmacallan	fi
3765dbbd9e4bSmacallan	;;
3766dbbd9e4bSmacallan    esac
3767dbbd9e4bSmacallan    ;;
3768dbbd9e4bSmacallan  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3769dbbd9e4bSmacallan    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3770dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3771dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3772dbbd9e4bSmacallan    runpath_var='LD_RUN_PATH'
3773dbbd9e4bSmacallan
3774dbbd9e4bSmacallan    case $cc_basename in
3775dbbd9e4bSmacallan      CC*)
3776dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3777dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3778dbbd9e4bSmacallan	;;
3779dbbd9e4bSmacallan      *)
3780dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3781dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3782dbbd9e4bSmacallan	;;
3783dbbd9e4bSmacallan    esac
3784dbbd9e4bSmacallan    ;;
3785dbbd9e4bSmacallan  sysv5* | sco3.2v5* | sco5v6*)
3786dbbd9e4bSmacallan    # Note: We can NOT use -z defs as we might desire, because we do not
3787dbbd9e4bSmacallan    # link with -lc, and that would cause any symbols used from libc to
3788dbbd9e4bSmacallan    # always be unresolved, which means just about no library would
3789dbbd9e4bSmacallan    # ever link correctly.  If we're not using GNU ld we use -z text
3790dbbd9e4bSmacallan    # though, which does catch some bad symbols but isn't as heavy-handed
3791dbbd9e4bSmacallan    # as -z defs.
3792dbbd9e4bSmacallan    # For security reasons, it is highly recommended that you always
3793dbbd9e4bSmacallan    # use absolute paths for naming shared libraries, and exclude the
3794dbbd9e4bSmacallan    # DT_RUNPATH tag from executables and libraries.  But doing so
3795dbbd9e4bSmacallan    # requires that you compile everything twice, which is a pain.
3796dbbd9e4bSmacallan    # So that behaviour is only enabled if SCOABSPATH is set to a
3797dbbd9e4bSmacallan    # non-empty value in the environment.  Most likely only useful for
3798dbbd9e4bSmacallan    # creating official distributions of packages.
3799dbbd9e4bSmacallan    # This is a hack until libtool officially supports absolute path
3800dbbd9e4bSmacallan    # names for shared libraries.
3801dbbd9e4bSmacallan    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3802dbbd9e4bSmacallan    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3803dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3804dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3805dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3806dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3807dbbd9e4bSmacallan    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3808dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3809dbbd9e4bSmacallan    runpath_var='LD_RUN_PATH'
3810dbbd9e4bSmacallan
3811dbbd9e4bSmacallan    case $cc_basename in
3812dbbd9e4bSmacallan      CC*)
3813dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3814dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3815dbbd9e4bSmacallan	;;
3816dbbd9e4bSmacallan      *)
3817dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3818dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3819dbbd9e4bSmacallan	;;
3820dbbd9e4bSmacallan    esac
3821dbbd9e4bSmacallan    ;;
3822dbbd9e4bSmacallan  tandem*)
3823dbbd9e4bSmacallan    case $cc_basename in
3824dbbd9e4bSmacallan      NCC*)
3825dbbd9e4bSmacallan	# NonStop-UX NCC 3.20
3826dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3827dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3828dbbd9e4bSmacallan	;;
3829dbbd9e4bSmacallan      *)
3830dbbd9e4bSmacallan	# FIXME: insert proper C++ library support
3831dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3832dbbd9e4bSmacallan	;;
3833dbbd9e4bSmacallan    esac
3834dbbd9e4bSmacallan    ;;
3835dbbd9e4bSmacallan  vxworks*)
3836dbbd9e4bSmacallan    # FIXME: insert proper C++ library support
3837dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3838dbbd9e4bSmacallan    ;;
3839dbbd9e4bSmacallan  *)
3840dbbd9e4bSmacallan    # FIXME: insert proper C++ library support
3841dbbd9e4bSmacallan    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3842dbbd9e4bSmacallan    ;;
3843dbbd9e4bSmacallanesac
3844dbbd9e4bSmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3845dbbd9e4bSmacallantest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3846dbbd9e4bSmacallan
3847dbbd9e4bSmacallan_LT_AC_TAGVAR(GCC, $1)="$GXX"
3848dbbd9e4bSmacallan_LT_AC_TAGVAR(LD, $1)="$LD"
3849dbbd9e4bSmacallan
3850dbbd9e4bSmacallanAC_LIBTOOL_POSTDEP_PREDEP($1)
3851dbbd9e4bSmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1)
3852dbbd9e4bSmacallanAC_LIBTOOL_PROG_CC_C_O($1)
3853dbbd9e4bSmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3854dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1)
3855dbbd9e4bSmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3856dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3857dbbd9e4bSmacallan
3858dbbd9e4bSmacallanAC_LIBTOOL_CONFIG($1)
3859dbbd9e4bSmacallan
3860dbbd9e4bSmacallanAC_LANG_POP
3861dbbd9e4bSmacallanCC=$lt_save_CC
3862dbbd9e4bSmacallanLDCXX=$LD
3863dbbd9e4bSmacallanLD=$lt_save_LD
3864dbbd9e4bSmacallanGCC=$lt_save_GCC
3865dbbd9e4bSmacallanwith_gnu_ldcxx=$with_gnu_ld
3866dbbd9e4bSmacallanwith_gnu_ld=$lt_save_with_gnu_ld
3867dbbd9e4bSmacallanlt_cv_path_LDCXX=$lt_cv_path_LD
3868dbbd9e4bSmacallanlt_cv_path_LD=$lt_save_path_LD
3869dbbd9e4bSmacallanlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3870dbbd9e4bSmacallanlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3871dbbd9e4bSmacallan])# AC_LIBTOOL_LANG_CXX_CONFIG
3872dbbd9e4bSmacallan
3873dbbd9e4bSmacallan# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3874dbbd9e4bSmacallan# ------------------------------------
3875dbbd9e4bSmacallan# Figure out "hidden" library dependencies from verbose
3876dbbd9e4bSmacallan# compiler output when linking a shared library.
3877dbbd9e4bSmacallan# Parse the compiler output and extract the necessary
3878dbbd9e4bSmacallan# objects, libraries and library flags.
3879dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
3880dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
3881dbbd9e4bSmacallandnl we can't use the lt_simple_compile_test_code here,
3882dbbd9e4bSmacallandnl because it contains code intended for an executable,
3883dbbd9e4bSmacallandnl not a library.  It's possible we should let each
3884dbbd9e4bSmacallandnl tag define a new lt_????_link_test_code variable,
3885dbbd9e4bSmacallandnl but it's only used here...
3886dbbd9e4bSmacallanifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3887dbbd9e4bSmacallanint a;
3888dbbd9e4bSmacallanvoid foo (void) { a = 0; }
3889dbbd9e4bSmacallanEOF
3890dbbd9e4bSmacallan],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3891dbbd9e4bSmacallanclass Foo
3892dbbd9e4bSmacallan{
3893dbbd9e4bSmacallanpublic:
3894dbbd9e4bSmacallan  Foo (void) { a = 0; }
3895dbbd9e4bSmacallanprivate:
3896dbbd9e4bSmacallan  int a;
3897dbbd9e4bSmacallan};
3898dbbd9e4bSmacallanEOF
3899dbbd9e4bSmacallan],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3900dbbd9e4bSmacallan      subroutine foo
3901dbbd9e4bSmacallan      implicit none
3902dbbd9e4bSmacallan      integer*4 a
3903dbbd9e4bSmacallan      a=0
3904dbbd9e4bSmacallan      return
3905dbbd9e4bSmacallan      end
3906dbbd9e4bSmacallanEOF
3907dbbd9e4bSmacallan],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3908dbbd9e4bSmacallanpublic class foo {
3909dbbd9e4bSmacallan  private int a;
3910dbbd9e4bSmacallan  public void bar (void) {
3911dbbd9e4bSmacallan    a = 0;
3912dbbd9e4bSmacallan  }
3913dbbd9e4bSmacallan};
3914dbbd9e4bSmacallanEOF
3915dbbd9e4bSmacallan])
3916dbbd9e4bSmacallandnl Parse the compiler output and extract the necessary
3917dbbd9e4bSmacallandnl objects, libraries and library flags.
3918dbbd9e4bSmacallanif AC_TRY_EVAL(ac_compile); then
3919dbbd9e4bSmacallan  # Parse the compiler output and extract the necessary
3920dbbd9e4bSmacallan  # objects, libraries and library flags.
3921dbbd9e4bSmacallan
3922dbbd9e4bSmacallan  # Sentinel used to keep track of whether or not we are before
3923dbbd9e4bSmacallan  # the conftest object file.
3924dbbd9e4bSmacallan  pre_test_object_deps_done=no
3925dbbd9e4bSmacallan
3926dbbd9e4bSmacallan  # The `*' in the case matches for architectures that use `case' in
3927dbbd9e4bSmacallan  # $output_verbose_cmd can trigger glob expansion during the loop
3928dbbd9e4bSmacallan  # eval without this substitution.
3929dbbd9e4bSmacallan  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3930dbbd9e4bSmacallan
3931dbbd9e4bSmacallan  for p in `eval $output_verbose_link_cmd`; do
3932dbbd9e4bSmacallan    case $p in
3933dbbd9e4bSmacallan
3934dbbd9e4bSmacallan    -L* | -R* | -l*)
3935dbbd9e4bSmacallan       # Some compilers place space between "-{L,R}" and the path.
3936dbbd9e4bSmacallan       # Remove the space.
3937dbbd9e4bSmacallan       if test $p = "-L" \
3938dbbd9e4bSmacallan	  || test $p = "-R"; then
3939dbbd9e4bSmacallan	 prev=$p
3940dbbd9e4bSmacallan	 continue
3941dbbd9e4bSmacallan       else
3942dbbd9e4bSmacallan	 prev=
3943dbbd9e4bSmacallan       fi
3944dbbd9e4bSmacallan
3945dbbd9e4bSmacallan       if test "$pre_test_object_deps_done" = no; then
3946dbbd9e4bSmacallan	 case $p in
3947dbbd9e4bSmacallan	 -L* | -R*)
3948dbbd9e4bSmacallan	   # Internal compiler library paths should come after those
3949dbbd9e4bSmacallan	   # provided the user.  The postdeps already come after the
3950dbbd9e4bSmacallan	   # user supplied libs so there is no need to process them.
3951dbbd9e4bSmacallan	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3952dbbd9e4bSmacallan	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3953dbbd9e4bSmacallan	   else
3954dbbd9e4bSmacallan	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3955dbbd9e4bSmacallan	   fi
3956dbbd9e4bSmacallan	   ;;
3957dbbd9e4bSmacallan	 # The "-l" case would never come before the object being
3958dbbd9e4bSmacallan	 # linked, so don't bother handling this case.
3959dbbd9e4bSmacallan	 esac
3960dbbd9e4bSmacallan       else
3961dbbd9e4bSmacallan	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3962dbbd9e4bSmacallan	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3963dbbd9e4bSmacallan	 else
3964dbbd9e4bSmacallan	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3965dbbd9e4bSmacallan	 fi
3966dbbd9e4bSmacallan       fi
3967dbbd9e4bSmacallan       ;;
3968dbbd9e4bSmacallan
3969dbbd9e4bSmacallan    *.$objext)
3970dbbd9e4bSmacallan       # This assumes that the test object file only shows up
3971dbbd9e4bSmacallan       # once in the compiler output.
3972dbbd9e4bSmacallan       if test "$p" = "conftest.$objext"; then
3973dbbd9e4bSmacallan	 pre_test_object_deps_done=yes
3974dbbd9e4bSmacallan	 continue
3975dbbd9e4bSmacallan       fi
3976dbbd9e4bSmacallan
3977dbbd9e4bSmacallan       if test "$pre_test_object_deps_done" = no; then
3978dbbd9e4bSmacallan	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3979dbbd9e4bSmacallan	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3980dbbd9e4bSmacallan	 else
3981dbbd9e4bSmacallan	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3982dbbd9e4bSmacallan	 fi
3983dbbd9e4bSmacallan       else
3984dbbd9e4bSmacallan	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3985dbbd9e4bSmacallan	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3986dbbd9e4bSmacallan	 else
3987dbbd9e4bSmacallan	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3988dbbd9e4bSmacallan	 fi
3989dbbd9e4bSmacallan       fi
3990dbbd9e4bSmacallan       ;;
3991dbbd9e4bSmacallan
3992dbbd9e4bSmacallan    *) ;; # Ignore the rest.
3993dbbd9e4bSmacallan
3994dbbd9e4bSmacallan    esac
3995dbbd9e4bSmacallan  done
3996dbbd9e4bSmacallan
3997dbbd9e4bSmacallan  # Clean up.
3998dbbd9e4bSmacallan  rm -f a.out a.exe
3999dbbd9e4bSmacallanelse
4000dbbd9e4bSmacallan  echo "libtool.m4: error: problem compiling $1 test program"
4001dbbd9e4bSmacallanfi
4002dbbd9e4bSmacallan
4003dbbd9e4bSmacallan$rm -f confest.$objext
4004dbbd9e4bSmacallan
4005dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4006dbbd9e4bSmacallanif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4007dbbd9e4bSmacallan  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4008dbbd9e4bSmacallanfi
4009dbbd9e4bSmacallan
4010dbbd9e4bSmacallan# PORTME: override above test on systems where it is broken
4011dbbd9e4bSmacallanifelse([$1],[CXX],
4012dbbd9e4bSmacallan[case $host_os in
4013dbbd9e4bSmacallaninterix[[3-9]]*)
4014dbbd9e4bSmacallan  # Interix 3.5 installs completely hosed .la files for C++, so rather than
4015dbbd9e4bSmacallan  # hack all around it, let's just trust "g++" to DTRT.
4016dbbd9e4bSmacallan  _LT_AC_TAGVAR(predep_objects,$1)=
4017dbbd9e4bSmacallan  _LT_AC_TAGVAR(postdep_objects,$1)=
4018dbbd9e4bSmacallan  _LT_AC_TAGVAR(postdeps,$1)=
4019dbbd9e4bSmacallan  ;;
4020dbbd9e4bSmacallan
4021dbbd9e4bSmacallanlinux*)
4022dbbd9e4bSmacallan  case `$CC -V 2>&1 | sed 5q` in
4023dbbd9e4bSmacallan  *Sun\ C*)
4024dbbd9e4bSmacallan    # Sun C++ 5.9
4025dbbd9e4bSmacallan    #
4026dbbd9e4bSmacallan    # The more standards-conforming stlport4 library is
4027dbbd9e4bSmacallan    # incompatible with the Cstd library. Avoid specifying
4028dbbd9e4bSmacallan    # it if it's in CXXFLAGS. Ignore libCrun as
4029dbbd9e4bSmacallan    # -library=stlport4 depends on it.
4030dbbd9e4bSmacallan    case " $CXX $CXXFLAGS " in
4031dbbd9e4bSmacallan    *" -library=stlport4 "*)
4032dbbd9e4bSmacallan      solaris_use_stlport4=yes
4033dbbd9e4bSmacallan      ;;
4034dbbd9e4bSmacallan    esac
4035dbbd9e4bSmacallan    if test "$solaris_use_stlport4" != yes; then
4036dbbd9e4bSmacallan      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4037dbbd9e4bSmacallan    fi
4038dbbd9e4bSmacallan    ;;
4039dbbd9e4bSmacallan  esac
4040dbbd9e4bSmacallan  ;;
4041dbbd9e4bSmacallan
4042dbbd9e4bSmacallansolaris*)
4043dbbd9e4bSmacallan  case $cc_basename in
4044dbbd9e4bSmacallan  CC*)
4045dbbd9e4bSmacallan    # The more standards-conforming stlport4 library is
4046dbbd9e4bSmacallan    # incompatible with the Cstd library. Avoid specifying
4047dbbd9e4bSmacallan    # it if it's in CXXFLAGS. Ignore libCrun as
4048dbbd9e4bSmacallan    # -library=stlport4 depends on it.
4049dbbd9e4bSmacallan    case " $CXX $CXXFLAGS " in
4050dbbd9e4bSmacallan    *" -library=stlport4 "*)
4051dbbd9e4bSmacallan      solaris_use_stlport4=yes
4052dbbd9e4bSmacallan      ;;
4053dbbd9e4bSmacallan    esac
4054dbbd9e4bSmacallan
4055dbbd9e4bSmacallan    # Adding this requires a known-good setup of shared libraries for
4056dbbd9e4bSmacallan    # Sun compiler versions before 5.6, else PIC objects from an old
4057dbbd9e4bSmacallan    # archive will be linked into the output, leading to subtle bugs.
4058dbbd9e4bSmacallan    if test "$solaris_use_stlport4" != yes; then
4059dbbd9e4bSmacallan      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4060dbbd9e4bSmacallan    fi
4061dbbd9e4bSmacallan    ;;
4062dbbd9e4bSmacallan  esac
4063dbbd9e4bSmacallan  ;;
4064dbbd9e4bSmacallanesac
4065dbbd9e4bSmacallan])
4066dbbd9e4bSmacallancase " $_LT_AC_TAGVAR(postdeps, $1) " in
4067dbbd9e4bSmacallan*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4068dbbd9e4bSmacallanesac
4069dbbd9e4bSmacallan])# AC_LIBTOOL_POSTDEP_PREDEP
4070dbbd9e4bSmacallan
4071dbbd9e4bSmacallan# AC_LIBTOOL_LANG_F77_CONFIG
4072dbbd9e4bSmacallan# --------------------------
4073dbbd9e4bSmacallan# Ensure that the configuration vars for the C compiler are
4074dbbd9e4bSmacallan# suitably defined.  Those variables are subsequently used by
4075dbbd9e4bSmacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4076dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4077dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4078dbbd9e4bSmacallan[AC_REQUIRE([AC_PROG_F77])
4079dbbd9e4bSmacallanAC_LANG_PUSH(Fortran 77)
4080dbbd9e4bSmacallan
4081dbbd9e4bSmacallan_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4082dbbd9e4bSmacallan_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4083dbbd9e4bSmacallan_LT_AC_TAGVAR(always_export_symbols, $1)=no
4084dbbd9e4bSmacallan_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4085dbbd9e4bSmacallan_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4086dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_direct, $1)=no
4087dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4088dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4089dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4090dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4091dbbd9e4bSmacallan_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4092dbbd9e4bSmacallan_LT_AC_TAGVAR(module_cmds, $1)=
4093dbbd9e4bSmacallan_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4094dbbd9e4bSmacallan_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4095dbbd9e4bSmacallan_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4096dbbd9e4bSmacallan_LT_AC_TAGVAR(no_undefined_flag, $1)=
4097dbbd9e4bSmacallan_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4098dbbd9e4bSmacallan_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4099dbbd9e4bSmacallan
4100dbbd9e4bSmacallan# Source file extension for f77 test sources.
4101dbbd9e4bSmacallanac_ext=f
4102dbbd9e4bSmacallan
4103dbbd9e4bSmacallan# Object file extension for compiled f77 test sources.
4104dbbd9e4bSmacallanobjext=o
4105dbbd9e4bSmacallan_LT_AC_TAGVAR(objext, $1)=$objext
4106dbbd9e4bSmacallan
4107dbbd9e4bSmacallan# Code to be used in simple compile tests
4108dbbd9e4bSmacallanlt_simple_compile_test_code="\
4109dbbd9e4bSmacallan      subroutine t
4110dbbd9e4bSmacallan      return
4111dbbd9e4bSmacallan      end
4112dbbd9e4bSmacallan"
4113dbbd9e4bSmacallan
4114dbbd9e4bSmacallan# Code to be used in simple link tests
4115dbbd9e4bSmacallanlt_simple_link_test_code="\
4116dbbd9e4bSmacallan      program t
4117dbbd9e4bSmacallan      end
4118dbbd9e4bSmacallan"
4119dbbd9e4bSmacallan
4120dbbd9e4bSmacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4121dbbd9e4bSmacallan_LT_AC_SYS_COMPILER
4122dbbd9e4bSmacallan
4123dbbd9e4bSmacallan# save warnings/boilerplate of simple test code
4124dbbd9e4bSmacallan_LT_COMPILER_BOILERPLATE
4125dbbd9e4bSmacallan_LT_LINKER_BOILERPLATE
4126dbbd9e4bSmacallan
4127dbbd9e4bSmacallan# Allow CC to be a program name with arguments.
4128dbbd9e4bSmacallanlt_save_CC="$CC"
4129dbbd9e4bSmacallanCC=${F77-"f77"}
4130dbbd9e4bSmacallancompiler=$CC
4131dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler, $1)=$CC
4132dbbd9e4bSmacallan_LT_CC_BASENAME([$compiler])
4133dbbd9e4bSmacallan
4134dbbd9e4bSmacallanAC_MSG_CHECKING([if libtool supports shared libraries])
4135dbbd9e4bSmacallanAC_MSG_RESULT([$can_build_shared])
4136dbbd9e4bSmacallan
4137dbbd9e4bSmacallanAC_MSG_CHECKING([whether to build shared libraries])
4138dbbd9e4bSmacallantest "$can_build_shared" = "no" && enable_shared=no
4139dbbd9e4bSmacallan
4140dbbd9e4bSmacallan# On AIX, shared libraries and static libraries use the same namespace, and
4141dbbd9e4bSmacallan# are all built from PIC.
4142dbbd9e4bSmacallancase $host_os in
4143dbbd9e4bSmacallanaix3*)
4144dbbd9e4bSmacallan  test "$enable_shared" = yes && enable_static=no
4145dbbd9e4bSmacallan  if test -n "$RANLIB"; then
4146dbbd9e4bSmacallan    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4147dbbd9e4bSmacallan    postinstall_cmds='$RANLIB $lib'
4148dbbd9e4bSmacallan  fi
4149dbbd9e4bSmacallan  ;;
4150dbbd9e4bSmacallanaix[[4-9]]*)
4151dbbd9e4bSmacallan  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4152dbbd9e4bSmacallan    test "$enable_shared" = yes && enable_static=no
4153dbbd9e4bSmacallan  fi
4154dbbd9e4bSmacallan  ;;
4155dbbd9e4bSmacallanesac
4156dbbd9e4bSmacallanAC_MSG_RESULT([$enable_shared])
4157dbbd9e4bSmacallan
4158dbbd9e4bSmacallanAC_MSG_CHECKING([whether to build static libraries])
4159dbbd9e4bSmacallan# Make sure either enable_shared or enable_static is yes.
4160dbbd9e4bSmacallantest "$enable_shared" = yes || enable_static=yes
4161dbbd9e4bSmacallanAC_MSG_RESULT([$enable_static])
4162dbbd9e4bSmacallan
4163dbbd9e4bSmacallan_LT_AC_TAGVAR(GCC, $1)="$G77"
4164dbbd9e4bSmacallan_LT_AC_TAGVAR(LD, $1)="$LD"
4165dbbd9e4bSmacallan
4166dbbd9e4bSmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1)
4167dbbd9e4bSmacallanAC_LIBTOOL_PROG_CC_C_O($1)
4168dbbd9e4bSmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4169dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1)
4170dbbd9e4bSmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4171dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4172dbbd9e4bSmacallan
4173dbbd9e4bSmacallanAC_LIBTOOL_CONFIG($1)
4174dbbd9e4bSmacallan
4175dbbd9e4bSmacallanAC_LANG_POP
4176dbbd9e4bSmacallanCC="$lt_save_CC"
4177dbbd9e4bSmacallan])# AC_LIBTOOL_LANG_F77_CONFIG
4178dbbd9e4bSmacallan
4179dbbd9e4bSmacallan
4180dbbd9e4bSmacallan# AC_LIBTOOL_LANG_GCJ_CONFIG
4181dbbd9e4bSmacallan# --------------------------
4182dbbd9e4bSmacallan# Ensure that the configuration vars for the C compiler are
4183dbbd9e4bSmacallan# suitably defined.  Those variables are subsequently used by
4184dbbd9e4bSmacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4185dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4186dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4187dbbd9e4bSmacallan[AC_LANG_SAVE
4188dbbd9e4bSmacallan
4189dbbd9e4bSmacallan# Source file extension for Java test sources.
4190dbbd9e4bSmacallanac_ext=java
4191dbbd9e4bSmacallan
4192dbbd9e4bSmacallan# Object file extension for compiled Java test sources.
4193dbbd9e4bSmacallanobjext=o
4194dbbd9e4bSmacallan_LT_AC_TAGVAR(objext, $1)=$objext
4195dbbd9e4bSmacallan
4196dbbd9e4bSmacallan# Code to be used in simple compile tests
4197dbbd9e4bSmacallanlt_simple_compile_test_code="class foo {}"
4198dbbd9e4bSmacallan
4199dbbd9e4bSmacallan# Code to be used in simple link tests
4200dbbd9e4bSmacallanlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4201dbbd9e4bSmacallan
4202dbbd9e4bSmacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4203dbbd9e4bSmacallan_LT_AC_SYS_COMPILER
4204dbbd9e4bSmacallan
4205dbbd9e4bSmacallan# save warnings/boilerplate of simple test code
4206dbbd9e4bSmacallan_LT_COMPILER_BOILERPLATE
4207dbbd9e4bSmacallan_LT_LINKER_BOILERPLATE
4208dbbd9e4bSmacallan
4209dbbd9e4bSmacallan# Allow CC to be a program name with arguments.
4210dbbd9e4bSmacallanlt_save_CC="$CC"
4211dbbd9e4bSmacallanCC=${GCJ-"gcj"}
4212dbbd9e4bSmacallancompiler=$CC
4213dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler, $1)=$CC
4214dbbd9e4bSmacallan_LT_CC_BASENAME([$compiler])
4215dbbd9e4bSmacallan
4216dbbd9e4bSmacallan# GCJ did not exist at the time GCC didn't implicitly link libc in.
4217dbbd9e4bSmacallan_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4218dbbd9e4bSmacallan
4219dbbd9e4bSmacallan_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4220dbbd9e4bSmacallan
4221dbbd9e4bSmacallanAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4222dbbd9e4bSmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1)
4223dbbd9e4bSmacallanAC_LIBTOOL_PROG_CC_C_O($1)
4224dbbd9e4bSmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4225dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1)
4226dbbd9e4bSmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4227dbbd9e4bSmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4228dbbd9e4bSmacallan
4229dbbd9e4bSmacallanAC_LIBTOOL_CONFIG($1)
4230dbbd9e4bSmacallan
4231dbbd9e4bSmacallanAC_LANG_RESTORE
4232dbbd9e4bSmacallanCC="$lt_save_CC"
4233dbbd9e4bSmacallan])# AC_LIBTOOL_LANG_GCJ_CONFIG
4234dbbd9e4bSmacallan
4235dbbd9e4bSmacallan
4236dbbd9e4bSmacallan# AC_LIBTOOL_LANG_RC_CONFIG
4237dbbd9e4bSmacallan# -------------------------
4238dbbd9e4bSmacallan# Ensure that the configuration vars for the Windows resource compiler are
4239dbbd9e4bSmacallan# suitably defined.  Those variables are subsequently used by
4240dbbd9e4bSmacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4241dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4242dbbd9e4bSmacallanAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4243dbbd9e4bSmacallan[AC_LANG_SAVE
4244dbbd9e4bSmacallan
4245dbbd9e4bSmacallan# Source file extension for RC test sources.
4246dbbd9e4bSmacallanac_ext=rc
4247dbbd9e4bSmacallan
4248dbbd9e4bSmacallan# Object file extension for compiled RC test sources.
4249dbbd9e4bSmacallanobjext=o
4250dbbd9e4bSmacallan_LT_AC_TAGVAR(objext, $1)=$objext
4251dbbd9e4bSmacallan
4252dbbd9e4bSmacallan# Code to be used in simple compile tests
4253dbbd9e4bSmacallanlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4254dbbd9e4bSmacallan
4255dbbd9e4bSmacallan# Code to be used in simple link tests
4256dbbd9e4bSmacallanlt_simple_link_test_code="$lt_simple_compile_test_code"
4257dbbd9e4bSmacallan
4258dbbd9e4bSmacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4259dbbd9e4bSmacallan_LT_AC_SYS_COMPILER
4260dbbd9e4bSmacallan
4261dbbd9e4bSmacallan# save warnings/boilerplate of simple test code
4262dbbd9e4bSmacallan_LT_COMPILER_BOILERPLATE
4263dbbd9e4bSmacallan_LT_LINKER_BOILERPLATE
4264dbbd9e4bSmacallan
4265dbbd9e4bSmacallan# Allow CC to be a program name with arguments.
4266dbbd9e4bSmacallanlt_save_CC="$CC"
4267dbbd9e4bSmacallanCC=${RC-"windres"}
4268dbbd9e4bSmacallancompiler=$CC
4269dbbd9e4bSmacallan_LT_AC_TAGVAR(compiler, $1)=$CC
4270dbbd9e4bSmacallan_LT_CC_BASENAME([$compiler])
4271dbbd9e4bSmacallan_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4272dbbd9e4bSmacallan
4273dbbd9e4bSmacallanAC_LIBTOOL_CONFIG($1)
4274dbbd9e4bSmacallan
4275dbbd9e4bSmacallanAC_LANG_RESTORE
4276dbbd9e4bSmacallanCC="$lt_save_CC"
4277dbbd9e4bSmacallan])# AC_LIBTOOL_LANG_RC_CONFIG
4278dbbd9e4bSmacallan
4279dbbd9e4bSmacallan
4280dbbd9e4bSmacallan# AC_LIBTOOL_CONFIG([TAGNAME])
4281dbbd9e4bSmacallan# ----------------------------
4282dbbd9e4bSmacallan# If TAGNAME is not passed, then create an initial libtool script
4283dbbd9e4bSmacallan# with a default configuration from the untagged config vars.  Otherwise
4284dbbd9e4bSmacallan# add code to config.status for appending the configuration named by
4285dbbd9e4bSmacallan# TAGNAME from the matching tagged config vars.
4286dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_CONFIG],
4287dbbd9e4bSmacallan[# The else clause should only fire when bootstrapping the
4288dbbd9e4bSmacallan# libtool distribution, otherwise you forgot to ship ltmain.sh
4289dbbd9e4bSmacallan# with your package, and you will get complaints that there are
4290dbbd9e4bSmacallan# no rules to generate ltmain.sh.
4291dbbd9e4bSmacallanif test -f "$ltmain"; then
4292dbbd9e4bSmacallan  # See if we are running on zsh, and set the options which allow our commands through
4293dbbd9e4bSmacallan  # without removal of \ escapes.
4294dbbd9e4bSmacallan  if test -n "${ZSH_VERSION+set}" ; then
4295dbbd9e4bSmacallan    setopt NO_GLOB_SUBST
4296dbbd9e4bSmacallan  fi
4297dbbd9e4bSmacallan  # Now quote all the things that may contain metacharacters while being
4298dbbd9e4bSmacallan  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4299dbbd9e4bSmacallan  # variables and quote the copies for generation of the libtool script.
4300dbbd9e4bSmacallan  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4301dbbd9e4bSmacallan    SED SHELL STRIP \
4302dbbd9e4bSmacallan    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4303dbbd9e4bSmacallan    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4304dbbd9e4bSmacallan    deplibs_check_method reload_flag reload_cmds need_locks \
4305dbbd9e4bSmacallan    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4306dbbd9e4bSmacallan    lt_cv_sys_global_symbol_to_c_name_address \
4307dbbd9e4bSmacallan    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4308dbbd9e4bSmacallan    old_postinstall_cmds old_postuninstall_cmds \
4309dbbd9e4bSmacallan    _LT_AC_TAGVAR(compiler, $1) \
4310dbbd9e4bSmacallan    _LT_AC_TAGVAR(CC, $1) \
4311dbbd9e4bSmacallan    _LT_AC_TAGVAR(LD, $1) \
4312dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4313dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4314dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4315dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4316dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4317dbbd9e4bSmacallan    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4318dbbd9e4bSmacallan    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4319dbbd9e4bSmacallan    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4320dbbd9e4bSmacallan    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4321dbbd9e4bSmacallan    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4322dbbd9e4bSmacallan    _LT_AC_TAGVAR(predep_objects, $1) \
4323dbbd9e4bSmacallan    _LT_AC_TAGVAR(postdep_objects, $1) \
4324dbbd9e4bSmacallan    _LT_AC_TAGVAR(predeps, $1) \
4325dbbd9e4bSmacallan    _LT_AC_TAGVAR(postdeps, $1) \
4326dbbd9e4bSmacallan    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4327dbbd9e4bSmacallan    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4328dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds, $1) \
4329dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4330dbbd9e4bSmacallan    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4331dbbd9e4bSmacallan    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4332dbbd9e4bSmacallan    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4333dbbd9e4bSmacallan    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4334dbbd9e4bSmacallan    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4335dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4336dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4337dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4338dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4339dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4340dbbd9e4bSmacallan    _LT_AC_TAGVAR(module_cmds, $1) \
4341dbbd9e4bSmacallan    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4342dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4343dbbd9e4bSmacallan    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4344dbbd9e4bSmacallan    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4345dbbd9e4bSmacallan    _LT_AC_TAGVAR(include_expsyms, $1); do
4346dbbd9e4bSmacallan
4347dbbd9e4bSmacallan    case $var in
4348dbbd9e4bSmacallan    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4349dbbd9e4bSmacallan    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4350dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_cmds, $1) | \
4351dbbd9e4bSmacallan    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4352dbbd9e4bSmacallan    _LT_AC_TAGVAR(module_cmds, $1) | \
4353dbbd9e4bSmacallan    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4354dbbd9e4bSmacallan    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4355dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4356dbbd9e4bSmacallan    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4357dbbd9e4bSmacallan    postinstall_cmds | postuninstall_cmds | \
4358dbbd9e4bSmacallan    old_postinstall_cmds | old_postuninstall_cmds | \
4359dbbd9e4bSmacallan    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4360dbbd9e4bSmacallan      # Double-quote double-evaled strings.
4361dbbd9e4bSmacallan      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4362dbbd9e4bSmacallan      ;;
4363dbbd9e4bSmacallan    *)
4364dbbd9e4bSmacallan      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4365dbbd9e4bSmacallan      ;;
4366dbbd9e4bSmacallan    esac
4367dbbd9e4bSmacallan  done
4368dbbd9e4bSmacallan
4369dbbd9e4bSmacallan  case $lt_echo in
4370dbbd9e4bSmacallan  *'\[$]0 --fallback-echo"')
4371dbbd9e4bSmacallan    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4372dbbd9e4bSmacallan    ;;
4373dbbd9e4bSmacallan  esac
4374dbbd9e4bSmacallan
4375dbbd9e4bSmacallanifelse([$1], [],
4376dbbd9e4bSmacallan  [cfgfile="${ofile}T"
4377dbbd9e4bSmacallan  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4378dbbd9e4bSmacallan  $rm -f "$cfgfile"
4379dbbd9e4bSmacallan  AC_MSG_NOTICE([creating $ofile])],
4380dbbd9e4bSmacallan  [cfgfile="$ofile"])
4381dbbd9e4bSmacallan
4382dbbd9e4bSmacallan  cat <<__EOF__ >> "$cfgfile"
4383dbbd9e4bSmacallanifelse([$1], [],
4384dbbd9e4bSmacallan[#! $SHELL
4385dbbd9e4bSmacallan
4386dbbd9e4bSmacallan# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4387dbbd9e4bSmacallan# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4388dbbd9e4bSmacallan# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4389dbbd9e4bSmacallan#
4390dbbd9e4bSmacallan# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4391dbbd9e4bSmacallan# Free Software Foundation, Inc.
4392dbbd9e4bSmacallan#
4393dbbd9e4bSmacallan# This file is part of GNU Libtool:
4394dbbd9e4bSmacallan# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4395dbbd9e4bSmacallan#
4396dbbd9e4bSmacallan# This program is free software; you can redistribute it and/or modify
4397dbbd9e4bSmacallan# it under the terms of the GNU General Public License as published by
4398dbbd9e4bSmacallan# the Free Software Foundation; either version 2 of the License, or
4399dbbd9e4bSmacallan# (at your option) any later version.
4400dbbd9e4bSmacallan#
4401dbbd9e4bSmacallan# This program is distributed in the hope that it will be useful, but
4402dbbd9e4bSmacallan# WITHOUT ANY WARRANTY; without even the implied warranty of
4403dbbd9e4bSmacallan# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4404dbbd9e4bSmacallan# General Public License for more details.
4405dbbd9e4bSmacallan#
4406dbbd9e4bSmacallan# You should have received a copy of the GNU General Public License
4407dbbd9e4bSmacallan# along with this program; if not, write to the Free Software
4408dbbd9e4bSmacallan# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4409dbbd9e4bSmacallan#
4410dbbd9e4bSmacallan# As a special exception to the GNU General Public License, if you
4411dbbd9e4bSmacallan# distribute this file as part of a program that contains a
4412dbbd9e4bSmacallan# configuration script generated by Autoconf, you may include it under
4413dbbd9e4bSmacallan# the same distribution terms that you use for the rest of that program.
4414dbbd9e4bSmacallan
4415dbbd9e4bSmacallan# A sed program that does not truncate output.
4416dbbd9e4bSmacallanSED=$lt_SED
4417dbbd9e4bSmacallan
4418dbbd9e4bSmacallan# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4419dbbd9e4bSmacallanXsed="$SED -e 1s/^X//"
4420dbbd9e4bSmacallan
4421dbbd9e4bSmacallan# The HP-UX ksh and POSIX shell print the target directory to stdout
4422dbbd9e4bSmacallan# if CDPATH is set.
4423dbbd9e4bSmacallan(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4424dbbd9e4bSmacallan
4425dbbd9e4bSmacallan# The names of the tagged configurations supported by this script.
4426dbbd9e4bSmacallanavailable_tags=
4427dbbd9e4bSmacallan
4428dbbd9e4bSmacallan# ### BEGIN LIBTOOL CONFIG],
4429dbbd9e4bSmacallan[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4430dbbd9e4bSmacallan
4431dbbd9e4bSmacallan# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4432dbbd9e4bSmacallan
4433dbbd9e4bSmacallan# Shell to use when invoking shell scripts.
4434dbbd9e4bSmacallanSHELL=$lt_SHELL
4435dbbd9e4bSmacallan
4436dbbd9e4bSmacallan# Whether or not to build shared libraries.
4437dbbd9e4bSmacallanbuild_libtool_libs=$enable_shared
4438dbbd9e4bSmacallan
4439dbbd9e4bSmacallan# Whether or not to build static libraries.
4440dbbd9e4bSmacallanbuild_old_libs=$enable_static
4441dbbd9e4bSmacallan
4442dbbd9e4bSmacallan# Whether or not to add -lc for building shared libraries.
4443dbbd9e4bSmacallanbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4444dbbd9e4bSmacallan
4445dbbd9e4bSmacallan# Whether or not to disallow shared libs when runtime libs are static
4446dbbd9e4bSmacallanallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4447dbbd9e4bSmacallan
4448dbbd9e4bSmacallan# Whether or not to optimize for fast installation.
4449dbbd9e4bSmacallanfast_install=$enable_fast_install
4450dbbd9e4bSmacallan
4451dbbd9e4bSmacallan# The host system.
4452dbbd9e4bSmacallanhost_alias=$host_alias
4453dbbd9e4bSmacallanhost=$host
4454dbbd9e4bSmacallanhost_os=$host_os
4455dbbd9e4bSmacallan
4456dbbd9e4bSmacallan# The build system.
4457dbbd9e4bSmacallanbuild_alias=$build_alias
4458dbbd9e4bSmacallanbuild=$build
4459dbbd9e4bSmacallanbuild_os=$build_os
4460dbbd9e4bSmacallan
4461dbbd9e4bSmacallan# An echo program that does not interpret backslashes.
4462dbbd9e4bSmacallanecho=$lt_echo
4463dbbd9e4bSmacallan
4464dbbd9e4bSmacallan# The archiver.
4465dbbd9e4bSmacallanAR=$lt_AR
4466dbbd9e4bSmacallanAR_FLAGS=$lt_AR_FLAGS
4467dbbd9e4bSmacallan
4468dbbd9e4bSmacallan# A C compiler.
4469dbbd9e4bSmacallanLTCC=$lt_LTCC
4470dbbd9e4bSmacallan
4471dbbd9e4bSmacallan# LTCC compiler flags.
4472dbbd9e4bSmacallanLTCFLAGS=$lt_LTCFLAGS
4473dbbd9e4bSmacallan
4474dbbd9e4bSmacallan# A language-specific compiler.
4475dbbd9e4bSmacallanCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4476dbbd9e4bSmacallan
4477dbbd9e4bSmacallan# Is the compiler the GNU C compiler?
4478dbbd9e4bSmacallanwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4479dbbd9e4bSmacallan
4480dbbd9e4bSmacallan# An ERE matcher.
4481dbbd9e4bSmacallanEGREP=$lt_EGREP
4482dbbd9e4bSmacallan
4483dbbd9e4bSmacallan# The linker used to build libraries.
4484dbbd9e4bSmacallanLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4485dbbd9e4bSmacallan
4486dbbd9e4bSmacallan# Whether we need hard or soft links.
4487dbbd9e4bSmacallanLN_S=$lt_LN_S
4488dbbd9e4bSmacallan
4489dbbd9e4bSmacallan# A BSD-compatible nm program.
4490dbbd9e4bSmacallanNM=$lt_NM
4491dbbd9e4bSmacallan
4492dbbd9e4bSmacallan# A symbol stripping program
4493dbbd9e4bSmacallanSTRIP=$lt_STRIP
4494dbbd9e4bSmacallan
4495dbbd9e4bSmacallan# Used to examine libraries when file_magic_cmd begins "file"
4496dbbd9e4bSmacallanMAGIC_CMD=$MAGIC_CMD
4497dbbd9e4bSmacallan
4498dbbd9e4bSmacallan# Used on cygwin: DLL creation program.
4499dbbd9e4bSmacallanDLLTOOL="$DLLTOOL"
4500dbbd9e4bSmacallan
4501dbbd9e4bSmacallan# Used on cygwin: object dumper.
4502dbbd9e4bSmacallanOBJDUMP="$OBJDUMP"
4503dbbd9e4bSmacallan
4504dbbd9e4bSmacallan# Used on cygwin: assembler.
4505dbbd9e4bSmacallanAS="$AS"
4506dbbd9e4bSmacallan
4507dbbd9e4bSmacallan# The name of the directory that contains temporary libtool files.
4508dbbd9e4bSmacallanobjdir=$objdir
4509dbbd9e4bSmacallan
4510dbbd9e4bSmacallan# How to create reloadable object files.
4511dbbd9e4bSmacallanreload_flag=$lt_reload_flag
4512dbbd9e4bSmacallanreload_cmds=$lt_reload_cmds
4513dbbd9e4bSmacallan
4514dbbd9e4bSmacallan# How to pass a linker flag through the compiler.
4515dbbd9e4bSmacallanwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4516dbbd9e4bSmacallan
4517dbbd9e4bSmacallan# Object file suffix (normally "o").
4518dbbd9e4bSmacallanobjext="$ac_objext"
4519dbbd9e4bSmacallan
4520dbbd9e4bSmacallan# Old archive suffix (normally "a").
4521dbbd9e4bSmacallanlibext="$libext"
4522dbbd9e4bSmacallan
4523dbbd9e4bSmacallan# Shared library suffix (normally ".so").
4524dbbd9e4bSmacallanshrext_cmds='$shrext_cmds'
4525dbbd9e4bSmacallan
4526dbbd9e4bSmacallan# Executable file suffix (normally "").
4527dbbd9e4bSmacallanexeext="$exeext"
4528dbbd9e4bSmacallan
4529dbbd9e4bSmacallan# Additional compiler flags for building library objects.
4530dbbd9e4bSmacallanpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4531dbbd9e4bSmacallanpic_mode=$pic_mode
4532dbbd9e4bSmacallan
4533dbbd9e4bSmacallan# What is the maximum length of a command?
4534dbbd9e4bSmacallanmax_cmd_len=$lt_cv_sys_max_cmd_len
4535dbbd9e4bSmacallan
4536dbbd9e4bSmacallan# Does compiler simultaneously support -c and -o options?
4537dbbd9e4bSmacallancompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4538dbbd9e4bSmacallan
4539dbbd9e4bSmacallan# Must we lock files when doing compilation?
4540dbbd9e4bSmacallanneed_locks=$lt_need_locks
4541dbbd9e4bSmacallan
4542dbbd9e4bSmacallan# Do we need the lib prefix for modules?
4543dbbd9e4bSmacallanneed_lib_prefix=$need_lib_prefix
4544dbbd9e4bSmacallan
4545dbbd9e4bSmacallan# Do we need a version for libraries?
4546dbbd9e4bSmacallanneed_version=$need_version
4547dbbd9e4bSmacallan
4548dbbd9e4bSmacallan# Whether dlopen is supported.
4549dbbd9e4bSmacallandlopen_support=$enable_dlopen
4550dbbd9e4bSmacallan
4551dbbd9e4bSmacallan# Whether dlopen of programs is supported.
4552dbbd9e4bSmacallandlopen_self=$enable_dlopen_self
4553dbbd9e4bSmacallan
4554dbbd9e4bSmacallan# Whether dlopen of statically linked programs is supported.
4555dbbd9e4bSmacallandlopen_self_static=$enable_dlopen_self_static
4556dbbd9e4bSmacallan
4557dbbd9e4bSmacallan# Compiler flag to prevent dynamic linking.
4558dbbd9e4bSmacallanlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4559dbbd9e4bSmacallan
4560dbbd9e4bSmacallan# Compiler flag to turn off builtin functions.
4561dbbd9e4bSmacallanno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4562dbbd9e4bSmacallan
4563dbbd9e4bSmacallan# Compiler flag to allow reflexive dlopens.
4564dbbd9e4bSmacallanexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4565dbbd9e4bSmacallan
4566dbbd9e4bSmacallan# Compiler flag to generate shared objects directly from archives.
4567dbbd9e4bSmacallanwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4568dbbd9e4bSmacallan
4569dbbd9e4bSmacallan# Compiler flag to generate thread-safe objects.
4570dbbd9e4bSmacallanthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4571dbbd9e4bSmacallan
4572dbbd9e4bSmacallan# Library versioning type.
4573dbbd9e4bSmacallanversion_type=$version_type
4574dbbd9e4bSmacallan
4575dbbd9e4bSmacallan# Format of library name prefix.
4576dbbd9e4bSmacallanlibname_spec=$lt_libname_spec
4577dbbd9e4bSmacallan
4578dbbd9e4bSmacallan# List of archive names.  First name is the real one, the rest are links.
4579dbbd9e4bSmacallan# The last name is the one that the linker finds with -lNAME.
4580dbbd9e4bSmacallanlibrary_names_spec=$lt_library_names_spec
4581dbbd9e4bSmacallan
4582dbbd9e4bSmacallan# The coded name of the library, if different from the real name.
4583dbbd9e4bSmacallansoname_spec=$lt_soname_spec
4584dbbd9e4bSmacallan
4585dbbd9e4bSmacallan# Commands used to build and install an old-style archive.
4586dbbd9e4bSmacallanRANLIB=$lt_RANLIB
4587dbbd9e4bSmacallanold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4588dbbd9e4bSmacallanold_postinstall_cmds=$lt_old_postinstall_cmds
4589dbbd9e4bSmacallanold_postuninstall_cmds=$lt_old_postuninstall_cmds
4590dbbd9e4bSmacallan
4591dbbd9e4bSmacallan# Create an old-style archive from a shared archive.
4592dbbd9e4bSmacallanold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4593dbbd9e4bSmacallan
4594dbbd9e4bSmacallan# Create a temporary old-style archive to link instead of a shared archive.
4595dbbd9e4bSmacallanold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4596dbbd9e4bSmacallan
4597dbbd9e4bSmacallan# Commands used to build and install a shared archive.
4598dbbd9e4bSmacallanarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4599dbbd9e4bSmacallanarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4600dbbd9e4bSmacallanpostinstall_cmds=$lt_postinstall_cmds
4601dbbd9e4bSmacallanpostuninstall_cmds=$lt_postuninstall_cmds
4602dbbd9e4bSmacallan
4603dbbd9e4bSmacallan# Commands used to build a loadable module (assumed same as above if empty)
4604dbbd9e4bSmacallanmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4605dbbd9e4bSmacallanmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4606dbbd9e4bSmacallan
4607dbbd9e4bSmacallan# Commands to strip libraries.
4608dbbd9e4bSmacallanold_striplib=$lt_old_striplib
4609dbbd9e4bSmacallanstriplib=$lt_striplib
4610dbbd9e4bSmacallan
4611dbbd9e4bSmacallan# Dependencies to place before the objects being linked to create a
4612dbbd9e4bSmacallan# shared library.
4613dbbd9e4bSmacallanpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4614dbbd9e4bSmacallan
4615dbbd9e4bSmacallan# Dependencies to place after the objects being linked to create a
4616dbbd9e4bSmacallan# shared library.
4617dbbd9e4bSmacallanpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4618dbbd9e4bSmacallan
4619dbbd9e4bSmacallan# Dependencies to place before the objects being linked to create a
4620dbbd9e4bSmacallan# shared library.
4621dbbd9e4bSmacallanpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4622dbbd9e4bSmacallan
4623dbbd9e4bSmacallan# Dependencies to place after the objects being linked to create a
4624dbbd9e4bSmacallan# shared library.
4625dbbd9e4bSmacallanpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4626dbbd9e4bSmacallan
4627dbbd9e4bSmacallan# The directories searched by this compiler when creating a shared
4628dbbd9e4bSmacallan# library
4629dbbd9e4bSmacallancompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4630dbbd9e4bSmacallan
4631dbbd9e4bSmacallan# The library search path used internally by the compiler when linking
4632dbbd9e4bSmacallan# a shared library.
4633dbbd9e4bSmacallancompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4634dbbd9e4bSmacallan
4635dbbd9e4bSmacallan# Method to check whether dependent libraries are shared objects.
4636dbbd9e4bSmacallandeplibs_check_method=$lt_deplibs_check_method
4637dbbd9e4bSmacallan
4638dbbd9e4bSmacallan# Command to use when deplibs_check_method == file_magic.
4639dbbd9e4bSmacallanfile_magic_cmd=$lt_file_magic_cmd
4640dbbd9e4bSmacallan
4641dbbd9e4bSmacallan# Flag that allows shared libraries with undefined symbols to be built.
4642dbbd9e4bSmacallanallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4643dbbd9e4bSmacallan
4644dbbd9e4bSmacallan# Flag that forces no undefined symbols.
4645dbbd9e4bSmacallanno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4646dbbd9e4bSmacallan
4647dbbd9e4bSmacallan# Commands used to finish a libtool library installation in a directory.
4648dbbd9e4bSmacallanfinish_cmds=$lt_finish_cmds
4649dbbd9e4bSmacallan
4650dbbd9e4bSmacallan# Same as above, but a single script fragment to be evaled but not shown.
4651dbbd9e4bSmacallanfinish_eval=$lt_finish_eval
4652dbbd9e4bSmacallan
4653dbbd9e4bSmacallan# Take the output of nm and produce a listing of raw symbols and C names.
4654dbbd9e4bSmacallanglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4655dbbd9e4bSmacallan
4656dbbd9e4bSmacallan# Transform the output of nm in a proper C declaration
4657dbbd9e4bSmacallanglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4658dbbd9e4bSmacallan
4659dbbd9e4bSmacallan# Transform the output of nm in a C name address pair
4660dbbd9e4bSmacallanglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4661dbbd9e4bSmacallan
4662dbbd9e4bSmacallan# This is the shared library runtime path variable.
4663dbbd9e4bSmacallanrunpath_var=$runpath_var
4664dbbd9e4bSmacallan
4665dbbd9e4bSmacallan# This is the shared library path variable.
4666dbbd9e4bSmacallanshlibpath_var=$shlibpath_var
4667dbbd9e4bSmacallan
4668dbbd9e4bSmacallan# Is shlibpath searched before the hard-coded library search path?
4669dbbd9e4bSmacallanshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4670dbbd9e4bSmacallan
4671dbbd9e4bSmacallan# How to hardcode a shared library path into an executable.
4672dbbd9e4bSmacallanhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4673dbbd9e4bSmacallan
4674dbbd9e4bSmacallan# Whether we should hardcode library paths into libraries.
4675dbbd9e4bSmacallanhardcode_into_libs=$hardcode_into_libs
4676dbbd9e4bSmacallan
4677dbbd9e4bSmacallan# Flag to hardcode \$libdir into a binary during linking.
4678dbbd9e4bSmacallan# This must work even if \$libdir does not exist.
4679dbbd9e4bSmacallanhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4680dbbd9e4bSmacallan
4681dbbd9e4bSmacallan# If ld is used when linking, flag to hardcode \$libdir into
4682dbbd9e4bSmacallan# a binary during linking. This must work even if \$libdir does
4683dbbd9e4bSmacallan# not exist.
4684dbbd9e4bSmacallanhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4685dbbd9e4bSmacallan
4686dbbd9e4bSmacallan# Whether we need a single -rpath flag with a separated argument.
4687dbbd9e4bSmacallanhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4688dbbd9e4bSmacallan
4689dbbd9e4bSmacallan# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4690dbbd9e4bSmacallan# resulting binary.
4691dbbd9e4bSmacallanhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4692dbbd9e4bSmacallan
4693dbbd9e4bSmacallan# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4694dbbd9e4bSmacallan# resulting binary.
4695dbbd9e4bSmacallanhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4696dbbd9e4bSmacallan
4697dbbd9e4bSmacallan# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4698dbbd9e4bSmacallan# the resulting binary.
4699dbbd9e4bSmacallanhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4700dbbd9e4bSmacallan
4701dbbd9e4bSmacallan# Set to yes if building a shared library automatically hardcodes DIR into the library
4702dbbd9e4bSmacallan# and all subsequent libraries and executables linked against it.
4703dbbd9e4bSmacallanhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4704dbbd9e4bSmacallan
4705dbbd9e4bSmacallan# Variables whose values should be saved in libtool wrapper scripts and
4706dbbd9e4bSmacallan# restored at relink time.
4707dbbd9e4bSmacallanvariables_saved_for_relink="$variables_saved_for_relink"
4708dbbd9e4bSmacallan
4709dbbd9e4bSmacallan# Whether libtool must link a program against all its dependency libraries.
4710dbbd9e4bSmacallanlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4711dbbd9e4bSmacallan
4712dbbd9e4bSmacallan# Compile-time system search path for libraries
4713dbbd9e4bSmacallansys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4714dbbd9e4bSmacallan
4715dbbd9e4bSmacallan# Run-time system search path for libraries
4716dbbd9e4bSmacallansys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4717dbbd9e4bSmacallan
4718dbbd9e4bSmacallan# Fix the shell variable \$srcfile for the compiler.
4719dbbd9e4bSmacallanfix_srcfile_path=$lt_fix_srcfile_path
4720dbbd9e4bSmacallan
4721dbbd9e4bSmacallan# Set to yes if exported symbols are required.
4722dbbd9e4bSmacallanalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4723dbbd9e4bSmacallan
4724dbbd9e4bSmacallan# The commands to list exported symbols.
4725dbbd9e4bSmacallanexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4726dbbd9e4bSmacallan
4727dbbd9e4bSmacallan# The commands to extract the exported symbol list from a shared archive.
4728dbbd9e4bSmacallanextract_expsyms_cmds=$lt_extract_expsyms_cmds
4729dbbd9e4bSmacallan
4730dbbd9e4bSmacallan# Symbols that should not be listed in the preloaded symbols.
4731dbbd9e4bSmacallanexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4732dbbd9e4bSmacallan
4733dbbd9e4bSmacallan# Symbols that must always be exported.
4734dbbd9e4bSmacallaninclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4735dbbd9e4bSmacallan
4736dbbd9e4bSmacallanifelse([$1],[],
4737dbbd9e4bSmacallan[# ### END LIBTOOL CONFIG],
4738dbbd9e4bSmacallan[# ### END LIBTOOL TAG CONFIG: $tagname])
4739dbbd9e4bSmacallan
4740dbbd9e4bSmacallan__EOF__
4741dbbd9e4bSmacallan
4742dbbd9e4bSmacallanifelse([$1],[], [
4743dbbd9e4bSmacallan  case $host_os in
4744dbbd9e4bSmacallan  aix3*)
4745dbbd9e4bSmacallan    cat <<\EOF >> "$cfgfile"
4746dbbd9e4bSmacallan
4747dbbd9e4bSmacallan# AIX sometimes has problems with the GCC collect2 program.  For some
4748dbbd9e4bSmacallan# reason, if we set the COLLECT_NAMES environment variable, the problems
4749dbbd9e4bSmacallan# vanish in a puff of smoke.
4750dbbd9e4bSmacallanif test "X${COLLECT_NAMES+set}" != Xset; then
4751dbbd9e4bSmacallan  COLLECT_NAMES=
4752dbbd9e4bSmacallan  export COLLECT_NAMES
4753dbbd9e4bSmacallanfi
4754dbbd9e4bSmacallanEOF
4755dbbd9e4bSmacallan    ;;
4756dbbd9e4bSmacallan  esac
4757dbbd9e4bSmacallan
4758dbbd9e4bSmacallan  # We use sed instead of cat because bash on DJGPP gets confused if
4759dbbd9e4bSmacallan  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4760dbbd9e4bSmacallan  # text mode, it properly converts lines to CR/LF.  This bash problem
4761dbbd9e4bSmacallan  # is reportedly fixed, but why not run on old versions too?
4762dbbd9e4bSmacallan  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4763dbbd9e4bSmacallan
4764dbbd9e4bSmacallan  mv -f "$cfgfile" "$ofile" || \
4765dbbd9e4bSmacallan    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4766dbbd9e4bSmacallan  chmod +x "$ofile"
4767dbbd9e4bSmacallan])
4768dbbd9e4bSmacallanelse
4769dbbd9e4bSmacallan  # If there is no Makefile yet, we rely on a make rule to execute
4770dbbd9e4bSmacallan  # `config.status --recheck' to rerun these tests and create the
4771dbbd9e4bSmacallan  # libtool script then.
4772dbbd9e4bSmacallan  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4773dbbd9e4bSmacallan  if test -f "$ltmain_in"; then
4774dbbd9e4bSmacallan    test -f Makefile && make "$ltmain"
4775dbbd9e4bSmacallan  fi
4776dbbd9e4bSmacallanfi
4777dbbd9e4bSmacallan])# AC_LIBTOOL_CONFIG
4778dbbd9e4bSmacallan
4779dbbd9e4bSmacallan
4780dbbd9e4bSmacallan# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4781dbbd9e4bSmacallan# -------------------------------------------
4782dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4783dbbd9e4bSmacallan[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4784dbbd9e4bSmacallan
4785dbbd9e4bSmacallan_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4786dbbd9e4bSmacallan
4787dbbd9e4bSmacallanif test "$GCC" = yes; then
4788dbbd9e4bSmacallan  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4789dbbd9e4bSmacallan
4790dbbd9e4bSmacallan  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4791dbbd9e4bSmacallan    lt_cv_prog_compiler_rtti_exceptions,
4792dbbd9e4bSmacallan    [-fno-rtti -fno-exceptions], [],
4793dbbd9e4bSmacallan    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4794dbbd9e4bSmacallanfi
4795dbbd9e4bSmacallan])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4796dbbd9e4bSmacallan
4797dbbd9e4bSmacallan
4798dbbd9e4bSmacallan# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4799dbbd9e4bSmacallan# ---------------------------------
4800dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4801dbbd9e4bSmacallan[AC_REQUIRE([AC_CANONICAL_HOST])
4802dbbd9e4bSmacallanAC_REQUIRE([LT_AC_PROG_SED])
4803dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_NM])
4804dbbd9e4bSmacallanAC_REQUIRE([AC_OBJEXT])
4805dbbd9e4bSmacallan# Check for command to grab the raw symbol name followed by C symbol from nm.
4806dbbd9e4bSmacallanAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4807dbbd9e4bSmacallanAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4808dbbd9e4bSmacallan[
4809dbbd9e4bSmacallan# These are sane defaults that work on at least a few old systems.
4810dbbd9e4bSmacallan# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4811dbbd9e4bSmacallan
4812dbbd9e4bSmacallan# Character class describing NM global symbol codes.
4813dbbd9e4bSmacallansymcode='[[BCDEGRST]]'
4814dbbd9e4bSmacallan
4815dbbd9e4bSmacallan# Regexp to match symbols that can be accessed directly from C.
4816dbbd9e4bSmacallansympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4817dbbd9e4bSmacallan
4818dbbd9e4bSmacallan# Transform an extracted symbol line into a proper C declaration
4819dbbd9e4bSmacallanlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4820dbbd9e4bSmacallan
4821dbbd9e4bSmacallan# Transform an extracted symbol line into symbol name and symbol address
4822dbbd9e4bSmacallanlt_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'"
4823dbbd9e4bSmacallan
4824dbbd9e4bSmacallan# Define system-specific variables.
4825dbbd9e4bSmacallancase $host_os in
4826dbbd9e4bSmacallanaix*)
4827dbbd9e4bSmacallan  symcode='[[BCDT]]'
4828dbbd9e4bSmacallan  ;;
4829dbbd9e4bSmacallancygwin* | mingw* | pw32*)
4830dbbd9e4bSmacallan  symcode='[[ABCDGISTW]]'
4831dbbd9e4bSmacallan  ;;
4832dbbd9e4bSmacallanhpux*) # Its linker distinguishes data from code symbols
4833dbbd9e4bSmacallan  if test "$host_cpu" = ia64; then
4834dbbd9e4bSmacallan    symcode='[[ABCDEGRST]]'
4835dbbd9e4bSmacallan  fi
4836dbbd9e4bSmacallan  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4837dbbd9e4bSmacallan  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'"
4838dbbd9e4bSmacallan  ;;
4839dbbd9e4bSmacallanlinux* | k*bsd*-gnu)
4840dbbd9e4bSmacallan  if test "$host_cpu" = ia64; then
4841dbbd9e4bSmacallan    symcode='[[ABCDGIRSTW]]'
4842dbbd9e4bSmacallan    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4843dbbd9e4bSmacallan    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'"
4844dbbd9e4bSmacallan  fi
4845dbbd9e4bSmacallan  ;;
4846dbbd9e4bSmacallanirix* | nonstopux*)
4847dbbd9e4bSmacallan  symcode='[[BCDEGRST]]'
4848dbbd9e4bSmacallan  ;;
4849dbbd9e4bSmacallanosf*)
4850dbbd9e4bSmacallan  symcode='[[BCDEGQRST]]'
4851dbbd9e4bSmacallan  ;;
4852dbbd9e4bSmacallansolaris*)
4853dbbd9e4bSmacallan  symcode='[[BDRT]]'
4854dbbd9e4bSmacallan  ;;
4855dbbd9e4bSmacallansco3.2v5*)
4856dbbd9e4bSmacallan  symcode='[[DT]]'
4857dbbd9e4bSmacallan  ;;
4858dbbd9e4bSmacallansysv4.2uw2*)
4859dbbd9e4bSmacallan  symcode='[[DT]]'
4860dbbd9e4bSmacallan  ;;
4861dbbd9e4bSmacallansysv5* | sco5v6* | unixware* | OpenUNIX*)
4862dbbd9e4bSmacallan  symcode='[[ABDT]]'
4863dbbd9e4bSmacallan  ;;
4864dbbd9e4bSmacallansysv4)
4865dbbd9e4bSmacallan  symcode='[[DFNSTU]]'
4866dbbd9e4bSmacallan  ;;
4867dbbd9e4bSmacallanesac
4868dbbd9e4bSmacallan
4869dbbd9e4bSmacallan# Handle CRLF in mingw tool chain
4870dbbd9e4bSmacallanopt_cr=
4871dbbd9e4bSmacallancase $build_os in
4872dbbd9e4bSmacallanmingw*)
4873dbbd9e4bSmacallan  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4874dbbd9e4bSmacallan  ;;
4875dbbd9e4bSmacallanesac
4876dbbd9e4bSmacallan
4877dbbd9e4bSmacallan# If we're using GNU nm, then use its standard symbol codes.
4878dbbd9e4bSmacallancase `$NM -V 2>&1` in
4879dbbd9e4bSmacallan*GNU* | *'with BFD'*)
4880dbbd9e4bSmacallan  symcode='[[ABCDGIRSTW]]' ;;
4881dbbd9e4bSmacallanesac
4882dbbd9e4bSmacallan
4883dbbd9e4bSmacallan# Try without a prefix undercore, then with it.
4884dbbd9e4bSmacallanfor ac_symprfx in "" "_"; do
4885dbbd9e4bSmacallan
4886dbbd9e4bSmacallan  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4887dbbd9e4bSmacallan  symxfrm="\\1 $ac_symprfx\\2 \\2"
4888dbbd9e4bSmacallan
4889dbbd9e4bSmacallan  # Write the raw and C identifiers.
4890dbbd9e4bSmacallan  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4891dbbd9e4bSmacallan
4892dbbd9e4bSmacallan  # Check to see that the pipe works correctly.
4893dbbd9e4bSmacallan  pipe_works=no
4894dbbd9e4bSmacallan
4895dbbd9e4bSmacallan  rm -f conftest*
4896dbbd9e4bSmacallan  cat > conftest.$ac_ext <<EOF
4897dbbd9e4bSmacallan#ifdef __cplusplus
4898dbbd9e4bSmacallanextern "C" {
4899dbbd9e4bSmacallan#endif
4900dbbd9e4bSmacallanchar nm_test_var;
4901dbbd9e4bSmacallanvoid nm_test_func(){}
4902dbbd9e4bSmacallan#ifdef __cplusplus
4903dbbd9e4bSmacallan}
4904dbbd9e4bSmacallan#endif
4905dbbd9e4bSmacallanint main(){nm_test_var='a';nm_test_func();return(0);}
4906dbbd9e4bSmacallanEOF
4907dbbd9e4bSmacallan
4908dbbd9e4bSmacallan  if AC_TRY_EVAL(ac_compile); then
4909dbbd9e4bSmacallan    # Now try to grab the symbols.
4910dbbd9e4bSmacallan    nlist=conftest.nm
4911dbbd9e4bSmacallan    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4912dbbd9e4bSmacallan      # Try sorting and uniquifying the output.
4913dbbd9e4bSmacallan      if sort "$nlist" | uniq > "$nlist"T; then
4914dbbd9e4bSmacallan	mv -f "$nlist"T "$nlist"
4915dbbd9e4bSmacallan      else
4916dbbd9e4bSmacallan	rm -f "$nlist"T
4917dbbd9e4bSmacallan      fi
4918dbbd9e4bSmacallan
4919dbbd9e4bSmacallan      # Make sure that we snagged all the symbols we need.
4920dbbd9e4bSmacallan      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4921dbbd9e4bSmacallan	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4922dbbd9e4bSmacallan	  cat <<EOF > conftest.$ac_ext
4923dbbd9e4bSmacallan#ifdef __cplusplus
4924dbbd9e4bSmacallanextern "C" {
4925dbbd9e4bSmacallan#endif
4926dbbd9e4bSmacallan
4927dbbd9e4bSmacallanEOF
4928dbbd9e4bSmacallan	  # Now generate the symbol file.
4929dbbd9e4bSmacallan	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4930dbbd9e4bSmacallan
4931dbbd9e4bSmacallan	  cat <<EOF >> conftest.$ac_ext
4932dbbd9e4bSmacallan#if defined (__STDC__) && __STDC__
4933dbbd9e4bSmacallan# define lt_ptr_t void *
4934dbbd9e4bSmacallan#else
4935dbbd9e4bSmacallan# define lt_ptr_t char *
4936dbbd9e4bSmacallan# define const
4937dbbd9e4bSmacallan#endif
4938dbbd9e4bSmacallan
4939dbbd9e4bSmacallan/* The mapping between symbol names and symbols. */
4940dbbd9e4bSmacallanconst struct {
4941dbbd9e4bSmacallan  const char *name;
4942dbbd9e4bSmacallan  lt_ptr_t address;
4943dbbd9e4bSmacallan}
4944dbbd9e4bSmacallanlt_preloaded_symbols[[]] =
4945dbbd9e4bSmacallan{
4946dbbd9e4bSmacallanEOF
4947dbbd9e4bSmacallan	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4948dbbd9e4bSmacallan	  cat <<\EOF >> conftest.$ac_ext
4949dbbd9e4bSmacallan  {0, (lt_ptr_t) 0}
4950dbbd9e4bSmacallan};
4951dbbd9e4bSmacallan
4952dbbd9e4bSmacallan#ifdef __cplusplus
4953dbbd9e4bSmacallan}
4954dbbd9e4bSmacallan#endif
4955dbbd9e4bSmacallanEOF
4956dbbd9e4bSmacallan	  # Now try linking the two files.
4957dbbd9e4bSmacallan	  mv conftest.$ac_objext conftstm.$ac_objext
4958dbbd9e4bSmacallan	  lt_save_LIBS="$LIBS"
4959dbbd9e4bSmacallan	  lt_save_CFLAGS="$CFLAGS"
4960dbbd9e4bSmacallan	  LIBS="conftstm.$ac_objext"
4961dbbd9e4bSmacallan	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4962dbbd9e4bSmacallan	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4963dbbd9e4bSmacallan	    pipe_works=yes
4964dbbd9e4bSmacallan	  fi
4965dbbd9e4bSmacallan	  LIBS="$lt_save_LIBS"
4966dbbd9e4bSmacallan	  CFLAGS="$lt_save_CFLAGS"
4967dbbd9e4bSmacallan	else
4968dbbd9e4bSmacallan	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4969dbbd9e4bSmacallan	fi
4970dbbd9e4bSmacallan      else
4971dbbd9e4bSmacallan	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4972dbbd9e4bSmacallan      fi
4973dbbd9e4bSmacallan    else
4974dbbd9e4bSmacallan      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4975dbbd9e4bSmacallan    fi
4976dbbd9e4bSmacallan  else
4977dbbd9e4bSmacallan    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4978dbbd9e4bSmacallan    cat conftest.$ac_ext >&5
4979dbbd9e4bSmacallan  fi
4980dbbd9e4bSmacallan  rm -rf conftest* conftst*
4981dbbd9e4bSmacallan
4982dbbd9e4bSmacallan  # Do not use the global_symbol_pipe unless it works.
4983dbbd9e4bSmacallan  if test "$pipe_works" = yes; then
4984dbbd9e4bSmacallan    break
4985dbbd9e4bSmacallan  else
4986dbbd9e4bSmacallan    lt_cv_sys_global_symbol_pipe=
4987dbbd9e4bSmacallan  fi
4988dbbd9e4bSmacallandone
4989dbbd9e4bSmacallan])
4990dbbd9e4bSmacallanif test -z "$lt_cv_sys_global_symbol_pipe"; then
4991dbbd9e4bSmacallan  lt_cv_sys_global_symbol_to_cdecl=
4992dbbd9e4bSmacallanfi
4993dbbd9e4bSmacallanif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4994dbbd9e4bSmacallan  AC_MSG_RESULT(failed)
4995dbbd9e4bSmacallanelse
4996dbbd9e4bSmacallan  AC_MSG_RESULT(ok)
4997dbbd9e4bSmacallanfi
4998dbbd9e4bSmacallan]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4999dbbd9e4bSmacallan
5000dbbd9e4bSmacallan
5001dbbd9e4bSmacallan# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5002dbbd9e4bSmacallan# ---------------------------------------
5003dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5004dbbd9e4bSmacallan[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5005dbbd9e4bSmacallan_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5006dbbd9e4bSmacallan_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5007dbbd9e4bSmacallan
5008dbbd9e4bSmacallanAC_MSG_CHECKING([for $compiler option to produce PIC])
5009dbbd9e4bSmacallan ifelse([$1],[CXX],[
5010dbbd9e4bSmacallan  # C++ specific cases for pic, static, wl, etc.
5011dbbd9e4bSmacallan  if test "$GXX" = yes; then
5012dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5013dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5014dbbd9e4bSmacallan
5015dbbd9e4bSmacallan    case $host_os in
5016dbbd9e4bSmacallan    aix*)
5017dbbd9e4bSmacallan      # All AIX code is PIC.
5018dbbd9e4bSmacallan      if test "$host_cpu" = ia64; then
5019dbbd9e4bSmacallan	# AIX 5 now supports IA64 processor
5020dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5021dbbd9e4bSmacallan      fi
5022dbbd9e4bSmacallan      ;;
5023dbbd9e4bSmacallan    amigaos*)
5024dbbd9e4bSmacallan      # FIXME: we need at least 68020 code to build shared libraries, but
5025dbbd9e4bSmacallan      # adding the `-m68020' flag to GCC prevents building anything better,
5026dbbd9e4bSmacallan      # like `-m68040'.
5027dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5028dbbd9e4bSmacallan      ;;
5029dbbd9e4bSmacallan    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5030dbbd9e4bSmacallan      # PIC is the default for these OSes.
5031dbbd9e4bSmacallan      ;;
5032dbbd9e4bSmacallan    mingw* | cygwin* | os2* | pw32*)
5033dbbd9e4bSmacallan      # This hack is so that the source file can tell whether it is being
5034dbbd9e4bSmacallan      # built for inclusion in a dll (and should export symbols for example).
5035dbbd9e4bSmacallan      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5036dbbd9e4bSmacallan      # (--disable-auto-import) libraries
5037dbbd9e4bSmacallan      m4_if([$1], [GCJ], [],
5038dbbd9e4bSmacallan	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5039dbbd9e4bSmacallan      ;;
5040dbbd9e4bSmacallan    darwin* | rhapsody*)
5041dbbd9e4bSmacallan      # PIC is the default on this platform
5042dbbd9e4bSmacallan      # Common symbols not allowed in MH_DYLIB files
5043dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5044dbbd9e4bSmacallan      ;;
5045dbbd9e4bSmacallan    *djgpp*)
5046dbbd9e4bSmacallan      # DJGPP does not support shared libraries at all
5047dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5048dbbd9e4bSmacallan      ;;
5049dbbd9e4bSmacallan    interix[[3-9]]*)
5050dbbd9e4bSmacallan      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5051dbbd9e4bSmacallan      # Instead, we relocate shared libraries at runtime.
5052dbbd9e4bSmacallan      ;;
5053dbbd9e4bSmacallan    sysv4*MP*)
5054dbbd9e4bSmacallan      if test -d /usr/nec; then
5055dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5056dbbd9e4bSmacallan      fi
5057dbbd9e4bSmacallan      ;;
5058dbbd9e4bSmacallan    hpux*)
5059dbbd9e4bSmacallan      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5060dbbd9e4bSmacallan      # not for PA HP-UX.
5061dbbd9e4bSmacallan      case $host_cpu in
5062dbbd9e4bSmacallan      hppa*64*|ia64*)
5063dbbd9e4bSmacallan	;;
5064dbbd9e4bSmacallan      *)
5065dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5066dbbd9e4bSmacallan	;;
5067dbbd9e4bSmacallan      esac
5068dbbd9e4bSmacallan      ;;
5069dbbd9e4bSmacallan    *)
5070dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5071dbbd9e4bSmacallan      ;;
5072dbbd9e4bSmacallan    esac
5073dbbd9e4bSmacallan  else
5074dbbd9e4bSmacallan    case $host_os in
5075dbbd9e4bSmacallan      aix[[4-9]]*)
5076dbbd9e4bSmacallan	# All AIX code is PIC.
5077dbbd9e4bSmacallan	if test "$host_cpu" = ia64; then
5078dbbd9e4bSmacallan	  # AIX 5 now supports IA64 processor
5079dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5080dbbd9e4bSmacallan	else
5081dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5082dbbd9e4bSmacallan	fi
5083dbbd9e4bSmacallan	;;
5084dbbd9e4bSmacallan      chorus*)
5085dbbd9e4bSmacallan	case $cc_basename in
5086dbbd9e4bSmacallan	cxch68*)
5087dbbd9e4bSmacallan	  # Green Hills C++ Compiler
5088dbbd9e4bSmacallan	  # _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"
5089dbbd9e4bSmacallan	  ;;
5090dbbd9e4bSmacallan	esac
5091dbbd9e4bSmacallan	;;
5092dbbd9e4bSmacallan       darwin*)
5093dbbd9e4bSmacallan         # PIC is the default on this platform
5094dbbd9e4bSmacallan         # Common symbols not allowed in MH_DYLIB files
5095dbbd9e4bSmacallan         case $cc_basename in
5096dbbd9e4bSmacallan           xlc*)
5097dbbd9e4bSmacallan           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5098dbbd9e4bSmacallan           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5099dbbd9e4bSmacallan           ;;
5100dbbd9e4bSmacallan         esac
5101dbbd9e4bSmacallan       ;;
5102dbbd9e4bSmacallan      dgux*)
5103dbbd9e4bSmacallan	case $cc_basename in
5104dbbd9e4bSmacallan	  ec++*)
5105dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5106dbbd9e4bSmacallan	    ;;
5107dbbd9e4bSmacallan	  ghcx*)
5108dbbd9e4bSmacallan	    # Green Hills C++ Compiler
5109dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5110dbbd9e4bSmacallan	    ;;
5111dbbd9e4bSmacallan	  *)
5112dbbd9e4bSmacallan	    ;;
5113dbbd9e4bSmacallan	esac
5114dbbd9e4bSmacallan	;;
5115dbbd9e4bSmacallan      freebsd* | dragonfly*)
5116dbbd9e4bSmacallan	# FreeBSD uses GNU C++
5117dbbd9e4bSmacallan	;;
5118dbbd9e4bSmacallan      hpux9* | hpux10* | hpux11*)
5119dbbd9e4bSmacallan	case $cc_basename in
5120dbbd9e4bSmacallan	  CC*)
5121dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5122dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5123dbbd9e4bSmacallan	    if test "$host_cpu" != ia64; then
5124dbbd9e4bSmacallan	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5125dbbd9e4bSmacallan	    fi
5126dbbd9e4bSmacallan	    ;;
5127dbbd9e4bSmacallan	  aCC*)
5128dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5129dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5130dbbd9e4bSmacallan	    case $host_cpu in
5131dbbd9e4bSmacallan	    hppa*64*|ia64*)
5132dbbd9e4bSmacallan	      # +Z the default
5133dbbd9e4bSmacallan	      ;;
5134dbbd9e4bSmacallan	    *)
5135dbbd9e4bSmacallan	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5136dbbd9e4bSmacallan	      ;;
5137dbbd9e4bSmacallan	    esac
5138dbbd9e4bSmacallan	    ;;
5139dbbd9e4bSmacallan	  *)
5140dbbd9e4bSmacallan	    ;;
5141dbbd9e4bSmacallan	esac
5142dbbd9e4bSmacallan	;;
5143dbbd9e4bSmacallan      interix*)
5144dbbd9e4bSmacallan	# This is c89, which is MS Visual C++ (no shared libs)
5145dbbd9e4bSmacallan	# Anyone wants to do a port?
5146dbbd9e4bSmacallan	;;
5147dbbd9e4bSmacallan      irix5* | irix6* | nonstopux*)
5148dbbd9e4bSmacallan	case $cc_basename in
5149dbbd9e4bSmacallan	  CC*)
5150dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5151dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5152dbbd9e4bSmacallan	    # CC pic flag -KPIC is the default.
5153dbbd9e4bSmacallan	    ;;
5154dbbd9e4bSmacallan	  *)
5155dbbd9e4bSmacallan	    ;;
5156dbbd9e4bSmacallan	esac
5157dbbd9e4bSmacallan	;;
5158dbbd9e4bSmacallan      linux* | k*bsd*-gnu)
5159dbbd9e4bSmacallan	case $cc_basename in
5160dbbd9e4bSmacallan	  KCC*)
5161dbbd9e4bSmacallan	    # KAI C++ Compiler
5162dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5163dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5164dbbd9e4bSmacallan	    ;;
5165dbbd9e4bSmacallan	  icpc* | ecpc*)
5166dbbd9e4bSmacallan	    # Intel C++
5167dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5168dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5169dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5170dbbd9e4bSmacallan	    ;;
5171dbbd9e4bSmacallan	  pgCC* | pgcpp*)
5172dbbd9e4bSmacallan	    # Portland Group C++ compiler.
5173dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5174dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5175dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5176dbbd9e4bSmacallan	    ;;
5177dbbd9e4bSmacallan	  cxx*)
5178dbbd9e4bSmacallan	    # Compaq C++
5179dbbd9e4bSmacallan	    # Make sure the PIC flag is empty.  It appears that all Alpha
5180dbbd9e4bSmacallan	    # Linux and Compaq Tru64 Unix objects are PIC.
5181dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5182dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5183dbbd9e4bSmacallan	    ;;
5184dbbd9e4bSmacallan	  *)
5185dbbd9e4bSmacallan	    case `$CC -V 2>&1 | sed 5q` in
5186dbbd9e4bSmacallan	    *Sun\ C*)
5187dbbd9e4bSmacallan	      # Sun C++ 5.9
5188dbbd9e4bSmacallan	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5189dbbd9e4bSmacallan	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5190dbbd9e4bSmacallan	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5191dbbd9e4bSmacallan	      ;;
5192dbbd9e4bSmacallan	    esac
5193dbbd9e4bSmacallan	    ;;
5194dbbd9e4bSmacallan	esac
5195dbbd9e4bSmacallan	;;
5196dbbd9e4bSmacallan      lynxos*)
5197dbbd9e4bSmacallan	;;
5198dbbd9e4bSmacallan      m88k*)
5199dbbd9e4bSmacallan	;;
5200dbbd9e4bSmacallan      mvs*)
5201dbbd9e4bSmacallan	case $cc_basename in
5202dbbd9e4bSmacallan	  cxx*)
5203dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5204dbbd9e4bSmacallan	    ;;
5205dbbd9e4bSmacallan	  *)
5206dbbd9e4bSmacallan	    ;;
5207dbbd9e4bSmacallan	esac
5208dbbd9e4bSmacallan	;;
5209dbbd9e4bSmacallan      netbsd*)
5210dbbd9e4bSmacallan	;;
5211dbbd9e4bSmacallan      osf3* | osf4* | osf5*)
5212dbbd9e4bSmacallan	case $cc_basename in
5213dbbd9e4bSmacallan	  KCC*)
5214dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5215dbbd9e4bSmacallan	    ;;
5216dbbd9e4bSmacallan	  RCC*)
5217dbbd9e4bSmacallan	    # Rational C++ 2.4.1
5218dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5219dbbd9e4bSmacallan	    ;;
5220dbbd9e4bSmacallan	  cxx*)
5221dbbd9e4bSmacallan	    # Digital/Compaq C++
5222dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5223dbbd9e4bSmacallan	    # Make sure the PIC flag is empty.  It appears that all Alpha
5224dbbd9e4bSmacallan	    # Linux and Compaq Tru64 Unix objects are PIC.
5225dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5226dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5227dbbd9e4bSmacallan	    ;;
5228dbbd9e4bSmacallan	  *)
5229dbbd9e4bSmacallan	    ;;
5230dbbd9e4bSmacallan	esac
5231dbbd9e4bSmacallan	;;
5232dbbd9e4bSmacallan      psos*)
5233dbbd9e4bSmacallan	;;
5234dbbd9e4bSmacallan      solaris*)
5235dbbd9e4bSmacallan	case $cc_basename in
5236dbbd9e4bSmacallan	  CC*)
5237dbbd9e4bSmacallan	    # Sun C++ 4.2, 5.x and Centerline C++
5238dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5239dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5240dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5241dbbd9e4bSmacallan	    ;;
5242dbbd9e4bSmacallan	  gcx*)
5243dbbd9e4bSmacallan	    # Green Hills C++ Compiler
5244dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5245dbbd9e4bSmacallan	    ;;
5246dbbd9e4bSmacallan	  *)
5247dbbd9e4bSmacallan	    ;;
5248dbbd9e4bSmacallan	esac
5249dbbd9e4bSmacallan	;;
5250dbbd9e4bSmacallan      sunos4*)
5251dbbd9e4bSmacallan	case $cc_basename in
5252dbbd9e4bSmacallan	  CC*)
5253dbbd9e4bSmacallan	    # Sun C++ 4.x
5254dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5255dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5256dbbd9e4bSmacallan	    ;;
5257dbbd9e4bSmacallan	  lcc*)
5258dbbd9e4bSmacallan	    # Lucid
5259dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5260dbbd9e4bSmacallan	    ;;
5261dbbd9e4bSmacallan	  *)
5262dbbd9e4bSmacallan	    ;;
5263dbbd9e4bSmacallan	esac
5264dbbd9e4bSmacallan	;;
5265dbbd9e4bSmacallan      tandem*)
5266dbbd9e4bSmacallan	case $cc_basename in
5267dbbd9e4bSmacallan	  NCC*)
5268dbbd9e4bSmacallan	    # NonStop-UX NCC 3.20
5269dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5270dbbd9e4bSmacallan	    ;;
5271dbbd9e4bSmacallan	  *)
5272dbbd9e4bSmacallan	    ;;
5273dbbd9e4bSmacallan	esac
5274dbbd9e4bSmacallan	;;
5275dbbd9e4bSmacallan      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5276dbbd9e4bSmacallan	case $cc_basename in
5277dbbd9e4bSmacallan	  CC*)
5278dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5279dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5280dbbd9e4bSmacallan	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5281dbbd9e4bSmacallan	    ;;
5282dbbd9e4bSmacallan	esac
5283dbbd9e4bSmacallan	;;
5284dbbd9e4bSmacallan      vxworks*)
5285dbbd9e4bSmacallan	;;
5286dbbd9e4bSmacallan      *)
5287dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5288dbbd9e4bSmacallan	;;
5289dbbd9e4bSmacallan    esac
5290dbbd9e4bSmacallan  fi
5291dbbd9e4bSmacallan],
5292dbbd9e4bSmacallan[
5293dbbd9e4bSmacallan  if test "$GCC" = yes; then
5294dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5295dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5296dbbd9e4bSmacallan
5297dbbd9e4bSmacallan    case $host_os in
5298dbbd9e4bSmacallan      aix*)
5299dbbd9e4bSmacallan      # All AIX code is PIC.
5300dbbd9e4bSmacallan      if test "$host_cpu" = ia64; then
5301dbbd9e4bSmacallan	# AIX 5 now supports IA64 processor
5302dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5303dbbd9e4bSmacallan      fi
5304dbbd9e4bSmacallan      ;;
5305dbbd9e4bSmacallan
5306dbbd9e4bSmacallan    amigaos*)
5307dbbd9e4bSmacallan      # FIXME: we need at least 68020 code to build shared libraries, but
5308dbbd9e4bSmacallan      # adding the `-m68020' flag to GCC prevents building anything better,
5309dbbd9e4bSmacallan      # like `-m68040'.
5310dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5311dbbd9e4bSmacallan      ;;
5312dbbd9e4bSmacallan
5313dbbd9e4bSmacallan    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5314dbbd9e4bSmacallan      # PIC is the default for these OSes.
5315dbbd9e4bSmacallan      ;;
5316dbbd9e4bSmacallan
5317dbbd9e4bSmacallan    mingw* | cygwin* | pw32* | os2*)
5318dbbd9e4bSmacallan      # This hack is so that the source file can tell whether it is being
5319dbbd9e4bSmacallan      # built for inclusion in a dll (and should export symbols for example).
5320dbbd9e4bSmacallan      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5321dbbd9e4bSmacallan      # (--disable-auto-import) libraries
5322dbbd9e4bSmacallan      m4_if([$1], [GCJ], [],
5323dbbd9e4bSmacallan	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5324dbbd9e4bSmacallan      ;;
5325dbbd9e4bSmacallan
5326dbbd9e4bSmacallan    darwin* | rhapsody*)
5327dbbd9e4bSmacallan      # PIC is the default on this platform
5328dbbd9e4bSmacallan      # Common symbols not allowed in MH_DYLIB files
5329dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5330dbbd9e4bSmacallan      ;;
5331dbbd9e4bSmacallan
5332dbbd9e4bSmacallan    interix[[3-9]]*)
5333dbbd9e4bSmacallan      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5334dbbd9e4bSmacallan      # Instead, we relocate shared libraries at runtime.
5335dbbd9e4bSmacallan      ;;
5336dbbd9e4bSmacallan
5337dbbd9e4bSmacallan    msdosdjgpp*)
5338dbbd9e4bSmacallan      # Just because we use GCC doesn't mean we suddenly get shared libraries
5339dbbd9e4bSmacallan      # on systems that don't support them.
5340dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5341dbbd9e4bSmacallan      enable_shared=no
5342dbbd9e4bSmacallan      ;;
5343dbbd9e4bSmacallan
5344dbbd9e4bSmacallan    sysv4*MP*)
5345dbbd9e4bSmacallan      if test -d /usr/nec; then
5346dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5347dbbd9e4bSmacallan      fi
5348dbbd9e4bSmacallan      ;;
5349dbbd9e4bSmacallan
5350dbbd9e4bSmacallan    hpux*)
5351dbbd9e4bSmacallan      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5352dbbd9e4bSmacallan      # not for PA HP-UX.
5353dbbd9e4bSmacallan      case $host_cpu in
5354dbbd9e4bSmacallan      hppa*64*|ia64*)
5355dbbd9e4bSmacallan	# +Z the default
5356dbbd9e4bSmacallan	;;
5357dbbd9e4bSmacallan      *)
5358dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5359dbbd9e4bSmacallan	;;
5360dbbd9e4bSmacallan      esac
5361dbbd9e4bSmacallan      ;;
5362dbbd9e4bSmacallan
5363dbbd9e4bSmacallan    *)
5364dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5365dbbd9e4bSmacallan      ;;
5366dbbd9e4bSmacallan    esac
5367dbbd9e4bSmacallan  else
5368dbbd9e4bSmacallan    # PORTME Check for flag to pass linker flags through the system compiler.
5369dbbd9e4bSmacallan    case $host_os in
5370dbbd9e4bSmacallan    aix*)
5371dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372dbbd9e4bSmacallan      if test "$host_cpu" = ia64; then
5373dbbd9e4bSmacallan	# AIX 5 now supports IA64 processor
5374dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5375dbbd9e4bSmacallan      else
5376dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5377dbbd9e4bSmacallan      fi
5378dbbd9e4bSmacallan      ;;
5379dbbd9e4bSmacallan      darwin*)
5380dbbd9e4bSmacallan        # PIC is the default on this platform
5381dbbd9e4bSmacallan        # Common symbols not allowed in MH_DYLIB files
5382dbbd9e4bSmacallan       case $cc_basename in
5383dbbd9e4bSmacallan         xlc*)
5384dbbd9e4bSmacallan         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5385dbbd9e4bSmacallan         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5386dbbd9e4bSmacallan         ;;
5387dbbd9e4bSmacallan       esac
5388dbbd9e4bSmacallan       ;;
5389dbbd9e4bSmacallan
5390dbbd9e4bSmacallan    mingw* | cygwin* | pw32* | os2*)
5391dbbd9e4bSmacallan      # This hack is so that the source file can tell whether it is being
5392dbbd9e4bSmacallan      # built for inclusion in a dll (and should export symbols for example).
5393dbbd9e4bSmacallan      m4_if([$1], [GCJ], [],
5394dbbd9e4bSmacallan	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5395dbbd9e4bSmacallan      ;;
5396dbbd9e4bSmacallan
5397dbbd9e4bSmacallan    hpux9* | hpux10* | hpux11*)
5398dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5399dbbd9e4bSmacallan      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5400dbbd9e4bSmacallan      # not for PA HP-UX.
5401dbbd9e4bSmacallan      case $host_cpu in
5402dbbd9e4bSmacallan      hppa*64*|ia64*)
5403dbbd9e4bSmacallan	# +Z the default
5404dbbd9e4bSmacallan	;;
5405dbbd9e4bSmacallan      *)
5406dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5407dbbd9e4bSmacallan	;;
5408dbbd9e4bSmacallan      esac
5409dbbd9e4bSmacallan      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5410dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5411dbbd9e4bSmacallan      ;;
5412dbbd9e4bSmacallan
5413dbbd9e4bSmacallan    irix5* | irix6* | nonstopux*)
5414dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5415dbbd9e4bSmacallan      # PIC (with -KPIC) is the default.
5416dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5417dbbd9e4bSmacallan      ;;
5418dbbd9e4bSmacallan
5419dbbd9e4bSmacallan    newsos6)
5420dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5421dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5422dbbd9e4bSmacallan      ;;
5423dbbd9e4bSmacallan
5424dbbd9e4bSmacallan    linux* | k*bsd*-gnu)
5425dbbd9e4bSmacallan      case $cc_basename in
5426dbbd9e4bSmacallan      icc* | ecc*)
5427dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5428dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5429dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5430dbbd9e4bSmacallan        ;;
5431dbbd9e4bSmacallan      pgcc* | pgf77* | pgf90* | pgf95*)
5432dbbd9e4bSmacallan        # Portland Group compilers (*not* the Pentium gcc compiler,
5433dbbd9e4bSmacallan	# which looks to be a dead project)
5434dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5435dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5436dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5437dbbd9e4bSmacallan        ;;
5438dbbd9e4bSmacallan      ccc*)
5439dbbd9e4bSmacallan        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5440dbbd9e4bSmacallan        # All Alpha code is PIC.
5441dbbd9e4bSmacallan        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5442dbbd9e4bSmacallan        ;;
5443dbbd9e4bSmacallan      *)
5444dbbd9e4bSmacallan        case `$CC -V 2>&1 | sed 5q` in
5445dbbd9e4bSmacallan	*Sun\ C*)
5446dbbd9e4bSmacallan	  # Sun C 5.9
5447dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5448dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5449dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450dbbd9e4bSmacallan	  ;;
5451dbbd9e4bSmacallan	*Sun\ F*)
5452dbbd9e4bSmacallan	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5453dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5454dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5455dbbd9e4bSmacallan	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5456dbbd9e4bSmacallan	  ;;
5457dbbd9e4bSmacallan	esac
5458dbbd9e4bSmacallan	;;
5459dbbd9e4bSmacallan      esac
5460dbbd9e4bSmacallan      ;;
5461dbbd9e4bSmacallan
5462dbbd9e4bSmacallan    osf3* | osf4* | osf5*)
5463dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5464dbbd9e4bSmacallan      # All OSF/1 code is PIC.
5465dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5466dbbd9e4bSmacallan      ;;
5467dbbd9e4bSmacallan
5468dbbd9e4bSmacallan    rdos*)
5469dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5470dbbd9e4bSmacallan      ;;
5471dbbd9e4bSmacallan
5472dbbd9e4bSmacallan    solaris*)
5473dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5474dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5475dbbd9e4bSmacallan      case $cc_basename in
5476dbbd9e4bSmacallan      f77* | f90* | f95*)
5477dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5478dbbd9e4bSmacallan      *)
5479dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5480dbbd9e4bSmacallan      esac
5481dbbd9e4bSmacallan      ;;
5482dbbd9e4bSmacallan
5483dbbd9e4bSmacallan    sunos4*)
5484dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5485dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5486dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5487dbbd9e4bSmacallan      ;;
5488dbbd9e4bSmacallan
5489dbbd9e4bSmacallan    sysv4 | sysv4.2uw2* | sysv4.3*)
5490dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5491dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5492dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5493dbbd9e4bSmacallan      ;;
5494dbbd9e4bSmacallan
5495dbbd9e4bSmacallan    sysv4*MP*)
5496dbbd9e4bSmacallan      if test -d /usr/nec ;then
5497dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5498dbbd9e4bSmacallan	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5499dbbd9e4bSmacallan      fi
5500dbbd9e4bSmacallan      ;;
5501dbbd9e4bSmacallan
5502dbbd9e4bSmacallan    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5503dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5504dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5505dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5506dbbd9e4bSmacallan      ;;
5507dbbd9e4bSmacallan
5508dbbd9e4bSmacallan    unicos*)
5509dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5510dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5511dbbd9e4bSmacallan      ;;
5512dbbd9e4bSmacallan
5513dbbd9e4bSmacallan    uts4*)
5514dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5515dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5516dbbd9e4bSmacallan      ;;
5517dbbd9e4bSmacallan
5518dbbd9e4bSmacallan    *)
5519dbbd9e4bSmacallan      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5520dbbd9e4bSmacallan      ;;
5521dbbd9e4bSmacallan    esac
5522dbbd9e4bSmacallan  fi
5523dbbd9e4bSmacallan])
5524dbbd9e4bSmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5525dbbd9e4bSmacallan
5526dbbd9e4bSmacallan#
5527dbbd9e4bSmacallan# Check to make sure the PIC flag actually works.
5528dbbd9e4bSmacallan#
5529dbbd9e4bSmacallanif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5530dbbd9e4bSmacallan  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5531dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5532dbbd9e4bSmacallan    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5533dbbd9e4bSmacallan    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5534dbbd9e4bSmacallan     "" | " "*) ;;
5535dbbd9e4bSmacallan     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5536dbbd9e4bSmacallan     esac],
5537dbbd9e4bSmacallan    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5538dbbd9e4bSmacallan     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5539dbbd9e4bSmacallanfi
5540dbbd9e4bSmacallancase $host_os in
5541dbbd9e4bSmacallan  # For platforms which do not support PIC, -DPIC is meaningless:
5542dbbd9e4bSmacallan  *djgpp*)
5543dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5544dbbd9e4bSmacallan    ;;
5545dbbd9e4bSmacallan  *)
5546dbbd9e4bSmacallan    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5547dbbd9e4bSmacallan    ;;
5548dbbd9e4bSmacallanesac
5549dbbd9e4bSmacallan
5550dbbd9e4bSmacallan#
5551dbbd9e4bSmacallan# Check to make sure the static flag actually works.
5552dbbd9e4bSmacallan#
5553dbbd9e4bSmacallanwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5554dbbd9e4bSmacallanAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5555dbbd9e4bSmacallan  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5556dbbd9e4bSmacallan  $lt_tmp_static_flag,
5557dbbd9e4bSmacallan  [],
5558dbbd9e4bSmacallan  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5559dbbd9e4bSmacallan])
5560dbbd9e4bSmacallan
5561dbbd9e4bSmacallan
5562dbbd9e4bSmacallan# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5563dbbd9e4bSmacallan# ------------------------------------
5564dbbd9e4bSmacallan# See if the linker supports building shared libraries.
5565dbbd9e4bSmacallanAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5566dbbd9e4bSmacallan[AC_REQUIRE([LT_AC_PROG_SED])dnl
5567dbbd9e4bSmacallanAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5568dbbd9e4bSmacallanifelse([$1],[CXX],[
5569dbbd9e4bSmacallan  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5570dbbd9e4bSmacallan  case $host_os in
5571dbbd9e4bSmacallan  aix[[4-9]]*)
5572dbbd9e4bSmacallan    # If we're using GNU nm, then we don't want the "-C" option.
5573dbbd9e4bSmacallan    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5574dbbd9e4bSmacallan    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5575dbbd9e4bSmacallan      _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'
5576dbbd9e4bSmacallan    else
5577dbbd9e4bSmacallan      _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'
5578dbbd9e4bSmacallan    fi
5579dbbd9e4bSmacallan    ;;
5580dbbd9e4bSmacallan  pw32*)
5581dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5582dbbd9e4bSmacallan  ;;
5583dbbd9e4bSmacallan  cygwin* | mingw*)
5584dbbd9e4bSmacallan    _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'
5585dbbd9e4bSmacallan  ;;
5586dbbd9e4bSmacallan  *)
5587dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5588dbbd9e4bSmacallan  ;;
5589dbbd9e4bSmacallan  esac
5590dbbd9e4bSmacallan  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5591dbbd9e4bSmacallan],[
5592dbbd9e4bSmacallan  runpath_var=
5593dbbd9e4bSmacallan  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5594dbbd9e4bSmacallan  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5595dbbd9e4bSmacallan  _LT_AC_TAGVAR(archive_cmds, $1)=
5596dbbd9e4bSmacallan  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5597dbbd9e4bSmacallan  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5598dbbd9e4bSmacallan  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5599dbbd9e4bSmacallan  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5600dbbd9e4bSmacallan  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5601dbbd9e4bSmacallan  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5602dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5603dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5604dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5605dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5606dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5607dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5608dbbd9e4bSmacallan  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5609dbbd9e4bSmacallan  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5610dbbd9e4bSmacallan  _LT_AC_TAGVAR(module_cmds, $1)=
5611dbbd9e4bSmacallan  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5612dbbd9e4bSmacallan  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5613dbbd9e4bSmacallan  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5614dbbd9e4bSmacallan  # include_expsyms should be a list of space-separated symbols to be *always*
5615dbbd9e4bSmacallan  # included in the symbol list
5616dbbd9e4bSmacallan  _LT_AC_TAGVAR(include_expsyms, $1)=
5617dbbd9e4bSmacallan  # exclude_expsyms can be an extended regexp of symbols to exclude
5618dbbd9e4bSmacallan  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5619dbbd9e4bSmacallan  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5620dbbd9e4bSmacallan  # as well as any symbol that contains `d'.
5621dbbd9e4bSmacallan  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5622dbbd9e4bSmacallan  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5623dbbd9e4bSmacallan  # platforms (ab)use it in PIC code, but their linkers get confused if
5624dbbd9e4bSmacallan  # the symbol is explicitly referenced.  Since portable code cannot
5625dbbd9e4bSmacallan  # rely on this symbol name, it's probably fine to never include it in
5626dbbd9e4bSmacallan  # preloaded symbol tables.
5627dbbd9e4bSmacallan  # Exclude shared library initialization/finalization symbols.
5628dbbd9e4bSmacallandnl Note also adjust exclude_expsyms for C++ above.
5629dbbd9e4bSmacallan  extract_expsyms_cmds=
5630dbbd9e4bSmacallan  # Just being paranoid about ensuring that cc_basename is set.
5631dbbd9e4bSmacallan  _LT_CC_BASENAME([$compiler])
5632dbbd9e4bSmacallan  case $host_os in
5633dbbd9e4bSmacallan  cygwin* | mingw* | pw32*)
5634dbbd9e4bSmacallan    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5635dbbd9e4bSmacallan    # When not using gcc, we currently assume that we are using
5636dbbd9e4bSmacallan    # Microsoft Visual C++.
5637dbbd9e4bSmacallan    if test "$GCC" != yes; then
5638dbbd9e4bSmacallan      with_gnu_ld=no
5639dbbd9e4bSmacallan    fi
5640dbbd9e4bSmacallan    ;;
5641dbbd9e4bSmacallan  interix*)
5642dbbd9e4bSmacallan    # we just hope/assume this is gcc and not c89 (= MSVC++)
5643dbbd9e4bSmacallan    with_gnu_ld=yes
5644dbbd9e4bSmacallan    ;;
5645dbbd9e4bSmacallan  openbsd*)
5646dbbd9e4bSmacallan    with_gnu_ld=no
5647dbbd9e4bSmacallan    ;;
5648dbbd9e4bSmacallan  esac
5649dbbd9e4bSmacallan
5650dbbd9e4bSmacallan  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5651dbbd9e4bSmacallan  if test "$with_gnu_ld" = yes; then
5652dbbd9e4bSmacallan    # If archive_cmds runs LD, not CC, wlarc should be empty
5653dbbd9e4bSmacallan    wlarc='${wl}'
5654dbbd9e4bSmacallan
5655dbbd9e4bSmacallan    # Set some defaults for GNU ld with shared library support. These
5656dbbd9e4bSmacallan    # are reset later if shared libraries are not supported. Putting them
5657dbbd9e4bSmacallan    # here allows them to be overridden if necessary.
5658dbbd9e4bSmacallan    runpath_var=LD_RUN_PATH
5659dbbd9e4bSmacallan    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5660dbbd9e4bSmacallan    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5661dbbd9e4bSmacallan    # ancient GNU ld didn't support --whole-archive et. al.
5662dbbd9e4bSmacallan    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5663dbbd9e4bSmacallan	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5664dbbd9e4bSmacallan      else
5665dbbd9e4bSmacallan  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5666dbbd9e4bSmacallan    fi
5667dbbd9e4bSmacallan    supports_anon_versioning=no
5668dbbd9e4bSmacallan    case `$LD -v 2>/dev/null` in
5669dbbd9e4bSmacallan      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5670dbbd9e4bSmacallan      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5671dbbd9e4bSmacallan      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5672dbbd9e4bSmacallan      *\ 2.11.*) ;; # other 2.11 versions
5673dbbd9e4bSmacallan      *) supports_anon_versioning=yes ;;
5674dbbd9e4bSmacallan    esac
5675dbbd9e4bSmacallan
5676dbbd9e4bSmacallan    # See if GNU ld supports shared libraries.
5677dbbd9e4bSmacallan    case $host_os in
5678dbbd9e4bSmacallan    aix[[3-9]]*)
5679dbbd9e4bSmacallan      # On AIX/PPC, the GNU linker is very broken
5680dbbd9e4bSmacallan      if test "$host_cpu" != ia64; then
5681dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5682dbbd9e4bSmacallan	cat <<EOF 1>&2
5683dbbd9e4bSmacallan
5684dbbd9e4bSmacallan*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5685dbbd9e4bSmacallan*** to be unable to reliably create shared libraries on AIX.
5686dbbd9e4bSmacallan*** Therefore, libtool is disabling shared libraries support.  If you
5687dbbd9e4bSmacallan*** really care for shared libraries, you may want to modify your PATH
5688dbbd9e4bSmacallan*** so that a non-GNU linker is found, and then restart.
5689dbbd9e4bSmacallan
5690dbbd9e4bSmacallanEOF
5691dbbd9e4bSmacallan      fi
5692dbbd9e4bSmacallan      ;;
5693dbbd9e4bSmacallan
5694dbbd9e4bSmacallan    amigaos*)
5695dbbd9e4bSmacallan      _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)'
5696dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5697dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5698dbbd9e4bSmacallan
5699dbbd9e4bSmacallan      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5700dbbd9e4bSmacallan      # that the semantics of dynamic libraries on AmigaOS, at least up
5701dbbd9e4bSmacallan      # to version 4, is to share data among multiple programs linked
5702dbbd9e4bSmacallan      # with the same dynamic library.  Since this doesn't match the
5703dbbd9e4bSmacallan      # behavior of shared libraries on other platforms, we can't use
5704dbbd9e4bSmacallan      # them.
5705dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5706dbbd9e4bSmacallan      ;;
5707dbbd9e4bSmacallan
5708dbbd9e4bSmacallan    beos*)
5709dbbd9e4bSmacallan      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5710dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5711dbbd9e4bSmacallan	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5712dbbd9e4bSmacallan	# support --undefined.  This deserves some investigation.  FIXME
5713dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5714dbbd9e4bSmacallan      else
5715dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5716dbbd9e4bSmacallan      fi
5717dbbd9e4bSmacallan      ;;
5718dbbd9e4bSmacallan
5719dbbd9e4bSmacallan    cygwin* | mingw* | pw32*)
5720dbbd9e4bSmacallan      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5721dbbd9e4bSmacallan      # as there is no search path for DLLs.
5722dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5723dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5724dbbd9e4bSmacallan      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5725dbbd9e4bSmacallan      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5726dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5727dbbd9e4bSmacallan
5728dbbd9e4bSmacallan      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5729dbbd9e4bSmacallan        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5730dbbd9e4bSmacallan	# If the export-symbols file already is a .def file (1st line
5731dbbd9e4bSmacallan	# is EXPORTS), use it as is; otherwise, prepend...
5732dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5733dbbd9e4bSmacallan	  cp $export_symbols $output_objdir/$soname.def;
5734dbbd9e4bSmacallan	else
5735dbbd9e4bSmacallan	  echo EXPORTS > $output_objdir/$soname.def;
5736dbbd9e4bSmacallan	  cat $export_symbols >> $output_objdir/$soname.def;
5737dbbd9e4bSmacallan	fi~
5738dbbd9e4bSmacallan	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5739dbbd9e4bSmacallan      else
5740dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5741dbbd9e4bSmacallan      fi
5742dbbd9e4bSmacallan      ;;
5743dbbd9e4bSmacallan
5744dbbd9e4bSmacallan    interix[[3-9]]*)
5745dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5746dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5747dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5748dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749dbbd9e4bSmacallan      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5750dbbd9e4bSmacallan      # Instead, shared libraries are loaded at an image base (0x10000000 by
5751dbbd9e4bSmacallan      # default) and relocated if they conflict, which is a slow very memory
5752dbbd9e4bSmacallan      # consuming and fragmenting process.  To avoid this, we pick a random,
5753dbbd9e4bSmacallan      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5754dbbd9e4bSmacallan      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5755dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5756dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5757dbbd9e4bSmacallan      ;;
5758dbbd9e4bSmacallan
5759dbbd9e4bSmacallan    gnu* | linux* | k*bsd*-gnu)
5760dbbd9e4bSmacallan      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5761dbbd9e4bSmacallan	tmp_addflag=
5762dbbd9e4bSmacallan	case $cc_basename,$host_cpu in
5763dbbd9e4bSmacallan	pgcc*)				# Portland Group C compiler
5764dbbd9e4bSmacallan	  _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'
5765dbbd9e4bSmacallan	  tmp_addflag=' $pic_flag'
5766dbbd9e4bSmacallan	  ;;
5767dbbd9e4bSmacallan	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5768dbbd9e4bSmacallan	  _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'
5769dbbd9e4bSmacallan	  tmp_addflag=' $pic_flag -Mnomain' ;;
5770dbbd9e4bSmacallan	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5771dbbd9e4bSmacallan	  tmp_addflag=' -i_dynamic' ;;
5772dbbd9e4bSmacallan	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5773dbbd9e4bSmacallan	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5774dbbd9e4bSmacallan	ifc* | ifort*)			# Intel Fortran compiler
5775dbbd9e4bSmacallan	  tmp_addflag=' -nofor_main' ;;
5776dbbd9e4bSmacallan	esac
5777dbbd9e4bSmacallan	case `$CC -V 2>&1 | sed 5q` in
5778dbbd9e4bSmacallan	*Sun\ C*)			# Sun C 5.9
5779dbbd9e4bSmacallan	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5780dbbd9e4bSmacallan	  tmp_sharedflag='-G' ;;
5781dbbd9e4bSmacallan	*Sun\ F*)			# Sun Fortran 8.3
5782dbbd9e4bSmacallan	  tmp_sharedflag='-G' ;;
5783dbbd9e4bSmacallan	*)
5784dbbd9e4bSmacallan	  tmp_sharedflag='-shared' ;;
5785dbbd9e4bSmacallan	esac
5786dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5787dbbd9e4bSmacallan
5788dbbd9e4bSmacallan	if test $supports_anon_versioning = yes; then
5789dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5790dbbd9e4bSmacallan  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5791dbbd9e4bSmacallan  $echo "local: *; };" >> $output_objdir/$libname.ver~
5792dbbd9e4bSmacallan	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5793dbbd9e4bSmacallan	fi
5794dbbd9e4bSmacallan      else
5795dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5796dbbd9e4bSmacallan      fi
5797dbbd9e4bSmacallan      ;;
5798dbbd9e4bSmacallan
5799dbbd9e4bSmacallan    netbsd*)
5800dbbd9e4bSmacallan      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5801dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5802dbbd9e4bSmacallan	wlarc=
5803dbbd9e4bSmacallan      else
5804dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5805dbbd9e4bSmacallan	_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'
5806dbbd9e4bSmacallan      fi
5807dbbd9e4bSmacallan      ;;
5808dbbd9e4bSmacallan
5809dbbd9e4bSmacallan    solaris*)
5810dbbd9e4bSmacallan      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5811dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5812dbbd9e4bSmacallan	cat <<EOF 1>&2
5813dbbd9e4bSmacallan
5814dbbd9e4bSmacallan*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5815dbbd9e4bSmacallan*** create shared libraries on Solaris systems.  Therefore, libtool
5816dbbd9e4bSmacallan*** is disabling shared libraries support.  We urge you to upgrade GNU
5817dbbd9e4bSmacallan*** binutils to release 2.9.1 or newer.  Another option is to modify
5818dbbd9e4bSmacallan*** your PATH or compiler configuration so that the native linker is
5819dbbd9e4bSmacallan*** used, and then restart.
5820dbbd9e4bSmacallan
5821dbbd9e4bSmacallanEOF
5822dbbd9e4bSmacallan      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5823dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5824dbbd9e4bSmacallan	_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'
5825dbbd9e4bSmacallan      else
5826dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5827dbbd9e4bSmacallan      fi
5828dbbd9e4bSmacallan      ;;
5829dbbd9e4bSmacallan
5830dbbd9e4bSmacallan    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5831dbbd9e4bSmacallan      case `$LD -v 2>&1` in
5832dbbd9e4bSmacallan        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5833dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5834dbbd9e4bSmacallan	cat <<_LT_EOF 1>&2
5835dbbd9e4bSmacallan
5836dbbd9e4bSmacallan*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5837dbbd9e4bSmacallan*** reliably create shared libraries on SCO systems.  Therefore, libtool
5838dbbd9e4bSmacallan*** is disabling shared libraries support.  We urge you to upgrade GNU
5839dbbd9e4bSmacallan*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5840dbbd9e4bSmacallan*** your PATH or compiler configuration so that the native linker is
5841dbbd9e4bSmacallan*** used, and then restart.
5842dbbd9e4bSmacallan
5843dbbd9e4bSmacallan_LT_EOF
5844dbbd9e4bSmacallan	;;
5845dbbd9e4bSmacallan	*)
5846dbbd9e4bSmacallan	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5847dbbd9e4bSmacallan	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5848dbbd9e4bSmacallan	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5849dbbd9e4bSmacallan	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5850dbbd9e4bSmacallan	  else
5851dbbd9e4bSmacallan	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5852dbbd9e4bSmacallan	  fi
5853dbbd9e4bSmacallan	;;
5854dbbd9e4bSmacallan      esac
5855dbbd9e4bSmacallan      ;;
5856dbbd9e4bSmacallan
5857dbbd9e4bSmacallan    sunos4*)
5858dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5859dbbd9e4bSmacallan      wlarc=
5860dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5861dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5862dbbd9e4bSmacallan      ;;
5863dbbd9e4bSmacallan
5864dbbd9e4bSmacallan    *)
5865dbbd9e4bSmacallan      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5866dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5867dbbd9e4bSmacallan	_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'
5868dbbd9e4bSmacallan      else
5869dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5870dbbd9e4bSmacallan      fi
5871dbbd9e4bSmacallan      ;;
5872dbbd9e4bSmacallan    esac
5873dbbd9e4bSmacallan
5874dbbd9e4bSmacallan    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5875dbbd9e4bSmacallan      runpath_var=
5876dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5877dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5878dbbd9e4bSmacallan      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5879dbbd9e4bSmacallan    fi
5880dbbd9e4bSmacallan  else
5881dbbd9e4bSmacallan    # PORTME fill in a description of your system's linker (not GNU ld)
5882dbbd9e4bSmacallan    case $host_os in
5883dbbd9e4bSmacallan    aix3*)
5884dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5885dbbd9e4bSmacallan      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5886dbbd9e4bSmacallan      _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'
5887dbbd9e4bSmacallan      # Note: this linker hardcodes the directories in LIBPATH if there
5888dbbd9e4bSmacallan      # are no directories specified by -L.
5889dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5890dbbd9e4bSmacallan      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5891dbbd9e4bSmacallan	# Neither direct hardcoding nor static linking is supported with a
5892dbbd9e4bSmacallan	# broken collect2.
5893dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5894dbbd9e4bSmacallan      fi
5895dbbd9e4bSmacallan      ;;
5896dbbd9e4bSmacallan
5897dbbd9e4bSmacallan    aix[[4-9]]*)
5898dbbd9e4bSmacallan      if test "$host_cpu" = ia64; then
5899dbbd9e4bSmacallan	# On IA64, the linker does run time linking by default, so we don't
5900dbbd9e4bSmacallan	# have to do anything special.
5901dbbd9e4bSmacallan	aix_use_runtimelinking=no
5902dbbd9e4bSmacallan	exp_sym_flag='-Bexport'
5903dbbd9e4bSmacallan	no_entry_flag=""
5904dbbd9e4bSmacallan      else
5905dbbd9e4bSmacallan	# If we're using GNU nm, then we don't want the "-C" option.
5906dbbd9e4bSmacallan	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5907dbbd9e4bSmacallan	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5908dbbd9e4bSmacallan	  _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'
5909dbbd9e4bSmacallan	else
5910dbbd9e4bSmacallan	  _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'
5911dbbd9e4bSmacallan	fi
5912dbbd9e4bSmacallan	aix_use_runtimelinking=no
5913dbbd9e4bSmacallan
5914dbbd9e4bSmacallan	# Test if we are trying to use run time linking or normal
5915dbbd9e4bSmacallan	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5916dbbd9e4bSmacallan	# need to do runtime linking.
5917dbbd9e4bSmacallan	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5918dbbd9e4bSmacallan	  for ld_flag in $LDFLAGS; do
5919dbbd9e4bSmacallan  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5920dbbd9e4bSmacallan  	    aix_use_runtimelinking=yes
5921dbbd9e4bSmacallan  	    break
5922dbbd9e4bSmacallan  	  fi
5923dbbd9e4bSmacallan	  done
5924dbbd9e4bSmacallan	  ;;
5925dbbd9e4bSmacallan	esac
5926dbbd9e4bSmacallan
5927dbbd9e4bSmacallan	exp_sym_flag='-bexport'
5928dbbd9e4bSmacallan	no_entry_flag='-bnoentry'
5929dbbd9e4bSmacallan      fi
5930dbbd9e4bSmacallan
5931dbbd9e4bSmacallan      # When large executables or shared objects are built, AIX ld can
5932dbbd9e4bSmacallan      # have problems creating the table of contents.  If linking a library
5933dbbd9e4bSmacallan      # or program results in "error TOC overflow" add -mminimal-toc to
5934dbbd9e4bSmacallan      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5935dbbd9e4bSmacallan      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5936dbbd9e4bSmacallan
5937dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)=''
5938dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5939dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5940dbbd9e4bSmacallan      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5941dbbd9e4bSmacallan
5942dbbd9e4bSmacallan      if test "$GCC" = yes; then
5943dbbd9e4bSmacallan	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5944dbbd9e4bSmacallan	# We only want to do this on AIX 4.2 and lower, the check
5945dbbd9e4bSmacallan	# below for broken collect2 doesn't work under 4.3+
5946dbbd9e4bSmacallan	  collect2name=`${CC} -print-prog-name=collect2`
5947dbbd9e4bSmacallan	  if test -f "$collect2name" && \
5948dbbd9e4bSmacallan  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5949dbbd9e4bSmacallan	  then
5950dbbd9e4bSmacallan  	  # We have reworked collect2
5951dbbd9e4bSmacallan  	  :
5952dbbd9e4bSmacallan	  else
5953dbbd9e4bSmacallan  	  # We have old collect2
5954dbbd9e4bSmacallan  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5955dbbd9e4bSmacallan  	  # It fails to find uninstalled libraries when the uninstalled
5956dbbd9e4bSmacallan  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5957dbbd9e4bSmacallan  	  # to unsupported forces relinking
5958dbbd9e4bSmacallan  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5959dbbd9e4bSmacallan  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5960dbbd9e4bSmacallan  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5961dbbd9e4bSmacallan	  fi
5962dbbd9e4bSmacallan	  ;;
5963dbbd9e4bSmacallan	esac
5964dbbd9e4bSmacallan	shared_flag='-shared'
5965dbbd9e4bSmacallan	if test "$aix_use_runtimelinking" = yes; then
5966dbbd9e4bSmacallan	  shared_flag="$shared_flag "'${wl}-G'
5967dbbd9e4bSmacallan	fi
5968dbbd9e4bSmacallan      else
5969dbbd9e4bSmacallan	# not using gcc
5970dbbd9e4bSmacallan	if test "$host_cpu" = ia64; then
5971dbbd9e4bSmacallan  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5972dbbd9e4bSmacallan  	# chokes on -Wl,-G. The following line is correct:
5973dbbd9e4bSmacallan	  shared_flag='-G'
5974dbbd9e4bSmacallan	else
5975dbbd9e4bSmacallan	  if test "$aix_use_runtimelinking" = yes; then
5976dbbd9e4bSmacallan	    shared_flag='${wl}-G'
5977dbbd9e4bSmacallan	  else
5978dbbd9e4bSmacallan	    shared_flag='${wl}-bM:SRE'
5979dbbd9e4bSmacallan	  fi
5980dbbd9e4bSmacallan	fi
5981dbbd9e4bSmacallan      fi
5982dbbd9e4bSmacallan
5983dbbd9e4bSmacallan      # It seems that -bexpall does not export symbols beginning with
5984dbbd9e4bSmacallan      # underscore (_), so it is better to generate a list of symbols to export.
5985dbbd9e4bSmacallan      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5986dbbd9e4bSmacallan      if test "$aix_use_runtimelinking" = yes; then
5987dbbd9e4bSmacallan	# Warning - without using the other runtime loading flags (-brtl),
5988dbbd9e4bSmacallan	# -berok will link without error, but may produce a broken library.
5989dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5990dbbd9e4bSmacallan       # Determine the default libpath from the value encoded in an empty executable.
5991dbbd9e4bSmacallan       _LT_AC_SYS_LIBPATH_AIX
5992dbbd9e4bSmacallan       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5993dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5994dbbd9e4bSmacallan       else
5995dbbd9e4bSmacallan	if test "$host_cpu" = ia64; then
5996dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5997dbbd9e4bSmacallan	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5998dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5999dbbd9e4bSmacallan	else
6000dbbd9e4bSmacallan	 # Determine the default libpath from the value encoded in an empty executable.
6001dbbd9e4bSmacallan	 _LT_AC_SYS_LIBPATH_AIX
6002dbbd9e4bSmacallan	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6003dbbd9e4bSmacallan	  # Warning - without using the other run time loading flags,
6004dbbd9e4bSmacallan	  # -berok will link without error, but may produce a broken library.
6005dbbd9e4bSmacallan	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6006dbbd9e4bSmacallan	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6007dbbd9e4bSmacallan	  # Exported symbols can be pulled into shared objects from archives
6008dbbd9e4bSmacallan	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6009dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6010dbbd9e4bSmacallan	  # This is similar to how AIX traditionally builds its shared libraries.
6011dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6012dbbd9e4bSmacallan	fi
6013dbbd9e4bSmacallan      fi
6014dbbd9e4bSmacallan      ;;
6015dbbd9e4bSmacallan
6016dbbd9e4bSmacallan    amigaos*)
6017dbbd9e4bSmacallan      _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)'
6018dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6019dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6020dbbd9e4bSmacallan      # see comment about different semantics on the GNU ld section
6021dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6022dbbd9e4bSmacallan      ;;
6023dbbd9e4bSmacallan
6024dbbd9e4bSmacallan    bsdi[[45]]*)
6025dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6026dbbd9e4bSmacallan      ;;
6027dbbd9e4bSmacallan
6028dbbd9e4bSmacallan    cygwin* | mingw* | pw32*)
6029dbbd9e4bSmacallan      # When not using gcc, we currently assume that we are using
6030dbbd9e4bSmacallan      # Microsoft Visual C++.
6031dbbd9e4bSmacallan      # hardcode_libdir_flag_spec is actually meaningless, as there is
6032dbbd9e4bSmacallan      # no search path for DLLs.
6033dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6034dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6035dbbd9e4bSmacallan      # Tell ltmain to make .lib files, not .a files.
6036dbbd9e4bSmacallan      libext=lib
6037dbbd9e4bSmacallan      # Tell ltmain to make .dll files, not .so files.
6038dbbd9e4bSmacallan      shrext_cmds=".dll"
6039dbbd9e4bSmacallan      # FIXME: Setting linknames here is a bad hack.
6040dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6041dbbd9e4bSmacallan      # The linker will automatically build a .lib file if we build a DLL.
6042dbbd9e4bSmacallan      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6043dbbd9e4bSmacallan      # FIXME: Should let the user specify the lib program.
6044dbbd9e4bSmacallan      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6045dbbd9e4bSmacallan      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6046dbbd9e4bSmacallan      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6047dbbd9e4bSmacallan      ;;
6048dbbd9e4bSmacallan
6049dbbd9e4bSmacallan    darwin* | rhapsody*)
6050dbbd9e4bSmacallan      case $host_os in
6051dbbd9e4bSmacallan        rhapsody* | darwin1.[[012]])
6052dbbd9e4bSmacallan         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6053dbbd9e4bSmacallan         ;;
6054dbbd9e4bSmacallan       *) # Darwin 1.3 on
6055dbbd9e4bSmacallan         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6056dbbd9e4bSmacallan           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6057dbbd9e4bSmacallan         else
6058dbbd9e4bSmacallan           case ${MACOSX_DEPLOYMENT_TARGET} in
6059dbbd9e4bSmacallan             10.[[012]])
6060dbbd9e4bSmacallan               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6061dbbd9e4bSmacallan               ;;
6062dbbd9e4bSmacallan             10.*)
6063dbbd9e4bSmacallan               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6064dbbd9e4bSmacallan               ;;
6065dbbd9e4bSmacallan           esac
6066dbbd9e4bSmacallan         fi
6067dbbd9e4bSmacallan         ;;
6068dbbd9e4bSmacallan      esac
6069dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6070dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6071dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6072dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6073dbbd9e4bSmacallan      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6074dbbd9e4bSmacallan      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6075dbbd9e4bSmacallan    if test "$GCC" = yes ; then
6076dbbd9e4bSmacallan    	output_verbose_link_cmd='echo'
6077dbbd9e4bSmacallan        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
6078dbbd9e4bSmacallan        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6079dbbd9e4bSmacallan        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
6080dbbd9e4bSmacallan        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6081dbbd9e4bSmacallan    else
6082dbbd9e4bSmacallan      case $cc_basename in
6083dbbd9e4bSmacallan        xlc*)
6084dbbd9e4bSmacallan         output_verbose_link_cmd='echo'
6085dbbd9e4bSmacallan         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6086dbbd9e4bSmacallan         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6087dbbd9e4bSmacallan          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6088dbbd9e4bSmacallan         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6089dbbd9e4bSmacallan          _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}'
6090dbbd9e4bSmacallan          ;;
6091dbbd9e4bSmacallan       *)
6092dbbd9e4bSmacallan         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6093dbbd9e4bSmacallan          ;;
6094dbbd9e4bSmacallan      esac
6095dbbd9e4bSmacallan    fi
6096dbbd9e4bSmacallan      ;;
6097dbbd9e4bSmacallan
6098dbbd9e4bSmacallan    dgux*)
6099dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6100dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6101dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6102dbbd9e4bSmacallan      ;;
6103dbbd9e4bSmacallan
6104dbbd9e4bSmacallan    freebsd1*)
6105dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6106dbbd9e4bSmacallan      ;;
6107dbbd9e4bSmacallan
6108dbbd9e4bSmacallan    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6109dbbd9e4bSmacallan    # support.  Future versions do this automatically, but an explicit c++rt0.o
6110dbbd9e4bSmacallan    # does not break anything, and helps significantly (at the cost of a little
6111dbbd9e4bSmacallan    # extra space).
6112dbbd9e4bSmacallan    freebsd2.2*)
6113dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6114dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6115dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6116dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6117dbbd9e4bSmacallan      ;;
6118dbbd9e4bSmacallan
6119dbbd9e4bSmacallan    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6120dbbd9e4bSmacallan    freebsd2*)
6121dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6122dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6123dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6124dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6125dbbd9e4bSmacallan      ;;
6126dbbd9e4bSmacallan
6127dbbd9e4bSmacallan    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6128dbbd9e4bSmacallan    freebsd* | dragonfly*)
6129dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6130dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6131dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6132dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6133dbbd9e4bSmacallan      ;;
6134dbbd9e4bSmacallan
6135dbbd9e4bSmacallan    hpux9*)
6136dbbd9e4bSmacallan      if test "$GCC" = yes; then
6137dbbd9e4bSmacallan	_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'
6138dbbd9e4bSmacallan      else
6139dbbd9e4bSmacallan	_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'
6140dbbd9e4bSmacallan      fi
6141dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6142dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6143dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6144dbbd9e4bSmacallan
6145dbbd9e4bSmacallan      # hardcode_minus_L: Not really in the search PATH,
6146dbbd9e4bSmacallan      # but as the default location of the library.
6147dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6148dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6149dbbd9e4bSmacallan      ;;
6150dbbd9e4bSmacallan
6151dbbd9e4bSmacallan    hpux10*)
6152dbbd9e4bSmacallan      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6153dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6154dbbd9e4bSmacallan      else
6155dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6156dbbd9e4bSmacallan      fi
6157dbbd9e4bSmacallan      if test "$with_gnu_ld" = no; then
6158dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6159dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6160dbbd9e4bSmacallan
6161dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6162dbbd9e4bSmacallan	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6163dbbd9e4bSmacallan
6164dbbd9e4bSmacallan	# hardcode_minus_L: Not really in the search PATH,
6165dbbd9e4bSmacallan	# but as the default location of the library.
6166dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6167dbbd9e4bSmacallan      fi
6168dbbd9e4bSmacallan      ;;
6169dbbd9e4bSmacallan
6170dbbd9e4bSmacallan    hpux11*)
6171dbbd9e4bSmacallan      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6172dbbd9e4bSmacallan	case $host_cpu in
6173dbbd9e4bSmacallan	hppa*64*)
6174dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6175dbbd9e4bSmacallan	  ;;
6176dbbd9e4bSmacallan	ia64*)
6177dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6178dbbd9e4bSmacallan	  ;;
6179dbbd9e4bSmacallan	*)
6180dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6181dbbd9e4bSmacallan	  ;;
6182dbbd9e4bSmacallan	esac
6183dbbd9e4bSmacallan      else
6184dbbd9e4bSmacallan	case $host_cpu in
6185dbbd9e4bSmacallan	hppa*64*)
6186dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6187dbbd9e4bSmacallan	  ;;
6188dbbd9e4bSmacallan	ia64*)
6189dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6190dbbd9e4bSmacallan	  ;;
6191dbbd9e4bSmacallan	*)
6192dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6193dbbd9e4bSmacallan	  ;;
6194dbbd9e4bSmacallan	esac
6195dbbd9e4bSmacallan      fi
6196dbbd9e4bSmacallan      if test "$with_gnu_ld" = no; then
6197dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6198dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6199dbbd9e4bSmacallan
6200dbbd9e4bSmacallan	case $host_cpu in
6201dbbd9e4bSmacallan	hppa*64*|ia64*)
6202dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6203dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6204dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6205dbbd9e4bSmacallan	  ;;
6206dbbd9e4bSmacallan	*)
6207dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6208dbbd9e4bSmacallan	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6209dbbd9e4bSmacallan
6210dbbd9e4bSmacallan	  # hardcode_minus_L: Not really in the search PATH,
6211dbbd9e4bSmacallan	  # but as the default location of the library.
6212dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6213dbbd9e4bSmacallan	  ;;
6214dbbd9e4bSmacallan	esac
6215dbbd9e4bSmacallan      fi
6216dbbd9e4bSmacallan      ;;
6217dbbd9e4bSmacallan
6218dbbd9e4bSmacallan    irix5* | irix6* | nonstopux*)
6219dbbd9e4bSmacallan      if test "$GCC" = yes; then
6220dbbd9e4bSmacallan	_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'
6221dbbd9e4bSmacallan      else
6222dbbd9e4bSmacallan	_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'
6223dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6224dbbd9e4bSmacallan      fi
6225dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6226dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6227dbbd9e4bSmacallan      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6228dbbd9e4bSmacallan      ;;
6229dbbd9e4bSmacallan
6230dbbd9e4bSmacallan    netbsd*)
6231dbbd9e4bSmacallan      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6232dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6233dbbd9e4bSmacallan      else
6234dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6235dbbd9e4bSmacallan      fi
6236dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6237dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6238dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6239dbbd9e4bSmacallan      ;;
6240dbbd9e4bSmacallan
6241dbbd9e4bSmacallan    newsos6)
6242dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6243dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6244dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6245dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6246dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6247dbbd9e4bSmacallan      ;;
6248dbbd9e4bSmacallan
6249dbbd9e4bSmacallan    openbsd*)
6250dbbd9e4bSmacallan      if test -f /usr/libexec/ld.so; then
6251dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6252dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6253dbbd9e4bSmacallan	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6254dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6255dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6256dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6257dbbd9e4bSmacallan	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6258dbbd9e4bSmacallan	else
6259dbbd9e4bSmacallan	  case $host_os in
6260dbbd9e4bSmacallan	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6261dbbd9e4bSmacallan	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6262dbbd9e4bSmacallan	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6263dbbd9e4bSmacallan	     ;;
6264dbbd9e4bSmacallan	   *)
6265dbbd9e4bSmacallan	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6266dbbd9e4bSmacallan	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6267dbbd9e4bSmacallan	     ;;
6268dbbd9e4bSmacallan	  esac
6269dbbd9e4bSmacallan        fi
6270dbbd9e4bSmacallan      else
6271dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6272dbbd9e4bSmacallan      fi
6273dbbd9e4bSmacallan      ;;
6274dbbd9e4bSmacallan
6275dbbd9e4bSmacallan    os2*)
6276dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6277dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6278dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6279dbbd9e4bSmacallan      _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'
6280dbbd9e4bSmacallan      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6281dbbd9e4bSmacallan      ;;
6282dbbd9e4bSmacallan
6283dbbd9e4bSmacallan    osf3*)
6284dbbd9e4bSmacallan      if test "$GCC" = yes; then
6285dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6286dbbd9e4bSmacallan	_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'
6287dbbd9e4bSmacallan      else
6288dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6289dbbd9e4bSmacallan	_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'
6290dbbd9e4bSmacallan      fi
6291dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6292dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6293dbbd9e4bSmacallan      ;;
6294dbbd9e4bSmacallan
6295dbbd9e4bSmacallan    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6296dbbd9e4bSmacallan      if test "$GCC" = yes; then
6297dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6298dbbd9e4bSmacallan	_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'
6299dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6300dbbd9e4bSmacallan      else
6301dbbd9e4bSmacallan	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6302dbbd9e4bSmacallan	_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'
6303dbbd9e4bSmacallan	_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~
6304dbbd9e4bSmacallan	$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'
6305dbbd9e4bSmacallan
6306dbbd9e4bSmacallan	# Both c and cxx compiler support -rpath directly
6307dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6308dbbd9e4bSmacallan      fi
6309dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6310dbbd9e4bSmacallan      ;;
6311dbbd9e4bSmacallan
6312dbbd9e4bSmacallan    solaris*)
6313dbbd9e4bSmacallan      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6314dbbd9e4bSmacallan      if test "$GCC" = yes; then
6315dbbd9e4bSmacallan	wlarc='${wl}'
6316dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6317dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6318dbbd9e4bSmacallan	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6319dbbd9e4bSmacallan      else
6320dbbd9e4bSmacallan	wlarc=''
6321dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6322dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6323dbbd9e4bSmacallan  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6324dbbd9e4bSmacallan      fi
6325dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6326dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6327dbbd9e4bSmacallan      case $host_os in
6328dbbd9e4bSmacallan      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6329dbbd9e4bSmacallan      *)
6330dbbd9e4bSmacallan	# The compiler driver will combine and reorder linker options,
6331dbbd9e4bSmacallan	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6332dbbd9e4bSmacallan	# but is careful enough not to reorder.
6333dbbd9e4bSmacallan 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6334dbbd9e4bSmacallan	if test "$GCC" = yes; then
6335dbbd9e4bSmacallan	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6336dbbd9e4bSmacallan	else
6337dbbd9e4bSmacallan	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6338dbbd9e4bSmacallan	fi
6339dbbd9e4bSmacallan	;;
6340dbbd9e4bSmacallan      esac
6341dbbd9e4bSmacallan      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6342dbbd9e4bSmacallan      ;;
6343dbbd9e4bSmacallan
6344dbbd9e4bSmacallan    sunos4*)
6345dbbd9e4bSmacallan      if test "x$host_vendor" = xsequent; then
6346dbbd9e4bSmacallan	# Use $CC to link under sequent, because it throws in some extra .o
6347dbbd9e4bSmacallan	# files that make .init and .fini sections work.
6348dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6349dbbd9e4bSmacallan      else
6350dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6351dbbd9e4bSmacallan      fi
6352dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6353dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6354dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6355dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6356dbbd9e4bSmacallan      ;;
6357dbbd9e4bSmacallan
6358dbbd9e4bSmacallan    sysv4)
6359dbbd9e4bSmacallan      case $host_vendor in
6360dbbd9e4bSmacallan	sni)
6361dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6362dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6363dbbd9e4bSmacallan	;;
6364dbbd9e4bSmacallan	siemens)
6365dbbd9e4bSmacallan	  ## LD is ld it makes a PLAMLIB
6366dbbd9e4bSmacallan	  ## CC just makes a GrossModule.
6367dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6368dbbd9e4bSmacallan	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6369dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6370dbbd9e4bSmacallan        ;;
6371dbbd9e4bSmacallan	motorola)
6372dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373dbbd9e4bSmacallan	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6374dbbd9e4bSmacallan	;;
6375dbbd9e4bSmacallan      esac
6376dbbd9e4bSmacallan      runpath_var='LD_RUN_PATH'
6377dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6378dbbd9e4bSmacallan      ;;
6379dbbd9e4bSmacallan
6380dbbd9e4bSmacallan    sysv4.3*)
6381dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6382dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6383dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6384dbbd9e4bSmacallan      ;;
6385dbbd9e4bSmacallan
6386dbbd9e4bSmacallan    sysv4*MP*)
6387dbbd9e4bSmacallan      if test -d /usr/nec; then
6388dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6389dbbd9e4bSmacallan	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6390dbbd9e4bSmacallan	runpath_var=LD_RUN_PATH
6391dbbd9e4bSmacallan	hardcode_runpath_var=yes
6392dbbd9e4bSmacallan	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6393dbbd9e4bSmacallan      fi
6394dbbd9e4bSmacallan      ;;
6395dbbd9e4bSmacallan
6396dbbd9e4bSmacallan    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6397dbbd9e4bSmacallan      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6398dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6399dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6400dbbd9e4bSmacallan      runpath_var='LD_RUN_PATH'
6401dbbd9e4bSmacallan
6402dbbd9e4bSmacallan      if test "$GCC" = yes; then
6403dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6404dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6405dbbd9e4bSmacallan      else
6406dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6407dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6408dbbd9e4bSmacallan      fi
6409dbbd9e4bSmacallan      ;;
6410dbbd9e4bSmacallan
6411dbbd9e4bSmacallan    sysv5* | sco3.2v5* | sco5v6*)
6412dbbd9e4bSmacallan      # Note: We can NOT use -z defs as we might desire, because we do not
6413dbbd9e4bSmacallan      # link with -lc, and that would cause any symbols used from libc to
6414dbbd9e4bSmacallan      # always be unresolved, which means just about no library would
6415dbbd9e4bSmacallan      # ever link correctly.  If we're not using GNU ld we use -z text
6416dbbd9e4bSmacallan      # though, which does catch some bad symbols but isn't as heavy-handed
6417dbbd9e4bSmacallan      # as -z defs.
6418dbbd9e4bSmacallan      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6419dbbd9e4bSmacallan      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6420dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6421dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6422dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6423dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6424dbbd9e4bSmacallan      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6425dbbd9e4bSmacallan      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6426dbbd9e4bSmacallan      runpath_var='LD_RUN_PATH'
6427dbbd9e4bSmacallan
6428dbbd9e4bSmacallan      if test "$GCC" = yes; then
6429dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6430dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6431dbbd9e4bSmacallan      else
6432dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6433dbbd9e4bSmacallan	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6434dbbd9e4bSmacallan      fi
6435dbbd9e4bSmacallan      ;;
6436dbbd9e4bSmacallan
6437dbbd9e4bSmacallan    uts4*)
6438dbbd9e4bSmacallan      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6439dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6440dbbd9e4bSmacallan      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6441dbbd9e4bSmacallan      ;;
6442dbbd9e4bSmacallan
6443dbbd9e4bSmacallan    *)
6444dbbd9e4bSmacallan      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6445dbbd9e4bSmacallan      ;;
6446dbbd9e4bSmacallan    esac
6447dbbd9e4bSmacallan  fi
6448dbbd9e4bSmacallan])
6449dbbd9e4bSmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6450dbbd9e4bSmacallantest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6451dbbd9e4bSmacallan
6452dbbd9e4bSmacallan#
6453dbbd9e4bSmacallan# Do we need to explicitly link libc?
6454dbbd9e4bSmacallan#
6455dbbd9e4bSmacallancase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6456dbbd9e4bSmacallanx|xyes)
6457dbbd9e4bSmacallan  # Assume -lc should be added
6458dbbd9e4bSmacallan  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6459dbbd9e4bSmacallan
6460dbbd9e4bSmacallan  if test "$enable_shared" = yes && test "$GCC" = yes; then
6461dbbd9e4bSmacallan    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6462dbbd9e4bSmacallan    *'~'*)
6463dbbd9e4bSmacallan      # FIXME: we may have to deal with multi-command sequences.
6464dbbd9e4bSmacallan      ;;
6465dbbd9e4bSmacallan    '$CC '*)
6466dbbd9e4bSmacallan      # Test whether the compiler implicitly links with -lc since on some
6467dbbd9e4bSmacallan      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6468dbbd9e4bSmacallan      # to ld, don't add -lc before -lgcc.
6469dbbd9e4bSmacallan      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6470dbbd9e4bSmacallan      $rm conftest*
6471dbbd9e4bSmacallan      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6472dbbd9e4bSmacallan
6473dbbd9e4bSmacallan      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6474dbbd9e4bSmacallan        soname=conftest
6475dbbd9e4bSmacallan        lib=conftest
6476dbbd9e4bSmacallan        libobjs=conftest.$ac_objext
6477dbbd9e4bSmacallan        deplibs=
6478dbbd9e4bSmacallan        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6479dbbd9e4bSmacallan	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6480dbbd9e4bSmacallan        compiler_flags=-v
6481dbbd9e4bSmacallan        linker_flags=-v
6482dbbd9e4bSmacallan        verstring=
6483dbbd9e4bSmacallan        output_objdir=.
6484dbbd9e4bSmacallan        libname=conftest
6485dbbd9e4bSmacallan        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6486dbbd9e4bSmacallan        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6487dbbd9e4bSmacallan        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6488dbbd9e4bSmacallan        then
6489dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6490dbbd9e4bSmacallan        else
6491dbbd9e4bSmacallan	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6492dbbd9e4bSmacallan        fi
6493dbbd9e4bSmacallan        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6494dbbd9e4bSmacallan      else
6495dbbd9e4bSmacallan        cat conftest.err 1>&5
6496dbbd9e4bSmacallan      fi
6497dbbd9e4bSmacallan      $rm conftest*
6498dbbd9e4bSmacallan      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6499dbbd9e4bSmacallan      ;;
6500dbbd9e4bSmacallan    esac
6501dbbd9e4bSmacallan  fi
6502dbbd9e4bSmacallan  ;;
6503dbbd9e4bSmacallanesac
6504dbbd9e4bSmacallan])# AC_LIBTOOL_PROG_LD_SHLIBS
6505dbbd9e4bSmacallan
6506dbbd9e4bSmacallan
6507dbbd9e4bSmacallan# _LT_AC_FILE_LTDLL_C
6508dbbd9e4bSmacallan# -------------------
6509dbbd9e4bSmacallan# Be careful that the start marker always follows a newline.
6510dbbd9e4bSmacallanAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6511dbbd9e4bSmacallan# /* ltdll.c starts here */
6512dbbd9e4bSmacallan# #define WIN32_LEAN_AND_MEAN
6513dbbd9e4bSmacallan# #include <windows.h>
6514dbbd9e4bSmacallan# #undef WIN32_LEAN_AND_MEAN
6515dbbd9e4bSmacallan# #include <stdio.h>
6516dbbd9e4bSmacallan#
6517dbbd9e4bSmacallan# #ifndef __CYGWIN__
6518dbbd9e4bSmacallan# #  ifdef __CYGWIN32__
6519dbbd9e4bSmacallan# #    define __CYGWIN__ __CYGWIN32__
6520dbbd9e4bSmacallan# #  endif
6521dbbd9e4bSmacallan# #endif
6522dbbd9e4bSmacallan#
6523dbbd9e4bSmacallan# #ifdef __cplusplus
6524dbbd9e4bSmacallan# extern "C" {
6525dbbd9e4bSmacallan# #endif
6526dbbd9e4bSmacallan# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6527dbbd9e4bSmacallan# #ifdef __cplusplus
6528dbbd9e4bSmacallan# }
6529dbbd9e4bSmacallan# #endif
6530dbbd9e4bSmacallan#
6531dbbd9e4bSmacallan# #ifdef __CYGWIN__
6532dbbd9e4bSmacallan# #include <cygwin/cygwin_dll.h>
6533dbbd9e4bSmacallan# DECLARE_CYGWIN_DLL( DllMain );
6534dbbd9e4bSmacallan# #endif
6535dbbd9e4bSmacallan# HINSTANCE __hDllInstance_base;
6536dbbd9e4bSmacallan#
6537dbbd9e4bSmacallan# BOOL APIENTRY
6538dbbd9e4bSmacallan# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6539dbbd9e4bSmacallan# {
6540dbbd9e4bSmacallan#   __hDllInstance_base = hInst;
6541dbbd9e4bSmacallan#   return TRUE;
6542dbbd9e4bSmacallan# }
6543dbbd9e4bSmacallan# /* ltdll.c ends here */
6544dbbd9e4bSmacallan])# _LT_AC_FILE_LTDLL_C
6545dbbd9e4bSmacallan
6546dbbd9e4bSmacallan
6547dbbd9e4bSmacallan# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6548dbbd9e4bSmacallan# ---------------------------------
6549dbbd9e4bSmacallanAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6550dbbd9e4bSmacallan
6551dbbd9e4bSmacallan
6552dbbd9e4bSmacallan# old names
6553dbbd9e4bSmacallanAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6554dbbd9e4bSmacallanAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6555dbbd9e4bSmacallanAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6556dbbd9e4bSmacallanAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6557dbbd9e4bSmacallanAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6558dbbd9e4bSmacallanAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6559dbbd9e4bSmacallanAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6560dbbd9e4bSmacallan
6561dbbd9e4bSmacallan# This is just to silence aclocal about the macro not being used
6562dbbd9e4bSmacallanifelse([AC_DISABLE_FAST_INSTALL])
6563dbbd9e4bSmacallan
6564dbbd9e4bSmacallanAC_DEFUN([LT_AC_PROG_GCJ],
6565dbbd9e4bSmacallan[AC_CHECK_TOOL(GCJ, gcj, no)
6566dbbd9e4bSmacallan  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6567dbbd9e4bSmacallan  AC_SUBST(GCJFLAGS)
6568dbbd9e4bSmacallan])
6569dbbd9e4bSmacallan
6570dbbd9e4bSmacallanAC_DEFUN([LT_AC_PROG_RC],
6571dbbd9e4bSmacallan[AC_CHECK_TOOL(RC, windres, no)
6572dbbd9e4bSmacallan])
6573dbbd9e4bSmacallan
6574dbbd9e4bSmacallan
6575dbbd9e4bSmacallan# Cheap backport of AS_EXECUTABLE_P and required macros
6576dbbd9e4bSmacallan# from Autoconf 2.59; we should not use $as_executable_p directly.
6577dbbd9e4bSmacallan
6578dbbd9e4bSmacallan# _AS_TEST_PREPARE
6579dbbd9e4bSmacallan# ----------------
6580dbbd9e4bSmacallanm4_ifndef([_AS_TEST_PREPARE],
6581dbbd9e4bSmacallan[m4_defun([_AS_TEST_PREPARE],
6582dbbd9e4bSmacallan[if test -x / >/dev/null 2>&1; then
6583dbbd9e4bSmacallan  as_executable_p='test -x'
6584dbbd9e4bSmacallanelse
6585dbbd9e4bSmacallan  as_executable_p='test -f'
6586dbbd9e4bSmacallanfi
6587dbbd9e4bSmacallan])])# _AS_TEST_PREPARE
6588dbbd9e4bSmacallan
6589dbbd9e4bSmacallan# AS_EXECUTABLE_P
6590dbbd9e4bSmacallan# ---------------
6591dbbd9e4bSmacallan# Check whether a file is executable.
6592dbbd9e4bSmacallanm4_ifndef([AS_EXECUTABLE_P],
6593dbbd9e4bSmacallan[m4_defun([AS_EXECUTABLE_P],
6594dbbd9e4bSmacallan[AS_REQUIRE([_AS_TEST_PREPARE])dnl
6595dbbd9e4bSmacallan$as_executable_p $1[]dnl
6596dbbd9e4bSmacallan])])# AS_EXECUTABLE_P
6597dbbd9e4bSmacallan
6598dbbd9e4bSmacallan# NOTE: This macro has been submitted for inclusion into   #
6599dbbd9e4bSmacallan#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6600dbbd9e4bSmacallan#  a released version of Autoconf we should remove this    #
6601dbbd9e4bSmacallan#  macro and use it instead.                               #
6602dbbd9e4bSmacallan# LT_AC_PROG_SED
6603dbbd9e4bSmacallan# --------------
6604dbbd9e4bSmacallan# Check for a fully-functional sed program, that truncates
6605dbbd9e4bSmacallan# as few characters as possible.  Prefer GNU sed if found.
6606dbbd9e4bSmacallanAC_DEFUN([LT_AC_PROG_SED],
6607dbbd9e4bSmacallan[AC_MSG_CHECKING([for a sed that does not truncate output])
6608dbbd9e4bSmacallanAC_CACHE_VAL(lt_cv_path_SED,
6609dbbd9e4bSmacallan[# Loop through the user's path and test for sed and gsed.
6610dbbd9e4bSmacallan# Then use that list of sed's as ones to test for truncation.
6611dbbd9e4bSmacallanas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6612dbbd9e4bSmacallanfor as_dir in $PATH
6613dbbd9e4bSmacallando
6614dbbd9e4bSmacallan  IFS=$as_save_IFS
6615dbbd9e4bSmacallan  test -z "$as_dir" && as_dir=.
6616dbbd9e4bSmacallan  for lt_ac_prog in sed gsed; do
6617dbbd9e4bSmacallan    for ac_exec_ext in '' $ac_executable_extensions; do
6618dbbd9e4bSmacallan      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6619dbbd9e4bSmacallan        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6620dbbd9e4bSmacallan      fi
6621dbbd9e4bSmacallan    done
6622dbbd9e4bSmacallan  done
6623dbbd9e4bSmacallandone
6624dbbd9e4bSmacallanIFS=$as_save_IFS
6625dbbd9e4bSmacallanlt_ac_max=0
6626dbbd9e4bSmacallanlt_ac_count=0
6627dbbd9e4bSmacallan# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6628dbbd9e4bSmacallan# along with /bin/sed that truncates output.
6629dbbd9e4bSmacallanfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6630dbbd9e4bSmacallan  test ! -f $lt_ac_sed && continue
6631dbbd9e4bSmacallan  cat /dev/null > conftest.in
6632dbbd9e4bSmacallan  lt_ac_count=0
6633dbbd9e4bSmacallan  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6634dbbd9e4bSmacallan  # Check for GNU sed and select it if it is found.
6635dbbd9e4bSmacallan  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6636dbbd9e4bSmacallan    lt_cv_path_SED=$lt_ac_sed
6637dbbd9e4bSmacallan    break
6638dbbd9e4bSmacallan  fi
6639dbbd9e4bSmacallan  while true; do
6640dbbd9e4bSmacallan    cat conftest.in conftest.in >conftest.tmp
6641dbbd9e4bSmacallan    mv conftest.tmp conftest.in
6642dbbd9e4bSmacallan    cp conftest.in conftest.nl
6643dbbd9e4bSmacallan    echo >>conftest.nl
6644dbbd9e4bSmacallan    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6645dbbd9e4bSmacallan    cmp -s conftest.out conftest.nl || break
6646dbbd9e4bSmacallan    # 10000 chars as input seems more than enough
6647dbbd9e4bSmacallan    test $lt_ac_count -gt 10 && break
6648dbbd9e4bSmacallan    lt_ac_count=`expr $lt_ac_count + 1`
6649dbbd9e4bSmacallan    if test $lt_ac_count -gt $lt_ac_max; then
6650dbbd9e4bSmacallan      lt_ac_max=$lt_ac_count
6651dbbd9e4bSmacallan      lt_cv_path_SED=$lt_ac_sed
6652dbbd9e4bSmacallan    fi
6653dbbd9e4bSmacallan  done
6654dbbd9e4bSmacallandone
6655dbbd9e4bSmacallan])
6656dbbd9e4bSmacallanSED=$lt_cv_path_SED
6657dbbd9e4bSmacallanAC_SUBST([SED])
6658dbbd9e4bSmacallanAC_MSG_RESULT([$SED])
6659dbbd9e4bSmacallan])
6660dbbd9e4bSmacallan
6661dbbd9e4bSmacallan# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6662dbbd9e4bSmacallan# 
6663dbbd9e4bSmacallan# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6664dbbd9e4bSmacallan#
6665dbbd9e4bSmacallan# This program is free software; you can redistribute it and/or modify
6666dbbd9e4bSmacallan# it under the terms of the GNU General Public License as published by
6667dbbd9e4bSmacallan# the Free Software Foundation; either version 2 of the License, or
6668dbbd9e4bSmacallan# (at your option) any later version.
6669dbbd9e4bSmacallan#
6670dbbd9e4bSmacallan# This program is distributed in the hope that it will be useful, but
6671dbbd9e4bSmacallan# WITHOUT ANY WARRANTY; without even the implied warranty of
6672dbbd9e4bSmacallan# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6673dbbd9e4bSmacallan# General Public License for more details.
6674dbbd9e4bSmacallan#
6675dbbd9e4bSmacallan# You should have received a copy of the GNU General Public License
6676dbbd9e4bSmacallan# along with this program; if not, write to the Free Software
6677dbbd9e4bSmacallan# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6678dbbd9e4bSmacallan#
6679dbbd9e4bSmacallan# As a special exception to the GNU General Public License, if you
6680dbbd9e4bSmacallan# distribute this file as part of a program that contains a
6681dbbd9e4bSmacallan# configuration script generated by Autoconf, you may include it under
6682dbbd9e4bSmacallan# the same distribution terms that you use for the rest of that program.
6683dbbd9e4bSmacallan
6684dbbd9e4bSmacallan# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6685dbbd9e4bSmacallan# ----------------------------------
6686dbbd9e4bSmacallanAC_DEFUN([PKG_PROG_PKG_CONFIG],
6687dbbd9e4bSmacallan[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6688dbbd9e4bSmacallanm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6689dbbd9e4bSmacallanAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6690dbbd9e4bSmacallanif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6691dbbd9e4bSmacallan	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6692dbbd9e4bSmacallanfi
6693dbbd9e4bSmacallanif test -n "$PKG_CONFIG"; then
6694dbbd9e4bSmacallan	_pkg_min_version=m4_default([$1], [0.9.0])
6695dbbd9e4bSmacallan	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6696dbbd9e4bSmacallan	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6697dbbd9e4bSmacallan		AC_MSG_RESULT([yes])
6698dbbd9e4bSmacallan	else
6699dbbd9e4bSmacallan		AC_MSG_RESULT([no])
6700dbbd9e4bSmacallan		PKG_CONFIG=""
6701dbbd9e4bSmacallan	fi
6702dbbd9e4bSmacallan		
6703dbbd9e4bSmacallanfi[]dnl
6704dbbd9e4bSmacallan])# PKG_PROG_PKG_CONFIG
6705dbbd9e4bSmacallan
6706dbbd9e4bSmacallan# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6707dbbd9e4bSmacallan#
6708dbbd9e4bSmacallan# Check to see whether a particular set of modules exists.  Similar
6709dbbd9e4bSmacallan# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6710dbbd9e4bSmacallan#
6711dbbd9e4bSmacallan#
6712dbbd9e4bSmacallan# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6713dbbd9e4bSmacallan# this or PKG_CHECK_MODULES is called, or make sure to call
6714dbbd9e4bSmacallan# PKG_CHECK_EXISTS manually
6715dbbd9e4bSmacallan# --------------------------------------------------------------
6716dbbd9e4bSmacallanAC_DEFUN([PKG_CHECK_EXISTS],
6717dbbd9e4bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6718dbbd9e4bSmacallanif test -n "$PKG_CONFIG" && \
6719dbbd9e4bSmacallan    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6720dbbd9e4bSmacallan  m4_ifval([$2], [$2], [:])
6721dbbd9e4bSmacallanm4_ifvaln([$3], [else
6722dbbd9e4bSmacallan  $3])dnl
6723dbbd9e4bSmacallanfi])
6724dbbd9e4bSmacallan
6725dbbd9e4bSmacallan
6726dbbd9e4bSmacallan# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6727dbbd9e4bSmacallan# ---------------------------------------------
6728dbbd9e4bSmacallanm4_define([_PKG_CONFIG],
6729dbbd9e4bSmacallan[if test -n "$$1"; then
6730dbbd9e4bSmacallan    pkg_cv_[]$1="$$1"
6731dbbd9e4bSmacallan elif test -n "$PKG_CONFIG"; then
6732dbbd9e4bSmacallan    PKG_CHECK_EXISTS([$3],
6733dbbd9e4bSmacallan                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6734dbbd9e4bSmacallan		     [pkg_failed=yes])
6735dbbd9e4bSmacallan else
6736dbbd9e4bSmacallan    pkg_failed=untried
6737dbbd9e4bSmacallanfi[]dnl
6738dbbd9e4bSmacallan])# _PKG_CONFIG
6739dbbd9e4bSmacallan
6740dbbd9e4bSmacallan# _PKG_SHORT_ERRORS_SUPPORTED
6741dbbd9e4bSmacallan# -----------------------------
6742dbbd9e4bSmacallanAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6743dbbd9e4bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6744dbbd9e4bSmacallanif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6745dbbd9e4bSmacallan        _pkg_short_errors_supported=yes
6746dbbd9e4bSmacallanelse
6747dbbd9e4bSmacallan        _pkg_short_errors_supported=no
6748dbbd9e4bSmacallanfi[]dnl
6749dbbd9e4bSmacallan])# _PKG_SHORT_ERRORS_SUPPORTED
6750dbbd9e4bSmacallan
6751dbbd9e4bSmacallan
6752dbbd9e4bSmacallan# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6753dbbd9e4bSmacallan# [ACTION-IF-NOT-FOUND])
6754dbbd9e4bSmacallan#
6755dbbd9e4bSmacallan#
6756dbbd9e4bSmacallan# Note that if there is a possibility the first call to
6757dbbd9e4bSmacallan# PKG_CHECK_MODULES might not happen, you should be sure to include an
6758dbbd9e4bSmacallan# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6759dbbd9e4bSmacallan#
6760dbbd9e4bSmacallan#
6761dbbd9e4bSmacallan# --------------------------------------------------------------
6762dbbd9e4bSmacallanAC_DEFUN([PKG_CHECK_MODULES],
6763dbbd9e4bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6764dbbd9e4bSmacallanAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6765dbbd9e4bSmacallanAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6766dbbd9e4bSmacallan
6767dbbd9e4bSmacallanpkg_failed=no
6768dbbd9e4bSmacallanAC_MSG_CHECKING([for $1])
6769dbbd9e4bSmacallan
6770dbbd9e4bSmacallan_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6771dbbd9e4bSmacallan_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6772dbbd9e4bSmacallan
6773dbbd9e4bSmacallanm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6774dbbd9e4bSmacallanand $1[]_LIBS to avoid the need to call pkg-config.
6775dbbd9e4bSmacallanSee the pkg-config man page for more details.])
6776dbbd9e4bSmacallan
6777dbbd9e4bSmacallanif test $pkg_failed = yes; then
6778dbbd9e4bSmacallan        _PKG_SHORT_ERRORS_SUPPORTED
6779dbbd9e4bSmacallan        if test $_pkg_short_errors_supported = yes; then
6780dbbd9e4bSmacallan	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
6781dbbd9e4bSmacallan        else 
6782dbbd9e4bSmacallan	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
6783dbbd9e4bSmacallan        fi
6784dbbd9e4bSmacallan	# Put the nasty error message in config.log where it belongs
6785dbbd9e4bSmacallan	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6786dbbd9e4bSmacallan
6787dbbd9e4bSmacallan	ifelse([$4], , [AC_MSG_ERROR(dnl
6788dbbd9e4bSmacallan[Package requirements ($2) were not met:
6789dbbd9e4bSmacallan
6790dbbd9e4bSmacallan$$1_PKG_ERRORS
6791dbbd9e4bSmacallan
6792dbbd9e4bSmacallanConsider adjusting the PKG_CONFIG_PATH environment variable if you
6793dbbd9e4bSmacallaninstalled software in a non-standard prefix.
6794dbbd9e4bSmacallan
6795dbbd9e4bSmacallan_PKG_TEXT
6796dbbd9e4bSmacallan])],
6797dbbd9e4bSmacallan		[AC_MSG_RESULT([no])
6798dbbd9e4bSmacallan                $4])
6799dbbd9e4bSmacallanelif test $pkg_failed = untried; then
6800dbbd9e4bSmacallan	ifelse([$4], , [AC_MSG_FAILURE(dnl
6801dbbd9e4bSmacallan[The pkg-config script could not be found or is too old.  Make sure it
6802dbbd9e4bSmacallanis in your PATH or set the PKG_CONFIG environment variable to the full
6803dbbd9e4bSmacallanpath to pkg-config.
6804dbbd9e4bSmacallan
6805dbbd9e4bSmacallan_PKG_TEXT
6806dbbd9e4bSmacallan
6807dbbd9e4bSmacallanTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
6808dbbd9e4bSmacallan		[$4])
6809dbbd9e4bSmacallanelse
6810dbbd9e4bSmacallan	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6811dbbd9e4bSmacallan	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6812dbbd9e4bSmacallan        AC_MSG_RESULT([yes])
6813dbbd9e4bSmacallan	ifelse([$3], , :, [$3])
6814dbbd9e4bSmacallanfi[]dnl
6815dbbd9e4bSmacallan])# PKG_CHECK_MODULES
6816dbbd9e4bSmacallan
68171c397cbaSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
6818dbbd9e4bSmacallandnl
6819dbbd9e4bSmacallandnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
6820dbbd9e4bSmacallandnl 
6821dbbd9e4bSmacallandnl Permission is hereby granted, free of charge, to any person obtaining a
6822dbbd9e4bSmacallandnl copy of this software and associated documentation files (the
6823dbbd9e4bSmacallandnl "Software"), to deal in the Software without restriction, including
6824dbbd9e4bSmacallandnl without limitation the rights to use, copy, modify, merge, publish,
6825dbbd9e4bSmacallandnl distribute, and/or sell copies of the Software, and to permit persons
6826dbbd9e4bSmacallandnl to whom the Software is furnished to do so, provided that the above
6827dbbd9e4bSmacallandnl copyright notice(s) and this permission notice appear in all copies of
6828dbbd9e4bSmacallandnl the Software and that both the above copyright notice(s) and this
6829dbbd9e4bSmacallandnl permission notice appear in supporting documentation.
6830dbbd9e4bSmacallandnl
6831dbbd9e4bSmacallandnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6832dbbd9e4bSmacallandnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6833dbbd9e4bSmacallandnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
6834dbbd9e4bSmacallandnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
6835dbbd9e4bSmacallandnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
6836dbbd9e4bSmacallandnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
6837dbbd9e4bSmacallandnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
6838dbbd9e4bSmacallandnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
6839dbbd9e4bSmacallandnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6840dbbd9e4bSmacallandnl
6841dbbd9e4bSmacallandnl Except as contained in this notice, the name of a copyright holder
6842dbbd9e4bSmacallandnl shall not be used in advertising or otherwise to promote the sale, use
6843dbbd9e4bSmacallandnl or other dealings in this Software without prior written authorization
6844dbbd9e4bSmacallandnl of the copyright holder.
6845dbbd9e4bSmacallan
6846dbbd9e4bSmacallan# XORG_MACROS_VERSION(required-version)
6847dbbd9e4bSmacallan# -------------------------------------
6848dbbd9e4bSmacallan# Minimum version: 1.1.0
6849dbbd9e4bSmacallan#
6850dbbd9e4bSmacallan# If you're using a macro added in Version 1.1 or newer, include this in
6851dbbd9e4bSmacallan# your configure.ac with the minimum required version, such as:
6852dbbd9e4bSmacallan# XORG_MACROS_VERSION(1.1)
6853dbbd9e4bSmacallan#
6854dbbd9e4bSmacallan# To force at least a version with this macro defined, also add:
6855dbbd9e4bSmacallan# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
6856dbbd9e4bSmacallan#
6857dbbd9e4bSmacallan#
6858dbbd9e4bSmacallan# See the "minimum version" comment for each macro you use to see what 
6859dbbd9e4bSmacallan# version you require.
6860dbbd9e4bSmacallanAC_DEFUN([XORG_MACROS_VERSION],[
6861dbbd9e4bSmacallan	[XORG_MACROS_needed_version=$1
6862dbbd9e4bSmacallan	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
6863dbbd9e4bSmacallan	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6864dbbd9e4bSmacallan	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
68651c397cbaSmrg	[XORG_MACROS_version=1.2.1
6866dbbd9e4bSmacallan	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
6867dbbd9e4bSmacallan	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6868dbbd9e4bSmacallan	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
6869dbbd9e4bSmacallan		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
6870dbbd9e4bSmacallan	fi
6871dbbd9e4bSmacallan	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
6872dbbd9e4bSmacallan		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
6873dbbd9e4bSmacallan	fi
6874dbbd9e4bSmacallan	AC_MSG_RESULT([yes, $XORG_MACROS_version])
6875dbbd9e4bSmacallan]) # XORG_MACROS_VERSION
6876dbbd9e4bSmacallan
6877dbbd9e4bSmacallan# XORG_PROG_RAWCPP()
6878dbbd9e4bSmacallan# ------------------
6879dbbd9e4bSmacallan# Minimum version: 1.0.0
6880dbbd9e4bSmacallan#
6881dbbd9e4bSmacallan# Find cpp program and necessary flags for use in pre-processing text files
6882dbbd9e4bSmacallan# such as man pages and config files
6883dbbd9e4bSmacallanAC_DEFUN([XORG_PROG_RAWCPP],[
6884dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CPP])
6885dbbd9e4bSmacallanAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
6886dbbd9e4bSmacallan   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
6887dbbd9e4bSmacallan
6888dbbd9e4bSmacallan# Check for flag to avoid builtin definitions - assumes unix is predefined,
6889dbbd9e4bSmacallan# which is not the best choice for supporting other OS'es, but covers most
6890dbbd9e4bSmacallan# of the ones we need for now.
6891dbbd9e4bSmacallanAC_MSG_CHECKING([if $RAWCPP requires -undef])
6892dbbd9e4bSmacallanAC_LANG_CONFTEST([Does cpp redefine unix ?])
6893dbbd9e4bSmacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6894dbbd9e4bSmacallan	AC_MSG_RESULT([no])
6895dbbd9e4bSmacallanelse
6896dbbd9e4bSmacallan	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6897dbbd9e4bSmacallan		RAWCPPFLAGS=-undef
6898dbbd9e4bSmacallan		AC_MSG_RESULT([yes])
68991c397cbaSmrg	# under Cygwin unix is still defined even with -undef
69001c397cbaSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
69011c397cbaSmrg		RAWCPPFLAGS="-undef -ansi"
69021c397cbaSmrg		AC_MSG_RESULT([yes, with -ansi])
6903dbbd9e4bSmacallan	else
6904dbbd9e4bSmacallan		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
6905dbbd9e4bSmacallan	fi
6906dbbd9e4bSmacallanfi
6907dbbd9e4bSmacallanrm -f conftest.$ac_ext
6908dbbd9e4bSmacallan
6909dbbd9e4bSmacallanAC_MSG_CHECKING([if $RAWCPP requires -traditional])
6910dbbd9e4bSmacallanAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
6911dbbd9e4bSmacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
6912dbbd9e4bSmacallan	AC_MSG_RESULT([no])
6913dbbd9e4bSmacallanelse
6914dbbd9e4bSmacallan	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
6915dbbd9e4bSmacallan		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
6916dbbd9e4bSmacallan		AC_MSG_RESULT([yes])
6917dbbd9e4bSmacallan	else
6918dbbd9e4bSmacallan		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
6919dbbd9e4bSmacallan	fi
6920dbbd9e4bSmacallanfi
6921dbbd9e4bSmacallanrm -f conftest.$ac_ext
6922dbbd9e4bSmacallanAC_SUBST(RAWCPPFLAGS)
6923dbbd9e4bSmacallan]) # XORG_PROG_RAWCPP
6924dbbd9e4bSmacallan
6925dbbd9e4bSmacallan# XORG_MANPAGE_SECTIONS()
6926dbbd9e4bSmacallan# -----------------------
6927dbbd9e4bSmacallan# Minimum version: 1.0.0
6928dbbd9e4bSmacallan#
6929dbbd9e4bSmacallan# Determine which sections man pages go in for the different man page types
6930dbbd9e4bSmacallan# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
6931dbbd9e4bSmacallan# Not sure if there's any better way than just hardcoding by OS name.
6932dbbd9e4bSmacallan# Override default settings by setting environment variables
6933dbbd9e4bSmacallan
6934dbbd9e4bSmacallanAC_DEFUN([XORG_MANPAGE_SECTIONS],[
6935dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_HOST])
6936dbbd9e4bSmacallan
6937dbbd9e4bSmacallanif test x$APP_MAN_SUFFIX = x    ; then
6938dbbd9e4bSmacallan    APP_MAN_SUFFIX=1
6939dbbd9e4bSmacallanfi
6940dbbd9e4bSmacallanif test x$APP_MAN_DIR = x    ; then
6941dbbd9e4bSmacallan    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
6942dbbd9e4bSmacallanfi
6943dbbd9e4bSmacallan
6944dbbd9e4bSmacallanif test x$LIB_MAN_SUFFIX = x    ; then
6945dbbd9e4bSmacallan    LIB_MAN_SUFFIX=3
6946dbbd9e4bSmacallanfi
6947dbbd9e4bSmacallanif test x$LIB_MAN_DIR = x    ; then
6948dbbd9e4bSmacallan    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
6949dbbd9e4bSmacallanfi
6950dbbd9e4bSmacallan
6951dbbd9e4bSmacallanif test x$FILE_MAN_SUFFIX = x    ; then
6952dbbd9e4bSmacallan    case $host_os in
6953dbbd9e4bSmacallan	solaris*)	FILE_MAN_SUFFIX=4  ;;
6954dbbd9e4bSmacallan	*)		FILE_MAN_SUFFIX=5  ;;
6955dbbd9e4bSmacallan    esac
6956dbbd9e4bSmacallanfi
6957dbbd9e4bSmacallanif test x$FILE_MAN_DIR = x    ; then
6958dbbd9e4bSmacallan    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
6959dbbd9e4bSmacallanfi
6960dbbd9e4bSmacallan
6961dbbd9e4bSmacallanif test x$MISC_MAN_SUFFIX = x    ; then
6962dbbd9e4bSmacallan    case $host_os in
6963dbbd9e4bSmacallan	solaris*)	MISC_MAN_SUFFIX=5  ;;
6964dbbd9e4bSmacallan	*)		MISC_MAN_SUFFIX=7  ;;
6965dbbd9e4bSmacallan    esac
6966dbbd9e4bSmacallanfi
6967dbbd9e4bSmacallanif test x$MISC_MAN_DIR = x    ; then
6968dbbd9e4bSmacallan    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
6969dbbd9e4bSmacallanfi
6970dbbd9e4bSmacallan
6971dbbd9e4bSmacallanif test x$DRIVER_MAN_SUFFIX = x    ; then
6972dbbd9e4bSmacallan    case $host_os in
6973dbbd9e4bSmacallan	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
6974dbbd9e4bSmacallan	*)		DRIVER_MAN_SUFFIX=4  ;;
6975dbbd9e4bSmacallan    esac
6976dbbd9e4bSmacallanfi
6977dbbd9e4bSmacallanif test x$DRIVER_MAN_DIR = x    ; then
6978dbbd9e4bSmacallan    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
6979dbbd9e4bSmacallanfi
6980dbbd9e4bSmacallan
6981dbbd9e4bSmacallanif test x$ADMIN_MAN_SUFFIX = x    ; then
6982dbbd9e4bSmacallan    case $host_os in
6983dbbd9e4bSmacallan	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
6984dbbd9e4bSmacallan	*)		ADMIN_MAN_SUFFIX=8  ;;
6985dbbd9e4bSmacallan    esac
6986dbbd9e4bSmacallanfi
6987dbbd9e4bSmacallanif test x$ADMIN_MAN_DIR = x    ; then
6988dbbd9e4bSmacallan    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
6989dbbd9e4bSmacallanfi
6990dbbd9e4bSmacallan
6991dbbd9e4bSmacallan
6992dbbd9e4bSmacallanAC_SUBST([APP_MAN_SUFFIX])
6993dbbd9e4bSmacallanAC_SUBST([LIB_MAN_SUFFIX])
6994dbbd9e4bSmacallanAC_SUBST([FILE_MAN_SUFFIX])
6995dbbd9e4bSmacallanAC_SUBST([MISC_MAN_SUFFIX])
6996dbbd9e4bSmacallanAC_SUBST([DRIVER_MAN_SUFFIX])
6997dbbd9e4bSmacallanAC_SUBST([ADMIN_MAN_SUFFIX])
6998dbbd9e4bSmacallanAC_SUBST([APP_MAN_DIR])
6999dbbd9e4bSmacallanAC_SUBST([LIB_MAN_DIR])
7000dbbd9e4bSmacallanAC_SUBST([FILE_MAN_DIR])
7001dbbd9e4bSmacallanAC_SUBST([MISC_MAN_DIR])
7002dbbd9e4bSmacallanAC_SUBST([DRIVER_MAN_DIR])
7003dbbd9e4bSmacallanAC_SUBST([ADMIN_MAN_DIR])
7004dbbd9e4bSmacallan]) # XORG_MANPAGE_SECTIONS
7005dbbd9e4bSmacallan
7006dbbd9e4bSmacallan# XORG_CHECK_LINUXDOC
7007dbbd9e4bSmacallan# -------------------
7008dbbd9e4bSmacallan# Minimum version: 1.0.0
7009dbbd9e4bSmacallan#
7010dbbd9e4bSmacallan# Defines the variable MAKE_TEXT if the necessary tools and
7011dbbd9e4bSmacallan# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
7012dbbd9e4bSmacallan# Whether or not the necessary tools and files are found can be checked
7013dbbd9e4bSmacallan# with the AM_CONDITIONAL "BUILD_LINUXDOC"
7014dbbd9e4bSmacallanAC_DEFUN([XORG_CHECK_LINUXDOC],[
70151c397cbaSmrgif test x$XORG_SGML_PATH = x ; then
70161c397cbaSmrg    XORG_SGML_PATH=$prefix/share/sgml
70171c397cbaSmrgfi
7018dbbd9e4bSmacallanHAVE_DEFS_ENT=
7019dbbd9e4bSmacallan
7020dbbd9e4bSmacallanif test x"$cross_compiling" = x"yes" ; then
7021dbbd9e4bSmacallan  HAVE_DEFS_ENT=no
7022dbbd9e4bSmacallanelse
7023dbbd9e4bSmacallan  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7024dbbd9e4bSmacallanfi
7025dbbd9e4bSmacallan
7026dbbd9e4bSmacallanAC_PATH_PROG(LINUXDOC, linuxdoc)
7027dbbd9e4bSmacallanAC_PATH_PROG(PS2PDF, ps2pdf)
7028dbbd9e4bSmacallan
7029dbbd9e4bSmacallanAC_MSG_CHECKING([Whether to build documentation])
7030dbbd9e4bSmacallan
7031dbbd9e4bSmacallanif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
7032dbbd9e4bSmacallan   BUILDDOC=yes
7033dbbd9e4bSmacallanelse
7034dbbd9e4bSmacallan   BUILDDOC=no
7035dbbd9e4bSmacallanfi
7036dbbd9e4bSmacallan
7037dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
7038dbbd9e4bSmacallan
7039dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDDOC])
7040dbbd9e4bSmacallan
7041dbbd9e4bSmacallanAC_MSG_CHECKING([Whether to build pdf documentation])
7042dbbd9e4bSmacallan
7043dbbd9e4bSmacallanif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
7044dbbd9e4bSmacallan   BUILDPDFDOC=yes
7045dbbd9e4bSmacallanelse
7046dbbd9e4bSmacallan   BUILDPDFDOC=no
7047dbbd9e4bSmacallanfi
7048dbbd9e4bSmacallan
7049dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7050dbbd9e4bSmacallan
7051dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDPDFDOC])
7052dbbd9e4bSmacallan
7053dbbd9e4bSmacallanMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
7054dbbd9e4bSmacallanMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
7055dbbd9e4bSmacallanMAKE_PDF="$PS2PDF"
7056dbbd9e4bSmacallanMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
7057dbbd9e4bSmacallan
7058dbbd9e4bSmacallanAC_SUBST(MAKE_TEXT)
7059dbbd9e4bSmacallanAC_SUBST(MAKE_PS)
7060dbbd9e4bSmacallanAC_SUBST(MAKE_PDF)
7061dbbd9e4bSmacallanAC_SUBST(MAKE_HTML)
7062dbbd9e4bSmacallan]) # XORG_CHECK_LINUXDOC
7063dbbd9e4bSmacallan
7064dbbd9e4bSmacallan# XORG_CHECK_DOCBOOK
7065dbbd9e4bSmacallan# -------------------
7066dbbd9e4bSmacallan# Minimum version: 1.0.0
7067dbbd9e4bSmacallan#
7068dbbd9e4bSmacallan# Checks for the ability to build output formats from SGML DocBook source.
7069dbbd9e4bSmacallan# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
7070dbbd9e4bSmacallan# indicates whether the necessary tools and files are found and, if set,
7071dbbd9e4bSmacallan# $(MAKE_XXX) blah.sgml will produce blah.xxx.
7072dbbd9e4bSmacallanAC_DEFUN([XORG_CHECK_DOCBOOK],[
70731c397cbaSmrgif test x$XORG_SGML_PATH = x ; then
70741c397cbaSmrg    XORG_SGML_PATH=$prefix/share/sgml
70751c397cbaSmrgfi
7076dbbd9e4bSmacallanHAVE_DEFS_ENT=
7077dbbd9e4bSmacallanBUILDTXTDOC=no
7078dbbd9e4bSmacallanBUILDPDFDOC=no
7079dbbd9e4bSmacallanBUILDPSDOC=no
7080dbbd9e4bSmacallanBUILDHTMLDOC=no
7081dbbd9e4bSmacallan
7082dbbd9e4bSmacallanAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7083dbbd9e4bSmacallan
7084dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKPS, docbook2ps)
7085dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
7086dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKHTML, docbook2html)
7087dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
7088dbbd9e4bSmacallan
7089dbbd9e4bSmacallanAC_MSG_CHECKING([Whether to build text documentation])
7090dbbd9e4bSmacallanif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
7091dbbd9e4bSmacallan   test x$BUILD_TXTDOC != xno; then
7092dbbd9e4bSmacallan	BUILDTXTDOC=yes
7093dbbd9e4bSmacallanfi
7094dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
7095dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDTXTDOC])
7096dbbd9e4bSmacallan
7097dbbd9e4bSmacallanAC_MSG_CHECKING([Whether to build PDF documentation])
7098dbbd9e4bSmacallanif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
7099dbbd9e4bSmacallan   test x$BUILD_PDFDOC != xno; then
7100dbbd9e4bSmacallan	BUILDPDFDOC=yes
7101dbbd9e4bSmacallanfi
7102dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7103dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDPDFDOC])
7104dbbd9e4bSmacallan
7105dbbd9e4bSmacallanAC_MSG_CHECKING([Whether to build PostScript documentation])
7106dbbd9e4bSmacallanif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
7107dbbd9e4bSmacallan   test x$BUILD_PSDOC != xno; then
7108dbbd9e4bSmacallan	BUILDPSDOC=yes
7109dbbd9e4bSmacallanfi
7110dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
7111dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDPSDOC])
7112dbbd9e4bSmacallan
7113dbbd9e4bSmacallanAC_MSG_CHECKING([Whether to build HTML documentation])
7114dbbd9e4bSmacallanif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
7115dbbd9e4bSmacallan   test x$BUILD_HTMLDOC != xno; then
7116dbbd9e4bSmacallan	BUILDHTMLDOC=yes
7117dbbd9e4bSmacallanfi
7118dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
7119dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDHTMLDOC])
7120dbbd9e4bSmacallan
7121dbbd9e4bSmacallanMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
7122dbbd9e4bSmacallanMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
7123dbbd9e4bSmacallanMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
7124dbbd9e4bSmacallanMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
7125dbbd9e4bSmacallan
7126dbbd9e4bSmacallanAC_SUBST(MAKE_TEXT)
7127dbbd9e4bSmacallanAC_SUBST(MAKE_PS)
7128dbbd9e4bSmacallanAC_SUBST(MAKE_PDF)
7129dbbd9e4bSmacallanAC_SUBST(MAKE_HTML)
7130dbbd9e4bSmacallan]) # XORG_CHECK_DOCBOOK
7131dbbd9e4bSmacallan
7132dbbd9e4bSmacallan# XORG_CHECK_MALLOC_ZERO
7133dbbd9e4bSmacallan# ----------------------
7134dbbd9e4bSmacallan# Minimum version: 1.0.0
7135dbbd9e4bSmacallan#
7136dbbd9e4bSmacallan# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
7137dbbd9e4bSmacallan# malloc(0) returns NULL.  Packages should add one of these cflags to
7138dbbd9e4bSmacallan# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
7139dbbd9e4bSmacallanAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
7140dbbd9e4bSmacallanAC_ARG_ENABLE(malloc0returnsnull,
7141dbbd9e4bSmacallan	AC_HELP_STRING([--enable-malloc0returnsnull],
7142dbbd9e4bSmacallan		       [malloc(0) returns NULL (default: auto)]),
7143dbbd9e4bSmacallan	[MALLOC_ZERO_RETURNS_NULL=$enableval],
7144dbbd9e4bSmacallan	[MALLOC_ZERO_RETURNS_NULL=auto])
7145dbbd9e4bSmacallan
7146dbbd9e4bSmacallanAC_MSG_CHECKING([whether malloc(0) returns NULL])
7147dbbd9e4bSmacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
7148dbbd9e4bSmacallan	AC_RUN_IFELSE([
7149dbbd9e4bSmacallanchar *malloc();
7150dbbd9e4bSmacallanchar *realloc();
7151dbbd9e4bSmacallanchar *calloc();
7152dbbd9e4bSmacallanmain() {
7153dbbd9e4bSmacallan    char *m0, *r0, *c0, *p;
7154dbbd9e4bSmacallan    m0 = malloc(0);
7155dbbd9e4bSmacallan    p = malloc(10);
7156dbbd9e4bSmacallan    r0 = realloc(p,0);
7157dbbd9e4bSmacallan    c0 = calloc(0);
7158dbbd9e4bSmacallan    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
7159dbbd9e4bSmacallan}],
7160dbbd9e4bSmacallan		[MALLOC_ZERO_RETURNS_NULL=yes],
7161dbbd9e4bSmacallan		[MALLOC_ZERO_RETURNS_NULL=no])
7162dbbd9e4bSmacallanfi
7163dbbd9e4bSmacallanAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
7164dbbd9e4bSmacallan
7165dbbd9e4bSmacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
7166dbbd9e4bSmacallan	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
7167dbbd9e4bSmacallan	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
7168dbbd9e4bSmacallan	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
7169dbbd9e4bSmacallanelse
7170dbbd9e4bSmacallan	MALLOC_ZERO_CFLAGS=""
7171dbbd9e4bSmacallan	XMALLOC_ZERO_CFLAGS=""
7172dbbd9e4bSmacallan	XTMALLOC_ZERO_CFLAGS=""
7173dbbd9e4bSmacallanfi
7174dbbd9e4bSmacallan
7175dbbd9e4bSmacallanAC_SUBST([MALLOC_ZERO_CFLAGS])
7176dbbd9e4bSmacallanAC_SUBST([XMALLOC_ZERO_CFLAGS])
7177dbbd9e4bSmacallanAC_SUBST([XTMALLOC_ZERO_CFLAGS])
7178dbbd9e4bSmacallan]) # XORG_CHECK_MALLOC_ZERO
7179dbbd9e4bSmacallan
7180dbbd9e4bSmacallan# XORG_WITH_LINT()
7181dbbd9e4bSmacallan# ----------------
7182dbbd9e4bSmacallan# Minimum version: 1.1.0
7183dbbd9e4bSmacallan#
7184dbbd9e4bSmacallan# Sets up flags for source checkers such as lint and sparse if --with-lint
7185dbbd9e4bSmacallan# is specified.   (Use --with-lint=sparse for sparse.)
7186dbbd9e4bSmacallan# Sets $LINT to name of source checker passed with --with-lint (default: lint)
7187dbbd9e4bSmacallan# Sets $LINT_FLAGS to flags to pass to source checker
7188dbbd9e4bSmacallan# Sets LINT automake conditional if enabled (default: disabled)
7189dbbd9e4bSmacallan#
7190dbbd9e4bSmacallanAC_DEFUN([XORG_WITH_LINT],[
7191dbbd9e4bSmacallan
7192dbbd9e4bSmacallan# Allow checking code with lint, sparse, etc.
7193dbbd9e4bSmacallanAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
7194dbbd9e4bSmacallan		[Use a lint-style source code checker (default: disabled)])],
7195dbbd9e4bSmacallan		[use_lint=$withval], [use_lint=no])
7196dbbd9e4bSmacallanif test "x$use_lint" = "xyes" ; then
7197dbbd9e4bSmacallan	LINT="lint"
7198dbbd9e4bSmacallanelse
7199dbbd9e4bSmacallan	LINT="$use_lint"
7200dbbd9e4bSmacallanfi
7201dbbd9e4bSmacallanif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
7202dbbd9e4bSmacallan    case $LINT in
7203dbbd9e4bSmacallan	lint|*/lint)
7204dbbd9e4bSmacallan	    case $host_os in
7205dbbd9e4bSmacallan		solaris*)
7206dbbd9e4bSmacallan			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
7207dbbd9e4bSmacallan			;;
7208dbbd9e4bSmacallan	    esac
7209dbbd9e4bSmacallan	    ;;
7210dbbd9e4bSmacallan    esac
7211dbbd9e4bSmacallanfi
7212dbbd9e4bSmacallan
7213dbbd9e4bSmacallanAC_SUBST(LINT)
7214dbbd9e4bSmacallanAC_SUBST(LINT_FLAGS)
7215dbbd9e4bSmacallanAM_CONDITIONAL(LINT, [test x$LINT != xno])
7216dbbd9e4bSmacallan
7217dbbd9e4bSmacallan]) # XORG_WITH_LINT
7218dbbd9e4bSmacallan
7219dbbd9e4bSmacallan# XORG_LINT_LIBRARY(LIBNAME)
7220dbbd9e4bSmacallan# --------------------------
7221dbbd9e4bSmacallan# Minimum version: 1.1.0
7222dbbd9e4bSmacallan#
7223dbbd9e4bSmacallan# Sets up flags for building lint libraries for checking programs that call
7224dbbd9e4bSmacallan# functions in the library.
7225dbbd9e4bSmacallan# Disabled by default, enable with --enable-lint-library
7226dbbd9e4bSmacallan# Sets: 
7227dbbd9e4bSmacallan#	@LINTLIB@		- name of lint library file to make
7228dbbd9e4bSmacallan#	MAKE_LINT_LIB		- automake conditional
7229dbbd9e4bSmacallan#
7230dbbd9e4bSmacallan
7231dbbd9e4bSmacallanAC_DEFUN([XORG_LINT_LIBRARY],[
7232dbbd9e4bSmacallanAC_REQUIRE([XORG_WITH_LINT])
7233dbbd9e4bSmacallan# Build lint "library" for more indepth checks of programs calling this library
7234dbbd9e4bSmacallanAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
7235dbbd9e4bSmacallan	[Create lint library (default: disabled)])],
7236dbbd9e4bSmacallan	[make_lint_lib=$enableval], [make_lint_lib=no])
7237dbbd9e4bSmacallanif test "x$make_lint_lib" != "xno" ; then
7238dbbd9e4bSmacallan	if test "x$LINT" = "xno" ; then
7239dbbd9e4bSmacallan		AC_MSG_ERROR([Cannot make lint library without --with-lint])
7240dbbd9e4bSmacallan	fi
7241dbbd9e4bSmacallan	if test "x$make_lint_lib" = "xyes" ; then
7242dbbd9e4bSmacallan		LINTLIB=llib-l$1.ln
7243dbbd9e4bSmacallan	else
7244dbbd9e4bSmacallan		LINTLIB=$make_lint_lib
7245dbbd9e4bSmacallan	fi
7246dbbd9e4bSmacallanfi
7247dbbd9e4bSmacallanAC_SUBST(LINTLIB)
7248dbbd9e4bSmacallanAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
7249dbbd9e4bSmacallan
7250dbbd9e4bSmacallan]) # XORG_LINT_LIBRARY
7251dbbd9e4bSmacallan
72521c397cbaSmrg# XORG_CWARNFLAGS
72531c397cbaSmrg# ---------------
72541c397cbaSmrg# Minimum version: 1.2.0
72551c397cbaSmrg#
72561c397cbaSmrg# Defines CWARNFLAGS to enable C compiler warnings.
72571c397cbaSmrg#
72581c397cbaSmrgAC_DEFUN([XORG_CWARNFLAGS], [
72591c397cbaSmrgAC_REQUIRE([AC_PROG_CC])
72601c397cbaSmrgif  test "x$GCC" = xyes ; then
72611c397cbaSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
72621c397cbaSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
72631c397cbaSmrg-Wbad-function-cast"
72641c397cbaSmrg    case `gcc -dumpversion` in
72651c397cbaSmrg    3.4.* | 4.*)
72661c397cbaSmrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
72671c397cbaSmrg	;;
72681c397cbaSmrg    esac
72691c397cbaSmrgelse
72701c397cbaSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
72711c397cbaSmrg    if test "x$SUNCC" = "xyes"; then
72721c397cbaSmrg	CWARNFLAGS="-v"
72731c397cbaSmrg    fi
72741c397cbaSmrgfi
72751c397cbaSmrgAC_SUBST(CWARNFLAGS)
72761c397cbaSmrg]) # XORG_CWARNFLAGS
7277dbbd9e4bSmacallandnl Copyright 2005 Red Hat, Inc
7278dbbd9e4bSmacallandnl
7279dbbd9e4bSmacallandnl Permission to use, copy, modify, distribute, and sell this software and its
7280dbbd9e4bSmacallandnl documentation for any purpose is hereby granted without fee, provided that
7281dbbd9e4bSmacallandnl the above copyright notice appear in all copies and that both that
7282dbbd9e4bSmacallandnl copyright notice and this permission notice appear in supporting
7283dbbd9e4bSmacallandnl documentation.
7284dbbd9e4bSmacallandnl
7285dbbd9e4bSmacallandnl The above copyright notice and this permission notice shall be included
7286dbbd9e4bSmacallandnl in all copies or substantial portions of the Software.
7287dbbd9e4bSmacallandnl
7288dbbd9e4bSmacallandnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7289dbbd9e4bSmacallandnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7290dbbd9e4bSmacallandnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7291dbbd9e4bSmacallandnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
7292dbbd9e4bSmacallandnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
7293dbbd9e4bSmacallandnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7294dbbd9e4bSmacallandnl OTHER DEALINGS IN THE SOFTWARE.
7295dbbd9e4bSmacallandnl
7296dbbd9e4bSmacallandnl Except as contained in this notice, the name of the copyright holders shall
7297dbbd9e4bSmacallandnl not be used in advertising or otherwise to promote the sale, use or
7298dbbd9e4bSmacallandnl other dealings in this Software without prior written authorization
7299dbbd9e4bSmacallandnl from the copyright holders.
7300dbbd9e4bSmacallandnl
7301dbbd9e4bSmacallan
7302dbbd9e4bSmacallan# XORG_RELEASE_VERSION
7303dbbd9e4bSmacallan# --------------------
7304dbbd9e4bSmacallan# Adds --with/without-release-string and changes the PACKAGE and
7305dbbd9e4bSmacallan# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
7306dbbd9e4bSmacallan# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
7307dbbd9e4bSmacallan# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
7308dbbd9e4bSmacallan 
7309dbbd9e4bSmacallanAC_DEFUN([XORG_RELEASE_VERSION],[
7310dbbd9e4bSmacallan	AC_ARG_WITH(release-version,
7311dbbd9e4bSmacallan			AC_HELP_STRING([--with-release-version=STRING],
7312dbbd9e4bSmacallan				[Use release version string in package name]),
7313dbbd9e4bSmacallan			[RELEASE_VERSION="$withval"],
7314dbbd9e4bSmacallan			[RELEASE_VERSION=""])
7315dbbd9e4bSmacallan	if test "x$RELEASE_VERSION" != "x"; then
7316dbbd9e4bSmacallan		PACKAGE="$PACKAGE-$RELEASE_VERSION"
7317dbbd9e4bSmacallan		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
7318dbbd9e4bSmacallan		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
7319dbbd9e4bSmacallan	fi
7320dbbd9e4bSmacallan	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
7321dbbd9e4bSmacallan		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
7322dbbd9e4bSmacallan		[Major version of this package])
7323dbbd9e4bSmacallan	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
7324dbbd9e4bSmacallan	if test "x$PVM" = "x"; then
7325dbbd9e4bSmacallan		PVM="0"
7326dbbd9e4bSmacallan	fi
7327dbbd9e4bSmacallan	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
7328dbbd9e4bSmacallan		[$PVM],
7329dbbd9e4bSmacallan		[Minor version of this package])
7330dbbd9e4bSmacallan	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
7331dbbd9e4bSmacallan	if test "x$PVP" = "x"; then
7332dbbd9e4bSmacallan		PVP="0"
7333dbbd9e4bSmacallan	fi
7334dbbd9e4bSmacallan	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
7335dbbd9e4bSmacallan		[$PVP],
7336dbbd9e4bSmacallan		[Patch version of this package])
7337dbbd9e4bSmacallan])
7338dbbd9e4bSmacallan
73391c397cbaSmrg# XORG_CHANGELOG()
73401c397cbaSmrg# ----------------
73411c397cbaSmrg# Minimum version: 1.2.0
73421c397cbaSmrg#
73431c397cbaSmrg# Defines the variable CHANGELOG_CMD as the command to generate
73441c397cbaSmrg# ChangeLog from git.
73451c397cbaSmrg#
73461c397cbaSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
73471c397cbaSmrg#
73481c397cbaSmrgAC_DEFUN([XORG_CHANGELOG], [
73491c397cbaSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
73501c397cbaSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
73511c397cbaSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
73521c397cbaSmrgAC_SUBST([CHANGELOG_CMD])
73531c397cbaSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
73541c397cbaSmrg]) # XORG_CHANGELOG
73551c397cbaSmrg
73561c397cbaSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
7357dbbd9e4bSmacallan#
7358dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7359dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7360dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7361dbbd9e4bSmacallan
7362dbbd9e4bSmacallan# AM_AUTOMAKE_VERSION(VERSION)
7363dbbd9e4bSmacallan# ----------------------------
7364dbbd9e4bSmacallan# Automake X.Y traces this macro to ensure aclocal.m4 has been
7365dbbd9e4bSmacallan# generated from the m4 files accompanying Automake X.Y.
7366dbbd9e4bSmacallan# (This private macro should not be called outside this file.)
7367dbbd9e4bSmacallanAC_DEFUN([AM_AUTOMAKE_VERSION],
73681c397cbaSmrg[am__api_version='1.11'
7369dbbd9e4bSmacallandnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
7370dbbd9e4bSmacallandnl require some minimum version.  Point them to the right macro.
73711c397cbaSmrgm4_if([$1], [1.11], [],
7372dbbd9e4bSmacallan      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
7373dbbd9e4bSmacallan])
7374dbbd9e4bSmacallan
7375dbbd9e4bSmacallan# _AM_AUTOCONF_VERSION(VERSION)
7376dbbd9e4bSmacallan# -----------------------------
7377dbbd9e4bSmacallan# aclocal traces this macro to find the Autoconf version.
7378dbbd9e4bSmacallan# This is a private macro too.  Using m4_define simplifies
7379dbbd9e4bSmacallan# the logic in aclocal, which can simply ignore this definition.
7380dbbd9e4bSmacallanm4_define([_AM_AUTOCONF_VERSION], [])
7381dbbd9e4bSmacallan
7382dbbd9e4bSmacallan# AM_SET_CURRENT_AUTOMAKE_VERSION
7383dbbd9e4bSmacallan# -------------------------------
7384dbbd9e4bSmacallan# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
73851c397cbaSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
7386dbbd9e4bSmacallanAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
73871c397cbaSmrg[AM_AUTOMAKE_VERSION([1.11])dnl
7388dbbd9e4bSmacallanm4_ifndef([AC_AUTOCONF_VERSION],
7389dbbd9e4bSmacallan  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
73901c397cbaSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
7391dbbd9e4bSmacallan
7392dbbd9e4bSmacallan# Figure out how to run the assembler.                      -*- Autoconf -*-
7393dbbd9e4bSmacallan
7394dbbd9e4bSmacallan# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7395dbbd9e4bSmacallan#
7396dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7397dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7398dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7399dbbd9e4bSmacallan
7400dbbd9e4bSmacallan# serial 5
7401dbbd9e4bSmacallan
7402dbbd9e4bSmacallan# AM_PROG_AS
7403dbbd9e4bSmacallan# ----------
7404dbbd9e4bSmacallanAC_DEFUN([AM_PROG_AS],
7405dbbd9e4bSmacallan[# By default we simply use the C compiler to build assembly code.
7406dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CC])
7407dbbd9e4bSmacallantest "${CCAS+set}" = set || CCAS=$CC
7408dbbd9e4bSmacallantest "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
7409dbbd9e4bSmacallanAC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
7410dbbd9e4bSmacallanAC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
7411dbbd9e4bSmacallan_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
7412dbbd9e4bSmacallan])
7413dbbd9e4bSmacallan
7414dbbd9e4bSmacallan# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
7415dbbd9e4bSmacallan
7416dbbd9e4bSmacallan# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7417dbbd9e4bSmacallan#
7418dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7419dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7420dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7421dbbd9e4bSmacallan
7422dbbd9e4bSmacallan# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7423dbbd9e4bSmacallan# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
7424dbbd9e4bSmacallan# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7425dbbd9e4bSmacallan#
7426dbbd9e4bSmacallan# Of course, Automake must honor this variable whenever it calls a
7427dbbd9e4bSmacallan# tool from the auxiliary directory.  The problem is that $srcdir (and
7428dbbd9e4bSmacallan# therefore $ac_aux_dir as well) can be either absolute or relative,
7429dbbd9e4bSmacallan# depending on how configure is run.  This is pretty annoying, since
7430dbbd9e4bSmacallan# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7431dbbd9e4bSmacallan# source directory, any form will work fine, but in subdirectories a
7432dbbd9e4bSmacallan# relative path needs to be adjusted first.
7433dbbd9e4bSmacallan#
7434dbbd9e4bSmacallan# $ac_aux_dir/missing
7435dbbd9e4bSmacallan#    fails when called from a subdirectory if $ac_aux_dir is relative
7436dbbd9e4bSmacallan# $top_srcdir/$ac_aux_dir/missing
7437dbbd9e4bSmacallan#    fails if $ac_aux_dir is absolute,
7438dbbd9e4bSmacallan#    fails when called from a subdirectory in a VPATH build with
7439dbbd9e4bSmacallan#          a relative $ac_aux_dir
7440dbbd9e4bSmacallan#
7441dbbd9e4bSmacallan# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7442dbbd9e4bSmacallan# are both prefixed by $srcdir.  In an in-source build this is usually
7443dbbd9e4bSmacallan# harmless because $srcdir is `.', but things will broke when you
7444dbbd9e4bSmacallan# start a VPATH build or use an absolute $srcdir.
7445dbbd9e4bSmacallan#
7446dbbd9e4bSmacallan# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7447dbbd9e4bSmacallan# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
7448dbbd9e4bSmacallan#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7449dbbd9e4bSmacallan# and then we would define $MISSING as
7450dbbd9e4bSmacallan#   MISSING="\${SHELL} $am_aux_dir/missing"
7451dbbd9e4bSmacallan# This will work as long as MISSING is not called from configure, because
7452dbbd9e4bSmacallan# unfortunately $(top_srcdir) has no meaning in configure.
7453dbbd9e4bSmacallan# However there are other variables, like CC, which are often used in
7454dbbd9e4bSmacallan# configure, and could therefore not use this "fixed" $ac_aux_dir.
7455dbbd9e4bSmacallan#
7456dbbd9e4bSmacallan# Another solution, used here, is to always expand $ac_aux_dir to an
7457dbbd9e4bSmacallan# absolute PATH.  The drawback is that using absolute paths prevent a
7458dbbd9e4bSmacallan# configured tree to be moved without reconfiguration.
7459dbbd9e4bSmacallan
7460dbbd9e4bSmacallanAC_DEFUN([AM_AUX_DIR_EXPAND],
7461dbbd9e4bSmacallan[dnl Rely on autoconf to set up CDPATH properly.
7462dbbd9e4bSmacallanAC_PREREQ([2.50])dnl
7463dbbd9e4bSmacallan# expand $ac_aux_dir to an absolute path
7464dbbd9e4bSmacallanam_aux_dir=`cd $ac_aux_dir && pwd`
7465dbbd9e4bSmacallan])
7466dbbd9e4bSmacallan
7467dbbd9e4bSmacallan# AM_CONDITIONAL                                            -*- Autoconf -*-
7468dbbd9e4bSmacallan
74691c397cbaSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
7470dbbd9e4bSmacallan# Free Software Foundation, Inc.
7471dbbd9e4bSmacallan#
7472dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7473dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7474dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7475dbbd9e4bSmacallan
74761c397cbaSmrg# serial 9
7477dbbd9e4bSmacallan
7478dbbd9e4bSmacallan# AM_CONDITIONAL(NAME, SHELL-CONDITION)
7479dbbd9e4bSmacallan# -------------------------------------
7480dbbd9e4bSmacallan# Define a conditional.
7481dbbd9e4bSmacallanAC_DEFUN([AM_CONDITIONAL],
7482dbbd9e4bSmacallan[AC_PREREQ(2.52)dnl
7483dbbd9e4bSmacallan ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
7484dbbd9e4bSmacallan	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7485dbbd9e4bSmacallanAC_SUBST([$1_TRUE])dnl
7486dbbd9e4bSmacallanAC_SUBST([$1_FALSE])dnl
7487dbbd9e4bSmacallan_AM_SUBST_NOTMAKE([$1_TRUE])dnl
7488dbbd9e4bSmacallan_AM_SUBST_NOTMAKE([$1_FALSE])dnl
74891c397cbaSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
7490dbbd9e4bSmacallanif $2; then
7491dbbd9e4bSmacallan  $1_TRUE=
7492dbbd9e4bSmacallan  $1_FALSE='#'
7493dbbd9e4bSmacallanelse
7494dbbd9e4bSmacallan  $1_TRUE='#'
7495dbbd9e4bSmacallan  $1_FALSE=
7496dbbd9e4bSmacallanfi
7497dbbd9e4bSmacallanAC_CONFIG_COMMANDS_PRE(
7498dbbd9e4bSmacallan[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7499dbbd9e4bSmacallan  AC_MSG_ERROR([[conditional "$1" was never defined.
7500dbbd9e4bSmacallanUsually this means the macro was only invoked conditionally.]])
7501dbbd9e4bSmacallanfi])])
7502dbbd9e4bSmacallan
75031c397cbaSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
7504dbbd9e4bSmacallan# Free Software Foundation, Inc.
7505dbbd9e4bSmacallan#
7506dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7507dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7508dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7509dbbd9e4bSmacallan
75101c397cbaSmrg# serial 10
7511dbbd9e4bSmacallan
7512dbbd9e4bSmacallan# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7513dbbd9e4bSmacallan# written in clear, in which case automake, when reading aclocal.m4,
7514dbbd9e4bSmacallan# will think it sees a *use*, and therefore will trigger all it's
7515dbbd9e4bSmacallan# C support machinery.  Also note that it means that autoscan, seeing
7516dbbd9e4bSmacallan# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7517dbbd9e4bSmacallan
7518dbbd9e4bSmacallan
7519dbbd9e4bSmacallan# _AM_DEPENDENCIES(NAME)
7520dbbd9e4bSmacallan# ----------------------
7521dbbd9e4bSmacallan# See how the compiler implements dependency checking.
7522dbbd9e4bSmacallan# NAME is "CC", "CXX", "GCJ", or "OBJC".
7523dbbd9e4bSmacallan# We try a few techniques and use that to set a single cache variable.
7524dbbd9e4bSmacallan#
7525dbbd9e4bSmacallan# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7526dbbd9e4bSmacallan# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7527dbbd9e4bSmacallan# dependency, and given that the user is not expected to run this macro,
7528dbbd9e4bSmacallan# just rely on AC_PROG_CC.
7529dbbd9e4bSmacallanAC_DEFUN([_AM_DEPENDENCIES],
7530dbbd9e4bSmacallan[AC_REQUIRE([AM_SET_DEPDIR])dnl
7531dbbd9e4bSmacallanAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7532dbbd9e4bSmacallanAC_REQUIRE([AM_MAKE_INCLUDE])dnl
7533dbbd9e4bSmacallanAC_REQUIRE([AM_DEP_TRACK])dnl
7534dbbd9e4bSmacallan
7535dbbd9e4bSmacallanifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
7536dbbd9e4bSmacallan       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
7537dbbd9e4bSmacallan       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7538dbbd9e4bSmacallan       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
7539dbbd9e4bSmacallan       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
7540dbbd9e4bSmacallan                   [depcc="$$1"   am_compiler_list=])
7541dbbd9e4bSmacallan
7542dbbd9e4bSmacallanAC_CACHE_CHECK([dependency style of $depcc],
7543dbbd9e4bSmacallan               [am_cv_$1_dependencies_compiler_type],
7544dbbd9e4bSmacallan[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7545dbbd9e4bSmacallan  # We make a subdir and do the tests there.  Otherwise we can end up
7546dbbd9e4bSmacallan  # making bogus files that we don't know about and never remove.  For
7547dbbd9e4bSmacallan  # instance it was reported that on HP-UX the gcc test will end up
7548dbbd9e4bSmacallan  # making a dummy file named `D' -- because `-MD' means `put the output
7549dbbd9e4bSmacallan  # in D'.
7550dbbd9e4bSmacallan  mkdir conftest.dir
7551dbbd9e4bSmacallan  # Copy depcomp to subdir because otherwise we won't find it if we're
7552dbbd9e4bSmacallan  # using a relative directory.
7553dbbd9e4bSmacallan  cp "$am_depcomp" conftest.dir
7554dbbd9e4bSmacallan  cd conftest.dir
7555dbbd9e4bSmacallan  # We will build objects and dependencies in a subdirectory because
7556dbbd9e4bSmacallan  # it helps to detect inapplicable dependency modes.  For instance
7557dbbd9e4bSmacallan  # both Tru64's cc and ICC support -MD to output dependencies as a
7558dbbd9e4bSmacallan  # side effect of compilation, but ICC will put the dependencies in
7559dbbd9e4bSmacallan  # the current directory while Tru64 will put them in the object
7560dbbd9e4bSmacallan  # directory.
7561dbbd9e4bSmacallan  mkdir sub
7562dbbd9e4bSmacallan
7563dbbd9e4bSmacallan  am_cv_$1_dependencies_compiler_type=none
7564dbbd9e4bSmacallan  if test "$am_compiler_list" = ""; then
7565dbbd9e4bSmacallan     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7566dbbd9e4bSmacallan  fi
75671c397cbaSmrg  am__universal=false
75681c397cbaSmrg  m4_case([$1], [CC],
75691c397cbaSmrg    [case " $depcc " in #(
75701c397cbaSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
75711c397cbaSmrg     esac],
75721c397cbaSmrg    [CXX],
75731c397cbaSmrg    [case " $depcc " in #(
75741c397cbaSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
75751c397cbaSmrg     esac])
75761c397cbaSmrg
7577dbbd9e4bSmacallan  for depmode in $am_compiler_list; do
7578dbbd9e4bSmacallan    # Setup a source with many dependencies, because some compilers
7579dbbd9e4bSmacallan    # like to wrap large dependency lists on column 80 (with \), and
7580dbbd9e4bSmacallan    # we should not choose a depcomp mode which is confused by this.
7581dbbd9e4bSmacallan    #
7582dbbd9e4bSmacallan    # We need to recreate these files for each test, as the compiler may
7583dbbd9e4bSmacallan    # overwrite some of them when testing with obscure command lines.
7584dbbd9e4bSmacallan    # This happens at least with the AIX C compiler.
7585dbbd9e4bSmacallan    : > sub/conftest.c
7586dbbd9e4bSmacallan    for i in 1 2 3 4 5 6; do
7587dbbd9e4bSmacallan      echo '#include "conftst'$i'.h"' >> sub/conftest.c
7588dbbd9e4bSmacallan      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7589dbbd9e4bSmacallan      # Solaris 8's {/usr,}/bin/sh.
7590dbbd9e4bSmacallan      touch sub/conftst$i.h
7591dbbd9e4bSmacallan    done
7592dbbd9e4bSmacallan    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7593dbbd9e4bSmacallan
75941c397cbaSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
75951c397cbaSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
75961c397cbaSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
75971c397cbaSmrg    # versions had trouble with output in subdirs
75981c397cbaSmrg    am__obj=sub/conftest.${OBJEXT-o}
75991c397cbaSmrg    am__minus_obj="-o $am__obj"
7600dbbd9e4bSmacallan    case $depmode in
76011c397cbaSmrg    gcc)
76021c397cbaSmrg      # This depmode causes a compiler race in universal mode.
76031c397cbaSmrg      test "$am__universal" = false || continue
76041c397cbaSmrg      ;;
7605dbbd9e4bSmacallan    nosideeffect)
7606dbbd9e4bSmacallan      # after this tag, mechanisms are not by side-effect, so they'll
7607dbbd9e4bSmacallan      # only be used when explicitly requested
7608dbbd9e4bSmacallan      if test "x$enable_dependency_tracking" = xyes; then
7609dbbd9e4bSmacallan	continue
7610dbbd9e4bSmacallan      else
7611dbbd9e4bSmacallan	break
7612dbbd9e4bSmacallan      fi
7613dbbd9e4bSmacallan      ;;
76141c397cbaSmrg    msvisualcpp | msvcmsys)
76151c397cbaSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
76161c397cbaSmrg      # not run yet.  These depmodes are late enough in the game, and
76171c397cbaSmrg      # so weak that their functioning should not be impacted.
76181c397cbaSmrg      am__obj=conftest.${OBJEXT-o}
76191c397cbaSmrg      am__minus_obj=
76201c397cbaSmrg      ;;
7621dbbd9e4bSmacallan    none) break ;;
7622dbbd9e4bSmacallan    esac
7623dbbd9e4bSmacallan    if depmode=$depmode \
76241c397cbaSmrg       source=sub/conftest.c object=$am__obj \
7625dbbd9e4bSmacallan       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
76261c397cbaSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7627dbbd9e4bSmacallan         >/dev/null 2>conftest.err &&
7628dbbd9e4bSmacallan       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7629dbbd9e4bSmacallan       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
76301c397cbaSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7631dbbd9e4bSmacallan       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7632dbbd9e4bSmacallan      # icc doesn't choke on unknown options, it will just issue warnings
7633dbbd9e4bSmacallan      # or remarks (even with -Werror).  So we grep stderr for any message
7634dbbd9e4bSmacallan      # that says an option was ignored or not supported.
7635dbbd9e4bSmacallan      # When given -MP, icc 7.0 and 7.1 complain thusly:
7636dbbd9e4bSmacallan      #   icc: Command line warning: ignoring option '-M'; no argument required
7637dbbd9e4bSmacallan      # The diagnosis changed in icc 8.0:
7638dbbd9e4bSmacallan      #   icc: Command line remark: option '-MP' not supported
7639dbbd9e4bSmacallan      if (grep 'ignoring option' conftest.err ||
7640dbbd9e4bSmacallan          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7641dbbd9e4bSmacallan        am_cv_$1_dependencies_compiler_type=$depmode
7642dbbd9e4bSmacallan        break
7643dbbd9e4bSmacallan      fi
7644dbbd9e4bSmacallan    fi
7645dbbd9e4bSmacallan  done
7646dbbd9e4bSmacallan
7647dbbd9e4bSmacallan  cd ..
7648dbbd9e4bSmacallan  rm -rf conftest.dir
7649dbbd9e4bSmacallanelse
7650dbbd9e4bSmacallan  am_cv_$1_dependencies_compiler_type=none
7651dbbd9e4bSmacallanfi
7652dbbd9e4bSmacallan])
7653dbbd9e4bSmacallanAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7654dbbd9e4bSmacallanAM_CONDITIONAL([am__fastdep$1], [
7655dbbd9e4bSmacallan  test "x$enable_dependency_tracking" != xno \
7656dbbd9e4bSmacallan  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7657dbbd9e4bSmacallan])
7658dbbd9e4bSmacallan
7659dbbd9e4bSmacallan
7660dbbd9e4bSmacallan# AM_SET_DEPDIR
7661dbbd9e4bSmacallan# -------------
7662dbbd9e4bSmacallan# Choose a directory name for dependency files.
7663dbbd9e4bSmacallan# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7664dbbd9e4bSmacallanAC_DEFUN([AM_SET_DEPDIR],
7665dbbd9e4bSmacallan[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7666dbbd9e4bSmacallanAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7667dbbd9e4bSmacallan])
7668dbbd9e4bSmacallan
7669dbbd9e4bSmacallan
7670dbbd9e4bSmacallan# AM_DEP_TRACK
7671dbbd9e4bSmacallan# ------------
7672dbbd9e4bSmacallanAC_DEFUN([AM_DEP_TRACK],
7673dbbd9e4bSmacallan[AC_ARG_ENABLE(dependency-tracking,
7674dbbd9e4bSmacallan[  --disable-dependency-tracking  speeds up one-time build
7675dbbd9e4bSmacallan  --enable-dependency-tracking   do not reject slow dependency extractors])
7676dbbd9e4bSmacallanif test "x$enable_dependency_tracking" != xno; then
7677dbbd9e4bSmacallan  am_depcomp="$ac_aux_dir/depcomp"
7678dbbd9e4bSmacallan  AMDEPBACKSLASH='\'
7679dbbd9e4bSmacallanfi
7680dbbd9e4bSmacallanAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7681dbbd9e4bSmacallanAC_SUBST([AMDEPBACKSLASH])dnl
7682dbbd9e4bSmacallan_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
7683dbbd9e4bSmacallan])
7684dbbd9e4bSmacallan
7685dbbd9e4bSmacallan# Generate code to set up dependency tracking.              -*- Autoconf -*-
7686dbbd9e4bSmacallan
76871c397cbaSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
7688dbbd9e4bSmacallan# Free Software Foundation, Inc.
7689dbbd9e4bSmacallan#
7690dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7691dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7692dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7693dbbd9e4bSmacallan
76941c397cbaSmrg#serial 5
7695dbbd9e4bSmacallan
7696dbbd9e4bSmacallan# _AM_OUTPUT_DEPENDENCY_COMMANDS
7697dbbd9e4bSmacallan# ------------------------------
7698dbbd9e4bSmacallanAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
76991c397cbaSmrg[{
77001c397cbaSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
77011c397cbaSmrg  # are listed without --file.  Let's play safe and only enable the eval
77021c397cbaSmrg  # if we detect the quoting.
77031c397cbaSmrg  case $CONFIG_FILES in
77041c397cbaSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
77051c397cbaSmrg  *)   set x $CONFIG_FILES ;;
77061c397cbaSmrg  esac
77071c397cbaSmrg  shift
77081c397cbaSmrg  for mf
77091c397cbaSmrg  do
77101c397cbaSmrg    # Strip MF so we end up with the name of the file.
77111c397cbaSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
77121c397cbaSmrg    # Check whether this is an Automake generated Makefile or not.
77131c397cbaSmrg    # We used to match only the files named `Makefile.in', but
77141c397cbaSmrg    # some people rename them; so instead we look at the file content.
77151c397cbaSmrg    # Grep'ing the first line is not enough: some people post-process
77161c397cbaSmrg    # each Makefile.in and add a new line on top of each file to say so.
77171c397cbaSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
77181c397cbaSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
77191c397cbaSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
77201c397cbaSmrg      dirpart=`AS_DIRNAME("$mf")`
77211c397cbaSmrg    else
77221c397cbaSmrg      continue
77231c397cbaSmrg    fi
77241c397cbaSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
77251c397cbaSmrg    # from the Makefile without running `make'.
77261c397cbaSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
77271c397cbaSmrg    test -z "$DEPDIR" && continue
77281c397cbaSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
77291c397cbaSmrg    test -z "am__include" && continue
77301c397cbaSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
77311c397cbaSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
77321c397cbaSmrg    U=`sed -n 's/^U = //p' < "$mf"`
77331c397cbaSmrg    # Find all dependency output files, they are included files with
77341c397cbaSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
77351c397cbaSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
77361c397cbaSmrg    # expansion.
77371c397cbaSmrg    for file in `sed -n "
77381c397cbaSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
77391c397cbaSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
77401c397cbaSmrg      # Make sure the directory exists.
77411c397cbaSmrg      test -f "$dirpart/$file" && continue
77421c397cbaSmrg      fdir=`AS_DIRNAME(["$file"])`
77431c397cbaSmrg      AS_MKDIR_P([$dirpart/$fdir])
77441c397cbaSmrg      # echo "creating $dirpart/$file"
77451c397cbaSmrg      echo '# dummy' > "$dirpart/$file"
77461c397cbaSmrg    done
7747dbbd9e4bSmacallan  done
77481c397cbaSmrg}
7749dbbd9e4bSmacallan])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7750dbbd9e4bSmacallan
7751dbbd9e4bSmacallan
7752dbbd9e4bSmacallan# AM_OUTPUT_DEPENDENCY_COMMANDS
7753dbbd9e4bSmacallan# -----------------------------
7754dbbd9e4bSmacallan# This macro should only be invoked once -- use via AC_REQUIRE.
7755dbbd9e4bSmacallan#
7756dbbd9e4bSmacallan# This code is only required when automatic dependency tracking
7757dbbd9e4bSmacallan# is enabled.  FIXME.  This creates each `.P' file that we will
7758dbbd9e4bSmacallan# need in order to bootstrap the dependency handling code.
7759dbbd9e4bSmacallanAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7760dbbd9e4bSmacallan[AC_CONFIG_COMMANDS([depfiles],
7761dbbd9e4bSmacallan     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7762dbbd9e4bSmacallan     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7763dbbd9e4bSmacallan])
7764dbbd9e4bSmacallan
7765dbbd9e4bSmacallan# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7766dbbd9e4bSmacallan# Free Software Foundation, Inc.
7767dbbd9e4bSmacallan#
7768dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7769dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7770dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7771dbbd9e4bSmacallan
7772dbbd9e4bSmacallan# serial 8
7773dbbd9e4bSmacallan
7774dbbd9e4bSmacallan# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
7775dbbd9e4bSmacallanAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7776dbbd9e4bSmacallan
7777dbbd9e4bSmacallan# Do all the work for Automake.                             -*- Autoconf -*-
7778dbbd9e4bSmacallan
7779dbbd9e4bSmacallan# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
77801c397cbaSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
7781dbbd9e4bSmacallan#
7782dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7783dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7784dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7785dbbd9e4bSmacallan
77861c397cbaSmrg# serial 16
7787dbbd9e4bSmacallan
7788dbbd9e4bSmacallan# This macro actually does too much.  Some checks are only needed if
7789dbbd9e4bSmacallan# your package does certain things.  But this isn't really a big deal.
7790dbbd9e4bSmacallan
7791dbbd9e4bSmacallan# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7792dbbd9e4bSmacallan# AM_INIT_AUTOMAKE([OPTIONS])
7793dbbd9e4bSmacallan# -----------------------------------------------
7794dbbd9e4bSmacallan# The call with PACKAGE and VERSION arguments is the old style
7795dbbd9e4bSmacallan# call (pre autoconf-2.50), which is being phased out.  PACKAGE
7796dbbd9e4bSmacallan# and VERSION should now be passed to AC_INIT and removed from
7797dbbd9e4bSmacallan# the call to AM_INIT_AUTOMAKE.
7798dbbd9e4bSmacallan# We support both call styles for the transition.  After
7799dbbd9e4bSmacallan# the next Automake release, Autoconf can make the AC_INIT
7800dbbd9e4bSmacallan# arguments mandatory, and then we can depend on a new Autoconf
7801dbbd9e4bSmacallan# release and drop the old call support.
7802dbbd9e4bSmacallanAC_DEFUN([AM_INIT_AUTOMAKE],
78031c397cbaSmrg[AC_PREREQ([2.62])dnl
7804dbbd9e4bSmacallandnl Autoconf wants to disallow AM_ names.  We explicitly allow
7805dbbd9e4bSmacallandnl the ones we care about.
7806dbbd9e4bSmacallanm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7807dbbd9e4bSmacallanAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7808dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_INSTALL])dnl
7809dbbd9e4bSmacallanif test "`cd $srcdir && pwd`" != "`pwd`"; then
7810dbbd9e4bSmacallan  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7811dbbd9e4bSmacallan  # is not polluted with repeated "-I."
7812dbbd9e4bSmacallan  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
7813dbbd9e4bSmacallan  # test to see if srcdir already configured
7814dbbd9e4bSmacallan  if test -f $srcdir/config.status; then
7815dbbd9e4bSmacallan    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7816dbbd9e4bSmacallan  fi
7817dbbd9e4bSmacallanfi
7818dbbd9e4bSmacallan
7819dbbd9e4bSmacallan# test whether we have cygpath
7820dbbd9e4bSmacallanif test -z "$CYGPATH_W"; then
7821dbbd9e4bSmacallan  if (cygpath --version) >/dev/null 2>/dev/null; then
7822dbbd9e4bSmacallan    CYGPATH_W='cygpath -w'
7823dbbd9e4bSmacallan  else
7824dbbd9e4bSmacallan    CYGPATH_W=echo
7825dbbd9e4bSmacallan  fi
7826dbbd9e4bSmacallanfi
7827dbbd9e4bSmacallanAC_SUBST([CYGPATH_W])
7828dbbd9e4bSmacallan
7829dbbd9e4bSmacallan# Define the identity of the package.
7830dbbd9e4bSmacallandnl Distinguish between old-style and new-style calls.
7831dbbd9e4bSmacallanm4_ifval([$2],
7832dbbd9e4bSmacallan[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7833dbbd9e4bSmacallan AC_SUBST([PACKAGE], [$1])dnl
7834dbbd9e4bSmacallan AC_SUBST([VERSION], [$2])],
7835dbbd9e4bSmacallan[_AM_SET_OPTIONS([$1])dnl
7836dbbd9e4bSmacallandnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
7837dbbd9e4bSmacallanm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
7838dbbd9e4bSmacallan  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
7839dbbd9e4bSmacallan AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7840dbbd9e4bSmacallan AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7841dbbd9e4bSmacallan
7842dbbd9e4bSmacallan_AM_IF_OPTION([no-define],,
7843dbbd9e4bSmacallan[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7844dbbd9e4bSmacallan AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7845dbbd9e4bSmacallan
7846dbbd9e4bSmacallan# Some tools Automake needs.
7847dbbd9e4bSmacallanAC_REQUIRE([AM_SANITY_CHECK])dnl
7848dbbd9e4bSmacallanAC_REQUIRE([AC_ARG_PROGRAM])dnl
7849dbbd9e4bSmacallanAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7850dbbd9e4bSmacallanAM_MISSING_PROG(AUTOCONF, autoconf)
7851dbbd9e4bSmacallanAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7852dbbd9e4bSmacallanAM_MISSING_PROG(AUTOHEADER, autoheader)
7853dbbd9e4bSmacallanAM_MISSING_PROG(MAKEINFO, makeinfo)
78541c397cbaSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
78551c397cbaSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
7856dbbd9e4bSmacallanAC_REQUIRE([AM_PROG_MKDIR_P])dnl
7857dbbd9e4bSmacallan# We need awk for the "check" target.  The system "awk" is bad on
7858dbbd9e4bSmacallan# some platforms.
7859dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_AWK])dnl
7860dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_MAKE_SET])dnl
7861dbbd9e4bSmacallanAC_REQUIRE([AM_SET_LEADING_DOT])dnl
7862dbbd9e4bSmacallan_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
78631c397cbaSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
78641c397cbaSmrg			     [_AM_PROG_TAR([v7])])])
7865dbbd9e4bSmacallan_AM_IF_OPTION([no-dependencies],,
7866dbbd9e4bSmacallan[AC_PROVIDE_IFELSE([AC_PROG_CC],
78671c397cbaSmrg		  [_AM_DEPENDENCIES(CC)],
78681c397cbaSmrg		  [define([AC_PROG_CC],
78691c397cbaSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7870dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_PROG_CXX],
78711c397cbaSmrg		  [_AM_DEPENDENCIES(CXX)],
78721c397cbaSmrg		  [define([AC_PROG_CXX],
78731c397cbaSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7874dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_PROG_OBJC],
78751c397cbaSmrg		  [_AM_DEPENDENCIES(OBJC)],
78761c397cbaSmrg		  [define([AC_PROG_OBJC],
78771c397cbaSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7878dbbd9e4bSmacallan])
78791c397cbaSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
78801c397cbaSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
78811c397cbaSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
78821c397cbaSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
78831c397cbaSmrgAC_CONFIG_COMMANDS_PRE(dnl
78841c397cbaSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
78851c397cbaSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
7886dbbd9e4bSmacallan])
7887dbbd9e4bSmacallan
78881c397cbaSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
78891c397cbaSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
78901c397cbaSmrgdnl mangled by Autoconf and run in a shell conditional statement.
78911c397cbaSmrgm4_define([_AC_COMPILER_EXEEXT],
78921c397cbaSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
78931c397cbaSmrg
7894dbbd9e4bSmacallan
7895dbbd9e4bSmacallan# When config.status generates a header, we must update the stamp-h file.
7896dbbd9e4bSmacallan# This file resides in the same directory as the config header
7897dbbd9e4bSmacallan# that is generated.  The stamp files are numbered to have different names.
7898dbbd9e4bSmacallan
7899dbbd9e4bSmacallan# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7900dbbd9e4bSmacallan# loop where config.status creates the headers, so we can generate
7901dbbd9e4bSmacallan# our stamp files there.
7902dbbd9e4bSmacallanAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7903dbbd9e4bSmacallan[# Compute $1's index in $config_headers.
7904dbbd9e4bSmacallan_am_arg=$1
7905dbbd9e4bSmacallan_am_stamp_count=1
7906dbbd9e4bSmacallanfor _am_header in $config_headers :; do
7907dbbd9e4bSmacallan  case $_am_header in
7908dbbd9e4bSmacallan    $_am_arg | $_am_arg:* )
7909dbbd9e4bSmacallan      break ;;
7910dbbd9e4bSmacallan    * )
7911dbbd9e4bSmacallan      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7912dbbd9e4bSmacallan  esac
7913dbbd9e4bSmacallandone
7914dbbd9e4bSmacallanecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7915dbbd9e4bSmacallan
79161c397cbaSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
7917dbbd9e4bSmacallan#
7918dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7919dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7920dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7921dbbd9e4bSmacallan
7922dbbd9e4bSmacallan# AM_PROG_INSTALL_SH
7923dbbd9e4bSmacallan# ------------------
7924dbbd9e4bSmacallan# Define $install_sh.
7925dbbd9e4bSmacallanAC_DEFUN([AM_PROG_INSTALL_SH],
7926dbbd9e4bSmacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
79271c397cbaSmrgif test x"${install_sh}" != xset; then
79281c397cbaSmrg  case $am_aux_dir in
79291c397cbaSmrg  *\ * | *\	*)
79301c397cbaSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
79311c397cbaSmrg  *)
79321c397cbaSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
79331c397cbaSmrg  esac
79341c397cbaSmrgfi
7935dbbd9e4bSmacallanAC_SUBST(install_sh)])
7936dbbd9e4bSmacallan
7937dbbd9e4bSmacallan# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7938dbbd9e4bSmacallan#
7939dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7940dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7941dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7942dbbd9e4bSmacallan
7943dbbd9e4bSmacallan# serial 2
7944dbbd9e4bSmacallan
7945dbbd9e4bSmacallan# Check whether the underlying file-system supports filenames
7946dbbd9e4bSmacallan# with a leading dot.  For instance MS-DOS doesn't.
7947dbbd9e4bSmacallanAC_DEFUN([AM_SET_LEADING_DOT],
7948dbbd9e4bSmacallan[rm -rf .tst 2>/dev/null
7949dbbd9e4bSmacallanmkdir .tst 2>/dev/null
7950dbbd9e4bSmacallanif test -d .tst; then
7951dbbd9e4bSmacallan  am__leading_dot=.
7952dbbd9e4bSmacallanelse
7953dbbd9e4bSmacallan  am__leading_dot=_
7954dbbd9e4bSmacallanfi
7955dbbd9e4bSmacallanrmdir .tst 2>/dev/null
7956dbbd9e4bSmacallanAC_SUBST([am__leading_dot])])
7957dbbd9e4bSmacallan
7958dbbd9e4bSmacallan# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7959dbbd9e4bSmacallan# From Jim Meyering
7960dbbd9e4bSmacallan
79611c397cbaSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
7962dbbd9e4bSmacallan# Free Software Foundation, Inc.
7963dbbd9e4bSmacallan#
7964dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
7965dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
7966dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
7967dbbd9e4bSmacallan
79681c397cbaSmrg# serial 5
7969dbbd9e4bSmacallan
79701c397cbaSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
79711c397cbaSmrg# ----------------------------------
79721c397cbaSmrg# Control maintainer-specific portions of Makefiles.
79731c397cbaSmrg# Default is to disable them, unless `enable' is passed literally.
79741c397cbaSmrg# For symmetry, `disable' may be passed as well.  Anyway, the user
79751c397cbaSmrg# can override the default with the --enable/--disable switch.
7976dbbd9e4bSmacallanAC_DEFUN([AM_MAINTAINER_MODE],
79771c397cbaSmrg[m4_case(m4_default([$1], [disable]),
79781c397cbaSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
79791c397cbaSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
79801c397cbaSmrg       [m4_define([am_maintainer_other], [enable])
79811c397cbaSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
79821c397cbaSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
79831c397cbaSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
79841c397cbaSmrg  AC_ARG_ENABLE([maintainer-mode],
79851c397cbaSmrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
7986dbbd9e4bSmacallan			  (and sometimes confusing) to the casual installer],
79871c397cbaSmrg      [USE_MAINTAINER_MODE=$enableval],
79881c397cbaSmrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
7989dbbd9e4bSmacallan  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
79901c397cbaSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
7991dbbd9e4bSmacallan  MAINT=$MAINTAINER_MODE_TRUE
79921c397cbaSmrg  AC_SUBST([MAINT])dnl
7993dbbd9e4bSmacallan]
7994dbbd9e4bSmacallan)
7995dbbd9e4bSmacallan
7996dbbd9e4bSmacallanAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7997dbbd9e4bSmacallan
7998dbbd9e4bSmacallan# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7999dbbd9e4bSmacallan
80001c397cbaSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
8001dbbd9e4bSmacallan#
8002dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8003dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8004dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8005dbbd9e4bSmacallan
80061c397cbaSmrg# serial 4
8007dbbd9e4bSmacallan
8008dbbd9e4bSmacallan# AM_MAKE_INCLUDE()
8009dbbd9e4bSmacallan# -----------------
8010dbbd9e4bSmacallan# Check to see how make treats includes.
8011dbbd9e4bSmacallanAC_DEFUN([AM_MAKE_INCLUDE],
8012dbbd9e4bSmacallan[am_make=${MAKE-make}
8013dbbd9e4bSmacallancat > confinc << 'END'
8014dbbd9e4bSmacallanam__doit:
80151c397cbaSmrg	@echo this is the am__doit target
8016dbbd9e4bSmacallan.PHONY: am__doit
8017dbbd9e4bSmacallanEND
8018dbbd9e4bSmacallan# If we don't find an include directive, just comment out the code.
8019dbbd9e4bSmacallanAC_MSG_CHECKING([for style of include used by $am_make])
8020dbbd9e4bSmacallanam__include="#"
8021dbbd9e4bSmacallanam__quote=
8022dbbd9e4bSmacallan_am_result=none
8023dbbd9e4bSmacallan# First try GNU make style include.
8024dbbd9e4bSmacallanecho "include confinc" > confmf
80251c397cbaSmrg# Ignore all kinds of additional output from `make'.
80261c397cbaSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
80271c397cbaSmrg*the\ am__doit\ target*)
80281c397cbaSmrg  am__include=include
80291c397cbaSmrg  am__quote=
80301c397cbaSmrg  _am_result=GNU
80311c397cbaSmrg  ;;
80321c397cbaSmrgesac
8033dbbd9e4bSmacallan# Now try BSD make style include.
8034dbbd9e4bSmacallanif test "$am__include" = "#"; then
8035dbbd9e4bSmacallan   echo '.include "confinc"' > confmf
80361c397cbaSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
80371c397cbaSmrg   *the\ am__doit\ target*)
80381c397cbaSmrg     am__include=.include
80391c397cbaSmrg     am__quote="\""
80401c397cbaSmrg     _am_result=BSD
80411c397cbaSmrg     ;;
80421c397cbaSmrg   esac
8043dbbd9e4bSmacallanfi
8044dbbd9e4bSmacallanAC_SUBST([am__include])
8045dbbd9e4bSmacallanAC_SUBST([am__quote])
8046dbbd9e4bSmacallanAC_MSG_RESULT([$_am_result])
8047dbbd9e4bSmacallanrm -f confinc confmf
8048dbbd9e4bSmacallan])
8049dbbd9e4bSmacallan
8050dbbd9e4bSmacallan# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8051dbbd9e4bSmacallan
80521c397cbaSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8053dbbd9e4bSmacallan# Free Software Foundation, Inc.
8054dbbd9e4bSmacallan#
8055dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8056dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8057dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8058dbbd9e4bSmacallan
80591c397cbaSmrg# serial 6
8060dbbd9e4bSmacallan
8061dbbd9e4bSmacallan# AM_MISSING_PROG(NAME, PROGRAM)
8062dbbd9e4bSmacallan# ------------------------------
8063dbbd9e4bSmacallanAC_DEFUN([AM_MISSING_PROG],
8064dbbd9e4bSmacallan[AC_REQUIRE([AM_MISSING_HAS_RUN])
8065dbbd9e4bSmacallan$1=${$1-"${am_missing_run}$2"}
8066dbbd9e4bSmacallanAC_SUBST($1)])
8067dbbd9e4bSmacallan
8068dbbd9e4bSmacallan
8069dbbd9e4bSmacallan# AM_MISSING_HAS_RUN
8070dbbd9e4bSmacallan# ------------------
8071dbbd9e4bSmacallan# Define MISSING if not defined so far and test if it supports --run.
8072dbbd9e4bSmacallan# If it does, set am_missing_run to use it, otherwise, to nothing.
8073dbbd9e4bSmacallanAC_DEFUN([AM_MISSING_HAS_RUN],
8074dbbd9e4bSmacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8075dbbd9e4bSmacallanAC_REQUIRE_AUX_FILE([missing])dnl
80761c397cbaSmrgif test x"${MISSING+set}" != xset; then
80771c397cbaSmrg  case $am_aux_dir in
80781c397cbaSmrg  *\ * | *\	*)
80791c397cbaSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
80801c397cbaSmrg  *)
80811c397cbaSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
80821c397cbaSmrg  esac
80831c397cbaSmrgfi
8084dbbd9e4bSmacallan# Use eval to expand $SHELL
8085dbbd9e4bSmacallanif eval "$MISSING --run true"; then
8086dbbd9e4bSmacallan  am_missing_run="$MISSING --run "
8087dbbd9e4bSmacallanelse
8088dbbd9e4bSmacallan  am_missing_run=
8089dbbd9e4bSmacallan  AC_MSG_WARN([`missing' script is too old or missing])
8090dbbd9e4bSmacallanfi
8091dbbd9e4bSmacallan])
8092dbbd9e4bSmacallan
8093dbbd9e4bSmacallan# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8094dbbd9e4bSmacallan#
8095dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8096dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8097dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8098dbbd9e4bSmacallan
8099dbbd9e4bSmacallan# AM_PROG_MKDIR_P
8100dbbd9e4bSmacallan# ---------------
8101dbbd9e4bSmacallan# Check for `mkdir -p'.
8102dbbd9e4bSmacallanAC_DEFUN([AM_PROG_MKDIR_P],
8103dbbd9e4bSmacallan[AC_PREREQ([2.60])dnl
8104dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8105dbbd9e4bSmacallandnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8106dbbd9e4bSmacallandnl while keeping a definition of mkdir_p for backward compatibility.
8107dbbd9e4bSmacallandnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8108dbbd9e4bSmacallandnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8109dbbd9e4bSmacallandnl Makefile.ins that do not define MKDIR_P, so we do our own
8110dbbd9e4bSmacallandnl adjustment using top_builddir (which is defined more often than
8111dbbd9e4bSmacallandnl MKDIR_P).
8112dbbd9e4bSmacallanAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8113dbbd9e4bSmacallancase $mkdir_p in
8114dbbd9e4bSmacallan  [[\\/$]]* | ?:[[\\/]]*) ;;
8115dbbd9e4bSmacallan  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8116dbbd9e4bSmacallanesac
8117dbbd9e4bSmacallan])
8118dbbd9e4bSmacallan
8119dbbd9e4bSmacallan# Helper functions for option handling.                     -*- Autoconf -*-
8120dbbd9e4bSmacallan
81211c397cbaSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8122dbbd9e4bSmacallan#
8123dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8124dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8125dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8126dbbd9e4bSmacallan
81271c397cbaSmrg# serial 4
8128dbbd9e4bSmacallan
8129dbbd9e4bSmacallan# _AM_MANGLE_OPTION(NAME)
8130dbbd9e4bSmacallan# -----------------------
8131dbbd9e4bSmacallanAC_DEFUN([_AM_MANGLE_OPTION],
8132dbbd9e4bSmacallan[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8133dbbd9e4bSmacallan
8134dbbd9e4bSmacallan# _AM_SET_OPTION(NAME)
8135dbbd9e4bSmacallan# ------------------------------
8136dbbd9e4bSmacallan# Set option NAME.  Presently that only means defining a flag for this option.
8137dbbd9e4bSmacallanAC_DEFUN([_AM_SET_OPTION],
8138dbbd9e4bSmacallan[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8139dbbd9e4bSmacallan
8140dbbd9e4bSmacallan# _AM_SET_OPTIONS(OPTIONS)
8141dbbd9e4bSmacallan# ----------------------------------
8142dbbd9e4bSmacallan# OPTIONS is a space-separated list of Automake options.
8143dbbd9e4bSmacallanAC_DEFUN([_AM_SET_OPTIONS],
81441c397cbaSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8145dbbd9e4bSmacallan
8146dbbd9e4bSmacallan# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8147dbbd9e4bSmacallan# -------------------------------------------
8148dbbd9e4bSmacallan# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8149dbbd9e4bSmacallanAC_DEFUN([_AM_IF_OPTION],
8150dbbd9e4bSmacallan[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8151dbbd9e4bSmacallan
8152dbbd9e4bSmacallan# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8153dbbd9e4bSmacallan
81541c397cbaSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8155dbbd9e4bSmacallan# Free Software Foundation, Inc.
8156dbbd9e4bSmacallan#
8157dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8158dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8159dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8160dbbd9e4bSmacallan
81611c397cbaSmrg# serial 5
8162dbbd9e4bSmacallan
8163dbbd9e4bSmacallan# AM_SANITY_CHECK
8164dbbd9e4bSmacallan# ---------------
8165dbbd9e4bSmacallanAC_DEFUN([AM_SANITY_CHECK],
8166dbbd9e4bSmacallan[AC_MSG_CHECKING([whether build environment is sane])
8167dbbd9e4bSmacallan# Just in case
8168dbbd9e4bSmacallansleep 1
8169dbbd9e4bSmacallanecho timestamp > conftest.file
81701c397cbaSmrg# Reject unsafe characters in $srcdir or the absolute working directory
81711c397cbaSmrg# name.  Accept space and tab only in the latter.
81721c397cbaSmrgam_lf='
81731c397cbaSmrg'
81741c397cbaSmrgcase `pwd` in
81751c397cbaSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
81761c397cbaSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
81771c397cbaSmrgesac
81781c397cbaSmrgcase $srcdir in
81791c397cbaSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
81801c397cbaSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
81811c397cbaSmrgesac
81821c397cbaSmrg
8183dbbd9e4bSmacallan# Do `set' in a subshell so we don't clobber the current shell's
8184dbbd9e4bSmacallan# arguments.  Must try -L first in case configure is actually a
8185dbbd9e4bSmacallan# symlink; some systems play weird games with the mod time of symlinks
8186dbbd9e4bSmacallan# (eg FreeBSD returns the mod time of the symlink's containing
8187dbbd9e4bSmacallan# directory).
8188dbbd9e4bSmacallanif (
81891c397cbaSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8190dbbd9e4bSmacallan   if test "$[*]" = "X"; then
8191dbbd9e4bSmacallan      # -L didn't work.
81921c397cbaSmrg      set X `ls -t "$srcdir/configure" conftest.file`
8193dbbd9e4bSmacallan   fi
8194dbbd9e4bSmacallan   rm -f conftest.file
8195dbbd9e4bSmacallan   if test "$[*]" != "X $srcdir/configure conftest.file" \
8196dbbd9e4bSmacallan      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8197dbbd9e4bSmacallan
8198dbbd9e4bSmacallan      # If neither matched, then we have a broken ls.  This can happen
8199dbbd9e4bSmacallan      # if, for instance, CONFIG_SHELL is bash and it inherits a
8200dbbd9e4bSmacallan      # broken ls alias from the environment.  This has actually
8201dbbd9e4bSmacallan      # happened.  Such a system could not be considered "sane".
8202dbbd9e4bSmacallan      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8203dbbd9e4bSmacallanalias in your environment])
8204dbbd9e4bSmacallan   fi
8205dbbd9e4bSmacallan
8206dbbd9e4bSmacallan   test "$[2]" = conftest.file
8207dbbd9e4bSmacallan   )
8208dbbd9e4bSmacallanthen
8209dbbd9e4bSmacallan   # Ok.
8210dbbd9e4bSmacallan   :
8211dbbd9e4bSmacallanelse
8212dbbd9e4bSmacallan   AC_MSG_ERROR([newly created file is older than distributed files!
8213dbbd9e4bSmacallanCheck your system clock])
8214dbbd9e4bSmacallanfi
8215dbbd9e4bSmacallanAC_MSG_RESULT(yes)])
8216dbbd9e4bSmacallan
8217dbbd9e4bSmacallan# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8218dbbd9e4bSmacallan#
8219dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8220dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8221dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8222dbbd9e4bSmacallan
8223dbbd9e4bSmacallan# AM_PROG_INSTALL_STRIP
8224dbbd9e4bSmacallan# ---------------------
8225dbbd9e4bSmacallan# One issue with vendor `install' (even GNU) is that you can't
8226dbbd9e4bSmacallan# specify the program used to strip binaries.  This is especially
8227dbbd9e4bSmacallan# annoying in cross-compiling environments, where the build's strip
8228dbbd9e4bSmacallan# is unlikely to handle the host's binaries.
8229dbbd9e4bSmacallan# Fortunately install-sh will honor a STRIPPROG variable, so we
8230dbbd9e4bSmacallan# always use install-sh in `make install-strip', and initialize
8231dbbd9e4bSmacallan# STRIPPROG with the value of the STRIP variable (set by the user).
8232dbbd9e4bSmacallanAC_DEFUN([AM_PROG_INSTALL_STRIP],
8233dbbd9e4bSmacallan[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8234dbbd9e4bSmacallan# Installed binaries are usually stripped using `strip' when the user
8235dbbd9e4bSmacallan# run `make install-strip'.  However `strip' might not be the right
8236dbbd9e4bSmacallan# tool to use in cross-compilation environments, therefore Automake
8237dbbd9e4bSmacallan# will honor the `STRIP' environment variable to overrule this program.
8238dbbd9e4bSmacallandnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8239dbbd9e4bSmacallanif test "$cross_compiling" != no; then
8240dbbd9e4bSmacallan  AC_CHECK_TOOL([STRIP], [strip], :)
8241dbbd9e4bSmacallanfi
8242dbbd9e4bSmacallanINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8243dbbd9e4bSmacallanAC_SUBST([INSTALL_STRIP_PROGRAM])])
8244dbbd9e4bSmacallan
82451c397cbaSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
8246dbbd9e4bSmacallan#
8247dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8248dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8249dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8250dbbd9e4bSmacallan
82511c397cbaSmrg# serial 2
82521c397cbaSmrg
8253dbbd9e4bSmacallan# _AM_SUBST_NOTMAKE(VARIABLE)
8254dbbd9e4bSmacallan# ---------------------------
8255dbbd9e4bSmacallan# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
8256dbbd9e4bSmacallan# This macro is traced by Automake.
8257dbbd9e4bSmacallanAC_DEFUN([_AM_SUBST_NOTMAKE])
8258dbbd9e4bSmacallan
82591c397cbaSmrg# AM_SUBST_NOTMAKE(VARIABLE)
82601c397cbaSmrg# ---------------------------
82611c397cbaSmrg# Public sister of _AM_SUBST_NOTMAKE.
82621c397cbaSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
82631c397cbaSmrg
8264dbbd9e4bSmacallan# Check how to create a tarball.                            -*- Autoconf -*-
8265dbbd9e4bSmacallan
8266dbbd9e4bSmacallan# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
8267dbbd9e4bSmacallan#
8268dbbd9e4bSmacallan# This file is free software; the Free Software Foundation
8269dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it,
8270dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved.
8271dbbd9e4bSmacallan
8272dbbd9e4bSmacallan# serial 2
8273dbbd9e4bSmacallan
8274dbbd9e4bSmacallan# _AM_PROG_TAR(FORMAT)
8275dbbd9e4bSmacallan# --------------------
8276dbbd9e4bSmacallan# Check how to create a tarball in format FORMAT.
8277dbbd9e4bSmacallan# FORMAT should be one of `v7', `ustar', or `pax'.
8278dbbd9e4bSmacallan#
8279dbbd9e4bSmacallan# Substitute a variable $(am__tar) that is a command
8280dbbd9e4bSmacallan# writing to stdout a FORMAT-tarball containing the directory
8281dbbd9e4bSmacallan# $tardir.
8282dbbd9e4bSmacallan#     tardir=directory && $(am__tar) > result.tar
8283dbbd9e4bSmacallan#
8284dbbd9e4bSmacallan# Substitute a variable $(am__untar) that extract such
8285dbbd9e4bSmacallan# a tarball read from stdin.
8286dbbd9e4bSmacallan#     $(am__untar) < result.tar
8287dbbd9e4bSmacallanAC_DEFUN([_AM_PROG_TAR],
8288dbbd9e4bSmacallan[# Always define AMTAR for backward compatibility.
8289dbbd9e4bSmacallanAM_MISSING_PROG([AMTAR], [tar])
8290dbbd9e4bSmacallanm4_if([$1], [v7],
8291dbbd9e4bSmacallan     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8292dbbd9e4bSmacallan     [m4_case([$1], [ustar],, [pax],,
8293dbbd9e4bSmacallan              [m4_fatal([Unknown tar format])])
8294dbbd9e4bSmacallanAC_MSG_CHECKING([how to create a $1 tar archive])
8295dbbd9e4bSmacallan# Loop over all known methods to create a tar archive until one works.
8296dbbd9e4bSmacallan_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8297dbbd9e4bSmacallan_am_tools=${am_cv_prog_tar_$1-$_am_tools}
8298dbbd9e4bSmacallan# Do not fold the above two line into one, because Tru64 sh and
8299dbbd9e4bSmacallan# Solaris sh will not grok spaces in the rhs of `-'.
8300dbbd9e4bSmacallanfor _am_tool in $_am_tools
8301dbbd9e4bSmacallando
8302dbbd9e4bSmacallan  case $_am_tool in
8303dbbd9e4bSmacallan  gnutar)
8304dbbd9e4bSmacallan    for _am_tar in tar gnutar gtar;
8305dbbd9e4bSmacallan    do
8306dbbd9e4bSmacallan      AM_RUN_LOG([$_am_tar --version]) && break
8307dbbd9e4bSmacallan    done
8308dbbd9e4bSmacallan    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8309dbbd9e4bSmacallan    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8310dbbd9e4bSmacallan    am__untar="$_am_tar -xf -"
8311dbbd9e4bSmacallan    ;;
8312dbbd9e4bSmacallan  plaintar)
8313dbbd9e4bSmacallan    # Must skip GNU tar: if it does not support --format= it doesn't create
8314dbbd9e4bSmacallan    # ustar tarball either.
8315dbbd9e4bSmacallan    (tar --version) >/dev/null 2>&1 && continue
8316dbbd9e4bSmacallan    am__tar='tar chf - "$$tardir"'
8317dbbd9e4bSmacallan    am__tar_='tar chf - "$tardir"'
8318dbbd9e4bSmacallan    am__untar='tar xf -'
8319dbbd9e4bSmacallan    ;;
8320dbbd9e4bSmacallan  pax)
8321dbbd9e4bSmacallan    am__tar='pax -L -x $1 -w "$$tardir"'
8322dbbd9e4bSmacallan    am__tar_='pax -L -x $1 -w "$tardir"'
8323dbbd9e4bSmacallan    am__untar='pax -r'
8324dbbd9e4bSmacallan    ;;
8325dbbd9e4bSmacallan  cpio)
8326dbbd9e4bSmacallan    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8327dbbd9e4bSmacallan    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8328dbbd9e4bSmacallan    am__untar='cpio -i -H $1 -d'
8329dbbd9e4bSmacallan    ;;
8330dbbd9e4bSmacallan  none)
8331dbbd9e4bSmacallan    am__tar=false
8332dbbd9e4bSmacallan    am__tar_=false
8333dbbd9e4bSmacallan    am__untar=false
8334dbbd9e4bSmacallan    ;;
8335dbbd9e4bSmacallan  esac
8336dbbd9e4bSmacallan
8337dbbd9e4bSmacallan  # If the value was cached, stop now.  We just wanted to have am__tar
8338dbbd9e4bSmacallan  # and am__untar set.
8339dbbd9e4bSmacallan  test -n "${am_cv_prog_tar_$1}" && break
8340dbbd9e4bSmacallan
8341dbbd9e4bSmacallan  # tar/untar a dummy directory, and stop if the command works
8342dbbd9e4bSmacallan  rm -rf conftest.dir
8343dbbd9e4bSmacallan  mkdir conftest.dir
8344dbbd9e4bSmacallan  echo GrepMe > conftest.dir/file
8345dbbd9e4bSmacallan  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8346dbbd9e4bSmacallan  rm -rf conftest.dir
8347dbbd9e4bSmacallan  if test -s conftest.tar; then
8348dbbd9e4bSmacallan    AM_RUN_LOG([$am__untar <conftest.tar])
8349dbbd9e4bSmacallan    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
8350dbbd9e4bSmacallan  fi
8351dbbd9e4bSmacallandone
8352dbbd9e4bSmacallanrm -rf conftest.dir
8353dbbd9e4bSmacallan
8354dbbd9e4bSmacallanAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8355dbbd9e4bSmacallanAC_MSG_RESULT([$am_cv_prog_tar_$1])])
8356dbbd9e4bSmacallanAC_SUBST([am__tar])
8357dbbd9e4bSmacallanAC_SUBST([am__untar])
8358dbbd9e4bSmacallan]) # _AM_PROG_TAR
8359dbbd9e4bSmacallan
83601c397cbaSmrgdnl Copyright 2005 Red Hat, Inc
83611c397cbaSmrgdnl 
83621c397cbaSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
83631c397cbaSmrgdnl documentation for any purpose is hereby granted without fee, provided that
83641c397cbaSmrgdnl the above copyright notice appear in all copies and that both that
83651c397cbaSmrgdnl copyright notice and this permission notice appear in supporting
83661c397cbaSmrgdnl documentation.
83671c397cbaSmrgdnl 
83681c397cbaSmrgdnl The above copyright notice and this permission notice shall be included
83691c397cbaSmrgdnl in all copies or substantial portions of the Software.
83701c397cbaSmrgdnl 
83711c397cbaSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
83721c397cbaSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
83731c397cbaSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
83741c397cbaSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
83751c397cbaSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
83761c397cbaSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
83771c397cbaSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
83781c397cbaSmrgdnl 
83791c397cbaSmrgdnl Except as contained in this notice, the name of the copyright holders shall
83801c397cbaSmrgdnl not be used in advertising or otherwise to promote the sale, use or
83811c397cbaSmrgdnl other dealings in this Software without prior written authorization
83821c397cbaSmrgdnl from the copyright holders.
83831c397cbaSmrgdnl 
83841c397cbaSmrg
83851c397cbaSmrg# XORG_DRIVER_CHECK_EXT()
83861c397cbaSmrg# --------------------------
83871c397cbaSmrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
83881c397cbaSmrg# is defined, then add $1 to $REQUIRED_MODULES.
83891c397cbaSmrg
83901c397cbaSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
83911c397cbaSmrg	SAVE_CFLAGS="$CFLAGS"
83921c397cbaSmrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
83931c397cbaSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
83941c397cbaSmrg#include "xorg-server.h"
83951c397cbaSmrg#if !defined $1
83961c397cbaSmrg#error $1 not defined
83971c397cbaSmrg#endif
83981c397cbaSmrg		]])],
83991c397cbaSmrg		[_EXT_CHECK=yes],
84001c397cbaSmrg		[_EXT_CHECK=no])
84011c397cbaSmrg	CFLAGS="$SAVE_CFLAGS"
84021c397cbaSmrg	AC_MSG_CHECKING([if $1 is defined])
84031c397cbaSmrg	AC_MSG_RESULT([$_EXT_CHECK])
84041c397cbaSmrg	if test "$_EXT_CHECK" != no; then
84051c397cbaSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
84061c397cbaSmrg	fi
84071c397cbaSmrg])
84081c397cbaSmrg
8409