aclocal.m4 revision c503f109
1c503f109Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2209ff23fSmrg
3209ff23fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4c503f109Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5209ff23fSmrg# This file is free software; the Free Software Foundation
6209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
7209ff23fSmrg# with or without modifications, as long as this notice is preserved.
8209ff23fSmrg
9209ff23fSmrg# This program is distributed in the hope that it will be useful,
10209ff23fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11209ff23fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12209ff23fSmrg# PARTICULAR PURPOSE.
13209ff23fSmrg
14209ff23fSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15209ff23fSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16c503f109Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17c503f109Smrg[m4_warning([this file was generated for autoconf 2.63.
18209ff23fSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19209ff23fSmrgIf you have problems, you may need to regenerate the build system entirely.
20209ff23fSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21209ff23fSmrg
22209ff23fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23209ff23fSmrg
24c503f109Smrg# serial 52 AC_PROG_LIBTOOL
25209ff23fSmrg
26209ff23fSmrg
27209ff23fSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28209ff23fSmrg# -----------------------------------------------------------
29209ff23fSmrg# If this macro is not defined by Autoconf, define it here.
30209ff23fSmrgm4_ifdef([AC_PROVIDE_IFELSE],
31209ff23fSmrg         [],
32209ff23fSmrg         [m4_define([AC_PROVIDE_IFELSE],
33209ff23fSmrg	         [m4_ifdef([AC_PROVIDE_$1],
34209ff23fSmrg		           [$2], [$3])])])
35209ff23fSmrg
36209ff23fSmrg
37209ff23fSmrg# AC_PROG_LIBTOOL
38209ff23fSmrg# ---------------
39209ff23fSmrgAC_DEFUN([AC_PROG_LIBTOOL],
40209ff23fSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41209ff23fSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42209ff23fSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43209ff23fSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
44209ff23fSmrg    [AC_LIBTOOL_CXX],
45209ff23fSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46209ff23fSmrg  ])])
47209ff23fSmrgdnl And a similar setup for Fortran 77 support
48209ff23fSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
49209ff23fSmrg    [AC_LIBTOOL_F77],
50209ff23fSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
51209ff23fSmrg])])
52209ff23fSmrg
53209ff23fSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54209ff23fSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55209ff23fSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56209ff23fSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
57209ff23fSmrg    [AC_LIBTOOL_GCJ],
58209ff23fSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
59209ff23fSmrg      [AC_LIBTOOL_GCJ],
60209ff23fSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
61209ff23fSmrg	[AC_LIBTOOL_GCJ],
62209ff23fSmrg      [ifdef([AC_PROG_GCJ],
63209ff23fSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64209ff23fSmrg       ifdef([A][M_PROG_GCJ],
65209ff23fSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66209ff23fSmrg       ifdef([LT_AC_PROG_GCJ],
67209ff23fSmrg	     [define([LT_AC_PROG_GCJ],
68209ff23fSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
69209ff23fSmrg])])# AC_PROG_LIBTOOL
70209ff23fSmrg
71209ff23fSmrg
72209ff23fSmrg# _AC_PROG_LIBTOOL
73209ff23fSmrg# ----------------
74209ff23fSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
75209ff23fSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76209ff23fSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77209ff23fSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78209ff23fSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79209ff23fSmrg
80209ff23fSmrg# This can be used to rebuild libtool when needed
81209ff23fSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
82209ff23fSmrg
83209ff23fSmrg# Always use our own libtool.
84209ff23fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
85209ff23fSmrgAC_SUBST(LIBTOOL)dnl
86209ff23fSmrg
87209ff23fSmrg# Prevent multiple expansion
88209ff23fSmrgdefine([AC_PROG_LIBTOOL], [])
89209ff23fSmrg])# _AC_PROG_LIBTOOL
90209ff23fSmrg
91209ff23fSmrg
92209ff23fSmrg# AC_LIBTOOL_SETUP
93209ff23fSmrg# ----------------
94209ff23fSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
95209ff23fSmrg[AC_PREREQ(2.50)dnl
96209ff23fSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
97209ff23fSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
98209ff23fSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99209ff23fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
100209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
101209ff23fSmrgAC_REQUIRE([AC_PROG_CC])dnl
102209ff23fSmrgAC_REQUIRE([AC_PROG_LD])dnl
103209ff23fSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104209ff23fSmrgAC_REQUIRE([AC_PROG_NM])dnl
105209ff23fSmrg
106209ff23fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
107209ff23fSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108209ff23fSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109209ff23fSmrgAC_REQUIRE([AC_OBJEXT])dnl
110209ff23fSmrgAC_REQUIRE([AC_EXEEXT])dnl
111209ff23fSmrgdnl
112209ff23fSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
113209ff23fSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
114209ff23fSmrgAC_LIBTOOL_OBJDIR
115209ff23fSmrg
116209ff23fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
117209ff23fSmrg_LT_AC_PROG_ECHO_BACKSLASH
118209ff23fSmrg
119209ff23fSmrgcase $host_os in
120209ff23fSmrgaix3*)
121209ff23fSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
122209ff23fSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
123209ff23fSmrg  # vanish in a puff of smoke.
124209ff23fSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
125209ff23fSmrg    COLLECT_NAMES=
126209ff23fSmrg    export COLLECT_NAMES
127209ff23fSmrg  fi
128209ff23fSmrg  ;;
129209ff23fSmrgesac
130209ff23fSmrg
131209ff23fSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
132209ff23fSmrg# metacharacters that are still active within double-quoted strings.
133209ff23fSmrgXsed='sed -e 1s/^X//'
134209ff23fSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
135209ff23fSmrg
136209ff23fSmrg# Same as above, but do not quote variable references.
137209ff23fSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
138209ff23fSmrg
139209ff23fSmrg# Sed substitution to delay expansion of an escaped shell variable in a
140209ff23fSmrg# double_quote_subst'ed string.
141209ff23fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
142209ff23fSmrg
143209ff23fSmrg# Sed substitution to avoid accidental globbing in evaled expressions
144209ff23fSmrgno_glob_subst='s/\*/\\\*/g'
145209ff23fSmrg
146209ff23fSmrg# Constants:
147209ff23fSmrgrm="rm -f"
148209ff23fSmrg
149209ff23fSmrg# Global variables:
150209ff23fSmrgdefault_ofile=libtool
151209ff23fSmrgcan_build_shared=yes
152209ff23fSmrg
153209ff23fSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
154209ff23fSmrg# which needs '.lib').
155209ff23fSmrglibext=a
156209ff23fSmrgltmain="$ac_aux_dir/ltmain.sh"
157209ff23fSmrgofile="$default_ofile"
158209ff23fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
159209ff23fSmrg
160209ff23fSmrgAC_CHECK_TOOL(AR, ar, false)
161209ff23fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
162209ff23fSmrgAC_CHECK_TOOL(STRIP, strip, :)
163209ff23fSmrg
164209ff23fSmrgold_CC="$CC"
165209ff23fSmrgold_CFLAGS="$CFLAGS"
166209ff23fSmrg
167209ff23fSmrg# Set sane defaults for various variables
168209ff23fSmrgtest -z "$AR" && AR=ar
169209ff23fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
170209ff23fSmrgtest -z "$AS" && AS=as
171209ff23fSmrgtest -z "$CC" && CC=cc
172209ff23fSmrgtest -z "$LTCC" && LTCC=$CC
173209ff23fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
174209ff23fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
175209ff23fSmrgtest -z "$LD" && LD=ld
176209ff23fSmrgtest -z "$LN_S" && LN_S="ln -s"
177209ff23fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
178209ff23fSmrgtest -z "$NM" && NM=nm
179209ff23fSmrgtest -z "$SED" && SED=sed
180209ff23fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
181209ff23fSmrgtest -z "$RANLIB" && RANLIB=:
182209ff23fSmrgtest -z "$STRIP" && STRIP=:
183209ff23fSmrgtest -z "$ac_objext" && ac_objext=o
184209ff23fSmrg
185209ff23fSmrg# Determine commands to create old-style static archives.
186209ff23fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
187209ff23fSmrgold_postinstall_cmds='chmod 644 $oldlib'
188209ff23fSmrgold_postuninstall_cmds=
189209ff23fSmrg
190209ff23fSmrgif test -n "$RANLIB"; then
191209ff23fSmrg  case $host_os in
192209ff23fSmrg  openbsd*)
193209ff23fSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
194209ff23fSmrg    ;;
195209ff23fSmrg  *)
196209ff23fSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
197209ff23fSmrg    ;;
198209ff23fSmrg  esac
199209ff23fSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
200209ff23fSmrgfi
201209ff23fSmrg
202209ff23fSmrg_LT_CC_BASENAME([$compiler])
203209ff23fSmrg
204209ff23fSmrg# Only perform the check for file, if the check method requires it
205209ff23fSmrgcase $deplibs_check_method in
206209ff23fSmrgfile_magic*)
207209ff23fSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
208209ff23fSmrg    AC_PATH_MAGIC
209209ff23fSmrg  fi
210209ff23fSmrg  ;;
211209ff23fSmrgesac
212209ff23fSmrg
213209ff23fSmrg_LT_REQUIRED_DARWIN_CHECKS
214209ff23fSmrg
215209ff23fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
216209ff23fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
217209ff23fSmrgenable_win32_dll=yes, enable_win32_dll=no)
218209ff23fSmrg
219209ff23fSmrgAC_ARG_ENABLE([libtool-lock],
220209ff23fSmrg    [AC_HELP_STRING([--disable-libtool-lock],
221209ff23fSmrg	[avoid locking (might break parallel builds)])])
222209ff23fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
223209ff23fSmrg
224209ff23fSmrgAC_ARG_WITH([pic],
225209ff23fSmrg    [AC_HELP_STRING([--with-pic],
226209ff23fSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
227209ff23fSmrg    [pic_mode="$withval"],
228209ff23fSmrg    [pic_mode=default])
229209ff23fSmrgtest -z "$pic_mode" && pic_mode=default
230209ff23fSmrg
231209ff23fSmrg# Use C for the default configuration in the libtool script
232209ff23fSmrgtagname=
233209ff23fSmrgAC_LIBTOOL_LANG_C_CONFIG
234209ff23fSmrg_LT_AC_TAGCONFIG
235209ff23fSmrg])# AC_LIBTOOL_SETUP
236209ff23fSmrg
237209ff23fSmrg
238209ff23fSmrg# _LT_AC_SYS_COMPILER
239209ff23fSmrg# -------------------
240209ff23fSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
241209ff23fSmrg[AC_REQUIRE([AC_PROG_CC])dnl
242209ff23fSmrg
243209ff23fSmrg# If no C compiler was specified, use CC.
244209ff23fSmrgLTCC=${LTCC-"$CC"}
245209ff23fSmrg
246209ff23fSmrg# If no C compiler flags were specified, use CFLAGS.
247209ff23fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
248209ff23fSmrg
249209ff23fSmrg# Allow CC to be a program name with arguments.
250209ff23fSmrgcompiler=$CC
251209ff23fSmrg])# _LT_AC_SYS_COMPILER
252209ff23fSmrg
253209ff23fSmrg
254209ff23fSmrg# _LT_CC_BASENAME(CC)
255209ff23fSmrg# -------------------
256209ff23fSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
257209ff23fSmrgAC_DEFUN([_LT_CC_BASENAME],
258209ff23fSmrg[for cc_temp in $1""; do
259209ff23fSmrg  case $cc_temp in
260209ff23fSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
261209ff23fSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
262209ff23fSmrg    \-*) ;;
263209ff23fSmrg    *) break;;
264209ff23fSmrg  esac
265209ff23fSmrgdone
266209ff23fSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
267209ff23fSmrg])
268209ff23fSmrg
269209ff23fSmrg
270209ff23fSmrg# _LT_COMPILER_BOILERPLATE
271209ff23fSmrg# ------------------------
272209ff23fSmrg# Check for compiler boilerplate output or warnings with
273209ff23fSmrg# the simple compiler test code.
274209ff23fSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
275209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
276209ff23fSmrgac_outfile=conftest.$ac_objext
277209ff23fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
278209ff23fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
279209ff23fSmrg_lt_compiler_boilerplate=`cat conftest.err`
280209ff23fSmrg$rm conftest*
281209ff23fSmrg])# _LT_COMPILER_BOILERPLATE
282209ff23fSmrg
283209ff23fSmrg
284209ff23fSmrg# _LT_LINKER_BOILERPLATE
285209ff23fSmrg# ----------------------
286209ff23fSmrg# Check for linker boilerplate output or warnings with
287209ff23fSmrg# the simple link test code.
288209ff23fSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
289209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
290209ff23fSmrgac_outfile=conftest.$ac_objext
291209ff23fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
292209ff23fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
293209ff23fSmrg_lt_linker_boilerplate=`cat conftest.err`
294209ff23fSmrg$rm -r conftest*
295209ff23fSmrg])# _LT_LINKER_BOILERPLATE
296209ff23fSmrg
297209ff23fSmrg# _LT_REQUIRED_DARWIN_CHECKS
298209ff23fSmrg# --------------------------
299209ff23fSmrg# Check for some things on darwin
300209ff23fSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
301209ff23fSmrg  case $host_os in
302209ff23fSmrg    rhapsody* | darwin*)
303209ff23fSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
304209ff23fSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
305209ff23fSmrg
306209ff23fSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
307209ff23fSmrg      [lt_cv_apple_cc_single_mod=no
308209ff23fSmrg      if test -z "${LT_MULTI_MODULE}"; then
309209ff23fSmrg   # By default we will add the -single_module flag. You can override
310209ff23fSmrg   # by either setting the environment variable LT_MULTI_MODULE
311209ff23fSmrg   # non-empty at configure time, or by adding -multi_module to the
312209ff23fSmrg   # link flags.
313209ff23fSmrg   echo "int foo(void){return 1;}" > conftest.c
314209ff23fSmrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
315209ff23fSmrg     -dynamiclib ${wl}-single_module conftest.c
316209ff23fSmrg   if test -f libconftest.dylib; then
317209ff23fSmrg     lt_cv_apple_cc_single_mod=yes
318209ff23fSmrg     rm -rf libconftest.dylib*
319209ff23fSmrg   fi
320209ff23fSmrg   rm conftest.c
321209ff23fSmrg      fi])
322209ff23fSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
323209ff23fSmrg      [lt_cv_ld_exported_symbols_list],
324209ff23fSmrg      [lt_cv_ld_exported_symbols_list=no
325209ff23fSmrg      save_LDFLAGS=$LDFLAGS
326209ff23fSmrg      echo "_main" > conftest.sym
327209ff23fSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
328209ff23fSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
329209ff23fSmrg   [lt_cv_ld_exported_symbols_list=yes],
330209ff23fSmrg   [lt_cv_ld_exported_symbols_list=no])
331209ff23fSmrg   LDFLAGS="$save_LDFLAGS"
332209ff23fSmrg    ])
333209ff23fSmrg    case $host_os in
334209ff23fSmrg    rhapsody* | darwin1.[[0123]])
335209ff23fSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
336209ff23fSmrg    darwin1.*)
337209ff23fSmrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
338209ff23fSmrg    darwin*)
339209ff23fSmrg      # if running on 10.5 or later, the deployment target defaults
340209ff23fSmrg      # to the OS version, if on x86, and 10.4, the deployment
341209ff23fSmrg      # target defaults to 10.4. Don't you love it?
342209ff23fSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
343209ff23fSmrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
344209ff23fSmrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
345209ff23fSmrg   10.[[012]]*)
346209ff23fSmrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
347209ff23fSmrg   10.*)
348209ff23fSmrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
349209ff23fSmrg      esac
350209ff23fSmrg    ;;
351209ff23fSmrg  esac
352209ff23fSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
353209ff23fSmrg      _lt_dar_single_mod='$single_module'
354209ff23fSmrg    fi
355209ff23fSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
356209ff23fSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
357209ff23fSmrg    else
358209ff23fSmrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
359209ff23fSmrg    fi
360209ff23fSmrg    if test "$DSYMUTIL" != ":"; then
361209ff23fSmrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
362209ff23fSmrg    else
363209ff23fSmrg      _lt_dsymutil=
364209ff23fSmrg    fi
365209ff23fSmrg    ;;
366209ff23fSmrg  esac
367209ff23fSmrg])
368209ff23fSmrg
369209ff23fSmrg# _LT_AC_SYS_LIBPATH_AIX
370209ff23fSmrg# ----------------------
371209ff23fSmrg# Links a minimal program and checks the executable
372209ff23fSmrg# for the system default hardcoded library path. In most cases,
373209ff23fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
374209ff23fSmrg# the location of the communication and MPI libs are included too.
375209ff23fSmrg# If we don't find anything, use the default library path according
376209ff23fSmrg# to the aix ld manual.
377209ff23fSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
378209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
379209ff23fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
380209ff23fSmrglt_aix_libpath_sed='
381209ff23fSmrg    /Import File Strings/,/^$/ {
382209ff23fSmrg	/^0/ {
383209ff23fSmrg	    s/^0  *\(.*\)$/\1/
384209ff23fSmrg	    p
385209ff23fSmrg	}
386209ff23fSmrg    }'
387209ff23fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
388209ff23fSmrg# Check for a 64-bit object if we didn't find anything.
389209ff23fSmrgif test -z "$aix_libpath"; then
390209ff23fSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
391209ff23fSmrgfi],[])
392209ff23fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
393209ff23fSmrg])# _LT_AC_SYS_LIBPATH_AIX
394209ff23fSmrg
395209ff23fSmrg
396209ff23fSmrg# _LT_AC_SHELL_INIT(ARG)
397209ff23fSmrg# ----------------------
398209ff23fSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
399209ff23fSmrg[ifdef([AC_DIVERSION_NOTICE],
400209ff23fSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
401209ff23fSmrg	 [AC_DIVERT_PUSH(NOTICE)])
402209ff23fSmrg$1
403209ff23fSmrgAC_DIVERT_POP
404209ff23fSmrg])# _LT_AC_SHELL_INIT
405209ff23fSmrg
406209ff23fSmrg
407209ff23fSmrg# _LT_AC_PROG_ECHO_BACKSLASH
408209ff23fSmrg# --------------------------
409209ff23fSmrg# Add some code to the start of the generated configure script which
410209ff23fSmrg# will find an echo command which doesn't interpret backslashes.
411209ff23fSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
412209ff23fSmrg[_LT_AC_SHELL_INIT([
413209ff23fSmrg# Check that we are running under the correct shell.
414209ff23fSmrgSHELL=${CONFIG_SHELL-/bin/sh}
415209ff23fSmrg
416209ff23fSmrgcase X$ECHO in
417209ff23fSmrgX*--fallback-echo)
418209ff23fSmrg  # Remove one level of quotation (which was required for Make).
419209ff23fSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
420209ff23fSmrg  ;;
421209ff23fSmrgesac
422209ff23fSmrg
423209ff23fSmrgecho=${ECHO-echo}
424209ff23fSmrgif test "X[$]1" = X--no-reexec; then
425209ff23fSmrg  # Discard the --no-reexec flag, and continue.
426209ff23fSmrg  shift
427209ff23fSmrgelif test "X[$]1" = X--fallback-echo; then
428209ff23fSmrg  # Avoid inline document here, it may be left over
429209ff23fSmrg  :
430209ff23fSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
431209ff23fSmrg  # Yippee, $echo works!
432209ff23fSmrg  :
433209ff23fSmrgelse
434209ff23fSmrg  # Restart under the correct shell.
435209ff23fSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
436209ff23fSmrgfi
437209ff23fSmrg
438209ff23fSmrgif test "X[$]1" = X--fallback-echo; then
439209ff23fSmrg  # used as fallback echo
440209ff23fSmrg  shift
441209ff23fSmrg  cat <<EOF
442209ff23fSmrg[$]*
443209ff23fSmrgEOF
444209ff23fSmrg  exit 0
445209ff23fSmrgfi
446209ff23fSmrg
447209ff23fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
448209ff23fSmrg# if CDPATH is set.
449209ff23fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
450209ff23fSmrg
451209ff23fSmrgif test -z "$ECHO"; then
452209ff23fSmrgif test "X${echo_test_string+set}" != Xset; then
453209ff23fSmrg# find a string as large as possible, as long as the shell can cope with it
454209ff23fSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
455209ff23fSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
456209ff23fSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
457209ff23fSmrg       echo_test_string=`eval $cmd` &&
458209ff23fSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
459209ff23fSmrg    then
460209ff23fSmrg      break
461209ff23fSmrg    fi
462209ff23fSmrg  done
463209ff23fSmrgfi
464209ff23fSmrg
465209ff23fSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
466209ff23fSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
467209ff23fSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
468209ff23fSmrg  :
469209ff23fSmrgelse
470209ff23fSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
471209ff23fSmrg  # backslashes.  This makes it impossible to quote backslashes using
472209ff23fSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
473209ff23fSmrg  #
474209ff23fSmrg  # So, first we look for a working echo in the user's PATH.
475209ff23fSmrg
476209ff23fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
477209ff23fSmrg  for dir in $PATH /usr/ucb; do
478209ff23fSmrg    IFS="$lt_save_ifs"
479209ff23fSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
480209ff23fSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
481209ff23fSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
482209ff23fSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
483209ff23fSmrg      echo="$dir/echo"
484209ff23fSmrg      break
485209ff23fSmrg    fi
486209ff23fSmrg  done
487209ff23fSmrg  IFS="$lt_save_ifs"
488209ff23fSmrg
489209ff23fSmrg  if test "X$echo" = Xecho; then
490209ff23fSmrg    # We didn't find a better echo, so look for alternatives.
491209ff23fSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
492209ff23fSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
493209ff23fSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
494209ff23fSmrg      # This shell has a builtin print -r that does the trick.
495209ff23fSmrg      echo='print -r'
496209ff23fSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
497209ff23fSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
498209ff23fSmrg      # If we have ksh, try running configure again with it.
499209ff23fSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
500209ff23fSmrg      export ORIGINAL_CONFIG_SHELL
501209ff23fSmrg      CONFIG_SHELL=/bin/ksh
502209ff23fSmrg      export CONFIG_SHELL
503209ff23fSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
504209ff23fSmrg    else
505209ff23fSmrg      # Try using printf.
506209ff23fSmrg      echo='printf %s\n'
507209ff23fSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
508209ff23fSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
509209ff23fSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
510209ff23fSmrg	# Cool, printf works
511209ff23fSmrg	:
512209ff23fSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
513209ff23fSmrg	   test "X$echo_testing_string" = 'X\t' &&
514209ff23fSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
515209ff23fSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
516209ff23fSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
517209ff23fSmrg	export CONFIG_SHELL
518209ff23fSmrg	SHELL="$CONFIG_SHELL"
519209ff23fSmrg	export SHELL
520209ff23fSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
521209ff23fSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
522209ff23fSmrg	   test "X$echo_testing_string" = 'X\t' &&
523209ff23fSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
524209ff23fSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
525209ff23fSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
526209ff23fSmrg      else
527209ff23fSmrg	# maybe with a smaller string...
528209ff23fSmrg	prev=:
529209ff23fSmrg
530209ff23fSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
531209ff23fSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
532209ff23fSmrg	  then
533209ff23fSmrg	    break
534209ff23fSmrg	  fi
535209ff23fSmrg	  prev="$cmd"
536209ff23fSmrg	done
537209ff23fSmrg
538209ff23fSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
539209ff23fSmrg	  echo_test_string=`eval $prev`
540209ff23fSmrg	  export echo_test_string
541209ff23fSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
542209ff23fSmrg	else
543209ff23fSmrg	  # Oops.  We lost completely, so just stick with echo.
544209ff23fSmrg	  echo=echo
545209ff23fSmrg	fi
546209ff23fSmrg      fi
547209ff23fSmrg    fi
548209ff23fSmrg  fi
549209ff23fSmrgfi
550209ff23fSmrgfi
551209ff23fSmrg
552209ff23fSmrg# Copy echo and quote the copy suitably for passing to libtool from
553209ff23fSmrg# the Makefile, instead of quoting the original, which is used later.
554209ff23fSmrgECHO=$echo
555209ff23fSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
556209ff23fSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
557209ff23fSmrgfi
558209ff23fSmrg
559209ff23fSmrgAC_SUBST(ECHO)
560209ff23fSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
561209ff23fSmrg
562209ff23fSmrg
563209ff23fSmrg# _LT_AC_LOCK
564209ff23fSmrg# -----------
565209ff23fSmrgAC_DEFUN([_LT_AC_LOCK],
566209ff23fSmrg[AC_ARG_ENABLE([libtool-lock],
567209ff23fSmrg    [AC_HELP_STRING([--disable-libtool-lock],
568209ff23fSmrg	[avoid locking (might break parallel builds)])])
569209ff23fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
570209ff23fSmrg
571209ff23fSmrg# Some flags need to be propagated to the compiler or linker for good
572209ff23fSmrg# libtool support.
573209ff23fSmrgcase $host in
574209ff23fSmrgia64-*-hpux*)
575209ff23fSmrg  # Find out which ABI we are using.
576209ff23fSmrg  echo 'int i;' > conftest.$ac_ext
577209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
578209ff23fSmrg    case `/usr/bin/file conftest.$ac_objext` in
579209ff23fSmrg    *ELF-32*)
580209ff23fSmrg      HPUX_IA64_MODE="32"
581209ff23fSmrg      ;;
582209ff23fSmrg    *ELF-64*)
583209ff23fSmrg      HPUX_IA64_MODE="64"
584209ff23fSmrg      ;;
585209ff23fSmrg    esac
586209ff23fSmrg  fi
587209ff23fSmrg  rm -rf conftest*
588209ff23fSmrg  ;;
589209ff23fSmrg*-*-irix6*)
590209ff23fSmrg  # Find out which ABI we are using.
591209ff23fSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
592209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
593209ff23fSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
594209ff23fSmrg    case `/usr/bin/file conftest.$ac_objext` in
595209ff23fSmrg    *32-bit*)
596209ff23fSmrg      LD="${LD-ld} -melf32bsmip"
597209ff23fSmrg      ;;
598209ff23fSmrg    *N32*)
599209ff23fSmrg      LD="${LD-ld} -melf32bmipn32"
600209ff23fSmrg      ;;
601209ff23fSmrg    *64-bit*)
602209ff23fSmrg      LD="${LD-ld} -melf64bmip"
603209ff23fSmrg      ;;
604209ff23fSmrg    esac
605209ff23fSmrg   else
606209ff23fSmrg    case `/usr/bin/file conftest.$ac_objext` in
607209ff23fSmrg    *32-bit*)
608209ff23fSmrg      LD="${LD-ld} -32"
609209ff23fSmrg      ;;
610209ff23fSmrg    *N32*)
611209ff23fSmrg      LD="${LD-ld} -n32"
612209ff23fSmrg      ;;
613209ff23fSmrg    *64-bit*)
614209ff23fSmrg      LD="${LD-ld} -64"
615209ff23fSmrg      ;;
616209ff23fSmrg    esac
617209ff23fSmrg   fi
618209ff23fSmrg  fi
619209ff23fSmrg  rm -rf conftest*
620209ff23fSmrg  ;;
621209ff23fSmrg
622209ff23fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
623209ff23fSmrgs390*-*linux*|sparc*-*linux*)
624209ff23fSmrg  # Find out which ABI we are using.
625209ff23fSmrg  echo 'int i;' > conftest.$ac_ext
626209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
627209ff23fSmrg    case `/usr/bin/file conftest.o` in
628209ff23fSmrg    *32-bit*)
629209ff23fSmrg      case $host in
630209ff23fSmrg        x86_64-*kfreebsd*-gnu)
631209ff23fSmrg          LD="${LD-ld} -m elf_i386_fbsd"
632209ff23fSmrg          ;;
633209ff23fSmrg        x86_64-*linux*)
634209ff23fSmrg          LD="${LD-ld} -m elf_i386"
635209ff23fSmrg          ;;
636209ff23fSmrg        ppc64-*linux*|powerpc64-*linux*)
637209ff23fSmrg          LD="${LD-ld} -m elf32ppclinux"
638209ff23fSmrg          ;;
639209ff23fSmrg        s390x-*linux*)
640209ff23fSmrg          LD="${LD-ld} -m elf_s390"
641209ff23fSmrg          ;;
642209ff23fSmrg        sparc64-*linux*)
643209ff23fSmrg          LD="${LD-ld} -m elf32_sparc"
644209ff23fSmrg          ;;
645209ff23fSmrg      esac
646209ff23fSmrg      ;;
647209ff23fSmrg    *64-bit*)
648c503f109Smrg      libsuff=64
649209ff23fSmrg      case $host in
650209ff23fSmrg        x86_64-*kfreebsd*-gnu)
651209ff23fSmrg          LD="${LD-ld} -m elf_x86_64_fbsd"
652209ff23fSmrg          ;;
653209ff23fSmrg        x86_64-*linux*)
654209ff23fSmrg          LD="${LD-ld} -m elf_x86_64"
655209ff23fSmrg          ;;
656209ff23fSmrg        ppc*-*linux*|powerpc*-*linux*)
657209ff23fSmrg          LD="${LD-ld} -m elf64ppc"
658209ff23fSmrg          ;;
659209ff23fSmrg        s390*-*linux*)
660209ff23fSmrg          LD="${LD-ld} -m elf64_s390"
661209ff23fSmrg          ;;
662209ff23fSmrg        sparc*-*linux*)
663209ff23fSmrg          LD="${LD-ld} -m elf64_sparc"
664209ff23fSmrg          ;;
665209ff23fSmrg      esac
666209ff23fSmrg      ;;
667209ff23fSmrg    esac
668209ff23fSmrg  fi
669209ff23fSmrg  rm -rf conftest*
670209ff23fSmrg  ;;
671209ff23fSmrg
672209ff23fSmrg*-*-sco3.2v5*)
673209ff23fSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
674209ff23fSmrg  SAVE_CFLAGS="$CFLAGS"
675209ff23fSmrg  CFLAGS="$CFLAGS -belf"
676209ff23fSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
677209ff23fSmrg    [AC_LANG_PUSH(C)
678209ff23fSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
679209ff23fSmrg     AC_LANG_POP])
680209ff23fSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
681209ff23fSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
682209ff23fSmrg    CFLAGS="$SAVE_CFLAGS"
683209ff23fSmrg  fi
684209ff23fSmrg  ;;
685209ff23fSmrgsparc*-*solaris*)
686209ff23fSmrg  # Find out which ABI we are using.
687209ff23fSmrg  echo 'int i;' > conftest.$ac_ext
688209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
689209ff23fSmrg    case `/usr/bin/file conftest.o` in
690209ff23fSmrg    *64-bit*)
691209ff23fSmrg      case $lt_cv_prog_gnu_ld in
692209ff23fSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
693209ff23fSmrg      *)
694209ff23fSmrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
695209ff23fSmrg	  LD="${LD-ld} -64"
696209ff23fSmrg	fi
697209ff23fSmrg	;;
698209ff23fSmrg      esac
699209ff23fSmrg      ;;
700209ff23fSmrg    esac
701209ff23fSmrg  fi
702209ff23fSmrg  rm -rf conftest*
703209ff23fSmrg  ;;
704209ff23fSmrg
705209ff23fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
706209ff23fSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
707209ff23fSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
708209ff23fSmrg  AC_CHECK_TOOL(AS, as, false)
709209ff23fSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
710209ff23fSmrg  ;;
711209ff23fSmrg  ])
712209ff23fSmrgesac
713209ff23fSmrg
714209ff23fSmrgneed_locks="$enable_libtool_lock"
715209ff23fSmrg
716209ff23fSmrg])# _LT_AC_LOCK
717209ff23fSmrg
718209ff23fSmrg
719209ff23fSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
720209ff23fSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
721209ff23fSmrg# ----------------------------------------------------------------
722209ff23fSmrg# Check whether the given compiler option works
723209ff23fSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
724209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])
725209ff23fSmrgAC_CACHE_CHECK([$1], [$2],
726209ff23fSmrg  [$2=no
727209ff23fSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
728209ff23fSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
729209ff23fSmrg   lt_compiler_flag="$3"
730209ff23fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
731209ff23fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
732209ff23fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
733209ff23fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
734209ff23fSmrg   # The option is referenced via a variable to avoid confusing sed.
735209ff23fSmrg   lt_compile=`echo "$ac_compile" | $SED \
736209ff23fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
737209ff23fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
738209ff23fSmrg   -e 's:$: $lt_compiler_flag:'`
739209ff23fSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
740209ff23fSmrg   (eval "$lt_compile" 2>conftest.err)
741209ff23fSmrg   ac_status=$?
742209ff23fSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
743209ff23fSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
744209ff23fSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
745209ff23fSmrg     # The compiler can only warn and ignore the option if not recognized
746209ff23fSmrg     # So say no if there are warnings other than the usual output.
747209ff23fSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
748209ff23fSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
749209ff23fSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
750209ff23fSmrg       $2=yes
751209ff23fSmrg     fi
752209ff23fSmrg   fi
753209ff23fSmrg   $rm conftest*
754209ff23fSmrg])
755209ff23fSmrg
756209ff23fSmrgif test x"[$]$2" = xyes; then
757209ff23fSmrg    ifelse([$5], , :, [$5])
758209ff23fSmrgelse
759209ff23fSmrg    ifelse([$6], , :, [$6])
760209ff23fSmrgfi
761209ff23fSmrg])# AC_LIBTOOL_COMPILER_OPTION
762209ff23fSmrg
763209ff23fSmrg
764209ff23fSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
765209ff23fSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
766209ff23fSmrg# ------------------------------------------------------------
767209ff23fSmrg# Check whether the given compiler option works
768209ff23fSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
769209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
770209ff23fSmrgAC_CACHE_CHECK([$1], [$2],
771209ff23fSmrg  [$2=no
772209ff23fSmrg   save_LDFLAGS="$LDFLAGS"
773209ff23fSmrg   LDFLAGS="$LDFLAGS $3"
774209ff23fSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
775209ff23fSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
776209ff23fSmrg     # The linker can only warn and ignore the option if not recognized
777209ff23fSmrg     # So say no if there are warnings
778209ff23fSmrg     if test -s conftest.err; then
779209ff23fSmrg       # Append any errors to the config.log.
780209ff23fSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
781209ff23fSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
782209ff23fSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
783209ff23fSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
784209ff23fSmrg         $2=yes
785209ff23fSmrg       fi
786209ff23fSmrg     else
787209ff23fSmrg       $2=yes
788209ff23fSmrg     fi
789209ff23fSmrg   fi
790209ff23fSmrg   $rm -r conftest*
791209ff23fSmrg   LDFLAGS="$save_LDFLAGS"
792209ff23fSmrg])
793209ff23fSmrg
794209ff23fSmrgif test x"[$]$2" = xyes; then
795209ff23fSmrg    ifelse([$4], , :, [$4])
796209ff23fSmrgelse
797209ff23fSmrg    ifelse([$5], , :, [$5])
798209ff23fSmrgfi
799209ff23fSmrg])# AC_LIBTOOL_LINKER_OPTION
800209ff23fSmrg
801209ff23fSmrg
802209ff23fSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
803209ff23fSmrg# --------------------------
804209ff23fSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
805209ff23fSmrg[# find the maximum length of command line arguments
806209ff23fSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
807209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
808209ff23fSmrg  i=0
809209ff23fSmrg  teststring="ABCD"
810209ff23fSmrg
811209ff23fSmrg  case $build_os in
812209ff23fSmrg  msdosdjgpp*)
813209ff23fSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
814209ff23fSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
815209ff23fSmrg    # during glob expansion).  Even if it were fixed, the result of this
816209ff23fSmrg    # check would be larger than it should be.
817209ff23fSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
818209ff23fSmrg    ;;
819209ff23fSmrg
820209ff23fSmrg  gnu*)
821209ff23fSmrg    # Under GNU Hurd, this test is not required because there is
822209ff23fSmrg    # no limit to the length of command line arguments.
823209ff23fSmrg    # Libtool will interpret -1 as no limit whatsoever
824209ff23fSmrg    lt_cv_sys_max_cmd_len=-1;
825209ff23fSmrg    ;;
826209ff23fSmrg
827209ff23fSmrg  cygwin* | mingw*)
828209ff23fSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
829209ff23fSmrg    # about 5 minutes as the teststring grows exponentially.
830209ff23fSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
831209ff23fSmrg    # you end up with a "frozen" computer, even though with patience
832209ff23fSmrg    # the test eventually succeeds (with a max line length of 256k).
833209ff23fSmrg    # Instead, let's just punt: use the minimum linelength reported by
834209ff23fSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
835209ff23fSmrg    lt_cv_sys_max_cmd_len=8192;
836209ff23fSmrg    ;;
837209ff23fSmrg
838209ff23fSmrg  amigaos*)
839209ff23fSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
840209ff23fSmrg    # So we just punt and use a minimum line length of 8192.
841209ff23fSmrg    lt_cv_sys_max_cmd_len=8192;
842209ff23fSmrg    ;;
843209ff23fSmrg
844209ff23fSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
845209ff23fSmrg    # This has been around since 386BSD, at least.  Likely further.
846209ff23fSmrg    if test -x /sbin/sysctl; then
847209ff23fSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
848209ff23fSmrg    elif test -x /usr/sbin/sysctl; then
849209ff23fSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
850209ff23fSmrg    else
851209ff23fSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
852209ff23fSmrg    fi
853209ff23fSmrg    # And add a safety zone
854209ff23fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
855209ff23fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
856209ff23fSmrg    ;;
857209ff23fSmrg
858209ff23fSmrg  interix*)
859209ff23fSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
860209ff23fSmrg    lt_cv_sys_max_cmd_len=196608
861209ff23fSmrg    ;;
862209ff23fSmrg
863209ff23fSmrg  osf*)
864209ff23fSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
865209ff23fSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
866209ff23fSmrg    # nice to cause kernel panics so lets avoid the loop below.
867209ff23fSmrg    # First set a reasonable default.
868209ff23fSmrg    lt_cv_sys_max_cmd_len=16384
869209ff23fSmrg    #
870209ff23fSmrg    if test -x /sbin/sysconfig; then
871209ff23fSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
872209ff23fSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
873209ff23fSmrg      esac
874209ff23fSmrg    fi
875209ff23fSmrg    ;;
876209ff23fSmrg  sco3.2v5*)
877209ff23fSmrg    lt_cv_sys_max_cmd_len=102400
878209ff23fSmrg    ;;
879209ff23fSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
880209ff23fSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
881209ff23fSmrg    if test -n "$kargmax"; then
882209ff23fSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
883209ff23fSmrg    else
884209ff23fSmrg      lt_cv_sys_max_cmd_len=32768
885209ff23fSmrg    fi
886209ff23fSmrg    ;;
887209ff23fSmrg  *)
888209ff23fSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
889209ff23fSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
890209ff23fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
891209ff23fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
892209ff23fSmrg    else
893209ff23fSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
894209ff23fSmrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
895209ff23fSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
896209ff23fSmrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
897209ff23fSmrg	      lt_cv_sys_max_cmd_len=$new_result &&
898209ff23fSmrg	      test $i != 17 # 1/2 MB should be enough
899209ff23fSmrg      do
900209ff23fSmrg        i=`expr $i + 1`
901209ff23fSmrg        teststring=$teststring$teststring
902209ff23fSmrg      done
903209ff23fSmrg      teststring=
904209ff23fSmrg      # Add a significant safety factor because C++ compilers can tack on massive
905209ff23fSmrg      # amounts of additional arguments before passing them to the linker.
906209ff23fSmrg      # It appears as though 1/2 is a usable value.
907209ff23fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
908209ff23fSmrg    fi
909209ff23fSmrg    ;;
910209ff23fSmrg  esac
911209ff23fSmrg])
912209ff23fSmrgif test -n $lt_cv_sys_max_cmd_len ; then
913209ff23fSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
914209ff23fSmrgelse
915209ff23fSmrg  AC_MSG_RESULT(none)
916209ff23fSmrgfi
917209ff23fSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
918209ff23fSmrg
919209ff23fSmrg
920209ff23fSmrg# _LT_AC_CHECK_DLFCN
921209ff23fSmrg# ------------------
922209ff23fSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
923209ff23fSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
924209ff23fSmrg])# _LT_AC_CHECK_DLFCN
925209ff23fSmrg
926209ff23fSmrg
927209ff23fSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
928209ff23fSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
929209ff23fSmrg# ---------------------------------------------------------------------
930209ff23fSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
931209ff23fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
932209ff23fSmrgif test "$cross_compiling" = yes; then :
933209ff23fSmrg  [$4]
934209ff23fSmrgelse
935209ff23fSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
936209ff23fSmrg  lt_status=$lt_dlunknown
937209ff23fSmrg  cat > conftest.$ac_ext <<EOF
938209ff23fSmrg[#line __oline__ "configure"
939209ff23fSmrg#include "confdefs.h"
940209ff23fSmrg
941209ff23fSmrg#if HAVE_DLFCN_H
942209ff23fSmrg#include <dlfcn.h>
943209ff23fSmrg#endif
944209ff23fSmrg
945209ff23fSmrg#include <stdio.h>
946209ff23fSmrg
947209ff23fSmrg#ifdef RTLD_GLOBAL
948209ff23fSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
949209ff23fSmrg#else
950209ff23fSmrg#  ifdef DL_GLOBAL
951209ff23fSmrg#    define LT_DLGLOBAL		DL_GLOBAL
952209ff23fSmrg#  else
953209ff23fSmrg#    define LT_DLGLOBAL		0
954209ff23fSmrg#  endif
955209ff23fSmrg#endif
956209ff23fSmrg
957209ff23fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
958209ff23fSmrg   find out it does not work in some platform. */
959209ff23fSmrg#ifndef LT_DLLAZY_OR_NOW
960209ff23fSmrg#  ifdef RTLD_LAZY
961209ff23fSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
962209ff23fSmrg#  else
963209ff23fSmrg#    ifdef DL_LAZY
964209ff23fSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
965209ff23fSmrg#    else
966209ff23fSmrg#      ifdef RTLD_NOW
967209ff23fSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
968209ff23fSmrg#      else
969209ff23fSmrg#        ifdef DL_NOW
970209ff23fSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
971209ff23fSmrg#        else
972209ff23fSmrg#          define LT_DLLAZY_OR_NOW	0
973209ff23fSmrg#        endif
974209ff23fSmrg#      endif
975209ff23fSmrg#    endif
976209ff23fSmrg#  endif
977209ff23fSmrg#endif
978209ff23fSmrg
979209ff23fSmrg#ifdef __cplusplus
980209ff23fSmrgextern "C" void exit (int);
981209ff23fSmrg#endif
982209ff23fSmrg
983209ff23fSmrgvoid fnord() { int i=42;}
984209ff23fSmrgint main ()
985209ff23fSmrg{
986209ff23fSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
987209ff23fSmrg  int status = $lt_dlunknown;
988209ff23fSmrg
989209ff23fSmrg  if (self)
990209ff23fSmrg    {
991209ff23fSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
992209ff23fSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
993209ff23fSmrg      /* dlclose (self); */
994209ff23fSmrg    }
995209ff23fSmrg  else
996209ff23fSmrg    puts (dlerror ());
997209ff23fSmrg
998209ff23fSmrg    exit (status);
999209ff23fSmrg}]
1000209ff23fSmrgEOF
1001209ff23fSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1002209ff23fSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1003209ff23fSmrg    lt_status=$?
1004209ff23fSmrg    case x$lt_status in
1005209ff23fSmrg      x$lt_dlno_uscore) $1 ;;
1006209ff23fSmrg      x$lt_dlneed_uscore) $2 ;;
1007209ff23fSmrg      x$lt_dlunknown|x*) $3 ;;
1008209ff23fSmrg    esac
1009209ff23fSmrg  else :
1010209ff23fSmrg    # compilation failed
1011209ff23fSmrg    $3
1012209ff23fSmrg  fi
1013209ff23fSmrgfi
1014209ff23fSmrgrm -fr conftest*
1015209ff23fSmrg])# _LT_AC_TRY_DLOPEN_SELF
1016209ff23fSmrg
1017209ff23fSmrg
1018209ff23fSmrg# AC_LIBTOOL_DLOPEN_SELF
1019209ff23fSmrg# ----------------------
1020209ff23fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1021209ff23fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1022209ff23fSmrgif test "x$enable_dlopen" != xyes; then
1023209ff23fSmrg  enable_dlopen=unknown
1024209ff23fSmrg  enable_dlopen_self=unknown
1025209ff23fSmrg  enable_dlopen_self_static=unknown
1026209ff23fSmrgelse
1027209ff23fSmrg  lt_cv_dlopen=no
1028209ff23fSmrg  lt_cv_dlopen_libs=
1029209ff23fSmrg
1030209ff23fSmrg  case $host_os in
1031209ff23fSmrg  beos*)
1032209ff23fSmrg    lt_cv_dlopen="load_add_on"
1033209ff23fSmrg    lt_cv_dlopen_libs=
1034209ff23fSmrg    lt_cv_dlopen_self=yes
1035209ff23fSmrg    ;;
1036209ff23fSmrg
1037209ff23fSmrg  mingw* | pw32*)
1038209ff23fSmrg    lt_cv_dlopen="LoadLibrary"
1039209ff23fSmrg    lt_cv_dlopen_libs=
1040209ff23fSmrg   ;;
1041209ff23fSmrg
1042209ff23fSmrg  cygwin*)
1043209ff23fSmrg    lt_cv_dlopen="dlopen"
1044209ff23fSmrg    lt_cv_dlopen_libs=
1045209ff23fSmrg   ;;
1046209ff23fSmrg
1047209ff23fSmrg  darwin*)
1048209ff23fSmrg  # if libdl is installed we need to link against it
1049209ff23fSmrg    AC_CHECK_LIB([dl], [dlopen],
1050209ff23fSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1051209ff23fSmrg    lt_cv_dlopen="dyld"
1052209ff23fSmrg    lt_cv_dlopen_libs=
1053209ff23fSmrg    lt_cv_dlopen_self=yes
1054209ff23fSmrg    ])
1055209ff23fSmrg   ;;
1056209ff23fSmrg
1057209ff23fSmrg  *)
1058209ff23fSmrg    AC_CHECK_FUNC([shl_load],
1059209ff23fSmrg	  [lt_cv_dlopen="shl_load"],
1060209ff23fSmrg      [AC_CHECK_LIB([dld], [shl_load],
1061209ff23fSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1062209ff23fSmrg	[AC_CHECK_FUNC([dlopen],
1063209ff23fSmrg	      [lt_cv_dlopen="dlopen"],
1064209ff23fSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1065209ff23fSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1066209ff23fSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1067209ff23fSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1068209ff23fSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1069209ff23fSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1070209ff23fSmrg	      ])
1071209ff23fSmrg	    ])
1072209ff23fSmrg	  ])
1073209ff23fSmrg	])
1074209ff23fSmrg      ])
1075209ff23fSmrg    ;;
1076209ff23fSmrg  esac
1077209ff23fSmrg
1078209ff23fSmrg  if test "x$lt_cv_dlopen" != xno; then
1079209ff23fSmrg    enable_dlopen=yes
1080209ff23fSmrg  else
1081209ff23fSmrg    enable_dlopen=no
1082209ff23fSmrg  fi
1083209ff23fSmrg
1084209ff23fSmrg  case $lt_cv_dlopen in
1085209ff23fSmrg  dlopen)
1086209ff23fSmrg    save_CPPFLAGS="$CPPFLAGS"
1087209ff23fSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1088209ff23fSmrg
1089209ff23fSmrg    save_LDFLAGS="$LDFLAGS"
1090209ff23fSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1091209ff23fSmrg
1092209ff23fSmrg    save_LIBS="$LIBS"
1093209ff23fSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1094209ff23fSmrg
1095209ff23fSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1096209ff23fSmrg	  lt_cv_dlopen_self, [dnl
1097209ff23fSmrg	  _LT_AC_TRY_DLOPEN_SELF(
1098209ff23fSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1099209ff23fSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1100209ff23fSmrg    ])
1101209ff23fSmrg
1102209ff23fSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1103209ff23fSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1104209ff23fSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1105209ff23fSmrg    	  lt_cv_dlopen_self_static, [dnl
1106209ff23fSmrg	  _LT_AC_TRY_DLOPEN_SELF(
1107209ff23fSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1108209ff23fSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1109209ff23fSmrg      ])
1110209ff23fSmrg    fi
1111209ff23fSmrg
1112209ff23fSmrg    CPPFLAGS="$save_CPPFLAGS"
1113209ff23fSmrg    LDFLAGS="$save_LDFLAGS"
1114209ff23fSmrg    LIBS="$save_LIBS"
1115209ff23fSmrg    ;;
1116209ff23fSmrg  esac
1117209ff23fSmrg
1118209ff23fSmrg  case $lt_cv_dlopen_self in
1119209ff23fSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1120209ff23fSmrg  *) enable_dlopen_self=unknown ;;
1121209ff23fSmrg  esac
1122209ff23fSmrg
1123209ff23fSmrg  case $lt_cv_dlopen_self_static in
1124209ff23fSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1125209ff23fSmrg  *) enable_dlopen_self_static=unknown ;;
1126209ff23fSmrg  esac
1127209ff23fSmrgfi
1128209ff23fSmrg])# AC_LIBTOOL_DLOPEN_SELF
1129209ff23fSmrg
1130209ff23fSmrg
1131209ff23fSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1132209ff23fSmrg# ---------------------------------
1133209ff23fSmrg# Check to see if options -c and -o are simultaneously supported by compiler
1134209ff23fSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1135209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1136209ff23fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1137209ff23fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1138209ff23fSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1139209ff23fSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1140209ff23fSmrg   $rm -r conftest 2>/dev/null
1141209ff23fSmrg   mkdir conftest
1142209ff23fSmrg   cd conftest
1143209ff23fSmrg   mkdir out
1144209ff23fSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1145209ff23fSmrg
1146209ff23fSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1147209ff23fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1148209ff23fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1149209ff23fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1150209ff23fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1151209ff23fSmrg   lt_compile=`echo "$ac_compile" | $SED \
1152209ff23fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1153209ff23fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1154209ff23fSmrg   -e 's:$: $lt_compiler_flag:'`
1155209ff23fSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1156209ff23fSmrg   (eval "$lt_compile" 2>out/conftest.err)
1157209ff23fSmrg   ac_status=$?
1158209ff23fSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1159209ff23fSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1160209ff23fSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1161209ff23fSmrg   then
1162209ff23fSmrg     # The compiler can only warn and ignore the option if not recognized
1163209ff23fSmrg     # So say no if there are warnings
1164209ff23fSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1165209ff23fSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1166209ff23fSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1167209ff23fSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1168209ff23fSmrg     fi
1169209ff23fSmrg   fi
1170209ff23fSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1171209ff23fSmrg   $rm conftest*
1172209ff23fSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1173209ff23fSmrg   # template instantiation
1174209ff23fSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1175209ff23fSmrg   $rm out/* && rmdir out
1176209ff23fSmrg   cd ..
1177209ff23fSmrg   rmdir conftest
1178209ff23fSmrg   $rm conftest*
1179209ff23fSmrg])
1180209ff23fSmrg])# AC_LIBTOOL_PROG_CC_C_O
1181209ff23fSmrg
1182209ff23fSmrg
1183209ff23fSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1184209ff23fSmrg# -----------------------------------------
1185209ff23fSmrg# Check to see if we can do hard links to lock some files if needed
1186209ff23fSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1187209ff23fSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
1188209ff23fSmrg
1189209ff23fSmrghard_links="nottested"
1190209ff23fSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1191209ff23fSmrg  # do not overwrite the value of need_locks provided by the user
1192209ff23fSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1193209ff23fSmrg  hard_links=yes
1194209ff23fSmrg  $rm conftest*
1195209ff23fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1196209ff23fSmrg  touch conftest.a
1197209ff23fSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1198209ff23fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1199209ff23fSmrg  AC_MSG_RESULT([$hard_links])
1200209ff23fSmrg  if test "$hard_links" = no; then
1201209ff23fSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1202209ff23fSmrg    need_locks=warn
1203209ff23fSmrg  fi
1204209ff23fSmrgelse
1205209ff23fSmrg  need_locks=no
1206209ff23fSmrgfi
1207209ff23fSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1208209ff23fSmrg
1209209ff23fSmrg
1210209ff23fSmrg# AC_LIBTOOL_OBJDIR
1211209ff23fSmrg# -----------------
1212209ff23fSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
1213209ff23fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1214209ff23fSmrg[rm -f .libs 2>/dev/null
1215209ff23fSmrgmkdir .libs 2>/dev/null
1216209ff23fSmrgif test -d .libs; then
1217209ff23fSmrg  lt_cv_objdir=.libs
1218209ff23fSmrgelse
1219209ff23fSmrg  # MS-DOS does not allow filenames that begin with a dot.
1220209ff23fSmrg  lt_cv_objdir=_libs
1221209ff23fSmrgfi
1222209ff23fSmrgrmdir .libs 2>/dev/null])
1223209ff23fSmrgobjdir=$lt_cv_objdir
1224209ff23fSmrg])# AC_LIBTOOL_OBJDIR
1225209ff23fSmrg
1226209ff23fSmrg
1227209ff23fSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1228209ff23fSmrg# ----------------------------------------------
1229209ff23fSmrg# Check hardcoding attributes.
1230209ff23fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1231209ff23fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1232209ff23fSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
1233209ff23fSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1234209ff23fSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1235209ff23fSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1236209ff23fSmrg
1237209ff23fSmrg  # We can hardcode non-existant directories.
1238209ff23fSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1239209ff23fSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1240209ff23fSmrg     # have to relink, otherwise we might link with an installed library
1241209ff23fSmrg     # when we should be linking with a yet-to-be-installed one
1242209ff23fSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1243209ff23fSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1244209ff23fSmrg    # Linking always hardcodes the temporary library directory.
1245209ff23fSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1246209ff23fSmrg  else
1247209ff23fSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1248209ff23fSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1249209ff23fSmrg  fi
1250209ff23fSmrgelse
1251209ff23fSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1252209ff23fSmrg  # directories.
1253209ff23fSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1254209ff23fSmrgfi
1255209ff23fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1256209ff23fSmrg
1257209ff23fSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1258209ff23fSmrg  # Fast installation is not supported
1259209ff23fSmrg  enable_fast_install=no
1260209ff23fSmrgelif test "$shlibpath_overrides_runpath" = yes ||
1261209ff23fSmrg     test "$enable_shared" = no; then
1262209ff23fSmrg  # Fast installation is not necessary
1263209ff23fSmrg  enable_fast_install=needless
1264209ff23fSmrgfi
1265209ff23fSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1266209ff23fSmrg
1267209ff23fSmrg
1268209ff23fSmrg# AC_LIBTOOL_SYS_LIB_STRIP
1269209ff23fSmrg# ------------------------
1270209ff23fSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1271209ff23fSmrg[striplib=
1272209ff23fSmrgold_striplib=
1273209ff23fSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
1274209ff23fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1275209ff23fSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1276209ff23fSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1277209ff23fSmrg  AC_MSG_RESULT([yes])
1278209ff23fSmrgelse
1279209ff23fSmrg# FIXME - insert some real tests, host_os isn't really good enough
1280209ff23fSmrg  case $host_os in
1281209ff23fSmrg   darwin*)
1282209ff23fSmrg       if test -n "$STRIP" ; then
1283209ff23fSmrg         striplib="$STRIP -x"
1284209ff23fSmrg         old_striplib="$STRIP -S"
1285209ff23fSmrg         AC_MSG_RESULT([yes])
1286209ff23fSmrg       else
1287209ff23fSmrg  AC_MSG_RESULT([no])
1288209ff23fSmrgfi
1289209ff23fSmrg       ;;
1290209ff23fSmrg   *)
1291209ff23fSmrg  AC_MSG_RESULT([no])
1292209ff23fSmrg    ;;
1293209ff23fSmrg  esac
1294209ff23fSmrgfi
1295209ff23fSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
1296209ff23fSmrg
1297209ff23fSmrg
1298209ff23fSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1299209ff23fSmrg# -----------------------------
1300209ff23fSmrg# PORTME Fill in your ld.so characteristics
1301209ff23fSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1302209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1303209ff23fSmrgAC_MSG_CHECKING([dynamic linker characteristics])
1304209ff23fSmrglibrary_names_spec=
1305209ff23fSmrglibname_spec='lib$name'
1306209ff23fSmrgsoname_spec=
1307209ff23fSmrgshrext_cmds=".so"
1308209ff23fSmrgpostinstall_cmds=
1309209ff23fSmrgpostuninstall_cmds=
1310209ff23fSmrgfinish_cmds=
1311209ff23fSmrgfinish_eval=
1312209ff23fSmrgshlibpath_var=
1313209ff23fSmrgshlibpath_overrides_runpath=unknown
1314209ff23fSmrgversion_type=none
1315209ff23fSmrgdynamic_linker="$host_os ld.so"
1316209ff23fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1317209ff23fSmrgm4_if($1,[],[
1318209ff23fSmrgif test "$GCC" = yes; then
1319209ff23fSmrg  case $host_os in
1320209ff23fSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1321209ff23fSmrg    *) lt_awk_arg="/^libraries:/" ;;
1322209ff23fSmrg  esac
1323209ff23fSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1324209ff23fSmrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1325209ff23fSmrg    # if the path contains ";" then we assume it to be the separator
1326209ff23fSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
1327209ff23fSmrg    # assumed that no part of a normal pathname contains ";" but that should
1328209ff23fSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
1329209ff23fSmrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1330209ff23fSmrg  else
1331209ff23fSmrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1332209ff23fSmrg  fi
1333209ff23fSmrg  # Ok, now we have the path, separated by spaces, we can step through it
1334209ff23fSmrg  # and add multilib dir if necessary.
1335209ff23fSmrg  lt_tmp_lt_search_path_spec=
1336209ff23fSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1337209ff23fSmrg  for lt_sys_path in $lt_search_path_spec; do
1338209ff23fSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1339209ff23fSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1340209ff23fSmrg    else
1341209ff23fSmrg      test -d "$lt_sys_path" && \
1342209ff23fSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1343209ff23fSmrg    fi
1344209ff23fSmrg  done
1345209ff23fSmrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1346209ff23fSmrgBEGIN {RS=" "; FS="/|\n";} {
1347209ff23fSmrg  lt_foo="";
1348209ff23fSmrg  lt_count=0;
1349209ff23fSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
1350209ff23fSmrg    if ($lt_i != "" && $lt_i != ".") {
1351209ff23fSmrg      if ($lt_i == "..") {
1352209ff23fSmrg        lt_count++;
1353209ff23fSmrg      } else {
1354209ff23fSmrg        if (lt_count == 0) {
1355209ff23fSmrg          lt_foo="/" $lt_i lt_foo;
1356209ff23fSmrg        } else {
1357209ff23fSmrg          lt_count--;
1358209ff23fSmrg        }
1359209ff23fSmrg      }
1360209ff23fSmrg    }
1361209ff23fSmrg  }
1362209ff23fSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1363209ff23fSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1364209ff23fSmrg}'`
1365209ff23fSmrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
1366209ff23fSmrgelse
1367209ff23fSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1368209ff23fSmrgfi])
1369209ff23fSmrgneed_lib_prefix=unknown
1370209ff23fSmrghardcode_into_libs=no
1371209ff23fSmrg
1372209ff23fSmrg# when you set need_version to no, make sure it does not cause -set_version
1373209ff23fSmrg# flags to be left without arguments
1374209ff23fSmrgneed_version=unknown
1375209ff23fSmrg
1376209ff23fSmrgcase $host_os in
1377209ff23fSmrgaix3*)
1378209ff23fSmrg  version_type=linux
1379209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1380209ff23fSmrg  shlibpath_var=LIBPATH
1381209ff23fSmrg
1382209ff23fSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
1383209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1384209ff23fSmrg  ;;
1385209ff23fSmrg
1386209ff23fSmrgaix[[4-9]]*)
1387209ff23fSmrg  version_type=linux
1388209ff23fSmrg  need_lib_prefix=no
1389209ff23fSmrg  need_version=no
1390209ff23fSmrg  hardcode_into_libs=yes
1391209ff23fSmrg  if test "$host_cpu" = ia64; then
1392209ff23fSmrg    # AIX 5 supports IA64
1393209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1394209ff23fSmrg    shlibpath_var=LD_LIBRARY_PATH
1395209ff23fSmrg  else
1396209ff23fSmrg    # With GCC up to 2.95.x, collect2 would create an import file
1397209ff23fSmrg    # for dependence libraries.  The import file would start with
1398209ff23fSmrg    # the line `#! .'.  This would cause the generated library to
1399209ff23fSmrg    # depend on `.', always an invalid library.  This was fixed in
1400209ff23fSmrg    # development snapshots of GCC prior to 3.0.
1401209ff23fSmrg    case $host_os in
1402209ff23fSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
1403209ff23fSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1404209ff23fSmrg	   echo ' yes '
1405209ff23fSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1406209ff23fSmrg	:
1407209ff23fSmrg      else
1408209ff23fSmrg	can_build_shared=no
1409209ff23fSmrg      fi
1410209ff23fSmrg      ;;
1411209ff23fSmrg    esac
1412209ff23fSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1413209ff23fSmrg    # soname into executable. Probably we can add versioning support to
1414209ff23fSmrg    # collect2, so additional links can be useful in future.
1415209ff23fSmrg    if test "$aix_use_runtimelinking" = yes; then
1416209ff23fSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1417209ff23fSmrg      # instead of lib<name>.a to let people know that these are not
1418209ff23fSmrg      # typical AIX shared libraries.
1419209ff23fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1420209ff23fSmrg    else
1421209ff23fSmrg      # We preserve .a as extension for shared libraries through AIX4.2
1422209ff23fSmrg      # and later when we are not doing run time linking.
1423209ff23fSmrg      library_names_spec='${libname}${release}.a $libname.a'
1424209ff23fSmrg      soname_spec='${libname}${release}${shared_ext}$major'
1425209ff23fSmrg    fi
1426209ff23fSmrg    shlibpath_var=LIBPATH
1427209ff23fSmrg  fi
1428209ff23fSmrg  ;;
1429209ff23fSmrg
1430209ff23fSmrgamigaos*)
1431209ff23fSmrg  library_names_spec='$libname.ixlibrary $libname.a'
1432209ff23fSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1433209ff23fSmrg  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'
1434209ff23fSmrg  ;;
1435209ff23fSmrg
1436209ff23fSmrgbeos*)
1437209ff23fSmrg  library_names_spec='${libname}${shared_ext}'
1438209ff23fSmrg  dynamic_linker="$host_os ld.so"
1439209ff23fSmrg  shlibpath_var=LIBRARY_PATH
1440209ff23fSmrg  ;;
1441209ff23fSmrg
1442209ff23fSmrgbsdi[[45]]*)
1443209ff23fSmrg  version_type=linux
1444209ff23fSmrg  need_version=no
1445209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1446209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1447209ff23fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1448209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1449209ff23fSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1450209ff23fSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1451209ff23fSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
1452209ff23fSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1453209ff23fSmrg  # libtool to hard-code these into programs
1454209ff23fSmrg  ;;
1455209ff23fSmrg
1456209ff23fSmrgcygwin* | mingw* | pw32*)
1457209ff23fSmrg  version_type=windows
1458209ff23fSmrg  shrext_cmds=".dll"
1459209ff23fSmrg  need_version=no
1460209ff23fSmrg  need_lib_prefix=no
1461209ff23fSmrg
1462209ff23fSmrg  case $GCC,$host_os in
1463209ff23fSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
1464209ff23fSmrg    library_names_spec='$libname.dll.a'
1465209ff23fSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1466209ff23fSmrg    postinstall_cmds='base_file=`basename \${file}`~
1467209ff23fSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1468209ff23fSmrg      dldir=$destdir/`dirname \$dlpath`~
1469209ff23fSmrg      test -d \$dldir || mkdir -p \$dldir~
1470209ff23fSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
1471209ff23fSmrg      chmod a+x \$dldir/$dlname'
1472209ff23fSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1473209ff23fSmrg      dlpath=$dir/\$dldll~
1474209ff23fSmrg       $rm \$dlpath'
1475209ff23fSmrg    shlibpath_overrides_runpath=yes
1476209ff23fSmrg
1477209ff23fSmrg    case $host_os in
1478209ff23fSmrg    cygwin*)
1479209ff23fSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1480209ff23fSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1481209ff23fSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1482209ff23fSmrg      ;;
1483209ff23fSmrg    mingw*)
1484209ff23fSmrg      # MinGW DLLs use traditional 'lib' prefix
1485209ff23fSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1486209ff23fSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1487209ff23fSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1488209ff23fSmrg        # It is most probably a Windows format PATH printed by
1489209ff23fSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1490209ff23fSmrg        # path with ; separators, and with drive letters. We can handle the
1491209ff23fSmrg        # drive letters (cygwin fileutils understands them), so leave them,
1492209ff23fSmrg        # especially as we might pass files found there to a mingw objdump,
1493209ff23fSmrg        # which wouldn't understand a cygwinified path. Ahh.
1494209ff23fSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1495209ff23fSmrg      else
1496209ff23fSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1497209ff23fSmrg      fi
1498209ff23fSmrg      ;;
1499209ff23fSmrg    pw32*)
1500209ff23fSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
1501209ff23fSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1502209ff23fSmrg      ;;
1503209ff23fSmrg    esac
1504209ff23fSmrg    ;;
1505209ff23fSmrg
1506209ff23fSmrg  *)
1507209ff23fSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1508209ff23fSmrg    ;;
1509209ff23fSmrg  esac
1510209ff23fSmrg  dynamic_linker='Win32 ld.exe'
1511209ff23fSmrg  # FIXME: first we should search . and the directory the executable is in
1512209ff23fSmrg  shlibpath_var=PATH
1513209ff23fSmrg  ;;
1514209ff23fSmrg
1515209ff23fSmrgdarwin* | rhapsody*)
1516209ff23fSmrg  dynamic_linker="$host_os dyld"
1517209ff23fSmrg  version_type=darwin
1518209ff23fSmrg  need_lib_prefix=no
1519209ff23fSmrg  need_version=no
1520209ff23fSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1521209ff23fSmrg  soname_spec='${libname}${release}${major}$shared_ext'
1522209ff23fSmrg  shlibpath_overrides_runpath=yes
1523209ff23fSmrg  shlibpath_var=DYLD_LIBRARY_PATH
1524209ff23fSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1525209ff23fSmrg  m4_if([$1], [],[
1526209ff23fSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
1527209ff23fSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1528209ff23fSmrg  ;;
1529209ff23fSmrg
1530209ff23fSmrgdgux*)
1531209ff23fSmrg  version_type=linux
1532209ff23fSmrg  need_lib_prefix=no
1533209ff23fSmrg  need_version=no
1534209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1535209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1536209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1537209ff23fSmrg  ;;
1538209ff23fSmrg
1539209ff23fSmrgfreebsd1*)
1540209ff23fSmrg  dynamic_linker=no
1541209ff23fSmrg  ;;
1542209ff23fSmrg
1543209ff23fSmrgfreebsd* | dragonfly*)
1544209ff23fSmrg  # DragonFly does not have aout.  When/if they implement a new
1545209ff23fSmrg  # versioning mechanism, adjust this.
1546209ff23fSmrg  if test -x /usr/bin/objformat; then
1547209ff23fSmrg    objformat=`/usr/bin/objformat`
1548209ff23fSmrg  else
1549209ff23fSmrg    case $host_os in
1550209ff23fSmrg    freebsd[[123]]*) objformat=aout ;;
1551209ff23fSmrg    *) objformat=elf ;;
1552209ff23fSmrg    esac
1553209ff23fSmrg  fi
1554209ff23fSmrg  version_type=freebsd-$objformat
1555209ff23fSmrg  case $version_type in
1556209ff23fSmrg    freebsd-elf*)
1557209ff23fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1558209ff23fSmrg      need_version=no
1559209ff23fSmrg      need_lib_prefix=no
1560209ff23fSmrg      ;;
1561209ff23fSmrg    freebsd-*)
1562209ff23fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1563209ff23fSmrg      need_version=yes
1564209ff23fSmrg      ;;
1565209ff23fSmrg  esac
1566209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1567209ff23fSmrg  case $host_os in
1568209ff23fSmrg  freebsd2*)
1569209ff23fSmrg    shlibpath_overrides_runpath=yes
1570209ff23fSmrg    ;;
1571209ff23fSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1572209ff23fSmrg    shlibpath_overrides_runpath=yes
1573209ff23fSmrg    hardcode_into_libs=yes
1574209ff23fSmrg    ;;
1575209ff23fSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1576209ff23fSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1577209ff23fSmrg    shlibpath_overrides_runpath=no
1578209ff23fSmrg    hardcode_into_libs=yes
1579209ff23fSmrg    ;;
1580209ff23fSmrg  *) # from 4.6 on, and DragonFly
1581209ff23fSmrg    shlibpath_overrides_runpath=yes
1582209ff23fSmrg    hardcode_into_libs=yes
1583209ff23fSmrg    ;;
1584209ff23fSmrg  esac
1585209ff23fSmrg  ;;
1586209ff23fSmrg
1587209ff23fSmrggnu*)
1588209ff23fSmrg  version_type=linux
1589209ff23fSmrg  need_lib_prefix=no
1590209ff23fSmrg  need_version=no
1591209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1592209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1593209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1594209ff23fSmrg  hardcode_into_libs=yes
1595209ff23fSmrg  ;;
1596209ff23fSmrg
1597209ff23fSmrghpux9* | hpux10* | hpux11*)
1598209ff23fSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
1599209ff23fSmrg  # link against other versions.
1600209ff23fSmrg  version_type=sunos
1601209ff23fSmrg  need_lib_prefix=no
1602209ff23fSmrg  need_version=no
1603209ff23fSmrg  case $host_cpu in
1604209ff23fSmrg  ia64*)
1605209ff23fSmrg    shrext_cmds='.so'
1606209ff23fSmrg    hardcode_into_libs=yes
1607209ff23fSmrg    dynamic_linker="$host_os dld.so"
1608209ff23fSmrg    shlibpath_var=LD_LIBRARY_PATH
1609209ff23fSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1610209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1611209ff23fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1612209ff23fSmrg    if test "X$HPUX_IA64_MODE" = X32; then
1613209ff23fSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1614209ff23fSmrg    else
1615209ff23fSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1616209ff23fSmrg    fi
1617209ff23fSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1618209ff23fSmrg    ;;
1619209ff23fSmrg   hppa*64*)
1620209ff23fSmrg     shrext_cmds='.sl'
1621209ff23fSmrg     hardcode_into_libs=yes
1622209ff23fSmrg     dynamic_linker="$host_os dld.sl"
1623209ff23fSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1624209ff23fSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1625209ff23fSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1626209ff23fSmrg     soname_spec='${libname}${release}${shared_ext}$major'
1627209ff23fSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1628209ff23fSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1629209ff23fSmrg     ;;
1630209ff23fSmrg   *)
1631209ff23fSmrg    shrext_cmds='.sl'
1632209ff23fSmrg    dynamic_linker="$host_os dld.sl"
1633209ff23fSmrg    shlibpath_var=SHLIB_PATH
1634209ff23fSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1635209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1636209ff23fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1637209ff23fSmrg    ;;
1638209ff23fSmrg  esac
1639209ff23fSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1640209ff23fSmrg  postinstall_cmds='chmod 555 $lib'
1641209ff23fSmrg  ;;
1642209ff23fSmrg
1643209ff23fSmrginterix[[3-9]]*)
1644209ff23fSmrg  version_type=linux
1645209ff23fSmrg  need_lib_prefix=no
1646209ff23fSmrg  need_version=no
1647209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1648209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1649209ff23fSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1650209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1651209ff23fSmrg  shlibpath_overrides_runpath=no
1652209ff23fSmrg  hardcode_into_libs=yes
1653209ff23fSmrg  ;;
1654209ff23fSmrg
1655209ff23fSmrgirix5* | irix6* | nonstopux*)
1656209ff23fSmrg  case $host_os in
1657209ff23fSmrg    nonstopux*) version_type=nonstopux ;;
1658209ff23fSmrg    *)
1659209ff23fSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
1660209ff23fSmrg		version_type=linux
1661209ff23fSmrg	else
1662209ff23fSmrg		version_type=irix
1663209ff23fSmrg	fi ;;
1664209ff23fSmrg  esac
1665209ff23fSmrg  need_lib_prefix=no
1666209ff23fSmrg  need_version=no
1667209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1668209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1669209ff23fSmrg  case $host_os in
1670209ff23fSmrg  irix5* | nonstopux*)
1671209ff23fSmrg    libsuff= shlibsuff=
1672209ff23fSmrg    ;;
1673209ff23fSmrg  *)
1674209ff23fSmrg    case $LD in # libtool.m4 will add one of these switches to LD
1675209ff23fSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1676209ff23fSmrg      libsuff= shlibsuff= libmagic=32-bit;;
1677209ff23fSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1678209ff23fSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
1679209ff23fSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1680209ff23fSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1681209ff23fSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
1682209ff23fSmrg    esac
1683209ff23fSmrg    ;;
1684209ff23fSmrg  esac
1685209ff23fSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1686209ff23fSmrg  shlibpath_overrides_runpath=no
1687209ff23fSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1688209ff23fSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1689209ff23fSmrg  hardcode_into_libs=yes
1690209ff23fSmrg  ;;
1691209ff23fSmrg
1692209ff23fSmrg# No shared lib support for Linux oldld, aout, or coff.
1693209ff23fSmrglinux*oldld* | linux*aout* | linux*coff*)
1694209ff23fSmrg  dynamic_linker=no
1695209ff23fSmrg  ;;
1696209ff23fSmrg
1697209ff23fSmrg# This must be Linux ELF.
1698209ff23fSmrglinux* | k*bsd*-gnu)
1699209ff23fSmrg  version_type=linux
1700209ff23fSmrg  need_lib_prefix=no
1701209ff23fSmrg  need_version=no
1702209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1703209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1704209ff23fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1705209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1706209ff23fSmrg  shlibpath_overrides_runpath=no
1707209ff23fSmrg  # This implies no fast_install, which is unacceptable.
1708209ff23fSmrg  # Some rework will be needed to allow for fast_install
1709209ff23fSmrg  # before this can be enabled.
1710209ff23fSmrg  hardcode_into_libs=yes
1711c503f109Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1712c503f109Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1713209ff23fSmrg
1714209ff23fSmrg  # Append ld.so.conf contents to the search path
1715209ff23fSmrg  if test -f /etc/ld.so.conf; then
1716209ff23fSmrg    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' ' '`
1717c503f109Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1718209ff23fSmrg  fi
1719209ff23fSmrg
1720209ff23fSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
1721209ff23fSmrg  # powerpc, because MkLinux only supported shared libraries with the
1722209ff23fSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
1723209ff23fSmrg  # most powerpc-linux boxes support dynamic linking these days and
1724209ff23fSmrg  # people can always --disable-shared, the test was removed, and we
1725209ff23fSmrg  # assume the GNU/Linux dynamic linker is in use.
1726209ff23fSmrg  dynamic_linker='GNU/Linux ld.so'
1727209ff23fSmrg  ;;
1728209ff23fSmrg
1729209ff23fSmrgnetbsd*)
1730209ff23fSmrg  version_type=sunos
1731209ff23fSmrg  need_lib_prefix=no
1732209ff23fSmrg  need_version=no
1733209ff23fSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1734209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1735209ff23fSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1736209ff23fSmrg    dynamic_linker='NetBSD (a.out) ld.so'
1737209ff23fSmrg  else
1738209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1739209ff23fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1740209ff23fSmrg    dynamic_linker='NetBSD ld.elf_so'
1741209ff23fSmrg  fi
1742209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1743209ff23fSmrg  shlibpath_overrides_runpath=yes
1744209ff23fSmrg  hardcode_into_libs=yes
1745209ff23fSmrg  ;;
1746209ff23fSmrg
1747209ff23fSmrgnewsos6)
1748209ff23fSmrg  version_type=linux
1749209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1750209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1751209ff23fSmrg  shlibpath_overrides_runpath=yes
1752209ff23fSmrg  ;;
1753209ff23fSmrg
1754209ff23fSmrgnto-qnx*)
1755209ff23fSmrg  version_type=linux
1756209ff23fSmrg  need_lib_prefix=no
1757209ff23fSmrg  need_version=no
1758209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1759209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1760209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1761209ff23fSmrg  shlibpath_overrides_runpath=yes
1762209ff23fSmrg  ;;
1763209ff23fSmrg
1764209ff23fSmrgopenbsd*)
1765209ff23fSmrg  version_type=sunos
1766209ff23fSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
1767209ff23fSmrg  need_lib_prefix=no
1768209ff23fSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1769209ff23fSmrg  case $host_os in
1770209ff23fSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1771209ff23fSmrg    *)                         need_version=no  ;;
1772209ff23fSmrg  esac
1773209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1774209ff23fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1775209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1776209ff23fSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1777209ff23fSmrg    case $host_os in
1778209ff23fSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
1779209ff23fSmrg	shlibpath_overrides_runpath=no
1780209ff23fSmrg	;;
1781209ff23fSmrg      *)
1782209ff23fSmrg	shlibpath_overrides_runpath=yes
1783209ff23fSmrg	;;
1784209ff23fSmrg      esac
1785209ff23fSmrg  else
1786209ff23fSmrg    shlibpath_overrides_runpath=yes
1787209ff23fSmrg  fi
1788209ff23fSmrg  ;;
1789209ff23fSmrg
1790209ff23fSmrgos2*)
1791209ff23fSmrg  libname_spec='$name'
1792209ff23fSmrg  shrext_cmds=".dll"
1793209ff23fSmrg  need_lib_prefix=no
1794209ff23fSmrg  library_names_spec='$libname${shared_ext} $libname.a'
1795209ff23fSmrg  dynamic_linker='OS/2 ld.exe'
1796209ff23fSmrg  shlibpath_var=LIBPATH
1797209ff23fSmrg  ;;
1798209ff23fSmrg
1799209ff23fSmrgosf3* | osf4* | osf5*)
1800209ff23fSmrg  version_type=osf
1801209ff23fSmrg  need_lib_prefix=no
1802209ff23fSmrg  need_version=no
1803209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1804209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1805209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1806209ff23fSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1807209ff23fSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1808209ff23fSmrg  ;;
1809209ff23fSmrg
1810209ff23fSmrgrdos*)
1811209ff23fSmrg  dynamic_linker=no
1812209ff23fSmrg  ;;
1813209ff23fSmrg
1814209ff23fSmrgsolaris*)
1815209ff23fSmrg  version_type=linux
1816209ff23fSmrg  need_lib_prefix=no
1817209ff23fSmrg  need_version=no
1818209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1819209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1820209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1821209ff23fSmrg  shlibpath_overrides_runpath=yes
1822209ff23fSmrg  hardcode_into_libs=yes
1823209ff23fSmrg  # ldd complains unless libraries are executable
1824209ff23fSmrg  postinstall_cmds='chmod +x $lib'
1825209ff23fSmrg  ;;
1826209ff23fSmrg
1827209ff23fSmrgsunos4*)
1828209ff23fSmrg  version_type=sunos
1829209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1830209ff23fSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1831209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1832209ff23fSmrg  shlibpath_overrides_runpath=yes
1833209ff23fSmrg  if test "$with_gnu_ld" = yes; then
1834209ff23fSmrg    need_lib_prefix=no
1835209ff23fSmrg  fi
1836209ff23fSmrg  need_version=yes
1837209ff23fSmrg  ;;
1838209ff23fSmrg
1839209ff23fSmrgsysv4 | sysv4.3*)
1840209ff23fSmrg  version_type=linux
1841209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1842209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1843209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1844209ff23fSmrg  case $host_vendor in
1845209ff23fSmrg    sni)
1846209ff23fSmrg      shlibpath_overrides_runpath=no
1847209ff23fSmrg      need_lib_prefix=no
1848209ff23fSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
1849209ff23fSmrg      runpath_var=LD_RUN_PATH
1850209ff23fSmrg      ;;
1851209ff23fSmrg    siemens)
1852209ff23fSmrg      need_lib_prefix=no
1853209ff23fSmrg      ;;
1854209ff23fSmrg    motorola)
1855209ff23fSmrg      need_lib_prefix=no
1856209ff23fSmrg      need_version=no
1857209ff23fSmrg      shlibpath_overrides_runpath=no
1858209ff23fSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1859209ff23fSmrg      ;;
1860209ff23fSmrg  esac
1861209ff23fSmrg  ;;
1862209ff23fSmrg
1863209ff23fSmrgsysv4*MP*)
1864209ff23fSmrg  if test -d /usr/nec ;then
1865209ff23fSmrg    version_type=linux
1866209ff23fSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1867209ff23fSmrg    soname_spec='$libname${shared_ext}.$major'
1868209ff23fSmrg    shlibpath_var=LD_LIBRARY_PATH
1869209ff23fSmrg  fi
1870209ff23fSmrg  ;;
1871209ff23fSmrg
1872209ff23fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1873209ff23fSmrg  version_type=freebsd-elf
1874209ff23fSmrg  need_lib_prefix=no
1875209ff23fSmrg  need_version=no
1876209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1877209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1878209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1879209ff23fSmrg  hardcode_into_libs=yes
1880209ff23fSmrg  if test "$with_gnu_ld" = yes; then
1881209ff23fSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1882209ff23fSmrg    shlibpath_overrides_runpath=no
1883209ff23fSmrg  else
1884209ff23fSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1885209ff23fSmrg    shlibpath_overrides_runpath=yes
1886209ff23fSmrg    case $host_os in
1887209ff23fSmrg      sco3.2v5*)
1888209ff23fSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1889209ff23fSmrg	;;
1890209ff23fSmrg    esac
1891209ff23fSmrg  fi
1892209ff23fSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
1893209ff23fSmrg  ;;
1894209ff23fSmrg
1895209ff23fSmrguts4*)
1896209ff23fSmrg  version_type=linux
1897209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1898209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1899209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
1900209ff23fSmrg  ;;
1901209ff23fSmrg
1902209ff23fSmrg*)
1903209ff23fSmrg  dynamic_linker=no
1904209ff23fSmrg  ;;
1905209ff23fSmrgesac
1906209ff23fSmrgAC_MSG_RESULT([$dynamic_linker])
1907209ff23fSmrgtest "$dynamic_linker" = no && can_build_shared=no
1908209ff23fSmrg
1909209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
1910209ff23fSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
1911209ff23fSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
1912209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
1913209ff23fSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
1914209ff23fSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
1915209ff23fSmrg
1916209ff23fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1917209ff23fSmrgif test "$GCC" = yes; then
1918209ff23fSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1919209ff23fSmrgfi
1920209ff23fSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1921209ff23fSmrg
1922209ff23fSmrg
1923209ff23fSmrg# _LT_AC_TAGCONFIG
1924209ff23fSmrg# ----------------
1925209ff23fSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
1926209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1927209ff23fSmrgAC_ARG_WITH([tags],
1928209ff23fSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1929209ff23fSmrg        [include additional configurations @<:@automatic@:>@])],
1930209ff23fSmrg    [tagnames="$withval"])
1931209ff23fSmrg
1932209ff23fSmrgif test -f "$ltmain" && test -n "$tagnames"; then
1933209ff23fSmrg  if test ! -f "${ofile}"; then
1934209ff23fSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
1935209ff23fSmrg  fi
1936209ff23fSmrg
1937209ff23fSmrg  if test -z "$LTCC"; then
1938209ff23fSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1939209ff23fSmrg    if test -z "$LTCC"; then
1940209ff23fSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1941209ff23fSmrg    else
1942209ff23fSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1943209ff23fSmrg    fi
1944209ff23fSmrg  fi
1945209ff23fSmrg  if test -z "$LTCFLAGS"; then
1946209ff23fSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1947209ff23fSmrg  fi
1948209ff23fSmrg
1949209ff23fSmrg  # Extract list of available tagged configurations in $ofile.
1950209ff23fSmrg  # Note that this assumes the entire list is on one line.
1951209ff23fSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1952209ff23fSmrg
1953209ff23fSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1954209ff23fSmrg  for tagname in $tagnames; do
1955209ff23fSmrg    IFS="$lt_save_ifs"
1956209ff23fSmrg    # Check whether tagname contains only valid characters
1957209ff23fSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1958209ff23fSmrg    "") ;;
1959209ff23fSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1960209ff23fSmrg	;;
1961209ff23fSmrg    esac
1962209ff23fSmrg
1963209ff23fSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1964209ff23fSmrg    then
1965209ff23fSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1966209ff23fSmrg    fi
1967209ff23fSmrg
1968209ff23fSmrg    # Update the list of available tags.
1969209ff23fSmrg    if test -n "$tagname"; then
1970209ff23fSmrg      echo appending configuration tag \"$tagname\" to $ofile
1971209ff23fSmrg
1972209ff23fSmrg      case $tagname in
1973209ff23fSmrg      CXX)
1974209ff23fSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1975209ff23fSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1976209ff23fSmrg	    (test "X$CXX" != "Xg++"))) ; then
1977209ff23fSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
1978209ff23fSmrg	else
1979209ff23fSmrg	  tagname=""
1980209ff23fSmrg	fi
1981209ff23fSmrg	;;
1982209ff23fSmrg
1983209ff23fSmrg      F77)
1984209ff23fSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
1985209ff23fSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
1986209ff23fSmrg	else
1987209ff23fSmrg	  tagname=""
1988209ff23fSmrg	fi
1989209ff23fSmrg	;;
1990209ff23fSmrg
1991209ff23fSmrg      GCJ)
1992209ff23fSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1993209ff23fSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
1994209ff23fSmrg	else
1995209ff23fSmrg	  tagname=""
1996209ff23fSmrg	fi
1997209ff23fSmrg	;;
1998209ff23fSmrg
1999209ff23fSmrg      RC)
2000209ff23fSmrg	AC_LIBTOOL_LANG_RC_CONFIG
2001209ff23fSmrg	;;
2002209ff23fSmrg
2003209ff23fSmrg      *)
2004209ff23fSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
2005209ff23fSmrg	;;
2006209ff23fSmrg      esac
2007209ff23fSmrg
2008209ff23fSmrg      # Append the new tag name to the list of available tags.
2009209ff23fSmrg      if test -n "$tagname" ; then
2010209ff23fSmrg      available_tags="$available_tags $tagname"
2011209ff23fSmrg    fi
2012209ff23fSmrg    fi
2013209ff23fSmrg  done
2014209ff23fSmrg  IFS="$lt_save_ifs"
2015209ff23fSmrg
2016209ff23fSmrg  # Now substitute the updated list of available tags.
2017209ff23fSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2018209ff23fSmrg    mv "${ofile}T" "$ofile"
2019209ff23fSmrg    chmod +x "$ofile"
2020209ff23fSmrg  else
2021209ff23fSmrg    rm -f "${ofile}T"
2022209ff23fSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2023209ff23fSmrg  fi
2024209ff23fSmrgfi
2025209ff23fSmrg])# _LT_AC_TAGCONFIG
2026209ff23fSmrg
2027209ff23fSmrg
2028209ff23fSmrg# AC_LIBTOOL_DLOPEN
2029209ff23fSmrg# -----------------
2030209ff23fSmrg# enable checks for dlopen support
2031209ff23fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
2032209ff23fSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2033209ff23fSmrg])# AC_LIBTOOL_DLOPEN
2034209ff23fSmrg
2035209ff23fSmrg
2036209ff23fSmrg# AC_LIBTOOL_WIN32_DLL
2037209ff23fSmrg# --------------------
2038209ff23fSmrg# declare package support for building win32 DLLs
2039209ff23fSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2040209ff23fSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2041209ff23fSmrg])# AC_LIBTOOL_WIN32_DLL
2042209ff23fSmrg
2043209ff23fSmrg
2044209ff23fSmrg# AC_ENABLE_SHARED([DEFAULT])
2045209ff23fSmrg# ---------------------------
2046209ff23fSmrg# implement the --enable-shared flag
2047209ff23fSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2048209ff23fSmrgAC_DEFUN([AC_ENABLE_SHARED],
2049209ff23fSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2050209ff23fSmrgAC_ARG_ENABLE([shared],
2051209ff23fSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2052209ff23fSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2053209ff23fSmrg    [p=${PACKAGE-default}
2054209ff23fSmrg    case $enableval in
2055209ff23fSmrg    yes) enable_shared=yes ;;
2056209ff23fSmrg    no) enable_shared=no ;;
2057209ff23fSmrg    *)
2058209ff23fSmrg      enable_shared=no
2059209ff23fSmrg      # Look at the argument we got.  We use all the common list separators.
2060209ff23fSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2061209ff23fSmrg      for pkg in $enableval; do
2062209ff23fSmrg	IFS="$lt_save_ifs"
2063209ff23fSmrg	if test "X$pkg" = "X$p"; then
2064209ff23fSmrg	  enable_shared=yes
2065209ff23fSmrg	fi
2066209ff23fSmrg      done
2067209ff23fSmrg      IFS="$lt_save_ifs"
2068209ff23fSmrg      ;;
2069209ff23fSmrg    esac],
2070209ff23fSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2071209ff23fSmrg])# AC_ENABLE_SHARED
2072209ff23fSmrg
2073209ff23fSmrg
2074209ff23fSmrg# AC_DISABLE_SHARED
2075209ff23fSmrg# -----------------
2076209ff23fSmrg# set the default shared flag to --disable-shared
2077209ff23fSmrgAC_DEFUN([AC_DISABLE_SHARED],
2078209ff23fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2079209ff23fSmrgAC_ENABLE_SHARED(no)
2080209ff23fSmrg])# AC_DISABLE_SHARED
2081209ff23fSmrg
2082209ff23fSmrg
2083209ff23fSmrg# AC_ENABLE_STATIC([DEFAULT])
2084209ff23fSmrg# ---------------------------
2085209ff23fSmrg# implement the --enable-static flag
2086209ff23fSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2087209ff23fSmrgAC_DEFUN([AC_ENABLE_STATIC],
2088209ff23fSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2089209ff23fSmrgAC_ARG_ENABLE([static],
2090209ff23fSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2091209ff23fSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2092209ff23fSmrg    [p=${PACKAGE-default}
2093209ff23fSmrg    case $enableval in
2094209ff23fSmrg    yes) enable_static=yes ;;
2095209ff23fSmrg    no) enable_static=no ;;
2096209ff23fSmrg    *)
2097209ff23fSmrg     enable_static=no
2098209ff23fSmrg      # Look at the argument we got.  We use all the common list separators.
2099209ff23fSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2100209ff23fSmrg      for pkg in $enableval; do
2101209ff23fSmrg	IFS="$lt_save_ifs"
2102209ff23fSmrg	if test "X$pkg" = "X$p"; then
2103209ff23fSmrg	  enable_static=yes
2104209ff23fSmrg	fi
2105209ff23fSmrg      done
2106209ff23fSmrg      IFS="$lt_save_ifs"
2107209ff23fSmrg      ;;
2108209ff23fSmrg    esac],
2109209ff23fSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2110209ff23fSmrg])# AC_ENABLE_STATIC
2111209ff23fSmrg
2112209ff23fSmrg
2113209ff23fSmrg# AC_DISABLE_STATIC
2114209ff23fSmrg# -----------------
2115209ff23fSmrg# set the default static flag to --disable-static
2116209ff23fSmrgAC_DEFUN([AC_DISABLE_STATIC],
2117209ff23fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2118209ff23fSmrgAC_ENABLE_STATIC(no)
2119209ff23fSmrg])# AC_DISABLE_STATIC
2120209ff23fSmrg
2121209ff23fSmrg
2122209ff23fSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
2123209ff23fSmrg# ---------------------------------
2124209ff23fSmrg# implement the --enable-fast-install flag
2125209ff23fSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2126209ff23fSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
2127209ff23fSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2128209ff23fSmrgAC_ARG_ENABLE([fast-install],
2129209ff23fSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2130209ff23fSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2131209ff23fSmrg    [p=${PACKAGE-default}
2132209ff23fSmrg    case $enableval in
2133209ff23fSmrg    yes) enable_fast_install=yes ;;
2134209ff23fSmrg    no) enable_fast_install=no ;;
2135209ff23fSmrg    *)
2136209ff23fSmrg      enable_fast_install=no
2137209ff23fSmrg      # Look at the argument we got.  We use all the common list separators.
2138209ff23fSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2139209ff23fSmrg      for pkg in $enableval; do
2140209ff23fSmrg	IFS="$lt_save_ifs"
2141209ff23fSmrg	if test "X$pkg" = "X$p"; then
2142209ff23fSmrg	  enable_fast_install=yes
2143209ff23fSmrg	fi
2144209ff23fSmrg      done
2145209ff23fSmrg      IFS="$lt_save_ifs"
2146209ff23fSmrg      ;;
2147209ff23fSmrg    esac],
2148209ff23fSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2149209ff23fSmrg])# AC_ENABLE_FAST_INSTALL
2150209ff23fSmrg
2151209ff23fSmrg
2152209ff23fSmrg# AC_DISABLE_FAST_INSTALL
2153209ff23fSmrg# -----------------------
2154209ff23fSmrg# set the default to --disable-fast-install
2155209ff23fSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2156209ff23fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2157209ff23fSmrgAC_ENABLE_FAST_INSTALL(no)
2158209ff23fSmrg])# AC_DISABLE_FAST_INSTALL
2159209ff23fSmrg
2160209ff23fSmrg
2161209ff23fSmrg# AC_LIBTOOL_PICMODE([MODE])
2162209ff23fSmrg# --------------------------
2163209ff23fSmrg# implement the --with-pic flag
2164209ff23fSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2165209ff23fSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
2166209ff23fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2167209ff23fSmrgpic_mode=ifelse($#,1,$1,default)
2168209ff23fSmrg])# AC_LIBTOOL_PICMODE
2169209ff23fSmrg
2170209ff23fSmrg
2171209ff23fSmrg# AC_PROG_EGREP
2172209ff23fSmrg# -------------
2173209ff23fSmrg# This is predefined starting with Autoconf 2.54, so this conditional
2174209ff23fSmrg# definition can be removed once we require Autoconf 2.54 or later.
2175209ff23fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2176209ff23fSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2177209ff23fSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2178209ff23fSmrg    then ac_cv_prog_egrep='grep -E'
2179209ff23fSmrg    else ac_cv_prog_egrep='egrep'
2180209ff23fSmrg    fi])
2181209ff23fSmrg EGREP=$ac_cv_prog_egrep
2182209ff23fSmrg AC_SUBST([EGREP])
2183209ff23fSmrg])])
2184209ff23fSmrg
2185209ff23fSmrg
2186209ff23fSmrg# AC_PATH_TOOL_PREFIX
2187209ff23fSmrg# -------------------
2188209ff23fSmrg# find a file program which can recognize shared library
2189209ff23fSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
2190209ff23fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2191209ff23fSmrgAC_MSG_CHECKING([for $1])
2192209ff23fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2193209ff23fSmrg[case $MAGIC_CMD in
2194209ff23fSmrg[[\\/*] |  ?:[\\/]*])
2195209ff23fSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2196209ff23fSmrg  ;;
2197209ff23fSmrg*)
2198209ff23fSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2199209ff23fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2200209ff23fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2201209ff23fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2202209ff23fSmrgdnl not every word.  This closes a longstanding sh security hole.
2203209ff23fSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
2204209ff23fSmrg  for ac_dir in $ac_dummy; do
2205209ff23fSmrg    IFS="$lt_save_ifs"
2206209ff23fSmrg    test -z "$ac_dir" && ac_dir=.
2207209ff23fSmrg    if test -f $ac_dir/$1; then
2208209ff23fSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2209209ff23fSmrg      if test -n "$file_magic_test_file"; then
2210209ff23fSmrg	case $deplibs_check_method in
2211209ff23fSmrg	"file_magic "*)
2212209ff23fSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2213209ff23fSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2214209ff23fSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2215209ff23fSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2216209ff23fSmrg	    :
2217209ff23fSmrg	  else
2218209ff23fSmrg	    cat <<EOF 1>&2
2219209ff23fSmrg
2220209ff23fSmrg*** Warning: the command libtool uses to detect shared libraries,
2221209ff23fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2222209ff23fSmrg*** The result is that libtool may fail to recognize shared libraries
2223209ff23fSmrg*** as such.  This will affect the creation of libtool libraries that
2224209ff23fSmrg*** depend on shared libraries, but programs linked with such libtool
2225209ff23fSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2226209ff23fSmrg*** may want to report the problem to your system manager and/or to
2227209ff23fSmrg*** bug-libtool@gnu.org
2228209ff23fSmrg
2229209ff23fSmrgEOF
2230209ff23fSmrg	  fi ;;
2231209ff23fSmrg	esac
2232209ff23fSmrg      fi
2233209ff23fSmrg      break
2234209ff23fSmrg    fi
2235209ff23fSmrg  done
2236209ff23fSmrg  IFS="$lt_save_ifs"
2237209ff23fSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2238209ff23fSmrg  ;;
2239209ff23fSmrgesac])
2240209ff23fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2241209ff23fSmrgif test -n "$MAGIC_CMD"; then
2242209ff23fSmrg  AC_MSG_RESULT($MAGIC_CMD)
2243209ff23fSmrgelse
2244209ff23fSmrg  AC_MSG_RESULT(no)
2245209ff23fSmrgfi
2246209ff23fSmrg])# AC_PATH_TOOL_PREFIX
2247209ff23fSmrg
2248209ff23fSmrg
2249209ff23fSmrg# AC_PATH_MAGIC
2250209ff23fSmrg# -------------
2251209ff23fSmrg# find a file program which can recognize a shared library
2252209ff23fSmrgAC_DEFUN([AC_PATH_MAGIC],
2253209ff23fSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2254209ff23fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2255209ff23fSmrg  if test -n "$ac_tool_prefix"; then
2256209ff23fSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2257209ff23fSmrg  else
2258209ff23fSmrg    MAGIC_CMD=:
2259209ff23fSmrg  fi
2260209ff23fSmrgfi
2261209ff23fSmrg])# AC_PATH_MAGIC
2262209ff23fSmrg
2263209ff23fSmrg
2264209ff23fSmrg# AC_PROG_LD
2265209ff23fSmrg# ----------
2266209ff23fSmrg# find the pathname to the GNU or non-GNU linker
2267209ff23fSmrgAC_DEFUN([AC_PROG_LD],
2268209ff23fSmrg[AC_ARG_WITH([gnu-ld],
2269209ff23fSmrg    [AC_HELP_STRING([--with-gnu-ld],
2270209ff23fSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2271209ff23fSmrg    [test "$withval" = no || with_gnu_ld=yes],
2272209ff23fSmrg    [with_gnu_ld=no])
2273209ff23fSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
2274209ff23fSmrgAC_REQUIRE([AC_PROG_CC])dnl
2275209ff23fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2276209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2277209ff23fSmrgac_prog=ld
2278209ff23fSmrgif test "$GCC" = yes; then
2279209ff23fSmrg  # Check if gcc -print-prog-name=ld gives a path.
2280209ff23fSmrg  AC_MSG_CHECKING([for ld used by $CC])
2281209ff23fSmrg  case $host in
2282209ff23fSmrg  *-*-mingw*)
2283209ff23fSmrg    # gcc leaves a trailing carriage return which upsets mingw
2284209ff23fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2285209ff23fSmrg  *)
2286209ff23fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2287209ff23fSmrg  esac
2288209ff23fSmrg  case $ac_prog in
2289209ff23fSmrg    # Accept absolute paths.
2290209ff23fSmrg    [[\\/]]* | ?:[[\\/]]*)
2291209ff23fSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2292209ff23fSmrg      # Canonicalize the pathname of ld
2293209ff23fSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2294209ff23fSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2295209ff23fSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2296209ff23fSmrg      done
2297209ff23fSmrg      test -z "$LD" && LD="$ac_prog"
2298209ff23fSmrg      ;;
2299209ff23fSmrg  "")
2300209ff23fSmrg    # If it fails, then pretend we aren't using GCC.
2301209ff23fSmrg    ac_prog=ld
2302209ff23fSmrg    ;;
2303209ff23fSmrg  *)
2304209ff23fSmrg    # If it is relative, then search for the first ld in PATH.
2305209ff23fSmrg    with_gnu_ld=unknown
2306209ff23fSmrg    ;;
2307209ff23fSmrg  esac
2308209ff23fSmrgelif test "$with_gnu_ld" = yes; then
2309209ff23fSmrg  AC_MSG_CHECKING([for GNU ld])
2310209ff23fSmrgelse
2311209ff23fSmrg  AC_MSG_CHECKING([for non-GNU ld])
2312209ff23fSmrgfi
2313209ff23fSmrgAC_CACHE_VAL(lt_cv_path_LD,
2314209ff23fSmrg[if test -z "$LD"; then
2315209ff23fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2316209ff23fSmrg  for ac_dir in $PATH; do
2317209ff23fSmrg    IFS="$lt_save_ifs"
2318209ff23fSmrg    test -z "$ac_dir" && ac_dir=.
2319209ff23fSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2320209ff23fSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2321209ff23fSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2322209ff23fSmrg      # but apparently some variants of GNU ld only accept -v.
2323209ff23fSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2324209ff23fSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2325209ff23fSmrg      *GNU* | *'with BFD'*)
2326209ff23fSmrg	test "$with_gnu_ld" != no && break
2327209ff23fSmrg	;;
2328209ff23fSmrg      *)
2329209ff23fSmrg	test "$with_gnu_ld" != yes && break
2330209ff23fSmrg	;;
2331209ff23fSmrg      esac
2332209ff23fSmrg    fi
2333209ff23fSmrg  done
2334209ff23fSmrg  IFS="$lt_save_ifs"
2335209ff23fSmrgelse
2336209ff23fSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2337209ff23fSmrgfi])
2338209ff23fSmrgLD="$lt_cv_path_LD"
2339209ff23fSmrgif test -n "$LD"; then
2340209ff23fSmrg  AC_MSG_RESULT($LD)
2341209ff23fSmrgelse
2342209ff23fSmrg  AC_MSG_RESULT(no)
2343209ff23fSmrgfi
2344209ff23fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2345209ff23fSmrgAC_PROG_LD_GNU
2346209ff23fSmrg])# AC_PROG_LD
2347209ff23fSmrg
2348209ff23fSmrg
2349209ff23fSmrg# AC_PROG_LD_GNU
2350209ff23fSmrg# --------------
2351209ff23fSmrgAC_DEFUN([AC_PROG_LD_GNU],
2352209ff23fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2353209ff23fSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2354209ff23fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2355209ff23fSmrgcase `$LD -v 2>&1 </dev/null` in
2356209ff23fSmrg*GNU* | *'with BFD'*)
2357209ff23fSmrg  lt_cv_prog_gnu_ld=yes
2358209ff23fSmrg  ;;
2359209ff23fSmrg*)
2360209ff23fSmrg  lt_cv_prog_gnu_ld=no
2361209ff23fSmrg  ;;
2362209ff23fSmrgesac])
2363209ff23fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2364209ff23fSmrg])# AC_PROG_LD_GNU
2365209ff23fSmrg
2366209ff23fSmrg
2367209ff23fSmrg# AC_PROG_LD_RELOAD_FLAG
2368209ff23fSmrg# ----------------------
2369209ff23fSmrg# find reload flag for linker
2370209ff23fSmrg#   -- PORTME Some linkers may need a different reload flag.
2371209ff23fSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2372209ff23fSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2373209ff23fSmrg  lt_cv_ld_reload_flag,
2374209ff23fSmrg  [lt_cv_ld_reload_flag='-r'])
2375209ff23fSmrgreload_flag=$lt_cv_ld_reload_flag
2376209ff23fSmrgcase $reload_flag in
2377209ff23fSmrg"" | " "*) ;;
2378209ff23fSmrg*) reload_flag=" $reload_flag" ;;
2379209ff23fSmrgesac
2380209ff23fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2381209ff23fSmrgcase $host_os in
2382209ff23fSmrg  darwin*)
2383209ff23fSmrg    if test "$GCC" = yes; then
2384209ff23fSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2385209ff23fSmrg    else
2386209ff23fSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2387209ff23fSmrg    fi
2388209ff23fSmrg    ;;
2389209ff23fSmrgesac
2390209ff23fSmrg])# AC_PROG_LD_RELOAD_FLAG
2391209ff23fSmrg
2392209ff23fSmrg
2393209ff23fSmrg# AC_DEPLIBS_CHECK_METHOD
2394209ff23fSmrg# -----------------------
2395209ff23fSmrg# how to check for library dependencies
2396209ff23fSmrg#  -- PORTME fill in with the dynamic library characteristics
2397209ff23fSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2398209ff23fSmrg[AC_CACHE_CHECK([how to recognize dependent libraries],
2399209ff23fSmrglt_cv_deplibs_check_method,
2400209ff23fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2401209ff23fSmrglt_cv_file_magic_test_file=
2402209ff23fSmrglt_cv_deplibs_check_method='unknown'
2403209ff23fSmrg# Need to set the preceding variable on all platforms that support
2404209ff23fSmrg# interlibrary dependencies.
2405209ff23fSmrg# 'none' -- dependencies not supported.
2406209ff23fSmrg# `unknown' -- same as none, but documents that we really don't know.
2407209ff23fSmrg# 'pass_all' -- all dependencies passed with no checks.
2408209ff23fSmrg# 'test_compile' -- check by making test program.
2409209ff23fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
2410209ff23fSmrg# which responds to the $file_magic_cmd with a given extended regex.
2411209ff23fSmrg# If you have `file' or equivalent on your system and you're not sure
2412209ff23fSmrg# whether `pass_all' will *always* work, you probably want this one.
2413209ff23fSmrg
2414209ff23fSmrgcase $host_os in
2415209ff23fSmrgaix[[4-9]]*)
2416209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2417209ff23fSmrg  ;;
2418209ff23fSmrg
2419209ff23fSmrgbeos*)
2420209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2421209ff23fSmrg  ;;
2422209ff23fSmrg
2423209ff23fSmrgbsdi[[45]]*)
2424209ff23fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2425209ff23fSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
2426209ff23fSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
2427209ff23fSmrg  ;;
2428209ff23fSmrg
2429209ff23fSmrgcygwin*)
2430209ff23fSmrg  # func_win32_libid is a shell function defined in ltmain.sh
2431209ff23fSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2432209ff23fSmrg  lt_cv_file_magic_cmd='func_win32_libid'
2433209ff23fSmrg  ;;
2434209ff23fSmrg
2435209ff23fSmrgmingw* | pw32*)
2436209ff23fSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
2437209ff23fSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
2438209ff23fSmrg  # unless we find 'file', for example because we are cross-compiling.
2439209ff23fSmrg  if ( file / ) >/dev/null 2>&1; then
2440209ff23fSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2441209ff23fSmrg    lt_cv_file_magic_cmd='func_win32_libid'
2442209ff23fSmrg  else
2443209ff23fSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2444209ff23fSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
2445209ff23fSmrg  fi
2446209ff23fSmrg  ;;
2447209ff23fSmrg
2448209ff23fSmrgdarwin* | rhapsody*)
2449209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2450209ff23fSmrg  ;;
2451209ff23fSmrg
2452209ff23fSmrgfreebsd* | dragonfly*)
2453209ff23fSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2454209ff23fSmrg    case $host_cpu in
2455209ff23fSmrg    i*86 )
2456209ff23fSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
2457209ff23fSmrg      # Let's accept both of them until this is cleared up.
2458209ff23fSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2459209ff23fSmrg      lt_cv_file_magic_cmd=/usr/bin/file
2460209ff23fSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2461209ff23fSmrg      ;;
2462209ff23fSmrg    esac
2463209ff23fSmrg  else
2464209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
2465209ff23fSmrg  fi
2466209ff23fSmrg  ;;
2467209ff23fSmrg
2468209ff23fSmrggnu*)
2469209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2470209ff23fSmrg  ;;
2471209ff23fSmrg
2472209ff23fSmrghpux10.20* | hpux11*)
2473209ff23fSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2474209ff23fSmrg  case $host_cpu in
2475209ff23fSmrg  ia64*)
2476209ff23fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2477209ff23fSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2478209ff23fSmrg    ;;
2479209ff23fSmrg  hppa*64*)
2480209ff23fSmrg    [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]']
2481209ff23fSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2482209ff23fSmrg    ;;
2483209ff23fSmrg  *)
2484209ff23fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2485209ff23fSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2486209ff23fSmrg    ;;
2487209ff23fSmrg  esac
2488209ff23fSmrg  ;;
2489209ff23fSmrg
2490209ff23fSmrginterix[[3-9]]*)
2491209ff23fSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2492209ff23fSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2493209ff23fSmrg  ;;
2494209ff23fSmrg
2495209ff23fSmrgirix5* | irix6* | nonstopux*)
2496209ff23fSmrg  case $LD in
2497209ff23fSmrg  *-32|*"-32 ") libmagic=32-bit;;
2498209ff23fSmrg  *-n32|*"-n32 ") libmagic=N32;;
2499209ff23fSmrg  *-64|*"-64 ") libmagic=64-bit;;
2500209ff23fSmrg  *) libmagic=never-match;;
2501209ff23fSmrg  esac
2502209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2503209ff23fSmrg  ;;
2504209ff23fSmrg
2505209ff23fSmrg# This must be Linux ELF.
2506209ff23fSmrglinux* | k*bsd*-gnu)
2507209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2508209ff23fSmrg  ;;
2509209ff23fSmrg
2510c503f109Smrgnetbsd*)
2511209ff23fSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2512209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2513209ff23fSmrg  else
2514209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2515209ff23fSmrg  fi
2516209ff23fSmrg  ;;
2517209ff23fSmrg
2518209ff23fSmrgnewos6*)
2519209ff23fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2520209ff23fSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2521209ff23fSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2522209ff23fSmrg  ;;
2523209ff23fSmrg
2524209ff23fSmrgnto-qnx*)
2525209ff23fSmrg  lt_cv_deplibs_check_method=unknown
2526209ff23fSmrg  ;;
2527209ff23fSmrg
2528209ff23fSmrgopenbsd*)
2529209ff23fSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2530209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2531209ff23fSmrg  else
2532209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2533209ff23fSmrg  fi
2534209ff23fSmrg  ;;
2535209ff23fSmrg
2536209ff23fSmrgosf3* | osf4* | osf5*)
2537209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2538209ff23fSmrg  ;;
2539209ff23fSmrg
2540209ff23fSmrgrdos*)
2541209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2542209ff23fSmrg  ;;
2543209ff23fSmrg
2544209ff23fSmrgsolaris*)
2545209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2546209ff23fSmrg  ;;
2547209ff23fSmrg
2548209ff23fSmrgsysv4 | sysv4.3*)
2549209ff23fSmrg  case $host_vendor in
2550209ff23fSmrg  motorola)
2551209ff23fSmrg    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]]'
2552209ff23fSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2553209ff23fSmrg    ;;
2554209ff23fSmrg  ncr)
2555209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
2556209ff23fSmrg    ;;
2557209ff23fSmrg  sequent)
2558209ff23fSmrg    lt_cv_file_magic_cmd='/bin/file'
2559209ff23fSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2560209ff23fSmrg    ;;
2561209ff23fSmrg  sni)
2562209ff23fSmrg    lt_cv_file_magic_cmd='/bin/file'
2563209ff23fSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2564209ff23fSmrg    lt_cv_file_magic_test_file=/lib/libc.so
2565209ff23fSmrg    ;;
2566209ff23fSmrg  siemens)
2567209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
2568209ff23fSmrg    ;;
2569209ff23fSmrg  pc)
2570209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
2571209ff23fSmrg    ;;
2572209ff23fSmrg  esac
2573209ff23fSmrg  ;;
2574209ff23fSmrg
2575209ff23fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2576209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2577209ff23fSmrg  ;;
2578209ff23fSmrgesac
2579209ff23fSmrg])
2580209ff23fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
2581209ff23fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
2582209ff23fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
2583209ff23fSmrg])# AC_DEPLIBS_CHECK_METHOD
2584209ff23fSmrg
2585209ff23fSmrg
2586209ff23fSmrg# AC_PROG_NM
2587209ff23fSmrg# ----------
2588209ff23fSmrg# find the pathname to a BSD-compatible name lister
2589209ff23fSmrgAC_DEFUN([AC_PROG_NM],
2590209ff23fSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2591209ff23fSmrg[if test -n "$NM"; then
2592209ff23fSmrg  # Let the user override the test.
2593209ff23fSmrg  lt_cv_path_NM="$NM"
2594209ff23fSmrgelse
2595209ff23fSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
2596209ff23fSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2597209ff23fSmrg    lt_nm_to_check="$lt_nm_to_check nm"
2598209ff23fSmrg  fi
2599209ff23fSmrg  for lt_tmp_nm in $lt_nm_to_check; do
2600209ff23fSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2601209ff23fSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2602209ff23fSmrg      IFS="$lt_save_ifs"
2603209ff23fSmrg      test -z "$ac_dir" && ac_dir=.
2604209ff23fSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
2605209ff23fSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2606209ff23fSmrg	# Check to see if the nm accepts a BSD-compat flag.
2607209ff23fSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2608209ff23fSmrg	#   nm: unknown option "B" ignored
2609209ff23fSmrg	# Tru64's nm complains that /dev/null is an invalid object file
2610209ff23fSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2611209ff23fSmrg	*/dev/null* | *'Invalid file or object type'*)
2612209ff23fSmrg	  lt_cv_path_NM="$tmp_nm -B"
2613209ff23fSmrg	  break
2614209ff23fSmrg	  ;;
2615209ff23fSmrg	*)
2616209ff23fSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2617209ff23fSmrg	  */dev/null*)
2618209ff23fSmrg	    lt_cv_path_NM="$tmp_nm -p"
2619209ff23fSmrg	    break
2620209ff23fSmrg	    ;;
2621209ff23fSmrg	  *)
2622209ff23fSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2623209ff23fSmrg	    continue # so that we can try to find one that supports BSD flags
2624209ff23fSmrg	    ;;
2625209ff23fSmrg	  esac
2626209ff23fSmrg	  ;;
2627209ff23fSmrg	esac
2628209ff23fSmrg      fi
2629209ff23fSmrg    done
2630209ff23fSmrg    IFS="$lt_save_ifs"
2631209ff23fSmrg  done
2632209ff23fSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2633209ff23fSmrgfi])
2634209ff23fSmrgNM="$lt_cv_path_NM"
2635209ff23fSmrg])# AC_PROG_NM
2636209ff23fSmrg
2637209ff23fSmrg
2638209ff23fSmrg# AC_CHECK_LIBM
2639209ff23fSmrg# -------------
2640209ff23fSmrg# check for math library
2641209ff23fSmrgAC_DEFUN([AC_CHECK_LIBM],
2642209ff23fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2643209ff23fSmrgLIBM=
2644209ff23fSmrgcase $host in
2645209ff23fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2646209ff23fSmrg  # These system don't have libm, or don't need it
2647209ff23fSmrg  ;;
2648209ff23fSmrg*-ncr-sysv4.3*)
2649209ff23fSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2650209ff23fSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2651209ff23fSmrg  ;;
2652209ff23fSmrg*)
2653209ff23fSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
2654209ff23fSmrg  ;;
2655209ff23fSmrgesac
2656209ff23fSmrg])# AC_CHECK_LIBM
2657209ff23fSmrg
2658209ff23fSmrg
2659209ff23fSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2660209ff23fSmrg# -----------------------------------
2661209ff23fSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
2662209ff23fSmrg# LTDLINCL to the include flags for the libltdl header and adds
2663209ff23fSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
2664209ff23fSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2665209ff23fSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2666209ff23fSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2667209ff23fSmrg# (note the single quotes!).  If your package is not flat and you're not
2668209ff23fSmrg# using automake, define top_builddir and top_srcdir appropriately in
2669209ff23fSmrg# the Makefiles.
2670209ff23fSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2671209ff23fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2672209ff23fSmrg  case $enable_ltdl_convenience in
2673209ff23fSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2674209ff23fSmrg  "") enable_ltdl_convenience=yes
2675209ff23fSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2676209ff23fSmrg  esac
2677209ff23fSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2678209ff23fSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2679209ff23fSmrg  # For backwards non-gettext consistent compatibility...
2680209ff23fSmrg  INCLTDL="$LTDLINCL"
2681209ff23fSmrg])# AC_LIBLTDL_CONVENIENCE
2682209ff23fSmrg
2683209ff23fSmrg
2684209ff23fSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2685209ff23fSmrg# -----------------------------------
2686209ff23fSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
2687209ff23fSmrg# LTDLINCL to the include flags for the libltdl header and adds
2688209ff23fSmrg# --enable-ltdl-install to the configure arguments.  Note that
2689209ff23fSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2690209ff23fSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
2691209ff23fSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2692209ff23fSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
2693209ff23fSmrg# flat and you're not using automake, define top_builddir and top_srcdir
2694209ff23fSmrg# appropriately in the Makefiles.
2695209ff23fSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2696209ff23fSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2697209ff23fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2698209ff23fSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
2699209ff23fSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2700209ff23fSmrg  [if test x"$enable_ltdl_install" = xno; then
2701209ff23fSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
2702209ff23fSmrg   else
2703209ff23fSmrg     enable_ltdl_install=yes
2704209ff23fSmrg   fi
2705209ff23fSmrg  ])
2706209ff23fSmrg  if test x"$enable_ltdl_install" = x"yes"; then
2707209ff23fSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2708209ff23fSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2709209ff23fSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2710209ff23fSmrg  else
2711209ff23fSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2712209ff23fSmrg    LIBLTDL="-lltdl"
2713209ff23fSmrg    LTDLINCL=
2714209ff23fSmrg  fi
2715209ff23fSmrg  # For backwards non-gettext consistent compatibility...
2716209ff23fSmrg  INCLTDL="$LTDLINCL"
2717209ff23fSmrg])# AC_LIBLTDL_INSTALLABLE
2718209ff23fSmrg
2719209ff23fSmrg
2720209ff23fSmrg# AC_LIBTOOL_CXX
2721209ff23fSmrg# --------------
2722209ff23fSmrg# enable support for C++ libraries
2723209ff23fSmrgAC_DEFUN([AC_LIBTOOL_CXX],
2724209ff23fSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
2725209ff23fSmrg])# AC_LIBTOOL_CXX
2726209ff23fSmrg
2727209ff23fSmrg
2728209ff23fSmrg# _LT_AC_LANG_CXX
2729209ff23fSmrg# ---------------
2730209ff23fSmrgAC_DEFUN([_LT_AC_LANG_CXX],
2731209ff23fSmrg[AC_REQUIRE([AC_PROG_CXX])
2732209ff23fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2733209ff23fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2734209ff23fSmrg])# _LT_AC_LANG_CXX
2735209ff23fSmrg
2736209ff23fSmrg# _LT_AC_PROG_CXXCPP
2737209ff23fSmrg# ------------------
2738209ff23fSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
2739209ff23fSmrg[
2740209ff23fSmrgAC_REQUIRE([AC_PROG_CXX])
2741209ff23fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2742209ff23fSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2743209ff23fSmrg    (test "X$CXX" != "Xg++"))) ; then
2744209ff23fSmrg  AC_PROG_CXXCPP
2745209ff23fSmrgfi
2746209ff23fSmrg])# _LT_AC_PROG_CXXCPP
2747209ff23fSmrg
2748209ff23fSmrg# AC_LIBTOOL_F77
2749209ff23fSmrg# --------------
2750209ff23fSmrg# enable support for Fortran 77 libraries
2751209ff23fSmrgAC_DEFUN([AC_LIBTOOL_F77],
2752209ff23fSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
2753209ff23fSmrg])# AC_LIBTOOL_F77
2754209ff23fSmrg
2755209ff23fSmrg
2756209ff23fSmrg# _LT_AC_LANG_F77
2757209ff23fSmrg# ---------------
2758209ff23fSmrgAC_DEFUN([_LT_AC_LANG_F77],
2759209ff23fSmrg[AC_REQUIRE([AC_PROG_F77])
2760209ff23fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2761209ff23fSmrg])# _LT_AC_LANG_F77
2762209ff23fSmrg
2763209ff23fSmrg
2764209ff23fSmrg# AC_LIBTOOL_GCJ
2765209ff23fSmrg# --------------
2766209ff23fSmrg# enable support for GCJ libraries
2767209ff23fSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
2768209ff23fSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
2769209ff23fSmrg])# AC_LIBTOOL_GCJ
2770209ff23fSmrg
2771209ff23fSmrg
2772209ff23fSmrg# _LT_AC_LANG_GCJ
2773209ff23fSmrg# ---------------
2774209ff23fSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
2775209ff23fSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2776209ff23fSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2777209ff23fSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2778209ff23fSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2779209ff23fSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2780209ff23fSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2781209ff23fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2782209ff23fSmrg])# _LT_AC_LANG_GCJ
2783209ff23fSmrg
2784209ff23fSmrg
2785209ff23fSmrg# AC_LIBTOOL_RC
2786209ff23fSmrg# -------------
2787209ff23fSmrg# enable support for Windows resource files
2788209ff23fSmrgAC_DEFUN([AC_LIBTOOL_RC],
2789209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_RC])
2790209ff23fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2791209ff23fSmrg])# AC_LIBTOOL_RC
2792209ff23fSmrg
2793209ff23fSmrg
2794209ff23fSmrg# AC_LIBTOOL_LANG_C_CONFIG
2795209ff23fSmrg# ------------------------
2796209ff23fSmrg# Ensure that the configuration vars for the C compiler are
2797209ff23fSmrg# suitably defined.  Those variables are subsequently used by
2798209ff23fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2799209ff23fSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2800209ff23fSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2801209ff23fSmrg[lt_save_CC="$CC"
2802209ff23fSmrgAC_LANG_PUSH(C)
2803209ff23fSmrg
2804209ff23fSmrg# Source file extension for C test sources.
2805209ff23fSmrgac_ext=c
2806209ff23fSmrg
2807209ff23fSmrg# Object file extension for compiled C test sources.
2808209ff23fSmrgobjext=o
2809209ff23fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2810209ff23fSmrg
2811209ff23fSmrg# Code to be used in simple compile tests
2812209ff23fSmrglt_simple_compile_test_code="int some_variable = 0;"
2813209ff23fSmrg
2814209ff23fSmrg# Code to be used in simple link tests
2815209ff23fSmrglt_simple_link_test_code='int main(){return(0);}'
2816209ff23fSmrg
2817209ff23fSmrg_LT_AC_SYS_COMPILER
2818209ff23fSmrg
2819209ff23fSmrg# save warnings/boilerplate of simple test code
2820209ff23fSmrg_LT_COMPILER_BOILERPLATE
2821209ff23fSmrg_LT_LINKER_BOILERPLATE
2822209ff23fSmrg
2823209ff23fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2824209ff23fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
2825209ff23fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
2826209ff23fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2827209ff23fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
2828209ff23fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2829209ff23fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2830209ff23fSmrgAC_LIBTOOL_SYS_LIB_STRIP
2831209ff23fSmrgAC_LIBTOOL_DLOPEN_SELF
2832209ff23fSmrg
2833209ff23fSmrg# Report which library types will actually be built
2834209ff23fSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
2835209ff23fSmrgAC_MSG_RESULT([$can_build_shared])
2836209ff23fSmrg
2837209ff23fSmrgAC_MSG_CHECKING([whether to build shared libraries])
2838209ff23fSmrgtest "$can_build_shared" = "no" && enable_shared=no
2839209ff23fSmrg
2840209ff23fSmrg# On AIX, shared libraries and static libraries use the same namespace, and
2841209ff23fSmrg# are all built from PIC.
2842209ff23fSmrgcase $host_os in
2843209ff23fSmrgaix3*)
2844209ff23fSmrg  test "$enable_shared" = yes && enable_static=no
2845209ff23fSmrg  if test -n "$RANLIB"; then
2846209ff23fSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2847209ff23fSmrg    postinstall_cmds='$RANLIB $lib'
2848209ff23fSmrg  fi
2849209ff23fSmrg  ;;
2850209ff23fSmrg
2851209ff23fSmrgaix[[4-9]]*)
2852209ff23fSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2853209ff23fSmrg    test "$enable_shared" = yes && enable_static=no
2854209ff23fSmrg  fi
2855209ff23fSmrg    ;;
2856209ff23fSmrgesac
2857209ff23fSmrgAC_MSG_RESULT([$enable_shared])
2858209ff23fSmrg
2859209ff23fSmrgAC_MSG_CHECKING([whether to build static libraries])
2860209ff23fSmrg# Make sure either enable_shared or enable_static is yes.
2861209ff23fSmrgtest "$enable_shared" = yes || enable_static=yes
2862209ff23fSmrgAC_MSG_RESULT([$enable_static])
2863209ff23fSmrg
2864209ff23fSmrgAC_LIBTOOL_CONFIG($1)
2865209ff23fSmrg
2866209ff23fSmrgAC_LANG_POP
2867209ff23fSmrgCC="$lt_save_CC"
2868209ff23fSmrg])# AC_LIBTOOL_LANG_C_CONFIG
2869209ff23fSmrg
2870209ff23fSmrg
2871209ff23fSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
2872209ff23fSmrg# --------------------------
2873209ff23fSmrg# Ensure that the configuration vars for the C compiler are
2874209ff23fSmrg# suitably defined.  Those variables are subsequently used by
2875209ff23fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2876209ff23fSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2877209ff23fSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2878209ff23fSmrg[AC_LANG_PUSH(C++)
2879209ff23fSmrgAC_REQUIRE([AC_PROG_CXX])
2880209ff23fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2881209ff23fSmrg
2882209ff23fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2883209ff23fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2884209ff23fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
2885209ff23fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2886209ff23fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2887209ff23fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
2888209ff23fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2889209ff23fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2890209ff23fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2891209ff23fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2892209ff23fSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2893209ff23fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2894209ff23fSmrg_LT_AC_TAGVAR(module_cmds, $1)=
2895209ff23fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2896209ff23fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2897209ff23fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2898209ff23fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
2899209ff23fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2900209ff23fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2901209ff23fSmrg
2902209ff23fSmrg# Dependencies to place before and after the object being linked:
2903209ff23fSmrg_LT_AC_TAGVAR(predep_objects, $1)=
2904209ff23fSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
2905209ff23fSmrg_LT_AC_TAGVAR(predeps, $1)=
2906209ff23fSmrg_LT_AC_TAGVAR(postdeps, $1)=
2907209ff23fSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2908209ff23fSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
2909209ff23fSmrg
2910209ff23fSmrg# Source file extension for C++ test sources.
2911209ff23fSmrgac_ext=cpp
2912209ff23fSmrg
2913209ff23fSmrg# Object file extension for compiled C++ test sources.
2914209ff23fSmrgobjext=o
2915209ff23fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2916209ff23fSmrg
2917209ff23fSmrg# Code to be used in simple compile tests
2918209ff23fSmrglt_simple_compile_test_code="int some_variable = 0;"
2919209ff23fSmrg
2920209ff23fSmrg# Code to be used in simple link tests
2921209ff23fSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2922209ff23fSmrg
2923209ff23fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2924209ff23fSmrg_LT_AC_SYS_COMPILER
2925209ff23fSmrg
2926209ff23fSmrg# save warnings/boilerplate of simple test code
2927209ff23fSmrg_LT_COMPILER_BOILERPLATE
2928209ff23fSmrg_LT_LINKER_BOILERPLATE
2929209ff23fSmrg
2930209ff23fSmrg# Allow CC to be a program name with arguments.
2931209ff23fSmrglt_save_CC=$CC
2932209ff23fSmrglt_save_LD=$LD
2933209ff23fSmrglt_save_GCC=$GCC
2934209ff23fSmrgGCC=$GXX
2935209ff23fSmrglt_save_with_gnu_ld=$with_gnu_ld
2936209ff23fSmrglt_save_path_LD=$lt_cv_path_LD
2937209ff23fSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2938209ff23fSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2939209ff23fSmrgelse
2940209ff23fSmrg  $as_unset lt_cv_prog_gnu_ld
2941209ff23fSmrgfi
2942209ff23fSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
2943209ff23fSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
2944209ff23fSmrgelse
2945209ff23fSmrg  $as_unset lt_cv_path_LD
2946209ff23fSmrgfi
2947209ff23fSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
2948209ff23fSmrgCC=${CXX-"c++"}
2949209ff23fSmrgcompiler=$CC
2950209ff23fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
2951209ff23fSmrg_LT_CC_BASENAME([$compiler])
2952209ff23fSmrg
2953209ff23fSmrg# We don't want -fno-exception wen compiling C++ code, so set the
2954209ff23fSmrg# no_builtin_flag separately
2955209ff23fSmrgif test "$GXX" = yes; then
2956209ff23fSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2957209ff23fSmrgelse
2958209ff23fSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2959209ff23fSmrgfi
2960209ff23fSmrg
2961209ff23fSmrgif test "$GXX" = yes; then
2962209ff23fSmrg  # Set up default GNU C++ configuration
2963209ff23fSmrg
2964209ff23fSmrg  AC_PROG_LD
2965209ff23fSmrg
2966209ff23fSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2967209ff23fSmrg  # archiving commands below assume that GNU ld is being used.
2968209ff23fSmrg  if test "$with_gnu_ld" = yes; then
2969209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2970209ff23fSmrg    _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'
2971209ff23fSmrg
2972209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2973209ff23fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2974209ff23fSmrg
2975209ff23fSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
2976209ff23fSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2977209ff23fSmrg    #     investigate it a little bit more. (MM)
2978209ff23fSmrg    wlarc='${wl}'
2979209ff23fSmrg
2980209ff23fSmrg    # ancient GNU ld didn't support --whole-archive et. al.
2981209ff23fSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2982209ff23fSmrg	grep 'no-whole-archive' > /dev/null; then
2983209ff23fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2984209ff23fSmrg    else
2985209ff23fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2986209ff23fSmrg    fi
2987209ff23fSmrg  else
2988209ff23fSmrg    with_gnu_ld=no
2989209ff23fSmrg    wlarc=
2990209ff23fSmrg
2991209ff23fSmrg    # A generic and very simple default shared library creation
2992209ff23fSmrg    # command for GNU C++ for the case where it uses the native
2993209ff23fSmrg    # linker, instead of GNU ld.  If possible, this setting should
2994209ff23fSmrg    # overridden to take advantage of the native linker features on
2995209ff23fSmrg    # the platform it is being used on.
2996209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2997209ff23fSmrg  fi
2998209ff23fSmrg
2999209ff23fSmrg  # Commands to make compiler produce verbose output that lists
3000209ff23fSmrg  # what "hidden" libraries, object files and flags are used when
3001209ff23fSmrg  # linking a shared library.
3002209ff23fSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3003209ff23fSmrg
3004209ff23fSmrgelse
3005209ff23fSmrg  GXX=no
3006209ff23fSmrg  with_gnu_ld=no
3007209ff23fSmrg  wlarc=
3008209ff23fSmrgfi
3009209ff23fSmrg
3010209ff23fSmrg# PORTME: fill in a description of your system's C++ link characteristics
3011209ff23fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3012209ff23fSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3013209ff23fSmrgcase $host_os in
3014209ff23fSmrg  aix3*)
3015209ff23fSmrg    # FIXME: insert proper C++ library support
3016209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3017209ff23fSmrg    ;;
3018209ff23fSmrg  aix[[4-9]]*)
3019209ff23fSmrg    if test "$host_cpu" = ia64; then
3020209ff23fSmrg      # On IA64, the linker does run time linking by default, so we don't
3021209ff23fSmrg      # have to do anything special.
3022209ff23fSmrg      aix_use_runtimelinking=no
3023209ff23fSmrg      exp_sym_flag='-Bexport'
3024209ff23fSmrg      no_entry_flag=""
3025209ff23fSmrg    else
3026209ff23fSmrg      aix_use_runtimelinking=no
3027209ff23fSmrg
3028209ff23fSmrg      # Test if we are trying to use run time linking or normal
3029209ff23fSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3030209ff23fSmrg      # need to do runtime linking.
3031209ff23fSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3032209ff23fSmrg	for ld_flag in $LDFLAGS; do
3033209ff23fSmrg	  case $ld_flag in
3034209ff23fSmrg	  *-brtl*)
3035209ff23fSmrg	    aix_use_runtimelinking=yes
3036209ff23fSmrg	    break
3037209ff23fSmrg	    ;;
3038209ff23fSmrg	  esac
3039209ff23fSmrg	done
3040209ff23fSmrg	;;
3041209ff23fSmrg      esac
3042209ff23fSmrg
3043209ff23fSmrg      exp_sym_flag='-bexport'
3044209ff23fSmrg      no_entry_flag='-bnoentry'
3045209ff23fSmrg    fi
3046209ff23fSmrg
3047209ff23fSmrg    # When large executables or shared objects are built, AIX ld can
3048209ff23fSmrg    # have problems creating the table of contents.  If linking a library
3049209ff23fSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
3050209ff23fSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3051209ff23fSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3052209ff23fSmrg
3053209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
3054209ff23fSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3055209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3056209ff23fSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3057209ff23fSmrg
3058209ff23fSmrg    if test "$GXX" = yes; then
3059209ff23fSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
3060209ff23fSmrg      # We only want to do this on AIX 4.2 and lower, the check
3061209ff23fSmrg      # below for broken collect2 doesn't work under 4.3+
3062209ff23fSmrg	collect2name=`${CC} -print-prog-name=collect2`
3063209ff23fSmrg	if test -f "$collect2name" && \
3064209ff23fSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3065209ff23fSmrg	then
3066209ff23fSmrg	  # We have reworked collect2
3067209ff23fSmrg	  :
3068209ff23fSmrg	else
3069209ff23fSmrg	  # We have old collect2
3070209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3071209ff23fSmrg	  # It fails to find uninstalled libraries when the uninstalled
3072209ff23fSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
3073209ff23fSmrg	  # to unsupported forces relinking
3074209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3075209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3076209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3077209ff23fSmrg	fi
3078209ff23fSmrg	;;
3079209ff23fSmrg      esac
3080209ff23fSmrg      shared_flag='-shared'
3081209ff23fSmrg      if test "$aix_use_runtimelinking" = yes; then
3082209ff23fSmrg	shared_flag="$shared_flag "'${wl}-G'
3083209ff23fSmrg      fi
3084209ff23fSmrg    else
3085209ff23fSmrg      # not using gcc
3086209ff23fSmrg      if test "$host_cpu" = ia64; then
3087209ff23fSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3088209ff23fSmrg	# chokes on -Wl,-G. The following line is correct:
3089209ff23fSmrg	shared_flag='-G'
3090209ff23fSmrg      else
3091209ff23fSmrg	if test "$aix_use_runtimelinking" = yes; then
3092209ff23fSmrg	  shared_flag='${wl}-G'
3093209ff23fSmrg	else
3094209ff23fSmrg	  shared_flag='${wl}-bM:SRE'
3095209ff23fSmrg	fi
3096209ff23fSmrg      fi
3097209ff23fSmrg    fi
3098209ff23fSmrg
3099209ff23fSmrg    # It seems that -bexpall does not export symbols beginning with
3100209ff23fSmrg    # underscore (_), so it is better to generate a list of symbols to export.
3101209ff23fSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3102209ff23fSmrg    if test "$aix_use_runtimelinking" = yes; then
3103209ff23fSmrg      # Warning - without using the other runtime loading flags (-brtl),
3104209ff23fSmrg      # -berok will link without error, but may produce a broken library.
3105209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3106209ff23fSmrg      # Determine the default libpath from the value encoded in an empty executable.
3107209ff23fSmrg      _LT_AC_SYS_LIBPATH_AIX
3108209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3109209ff23fSmrg
3110209ff23fSmrg      _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"
3111209ff23fSmrg     else
3112209ff23fSmrg      if test "$host_cpu" = ia64; then
3113209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3114209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3115209ff23fSmrg	_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"
3116209ff23fSmrg      else
3117209ff23fSmrg	# Determine the default libpath from the value encoded in an empty executable.
3118209ff23fSmrg	_LT_AC_SYS_LIBPATH_AIX
3119209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3120209ff23fSmrg	# Warning - without using the other run time loading flags,
3121209ff23fSmrg	# -berok will link without error, but may produce a broken library.
3122209ff23fSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3123209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3124209ff23fSmrg	# Exported symbols can be pulled into shared objects from archives
3125209ff23fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3126209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3127209ff23fSmrg	# This is similar to how AIX traditionally builds its shared libraries.
3128209ff23fSmrg	_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'
3129209ff23fSmrg      fi
3130209ff23fSmrg    fi
3131209ff23fSmrg    ;;
3132209ff23fSmrg
3133209ff23fSmrg  beos*)
3134209ff23fSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3135209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3136209ff23fSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3137209ff23fSmrg      # support --undefined.  This deserves some investigation.  FIXME
3138209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3139209ff23fSmrg    else
3140209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3141209ff23fSmrg    fi
3142209ff23fSmrg    ;;
3143209ff23fSmrg
3144209ff23fSmrg  chorus*)
3145209ff23fSmrg    case $cc_basename in
3146209ff23fSmrg      *)
3147209ff23fSmrg	# FIXME: insert proper C++ library support
3148209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3149209ff23fSmrg	;;
3150209ff23fSmrg    esac
3151209ff23fSmrg    ;;
3152209ff23fSmrg
3153209ff23fSmrg  cygwin* | mingw* | pw32*)
3154209ff23fSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3155209ff23fSmrg    # as there is no search path for DLLs.
3156209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3157209ff23fSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3158209ff23fSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3159209ff23fSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3160209ff23fSmrg
3161209ff23fSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3162209ff23fSmrg      _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'
3163209ff23fSmrg      # If the export-symbols file already is a .def file (1st line
3164209ff23fSmrg      # is EXPORTS), use it as is; otherwise, prepend...
3165209ff23fSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3166209ff23fSmrg	cp $export_symbols $output_objdir/$soname.def;
3167209ff23fSmrg      else
3168209ff23fSmrg	echo EXPORTS > $output_objdir/$soname.def;
3169209ff23fSmrg	cat $export_symbols >> $output_objdir/$soname.def;
3170209ff23fSmrg      fi~
3171209ff23fSmrg      $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'
3172209ff23fSmrg    else
3173209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3174209ff23fSmrg    fi
3175209ff23fSmrg  ;;
3176209ff23fSmrg      darwin* | rhapsody*)
3177209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3178209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3179209ff23fSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3180209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3181209ff23fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3182209ff23fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3183209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3184209ff23fSmrg      if test "$GXX" = yes ; then
3185209ff23fSmrg      output_verbose_link_cmd='echo'
3186209ff23fSmrg      _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}"
3187209ff23fSmrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3188209ff23fSmrg      _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}"
3189209ff23fSmrg      _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}"
3190209ff23fSmrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3191209ff23fSmrg        _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}"
3192209ff23fSmrg        _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}"
3193209ff23fSmrg      fi
3194209ff23fSmrg      else
3195209ff23fSmrg      case $cc_basename in
3196209ff23fSmrg        xlc*)
3197209ff23fSmrg         output_verbose_link_cmd='echo'
3198209ff23fSmrg          _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'
3199209ff23fSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3200209ff23fSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3201209ff23fSmrg          _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}'
3202209ff23fSmrg          _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}'
3203209ff23fSmrg          ;;
3204209ff23fSmrg       *)
3205209ff23fSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3206209ff23fSmrg          ;;
3207209ff23fSmrg      esac
3208209ff23fSmrg      fi
3209209ff23fSmrg        ;;
3210209ff23fSmrg
3211209ff23fSmrg  dgux*)
3212209ff23fSmrg    case $cc_basename in
3213209ff23fSmrg      ec++*)
3214209ff23fSmrg	# FIXME: insert proper C++ library support
3215209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3216209ff23fSmrg	;;
3217209ff23fSmrg      ghcx*)
3218209ff23fSmrg	# Green Hills C++ Compiler
3219209ff23fSmrg	# FIXME: insert proper C++ library support
3220209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3221209ff23fSmrg	;;
3222209ff23fSmrg      *)
3223209ff23fSmrg	# FIXME: insert proper C++ library support
3224209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3225209ff23fSmrg	;;
3226209ff23fSmrg    esac
3227209ff23fSmrg    ;;
3228209ff23fSmrg  freebsd[[12]]*)
3229209ff23fSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
3230209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3231209ff23fSmrg    ;;
3232209ff23fSmrg  freebsd-elf*)
3233209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3234209ff23fSmrg    ;;
3235209ff23fSmrg  freebsd* | dragonfly*)
3236209ff23fSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3237209ff23fSmrg    # conventions
3238209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3239209ff23fSmrg    ;;
3240209ff23fSmrg  gnu*)
3241209ff23fSmrg    ;;
3242209ff23fSmrg  hpux9*)
3243209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3244209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3245209ff23fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3246209ff23fSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3247209ff23fSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3248209ff23fSmrg				# but as the default
3249209ff23fSmrg				# location of the library.
3250209ff23fSmrg
3251209ff23fSmrg    case $cc_basename in
3252209ff23fSmrg    CC*)
3253209ff23fSmrg      # FIXME: insert proper C++ library support
3254209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3255209ff23fSmrg      ;;
3256209ff23fSmrg    aCC*)
3257209ff23fSmrg      _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'
3258209ff23fSmrg      # Commands to make compiler produce verbose output that lists
3259209ff23fSmrg      # what "hidden" libraries, object files and flags are used when
3260209ff23fSmrg      # linking a shared library.
3261209ff23fSmrg      #
3262209ff23fSmrg      # There doesn't appear to be a way to prevent this compiler from
3263209ff23fSmrg      # explicitly linking system object files so we need to strip them
3264209ff23fSmrg      # from the output so that they don't get included in the library
3265209ff23fSmrg      # dependencies.
3266209ff23fSmrg      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'
3267209ff23fSmrg      ;;
3268209ff23fSmrg    *)
3269209ff23fSmrg      if test "$GXX" = yes; then
3270209ff23fSmrg        _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'
3271209ff23fSmrg      else
3272209ff23fSmrg        # FIXME: insert proper C++ library support
3273209ff23fSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3274209ff23fSmrg      fi
3275209ff23fSmrg      ;;
3276209ff23fSmrg    esac
3277209ff23fSmrg    ;;
3278209ff23fSmrg  hpux10*|hpux11*)
3279209ff23fSmrg    if test $with_gnu_ld = no; then
3280209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3281209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3282209ff23fSmrg
3283209ff23fSmrg      case $host_cpu in
3284209ff23fSmrg      hppa*64*|ia64*) ;;
3285209ff23fSmrg      *)
3286209ff23fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3287209ff23fSmrg        ;;
3288209ff23fSmrg      esac
3289209ff23fSmrg    fi
3290209ff23fSmrg    case $host_cpu in
3291209ff23fSmrg    hppa*64*|ia64*)
3292209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3293209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3294209ff23fSmrg      ;;
3295209ff23fSmrg    *)
3296209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3297209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3298209ff23fSmrg					      # but as the default
3299209ff23fSmrg					      # location of the library.
3300209ff23fSmrg      ;;
3301209ff23fSmrg    esac
3302209ff23fSmrg
3303209ff23fSmrg    case $cc_basename in
3304209ff23fSmrg      CC*)
3305209ff23fSmrg	# FIXME: insert proper C++ library support
3306209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3307209ff23fSmrg	;;
3308209ff23fSmrg      aCC*)
3309209ff23fSmrg	case $host_cpu in
3310209ff23fSmrg	hppa*64*)
3311209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3312209ff23fSmrg	  ;;
3313209ff23fSmrg	ia64*)
3314209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3315209ff23fSmrg	  ;;
3316209ff23fSmrg	*)
3317209ff23fSmrg	  _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'
3318209ff23fSmrg	  ;;
3319209ff23fSmrg	esac
3320209ff23fSmrg	# Commands to make compiler produce verbose output that lists
3321209ff23fSmrg	# what "hidden" libraries, object files and flags are used when
3322209ff23fSmrg	# linking a shared library.
3323209ff23fSmrg	#
3324209ff23fSmrg	# There doesn't appear to be a way to prevent this compiler from
3325209ff23fSmrg	# explicitly linking system object files so we need to strip them
3326209ff23fSmrg	# from the output so that they don't get included in the library
3327209ff23fSmrg	# dependencies.
3328209ff23fSmrg	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'
3329209ff23fSmrg	;;
3330209ff23fSmrg      *)
3331209ff23fSmrg	if test "$GXX" = yes; then
3332209ff23fSmrg	  if test $with_gnu_ld = no; then
3333209ff23fSmrg	    case $host_cpu in
3334209ff23fSmrg	    hppa*64*)
3335209ff23fSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3336209ff23fSmrg	      ;;
3337209ff23fSmrg	    ia64*)
3338209ff23fSmrg	      _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'
3339209ff23fSmrg	      ;;
3340209ff23fSmrg	    *)
3341209ff23fSmrg	      _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'
3342209ff23fSmrg	      ;;
3343209ff23fSmrg	    esac
3344209ff23fSmrg	  fi
3345209ff23fSmrg	else
3346209ff23fSmrg	  # FIXME: insert proper C++ library support
3347209ff23fSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3348209ff23fSmrg	fi
3349209ff23fSmrg	;;
3350209ff23fSmrg    esac
3351209ff23fSmrg    ;;
3352209ff23fSmrg  interix[[3-9]]*)
3353209ff23fSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3354209ff23fSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3355209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3356209ff23fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3357209ff23fSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3358209ff23fSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
3359209ff23fSmrg    # default) and relocated if they conflict, which is a slow very memory
3360209ff23fSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
3361209ff23fSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3362209ff23fSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3363209ff23fSmrg    _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'
3364209ff23fSmrg    _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'
3365209ff23fSmrg    ;;
3366209ff23fSmrg  irix5* | irix6*)
3367209ff23fSmrg    case $cc_basename in
3368209ff23fSmrg      CC*)
3369209ff23fSmrg	# SGI C++
3370209ff23fSmrg	_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'
3371209ff23fSmrg
3372209ff23fSmrg	# Archives containing C++ object files must be created using
3373209ff23fSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3374209ff23fSmrg	# necessary to make sure instantiated templates are included
3375209ff23fSmrg	# in the archive.
3376209ff23fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3377209ff23fSmrg	;;
3378209ff23fSmrg      *)
3379209ff23fSmrg	if test "$GXX" = yes; then
3380209ff23fSmrg	  if test "$with_gnu_ld" = no; then
3381209ff23fSmrg	    _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'
3382209ff23fSmrg	  else
3383209ff23fSmrg	    _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'
3384209ff23fSmrg	  fi
3385209ff23fSmrg	fi
3386209ff23fSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3387209ff23fSmrg	;;
3388209ff23fSmrg    esac
3389209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3390209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3391209ff23fSmrg    ;;
3392209ff23fSmrg  linux* | k*bsd*-gnu)
3393209ff23fSmrg    case $cc_basename in
3394209ff23fSmrg      KCC*)
3395209ff23fSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3396209ff23fSmrg
3397209ff23fSmrg	# KCC will only create a shared library if the output file
3398209ff23fSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3399209ff23fSmrg	# to its proper name (with version) after linking.
3400209ff23fSmrg	_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'
3401209ff23fSmrg	_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'
3402209ff23fSmrg	# Commands to make compiler produce verbose output that lists
3403209ff23fSmrg	# what "hidden" libraries, object files and flags are used when
3404209ff23fSmrg	# linking a shared library.
3405209ff23fSmrg	#
3406209ff23fSmrg	# There doesn't appear to be a way to prevent this compiler from
3407209ff23fSmrg	# explicitly linking system object files so we need to strip them
3408209ff23fSmrg	# from the output so that they don't get included in the library
3409209ff23fSmrg	# dependencies.
3410209ff23fSmrg	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'
3411209ff23fSmrg
3412209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3413209ff23fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3414209ff23fSmrg
3415209ff23fSmrg	# Archives containing C++ object files must be created using
3416209ff23fSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3417209ff23fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3418209ff23fSmrg	;;
3419209ff23fSmrg      icpc*)
3420209ff23fSmrg	# Intel C++
3421209ff23fSmrg	with_gnu_ld=yes
3422209ff23fSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
3423209ff23fSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
3424209ff23fSmrg	# earlier do not add the objects themselves.
3425209ff23fSmrg	case `$CC -V 2>&1` in
3426209ff23fSmrg	*"Version 7."*)
3427209ff23fSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3428209ff23fSmrg  	  _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'
3429209ff23fSmrg	  ;;
3430209ff23fSmrg	*)  # Version 8.0 or newer
3431209ff23fSmrg	  tmp_idyn=
3432209ff23fSmrg	  case $host_cpu in
3433209ff23fSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
3434209ff23fSmrg	  esac
3435209ff23fSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3436209ff23fSmrg	  _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'
3437209ff23fSmrg	  ;;
3438209ff23fSmrg	esac
3439209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3440209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3441209ff23fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3442209ff23fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3443209ff23fSmrg	;;
3444209ff23fSmrg      pgCC* | pgcpp*)
3445209ff23fSmrg        # Portland Group C++ compiler
3446209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3447209ff23fSmrg  	_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'
3448209ff23fSmrg
3449209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3450209ff23fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3451209ff23fSmrg	_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'
3452209ff23fSmrg        ;;
3453209ff23fSmrg      cxx*)
3454209ff23fSmrg	# Compaq C++
3455209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3456209ff23fSmrg	_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'
3457209ff23fSmrg
3458209ff23fSmrg	runpath_var=LD_RUN_PATH
3459209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3460209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3461209ff23fSmrg
3462209ff23fSmrg	# Commands to make compiler produce verbose output that lists
3463209ff23fSmrg	# what "hidden" libraries, object files and flags are used when
3464209ff23fSmrg	# linking a shared library.
3465209ff23fSmrg	#
3466209ff23fSmrg	# There doesn't appear to be a way to prevent this compiler from
3467209ff23fSmrg	# explicitly linking system object files so we need to strip them
3468209ff23fSmrg	# from the output so that they don't get included in the library
3469209ff23fSmrg	# dependencies.
3470209ff23fSmrg	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'
3471209ff23fSmrg	;;
3472209ff23fSmrg      *)
3473209ff23fSmrg	case `$CC -V 2>&1 | sed 5q` in
3474209ff23fSmrg	*Sun\ C*)
3475209ff23fSmrg	  # Sun C++ 5.9
3476209ff23fSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3477209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3478209ff23fSmrg	  _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'
3479209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3480209ff23fSmrg	  _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'
3481209ff23fSmrg
3482209ff23fSmrg	  # Not sure whether something based on
3483209ff23fSmrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3484209ff23fSmrg	  # would be better.
3485209ff23fSmrg	  output_verbose_link_cmd='echo'
3486209ff23fSmrg
3487209ff23fSmrg	  # Archives containing C++ object files must be created using
3488209ff23fSmrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3489209ff23fSmrg	  # necessary to make sure instantiated templates are included
3490209ff23fSmrg	  # in the archive.
3491209ff23fSmrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3492209ff23fSmrg	  ;;
3493209ff23fSmrg	esac
3494209ff23fSmrg	;;
3495209ff23fSmrg    esac
3496209ff23fSmrg    ;;
3497209ff23fSmrg  lynxos*)
3498209ff23fSmrg    # FIXME: insert proper C++ library support
3499209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3500209ff23fSmrg    ;;
3501209ff23fSmrg  m88k*)
3502209ff23fSmrg    # FIXME: insert proper C++ library support
3503209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3504209ff23fSmrg    ;;
3505209ff23fSmrg  mvs*)
3506209ff23fSmrg    case $cc_basename in
3507209ff23fSmrg      cxx*)
3508209ff23fSmrg	# FIXME: insert proper C++ library support
3509209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3510209ff23fSmrg	;;
3511209ff23fSmrg      *)
3512209ff23fSmrg	# FIXME: insert proper C++ library support
3513209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3514209ff23fSmrg	;;
3515209ff23fSmrg    esac
3516209ff23fSmrg    ;;
3517c503f109Smrg  netbsd*)
3518209ff23fSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3519209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3520209ff23fSmrg      wlarc=
3521209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3522209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3523209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3524209ff23fSmrg    fi
3525209ff23fSmrg    # Workaround some broken pre-1.5 toolchains
3526209ff23fSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3527209ff23fSmrg    ;;
3528209ff23fSmrg  openbsd2*)
3529209ff23fSmrg    # C++ shared libraries are fairly broken
3530209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3531209ff23fSmrg    ;;
3532209ff23fSmrg  openbsd*)
3533209ff23fSmrg    if test -f /usr/libexec/ld.so; then
3534209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3535209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3536209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3537209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3538209ff23fSmrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3539209ff23fSmrg	_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'
3540209ff23fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3541209ff23fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3542209ff23fSmrg      fi
3543209ff23fSmrg      output_verbose_link_cmd='echo'
3544209ff23fSmrg    else
3545209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3546209ff23fSmrg    fi
3547209ff23fSmrg    ;;
3548209ff23fSmrg  osf3*)
3549209ff23fSmrg    case $cc_basename in
3550209ff23fSmrg      KCC*)
3551209ff23fSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3552209ff23fSmrg
3553209ff23fSmrg	# KCC will only create a shared library if the output file
3554209ff23fSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3555209ff23fSmrg	# to its proper name (with version) after linking.
3556209ff23fSmrg	_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'
3557209ff23fSmrg
3558209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3559209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3560209ff23fSmrg
3561209ff23fSmrg	# Archives containing C++ object files must be created using
3562209ff23fSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3563209ff23fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3564209ff23fSmrg
3565209ff23fSmrg	;;
3566209ff23fSmrg      RCC*)
3567209ff23fSmrg	# Rational C++ 2.4.1
3568209ff23fSmrg	# FIXME: insert proper C++ library support
3569209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3570209ff23fSmrg	;;
3571209ff23fSmrg      cxx*)
3572209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3573209ff23fSmrg	_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'
3574209ff23fSmrg
3575209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3576209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3577209ff23fSmrg
3578209ff23fSmrg	# Commands to make compiler produce verbose output that lists
3579209ff23fSmrg	# what "hidden" libraries, object files and flags are used when
3580209ff23fSmrg	# linking a shared library.
3581209ff23fSmrg	#
3582209ff23fSmrg	# There doesn't appear to be a way to prevent this compiler from
3583209ff23fSmrg	# explicitly linking system object files so we need to strip them
3584209ff23fSmrg	# from the output so that they don't get included in the library
3585209ff23fSmrg	# dependencies.
3586209ff23fSmrg	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'
3587209ff23fSmrg	;;
3588209ff23fSmrg      *)
3589209ff23fSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3590209ff23fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3591209ff23fSmrg	  _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'
3592209ff23fSmrg
3593209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3594209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3595209ff23fSmrg
3596209ff23fSmrg	  # Commands to make compiler produce verbose output that lists
3597209ff23fSmrg	  # what "hidden" libraries, object files and flags are used when
3598209ff23fSmrg	  # linking a shared library.
3599209ff23fSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3600209ff23fSmrg
3601209ff23fSmrg	else
3602209ff23fSmrg	  # FIXME: insert proper C++ library support
3603209ff23fSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3604209ff23fSmrg	fi
3605209ff23fSmrg	;;
3606209ff23fSmrg    esac
3607209ff23fSmrg    ;;
3608209ff23fSmrg  osf4* | osf5*)
3609209ff23fSmrg    case $cc_basename in
3610209ff23fSmrg      KCC*)
3611209ff23fSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3612209ff23fSmrg
3613209ff23fSmrg	# KCC will only create a shared library if the output file
3614209ff23fSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3615209ff23fSmrg	# to its proper name (with version) after linking.
3616209ff23fSmrg	_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'
3617209ff23fSmrg
3618209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3619209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3620209ff23fSmrg
3621209ff23fSmrg	# Archives containing C++ object files must be created using
3622209ff23fSmrg	# the KAI C++ compiler.
3623209ff23fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3624209ff23fSmrg	;;
3625209ff23fSmrg      RCC*)
3626209ff23fSmrg	# Rational C++ 2.4.1
3627209ff23fSmrg	# FIXME: insert proper C++ library support
3628209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3629209ff23fSmrg	;;
3630209ff23fSmrg      cxx*)
3631209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3632209ff23fSmrg	_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'
3633209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3634209ff23fSmrg	  echo "-hidden">> $lib.exp~
3635209ff23fSmrg	  $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~
3636209ff23fSmrg	  $rm $lib.exp'
3637209ff23fSmrg
3638209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3639209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3640209ff23fSmrg
3641209ff23fSmrg	# Commands to make compiler produce verbose output that lists
3642209ff23fSmrg	# what "hidden" libraries, object files and flags are used when
3643209ff23fSmrg	# linking a shared library.
3644209ff23fSmrg	#
3645209ff23fSmrg	# There doesn't appear to be a way to prevent this compiler from
3646209ff23fSmrg	# explicitly linking system object files so we need to strip them
3647209ff23fSmrg	# from the output so that they don't get included in the library
3648209ff23fSmrg	# dependencies.
3649209ff23fSmrg	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'
3650209ff23fSmrg	;;
3651209ff23fSmrg      *)
3652209ff23fSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3653209ff23fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3654209ff23fSmrg	 _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'
3655209ff23fSmrg
3656209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3657209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3658209ff23fSmrg
3659209ff23fSmrg	  # Commands to make compiler produce verbose output that lists
3660209ff23fSmrg	  # what "hidden" libraries, object files and flags are used when
3661209ff23fSmrg	  # linking a shared library.
3662209ff23fSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3663209ff23fSmrg
3664209ff23fSmrg	else
3665209ff23fSmrg	  # FIXME: insert proper C++ library support
3666209ff23fSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3667209ff23fSmrg	fi
3668209ff23fSmrg	;;
3669209ff23fSmrg    esac
3670209ff23fSmrg    ;;
3671209ff23fSmrg  psos*)
3672209ff23fSmrg    # FIXME: insert proper C++ library support
3673209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3674209ff23fSmrg    ;;
3675209ff23fSmrg  sunos4*)
3676209ff23fSmrg    case $cc_basename in
3677209ff23fSmrg      CC*)
3678209ff23fSmrg	# Sun C++ 4.x
3679209ff23fSmrg	# FIXME: insert proper C++ library support
3680209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3681209ff23fSmrg	;;
3682209ff23fSmrg      lcc*)
3683209ff23fSmrg	# Lucid
3684209ff23fSmrg	# FIXME: insert proper C++ library support
3685209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3686209ff23fSmrg	;;
3687209ff23fSmrg      *)
3688209ff23fSmrg	# FIXME: insert proper C++ library support
3689209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3690209ff23fSmrg	;;
3691209ff23fSmrg    esac
3692209ff23fSmrg    ;;
3693209ff23fSmrg  solaris*)
3694209ff23fSmrg    case $cc_basename in
3695209ff23fSmrg      CC*)
3696209ff23fSmrg	# Sun C++ 4.2, 5.x and Centerline C++
3697209ff23fSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3698209ff23fSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3699209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3700209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3701209ff23fSmrg	$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'
3702209ff23fSmrg
3703209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3704209ff23fSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3705209ff23fSmrg	case $host_os in
3706209ff23fSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3707209ff23fSmrg	  *)
3708209ff23fSmrg	    # The compiler driver will combine and reorder linker options,
3709209ff23fSmrg	    # but understands `-z linker_flag'.
3710209ff23fSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3711209ff23fSmrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3712209ff23fSmrg	    ;;
3713209ff23fSmrg	esac
3714209ff23fSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3715209ff23fSmrg
3716209ff23fSmrg	output_verbose_link_cmd='echo'
3717209ff23fSmrg
3718209ff23fSmrg	# Archives containing C++ object files must be created using
3719209ff23fSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3720209ff23fSmrg	# necessary to make sure instantiated templates are included
3721209ff23fSmrg	# in the archive.
3722209ff23fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3723209ff23fSmrg	;;
3724209ff23fSmrg      gcx*)
3725209ff23fSmrg	# Green Hills C++ Compiler
3726209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3727209ff23fSmrg
3728209ff23fSmrg	# The C++ compiler must be used to create the archive.
3729209ff23fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3730209ff23fSmrg	;;
3731209ff23fSmrg      *)
3732209ff23fSmrg	# GNU C++ compiler with Solaris linker
3733209ff23fSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3734209ff23fSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3735209ff23fSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3736209ff23fSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3737209ff23fSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3738209ff23fSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3739209ff23fSmrg
3740209ff23fSmrg	    # Commands to make compiler produce verbose output that lists
3741209ff23fSmrg	    # what "hidden" libraries, object files and flags are used when
3742209ff23fSmrg	    # linking a shared library.
3743209ff23fSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3744209ff23fSmrg	  else
3745209ff23fSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3746209ff23fSmrg	    # platform.
3747209ff23fSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3748209ff23fSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3749209ff23fSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3750209ff23fSmrg
3751209ff23fSmrg	    # Commands to make compiler produce verbose output that lists
3752209ff23fSmrg	    # what "hidden" libraries, object files and flags are used when
3753209ff23fSmrg	    # linking a shared library.
3754209ff23fSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3755209ff23fSmrg	  fi
3756209ff23fSmrg
3757209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3758209ff23fSmrg	  case $host_os in
3759209ff23fSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3760209ff23fSmrg	  *)
3761209ff23fSmrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3762209ff23fSmrg	    ;;
3763209ff23fSmrg	  esac
3764209ff23fSmrg	fi
3765209ff23fSmrg	;;
3766209ff23fSmrg    esac
3767209ff23fSmrg    ;;
3768209ff23fSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3769209ff23fSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3770209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3771209ff23fSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3772209ff23fSmrg    runpath_var='LD_RUN_PATH'
3773209ff23fSmrg
3774209ff23fSmrg    case $cc_basename in
3775209ff23fSmrg      CC*)
3776209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3777209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3778209ff23fSmrg	;;
3779209ff23fSmrg      *)
3780209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3781209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3782209ff23fSmrg	;;
3783209ff23fSmrg    esac
3784209ff23fSmrg    ;;
3785209ff23fSmrg  sysv5* | sco3.2v5* | sco5v6*)
3786209ff23fSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
3787209ff23fSmrg    # link with -lc, and that would cause any symbols used from libc to
3788209ff23fSmrg    # always be unresolved, which means just about no library would
3789209ff23fSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
3790209ff23fSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
3791209ff23fSmrg    # as -z defs.
3792209ff23fSmrg    # For security reasons, it is highly recommended that you always
3793209ff23fSmrg    # use absolute paths for naming shared libraries, and exclude the
3794209ff23fSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
3795209ff23fSmrg    # requires that you compile everything twice, which is a pain.
3796209ff23fSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
3797209ff23fSmrg    # non-empty value in the environment.  Most likely only useful for
3798209ff23fSmrg    # creating official distributions of packages.
3799209ff23fSmrg    # This is a hack until libtool officially supports absolute path
3800209ff23fSmrg    # names for shared libraries.
3801209ff23fSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3802209ff23fSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3803209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3804209ff23fSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3805209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3806209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3807209ff23fSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3808209ff23fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3809209ff23fSmrg    runpath_var='LD_RUN_PATH'
3810209ff23fSmrg
3811209ff23fSmrg    case $cc_basename in
3812209ff23fSmrg      CC*)
3813209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3814209ff23fSmrg	_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'
3815209ff23fSmrg	;;
3816209ff23fSmrg      *)
3817209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3818209ff23fSmrg	_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'
3819209ff23fSmrg	;;
3820209ff23fSmrg    esac
3821209ff23fSmrg    ;;
3822209ff23fSmrg  tandem*)
3823209ff23fSmrg    case $cc_basename in
3824209ff23fSmrg      NCC*)
3825209ff23fSmrg	# NonStop-UX NCC 3.20
3826209ff23fSmrg	# FIXME: insert proper C++ library support
3827209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3828209ff23fSmrg	;;
3829209ff23fSmrg      *)
3830209ff23fSmrg	# FIXME: insert proper C++ library support
3831209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3832209ff23fSmrg	;;
3833209ff23fSmrg    esac
3834209ff23fSmrg    ;;
3835209ff23fSmrg  vxworks*)
3836209ff23fSmrg    # FIXME: insert proper C++ library support
3837209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3838209ff23fSmrg    ;;
3839209ff23fSmrg  *)
3840209ff23fSmrg    # FIXME: insert proper C++ library support
3841209ff23fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3842209ff23fSmrg    ;;
3843209ff23fSmrgesac
3844209ff23fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3845209ff23fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3846209ff23fSmrg
3847209ff23fSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
3848209ff23fSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
3849209ff23fSmrg
3850209ff23fSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
3851209ff23fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3852209ff23fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3853209ff23fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3854209ff23fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3855209ff23fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3856209ff23fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3857209ff23fSmrg
3858209ff23fSmrgAC_LIBTOOL_CONFIG($1)
3859209ff23fSmrg
3860209ff23fSmrgAC_LANG_POP
3861209ff23fSmrgCC=$lt_save_CC
3862209ff23fSmrgLDCXX=$LD
3863209ff23fSmrgLD=$lt_save_LD
3864209ff23fSmrgGCC=$lt_save_GCC
3865209ff23fSmrgwith_gnu_ldcxx=$with_gnu_ld
3866209ff23fSmrgwith_gnu_ld=$lt_save_with_gnu_ld
3867209ff23fSmrglt_cv_path_LDCXX=$lt_cv_path_LD
3868209ff23fSmrglt_cv_path_LD=$lt_save_path_LD
3869209ff23fSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3870209ff23fSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3871209ff23fSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
3872209ff23fSmrg
3873209ff23fSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3874209ff23fSmrg# ------------------------------------
3875209ff23fSmrg# Figure out "hidden" library dependencies from verbose
3876209ff23fSmrg# compiler output when linking a shared library.
3877209ff23fSmrg# Parse the compiler output and extract the necessary
3878209ff23fSmrg# objects, libraries and library flags.
3879209ff23fSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
3880209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3881209ff23fSmrgdnl we can't use the lt_simple_compile_test_code here,
3882209ff23fSmrgdnl because it contains code intended for an executable,
3883209ff23fSmrgdnl not a library.  It's possible we should let each
3884209ff23fSmrgdnl tag define a new lt_????_link_test_code variable,
3885209ff23fSmrgdnl but it's only used here...
3886209ff23fSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3887209ff23fSmrgint a;
3888209ff23fSmrgvoid foo (void) { a = 0; }
3889209ff23fSmrgEOF
3890209ff23fSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3891209ff23fSmrgclass Foo
3892209ff23fSmrg{
3893209ff23fSmrgpublic:
3894209ff23fSmrg  Foo (void) { a = 0; }
3895209ff23fSmrgprivate:
3896209ff23fSmrg  int a;
3897209ff23fSmrg};
3898209ff23fSmrgEOF
3899209ff23fSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3900209ff23fSmrg      subroutine foo
3901209ff23fSmrg      implicit none
3902209ff23fSmrg      integer*4 a
3903209ff23fSmrg      a=0
3904209ff23fSmrg      return
3905209ff23fSmrg      end
3906209ff23fSmrgEOF
3907209ff23fSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3908209ff23fSmrgpublic class foo {
3909209ff23fSmrg  private int a;
3910209ff23fSmrg  public void bar (void) {
3911209ff23fSmrg    a = 0;
3912209ff23fSmrg  }
3913209ff23fSmrg};
3914209ff23fSmrgEOF
3915209ff23fSmrg])
3916209ff23fSmrgdnl Parse the compiler output and extract the necessary
3917209ff23fSmrgdnl objects, libraries and library flags.
3918209ff23fSmrgif AC_TRY_EVAL(ac_compile); then
3919209ff23fSmrg  # Parse the compiler output and extract the necessary
3920209ff23fSmrg  # objects, libraries and library flags.
3921209ff23fSmrg
3922209ff23fSmrg  # Sentinel used to keep track of whether or not we are before
3923209ff23fSmrg  # the conftest object file.
3924209ff23fSmrg  pre_test_object_deps_done=no
3925209ff23fSmrg
3926209ff23fSmrg  # The `*' in the case matches for architectures that use `case' in
3927209ff23fSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
3928209ff23fSmrg  # eval without this substitution.
3929209ff23fSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3930209ff23fSmrg
3931209ff23fSmrg  for p in `eval $output_verbose_link_cmd`; do
3932209ff23fSmrg    case $p in
3933209ff23fSmrg
3934209ff23fSmrg    -L* | -R* | -l*)
3935209ff23fSmrg       # Some compilers place space between "-{L,R}" and the path.
3936209ff23fSmrg       # Remove the space.
3937209ff23fSmrg       if test $p = "-L" \
3938209ff23fSmrg	  || test $p = "-R"; then
3939209ff23fSmrg	 prev=$p
3940209ff23fSmrg	 continue
3941209ff23fSmrg       else
3942209ff23fSmrg	 prev=
3943209ff23fSmrg       fi
3944209ff23fSmrg
3945209ff23fSmrg       if test "$pre_test_object_deps_done" = no; then
3946209ff23fSmrg	 case $p in
3947209ff23fSmrg	 -L* | -R*)
3948209ff23fSmrg	   # Internal compiler library paths should come after those
3949209ff23fSmrg	   # provided the user.  The postdeps already come after the
3950209ff23fSmrg	   # user supplied libs so there is no need to process them.
3951209ff23fSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3952209ff23fSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3953209ff23fSmrg	   else
3954209ff23fSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3955209ff23fSmrg	   fi
3956209ff23fSmrg	   ;;
3957209ff23fSmrg	 # The "-l" case would never come before the object being
3958209ff23fSmrg	 # linked, so don't bother handling this case.
3959209ff23fSmrg	 esac
3960209ff23fSmrg       else
3961209ff23fSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3962209ff23fSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3963209ff23fSmrg	 else
3964209ff23fSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3965209ff23fSmrg	 fi
3966209ff23fSmrg       fi
3967209ff23fSmrg       ;;
3968209ff23fSmrg
3969209ff23fSmrg    *.$objext)
3970209ff23fSmrg       # This assumes that the test object file only shows up
3971209ff23fSmrg       # once in the compiler output.
3972209ff23fSmrg       if test "$p" = "conftest.$objext"; then
3973209ff23fSmrg	 pre_test_object_deps_done=yes
3974209ff23fSmrg	 continue
3975209ff23fSmrg       fi
3976209ff23fSmrg
3977209ff23fSmrg       if test "$pre_test_object_deps_done" = no; then
3978209ff23fSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3979209ff23fSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3980209ff23fSmrg	 else
3981209ff23fSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3982209ff23fSmrg	 fi
3983209ff23fSmrg       else
3984209ff23fSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3985209ff23fSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3986209ff23fSmrg	 else
3987209ff23fSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3988209ff23fSmrg	 fi
3989209ff23fSmrg       fi
3990209ff23fSmrg       ;;
3991209ff23fSmrg
3992209ff23fSmrg    *) ;; # Ignore the rest.
3993209ff23fSmrg
3994209ff23fSmrg    esac
3995209ff23fSmrg  done
3996209ff23fSmrg
3997209ff23fSmrg  # Clean up.
3998209ff23fSmrg  rm -f a.out a.exe
3999209ff23fSmrgelse
4000209ff23fSmrg  echo "libtool.m4: error: problem compiling $1 test program"
4001209ff23fSmrgfi
4002209ff23fSmrg
4003209ff23fSmrg$rm -f confest.$objext
4004209ff23fSmrg
4005209ff23fSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4006209ff23fSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4007209ff23fSmrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4008209ff23fSmrgfi
4009209ff23fSmrg
4010209ff23fSmrg# PORTME: override above test on systems where it is broken
4011209ff23fSmrgifelse([$1],[CXX],
4012209ff23fSmrg[case $host_os in
4013209ff23fSmrginterix[[3-9]]*)
4014209ff23fSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
4015209ff23fSmrg  # hack all around it, let's just trust "g++" to DTRT.
4016209ff23fSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
4017209ff23fSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
4018209ff23fSmrg  _LT_AC_TAGVAR(postdeps,$1)=
4019209ff23fSmrg  ;;
4020209ff23fSmrg
4021209ff23fSmrglinux*)
4022209ff23fSmrg  case `$CC -V 2>&1 | sed 5q` in
4023209ff23fSmrg  *Sun\ C*)
4024209ff23fSmrg    # Sun C++ 5.9
4025209ff23fSmrg    #
4026209ff23fSmrg    # The more standards-conforming stlport4 library is
4027209ff23fSmrg    # incompatible with the Cstd library. Avoid specifying
4028209ff23fSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
4029209ff23fSmrg    # -library=stlport4 depends on it.
4030209ff23fSmrg    case " $CXX $CXXFLAGS " in
4031209ff23fSmrg    *" -library=stlport4 "*)
4032209ff23fSmrg      solaris_use_stlport4=yes
4033209ff23fSmrg      ;;
4034209ff23fSmrg    esac
4035209ff23fSmrg    if test "$solaris_use_stlport4" != yes; then
4036209ff23fSmrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4037209ff23fSmrg    fi
4038209ff23fSmrg    ;;
4039209ff23fSmrg  esac
4040209ff23fSmrg  ;;
4041209ff23fSmrg
4042209ff23fSmrgsolaris*)
4043209ff23fSmrg  case $cc_basename in
4044209ff23fSmrg  CC*)
4045209ff23fSmrg    # The more standards-conforming stlport4 library is
4046209ff23fSmrg    # incompatible with the Cstd library. Avoid specifying
4047209ff23fSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
4048209ff23fSmrg    # -library=stlport4 depends on it.
4049209ff23fSmrg    case " $CXX $CXXFLAGS " in
4050209ff23fSmrg    *" -library=stlport4 "*)
4051209ff23fSmrg      solaris_use_stlport4=yes
4052209ff23fSmrg      ;;
4053209ff23fSmrg    esac
4054209ff23fSmrg
4055209ff23fSmrg    # Adding this requires a known-good setup of shared libraries for
4056209ff23fSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
4057209ff23fSmrg    # archive will be linked into the output, leading to subtle bugs.
4058209ff23fSmrg    if test "$solaris_use_stlport4" != yes; then
4059209ff23fSmrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4060209ff23fSmrg    fi
4061209ff23fSmrg    ;;
4062209ff23fSmrg  esac
4063209ff23fSmrg  ;;
4064209ff23fSmrgesac
4065209ff23fSmrg])
4066209ff23fSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
4067209ff23fSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4068209ff23fSmrgesac
4069209ff23fSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
4070209ff23fSmrg
4071209ff23fSmrg# AC_LIBTOOL_LANG_F77_CONFIG
4072209ff23fSmrg# --------------------------
4073209ff23fSmrg# Ensure that the configuration vars for the C compiler are
4074209ff23fSmrg# suitably defined.  Those variables are subsequently used by
4075209ff23fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4076209ff23fSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4077209ff23fSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4078209ff23fSmrg[AC_REQUIRE([AC_PROG_F77])
4079209ff23fSmrgAC_LANG_PUSH(Fortran 77)
4080209ff23fSmrg
4081209ff23fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4082209ff23fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4083209ff23fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4084209ff23fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4085209ff23fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4086209ff23fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4087209ff23fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4088209ff23fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4089209ff23fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4090209ff23fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4091209ff23fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4092209ff23fSmrg_LT_AC_TAGVAR(module_cmds, $1)=
4093209ff23fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4094209ff23fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4095209ff23fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4096209ff23fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4097209ff23fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4098209ff23fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4099209ff23fSmrg
4100209ff23fSmrg# Source file extension for f77 test sources.
4101209ff23fSmrgac_ext=f
4102209ff23fSmrg
4103209ff23fSmrg# Object file extension for compiled f77 test sources.
4104209ff23fSmrgobjext=o
4105209ff23fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4106209ff23fSmrg
4107209ff23fSmrg# Code to be used in simple compile tests
4108209ff23fSmrglt_simple_compile_test_code="\
4109209ff23fSmrg      subroutine t
4110209ff23fSmrg      return
4111209ff23fSmrg      end
4112209ff23fSmrg"
4113209ff23fSmrg
4114209ff23fSmrg# Code to be used in simple link tests
4115209ff23fSmrglt_simple_link_test_code="\
4116209ff23fSmrg      program t
4117209ff23fSmrg      end
4118209ff23fSmrg"
4119209ff23fSmrg
4120209ff23fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4121209ff23fSmrg_LT_AC_SYS_COMPILER
4122209ff23fSmrg
4123209ff23fSmrg# save warnings/boilerplate of simple test code
4124209ff23fSmrg_LT_COMPILER_BOILERPLATE
4125209ff23fSmrg_LT_LINKER_BOILERPLATE
4126209ff23fSmrg
4127209ff23fSmrg# Allow CC to be a program name with arguments.
4128209ff23fSmrglt_save_CC="$CC"
4129209ff23fSmrgCC=${F77-"f77"}
4130209ff23fSmrgcompiler=$CC
4131209ff23fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4132209ff23fSmrg_LT_CC_BASENAME([$compiler])
4133209ff23fSmrg
4134209ff23fSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
4135209ff23fSmrgAC_MSG_RESULT([$can_build_shared])
4136209ff23fSmrg
4137209ff23fSmrgAC_MSG_CHECKING([whether to build shared libraries])
4138209ff23fSmrgtest "$can_build_shared" = "no" && enable_shared=no
4139209ff23fSmrg
4140209ff23fSmrg# On AIX, shared libraries and static libraries use the same namespace, and
4141209ff23fSmrg# are all built from PIC.
4142209ff23fSmrgcase $host_os in
4143209ff23fSmrgaix3*)
4144209ff23fSmrg  test "$enable_shared" = yes && enable_static=no
4145209ff23fSmrg  if test -n "$RANLIB"; then
4146209ff23fSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4147209ff23fSmrg    postinstall_cmds='$RANLIB $lib'
4148209ff23fSmrg  fi
4149209ff23fSmrg  ;;
4150209ff23fSmrgaix[[4-9]]*)
4151209ff23fSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4152209ff23fSmrg    test "$enable_shared" = yes && enable_static=no
4153209ff23fSmrg  fi
4154209ff23fSmrg  ;;
4155209ff23fSmrgesac
4156209ff23fSmrgAC_MSG_RESULT([$enable_shared])
4157209ff23fSmrg
4158209ff23fSmrgAC_MSG_CHECKING([whether to build static libraries])
4159209ff23fSmrg# Make sure either enable_shared or enable_static is yes.
4160209ff23fSmrgtest "$enable_shared" = yes || enable_static=yes
4161209ff23fSmrgAC_MSG_RESULT([$enable_static])
4162209ff23fSmrg
4163209ff23fSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
4164209ff23fSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
4165209ff23fSmrg
4166209ff23fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4167209ff23fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4168209ff23fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4169209ff23fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4170209ff23fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4171209ff23fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4172209ff23fSmrg
4173209ff23fSmrgAC_LIBTOOL_CONFIG($1)
4174209ff23fSmrg
4175209ff23fSmrgAC_LANG_POP
4176209ff23fSmrgCC="$lt_save_CC"
4177209ff23fSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
4178209ff23fSmrg
4179209ff23fSmrg
4180209ff23fSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
4181209ff23fSmrg# --------------------------
4182209ff23fSmrg# Ensure that the configuration vars for the C compiler are
4183209ff23fSmrg# suitably defined.  Those variables are subsequently used by
4184209ff23fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4185209ff23fSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4186209ff23fSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4187209ff23fSmrg[AC_LANG_SAVE
4188209ff23fSmrg
4189209ff23fSmrg# Source file extension for Java test sources.
4190209ff23fSmrgac_ext=java
4191209ff23fSmrg
4192209ff23fSmrg# Object file extension for compiled Java test sources.
4193209ff23fSmrgobjext=o
4194209ff23fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4195209ff23fSmrg
4196209ff23fSmrg# Code to be used in simple compile tests
4197209ff23fSmrglt_simple_compile_test_code="class foo {}"
4198209ff23fSmrg
4199209ff23fSmrg# Code to be used in simple link tests
4200209ff23fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4201209ff23fSmrg
4202209ff23fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4203209ff23fSmrg_LT_AC_SYS_COMPILER
4204209ff23fSmrg
4205209ff23fSmrg# save warnings/boilerplate of simple test code
4206209ff23fSmrg_LT_COMPILER_BOILERPLATE
4207209ff23fSmrg_LT_LINKER_BOILERPLATE
4208209ff23fSmrg
4209209ff23fSmrg# Allow CC to be a program name with arguments.
4210209ff23fSmrglt_save_CC="$CC"
4211209ff23fSmrgCC=${GCJ-"gcj"}
4212209ff23fSmrgcompiler=$CC
4213209ff23fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4214209ff23fSmrg_LT_CC_BASENAME([$compiler])
4215209ff23fSmrg
4216209ff23fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
4217209ff23fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4218209ff23fSmrg
4219209ff23fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4220209ff23fSmrg
4221209ff23fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4222209ff23fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4223209ff23fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4224209ff23fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4225209ff23fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4226209ff23fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4227209ff23fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4228209ff23fSmrg
4229209ff23fSmrgAC_LIBTOOL_CONFIG($1)
4230209ff23fSmrg
4231209ff23fSmrgAC_LANG_RESTORE
4232209ff23fSmrgCC="$lt_save_CC"
4233209ff23fSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
4234209ff23fSmrg
4235209ff23fSmrg
4236209ff23fSmrg# AC_LIBTOOL_LANG_RC_CONFIG
4237209ff23fSmrg# -------------------------
4238209ff23fSmrg# Ensure that the configuration vars for the Windows resource compiler are
4239209ff23fSmrg# suitably defined.  Those variables are subsequently used by
4240209ff23fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4241209ff23fSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4242209ff23fSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4243209ff23fSmrg[AC_LANG_SAVE
4244209ff23fSmrg
4245209ff23fSmrg# Source file extension for RC test sources.
4246209ff23fSmrgac_ext=rc
4247209ff23fSmrg
4248209ff23fSmrg# Object file extension for compiled RC test sources.
4249209ff23fSmrgobjext=o
4250209ff23fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4251209ff23fSmrg
4252209ff23fSmrg# Code to be used in simple compile tests
4253209ff23fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4254209ff23fSmrg
4255209ff23fSmrg# Code to be used in simple link tests
4256209ff23fSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
4257209ff23fSmrg
4258209ff23fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4259209ff23fSmrg_LT_AC_SYS_COMPILER
4260209ff23fSmrg
4261209ff23fSmrg# save warnings/boilerplate of simple test code
4262209ff23fSmrg_LT_COMPILER_BOILERPLATE
4263209ff23fSmrg_LT_LINKER_BOILERPLATE
4264209ff23fSmrg
4265209ff23fSmrg# Allow CC to be a program name with arguments.
4266209ff23fSmrglt_save_CC="$CC"
4267209ff23fSmrgCC=${RC-"windres"}
4268209ff23fSmrgcompiler=$CC
4269209ff23fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4270209ff23fSmrg_LT_CC_BASENAME([$compiler])
4271209ff23fSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4272209ff23fSmrg
4273209ff23fSmrgAC_LIBTOOL_CONFIG($1)
4274209ff23fSmrg
4275209ff23fSmrgAC_LANG_RESTORE
4276209ff23fSmrgCC="$lt_save_CC"
4277209ff23fSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
4278209ff23fSmrg
4279209ff23fSmrg
4280209ff23fSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
4281209ff23fSmrg# ----------------------------
4282209ff23fSmrg# If TAGNAME is not passed, then create an initial libtool script
4283209ff23fSmrg# with a default configuration from the untagged config vars.  Otherwise
4284209ff23fSmrg# add code to config.status for appending the configuration named by
4285209ff23fSmrg# TAGNAME from the matching tagged config vars.
4286209ff23fSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
4287209ff23fSmrg[# The else clause should only fire when bootstrapping the
4288209ff23fSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
4289209ff23fSmrg# with your package, and you will get complaints that there are
4290209ff23fSmrg# no rules to generate ltmain.sh.
4291209ff23fSmrgif test -f "$ltmain"; then
4292209ff23fSmrg  # See if we are running on zsh, and set the options which allow our commands through
4293209ff23fSmrg  # without removal of \ escapes.
4294209ff23fSmrg  if test -n "${ZSH_VERSION+set}" ; then
4295209ff23fSmrg    setopt NO_GLOB_SUBST
4296209ff23fSmrg  fi
4297209ff23fSmrg  # Now quote all the things that may contain metacharacters while being
4298209ff23fSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4299209ff23fSmrg  # variables and quote the copies for generation of the libtool script.
4300209ff23fSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4301209ff23fSmrg    SED SHELL STRIP \
4302209ff23fSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4303209ff23fSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4304209ff23fSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
4305209ff23fSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4306209ff23fSmrg    lt_cv_sys_global_symbol_to_c_name_address \
4307209ff23fSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4308209ff23fSmrg    old_postinstall_cmds old_postuninstall_cmds \
4309209ff23fSmrg    _LT_AC_TAGVAR(compiler, $1) \
4310209ff23fSmrg    _LT_AC_TAGVAR(CC, $1) \
4311209ff23fSmrg    _LT_AC_TAGVAR(LD, $1) \
4312209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4313209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4314209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4315209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4316209ff23fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4317209ff23fSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4318209ff23fSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4319209ff23fSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4320209ff23fSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4321209ff23fSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4322209ff23fSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
4323209ff23fSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
4324209ff23fSmrg    _LT_AC_TAGVAR(predeps, $1) \
4325209ff23fSmrg    _LT_AC_TAGVAR(postdeps, $1) \
4326209ff23fSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4327209ff23fSmrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4328209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
4329209ff23fSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4330209ff23fSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4331209ff23fSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4332209ff23fSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4333209ff23fSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4334209ff23fSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4335209ff23fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4336209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4337209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4338209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4339209ff23fSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4340209ff23fSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
4341209ff23fSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4342209ff23fSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4343209ff23fSmrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4344209ff23fSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4345209ff23fSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
4346209ff23fSmrg
4347209ff23fSmrg    case $var in
4348209ff23fSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4349209ff23fSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4350209ff23fSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
4351209ff23fSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4352209ff23fSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
4353209ff23fSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4354209ff23fSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4355209ff23fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4356209ff23fSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4357209ff23fSmrg    postinstall_cmds | postuninstall_cmds | \
4358209ff23fSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
4359209ff23fSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4360209ff23fSmrg      # Double-quote double-evaled strings.
4361209ff23fSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4362209ff23fSmrg      ;;
4363209ff23fSmrg    *)
4364209ff23fSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4365209ff23fSmrg      ;;
4366209ff23fSmrg    esac
4367209ff23fSmrg  done
4368209ff23fSmrg
4369209ff23fSmrg  case $lt_echo in
4370209ff23fSmrg  *'\[$]0 --fallback-echo"')
4371209ff23fSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4372209ff23fSmrg    ;;
4373209ff23fSmrg  esac
4374209ff23fSmrg
4375209ff23fSmrgifelse([$1], [],
4376209ff23fSmrg  [cfgfile="${ofile}T"
4377209ff23fSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4378209ff23fSmrg  $rm -f "$cfgfile"
4379209ff23fSmrg  AC_MSG_NOTICE([creating $ofile])],
4380209ff23fSmrg  [cfgfile="$ofile"])
4381209ff23fSmrg
4382209ff23fSmrg  cat <<__EOF__ >> "$cfgfile"
4383209ff23fSmrgifelse([$1], [],
4384209ff23fSmrg[#! $SHELL
4385209ff23fSmrg
4386209ff23fSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4387209ff23fSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4388209ff23fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4389209ff23fSmrg#
4390209ff23fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4391209ff23fSmrg# Free Software Foundation, Inc.
4392209ff23fSmrg#
4393209ff23fSmrg# This file is part of GNU Libtool:
4394209ff23fSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4395209ff23fSmrg#
4396209ff23fSmrg# This program is free software; you can redistribute it and/or modify
4397209ff23fSmrg# it under the terms of the GNU General Public License as published by
4398209ff23fSmrg# the Free Software Foundation; either version 2 of the License, or
4399209ff23fSmrg# (at your option) any later version.
4400209ff23fSmrg#
4401209ff23fSmrg# This program is distributed in the hope that it will be useful, but
4402209ff23fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
4403209ff23fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4404209ff23fSmrg# General Public License for more details.
4405209ff23fSmrg#
4406209ff23fSmrg# You should have received a copy of the GNU General Public License
4407209ff23fSmrg# along with this program; if not, write to the Free Software
4408209ff23fSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4409209ff23fSmrg#
4410209ff23fSmrg# As a special exception to the GNU General Public License, if you
4411209ff23fSmrg# distribute this file as part of a program that contains a
4412209ff23fSmrg# configuration script generated by Autoconf, you may include it under
4413209ff23fSmrg# the same distribution terms that you use for the rest of that program.
4414209ff23fSmrg
4415209ff23fSmrg# A sed program that does not truncate output.
4416209ff23fSmrgSED=$lt_SED
4417209ff23fSmrg
4418209ff23fSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4419209ff23fSmrgXsed="$SED -e 1s/^X//"
4420209ff23fSmrg
4421209ff23fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4422209ff23fSmrg# if CDPATH is set.
4423209ff23fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4424209ff23fSmrg
4425209ff23fSmrg# The names of the tagged configurations supported by this script.
4426209ff23fSmrgavailable_tags=
4427209ff23fSmrg
4428209ff23fSmrg# ### BEGIN LIBTOOL CONFIG],
4429209ff23fSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4430209ff23fSmrg
4431209ff23fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4432209ff23fSmrg
4433209ff23fSmrg# Shell to use when invoking shell scripts.
4434209ff23fSmrgSHELL=$lt_SHELL
4435209ff23fSmrg
4436209ff23fSmrg# Whether or not to build shared libraries.
4437209ff23fSmrgbuild_libtool_libs=$enable_shared
4438209ff23fSmrg
4439209ff23fSmrg# Whether or not to build static libraries.
4440209ff23fSmrgbuild_old_libs=$enable_static
4441209ff23fSmrg
4442209ff23fSmrg# Whether or not to add -lc for building shared libraries.
4443209ff23fSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4444209ff23fSmrg
4445209ff23fSmrg# Whether or not to disallow shared libs when runtime libs are static
4446209ff23fSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4447209ff23fSmrg
4448209ff23fSmrg# Whether or not to optimize for fast installation.
4449209ff23fSmrgfast_install=$enable_fast_install
4450209ff23fSmrg
4451209ff23fSmrg# The host system.
4452209ff23fSmrghost_alias=$host_alias
4453209ff23fSmrghost=$host
4454209ff23fSmrghost_os=$host_os
4455209ff23fSmrg
4456209ff23fSmrg# The build system.
4457209ff23fSmrgbuild_alias=$build_alias
4458209ff23fSmrgbuild=$build
4459209ff23fSmrgbuild_os=$build_os
4460209ff23fSmrg
4461209ff23fSmrg# An echo program that does not interpret backslashes.
4462209ff23fSmrgecho=$lt_echo
4463209ff23fSmrg
4464209ff23fSmrg# The archiver.
4465209ff23fSmrgAR=$lt_AR
4466209ff23fSmrgAR_FLAGS=$lt_AR_FLAGS
4467209ff23fSmrg
4468209ff23fSmrg# A C compiler.
4469209ff23fSmrgLTCC=$lt_LTCC
4470209ff23fSmrg
4471209ff23fSmrg# LTCC compiler flags.
4472209ff23fSmrgLTCFLAGS=$lt_LTCFLAGS
4473209ff23fSmrg
4474209ff23fSmrg# A language-specific compiler.
4475209ff23fSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4476209ff23fSmrg
4477209ff23fSmrg# Is the compiler the GNU C compiler?
4478209ff23fSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4479209ff23fSmrg
4480209ff23fSmrg# An ERE matcher.
4481209ff23fSmrgEGREP=$lt_EGREP
4482209ff23fSmrg
4483209ff23fSmrg# The linker used to build libraries.
4484209ff23fSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4485209ff23fSmrg
4486209ff23fSmrg# Whether we need hard or soft links.
4487209ff23fSmrgLN_S=$lt_LN_S
4488209ff23fSmrg
4489209ff23fSmrg# A BSD-compatible nm program.
4490209ff23fSmrgNM=$lt_NM
4491209ff23fSmrg
4492209ff23fSmrg# A symbol stripping program
4493209ff23fSmrgSTRIP=$lt_STRIP
4494209ff23fSmrg
4495209ff23fSmrg# Used to examine libraries when file_magic_cmd begins "file"
4496209ff23fSmrgMAGIC_CMD=$MAGIC_CMD
4497209ff23fSmrg
4498209ff23fSmrg# Used on cygwin: DLL creation program.
4499209ff23fSmrgDLLTOOL="$DLLTOOL"
4500209ff23fSmrg
4501209ff23fSmrg# Used on cygwin: object dumper.
4502209ff23fSmrgOBJDUMP="$OBJDUMP"
4503209ff23fSmrg
4504209ff23fSmrg# Used on cygwin: assembler.
4505209ff23fSmrgAS="$AS"
4506209ff23fSmrg
4507209ff23fSmrg# The name of the directory that contains temporary libtool files.
4508209ff23fSmrgobjdir=$objdir
4509209ff23fSmrg
4510209ff23fSmrg# How to create reloadable object files.
4511209ff23fSmrgreload_flag=$lt_reload_flag
4512209ff23fSmrgreload_cmds=$lt_reload_cmds
4513209ff23fSmrg
4514209ff23fSmrg# How to pass a linker flag through the compiler.
4515209ff23fSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4516209ff23fSmrg
4517209ff23fSmrg# Object file suffix (normally "o").
4518209ff23fSmrgobjext="$ac_objext"
4519209ff23fSmrg
4520209ff23fSmrg# Old archive suffix (normally "a").
4521209ff23fSmrglibext="$libext"
4522209ff23fSmrg
4523209ff23fSmrg# Shared library suffix (normally ".so").
4524209ff23fSmrgshrext_cmds='$shrext_cmds'
4525209ff23fSmrg
4526209ff23fSmrg# Executable file suffix (normally "").
4527209ff23fSmrgexeext="$exeext"
4528209ff23fSmrg
4529209ff23fSmrg# Additional compiler flags for building library objects.
4530209ff23fSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4531209ff23fSmrgpic_mode=$pic_mode
4532209ff23fSmrg
4533209ff23fSmrg# What is the maximum length of a command?
4534209ff23fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
4535209ff23fSmrg
4536209ff23fSmrg# Does compiler simultaneously support -c and -o options?
4537209ff23fSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4538209ff23fSmrg
4539209ff23fSmrg# Must we lock files when doing compilation?
4540209ff23fSmrgneed_locks=$lt_need_locks
4541209ff23fSmrg
4542209ff23fSmrg# Do we need the lib prefix for modules?
4543209ff23fSmrgneed_lib_prefix=$need_lib_prefix
4544209ff23fSmrg
4545209ff23fSmrg# Do we need a version for libraries?
4546209ff23fSmrgneed_version=$need_version
4547209ff23fSmrg
4548209ff23fSmrg# Whether dlopen is supported.
4549209ff23fSmrgdlopen_support=$enable_dlopen
4550209ff23fSmrg
4551209ff23fSmrg# Whether dlopen of programs is supported.
4552209ff23fSmrgdlopen_self=$enable_dlopen_self
4553209ff23fSmrg
4554209ff23fSmrg# Whether dlopen of statically linked programs is supported.
4555209ff23fSmrgdlopen_self_static=$enable_dlopen_self_static
4556209ff23fSmrg
4557209ff23fSmrg# Compiler flag to prevent dynamic linking.
4558209ff23fSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4559209ff23fSmrg
4560209ff23fSmrg# Compiler flag to turn off builtin functions.
4561209ff23fSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4562209ff23fSmrg
4563209ff23fSmrg# Compiler flag to allow reflexive dlopens.
4564209ff23fSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4565209ff23fSmrg
4566209ff23fSmrg# Compiler flag to generate shared objects directly from archives.
4567209ff23fSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4568209ff23fSmrg
4569209ff23fSmrg# Compiler flag to generate thread-safe objects.
4570209ff23fSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4571209ff23fSmrg
4572209ff23fSmrg# Library versioning type.
4573209ff23fSmrgversion_type=$version_type
4574209ff23fSmrg
4575209ff23fSmrg# Format of library name prefix.
4576209ff23fSmrglibname_spec=$lt_libname_spec
4577209ff23fSmrg
4578209ff23fSmrg# List of archive names.  First name is the real one, the rest are links.
4579209ff23fSmrg# The last name is the one that the linker finds with -lNAME.
4580209ff23fSmrglibrary_names_spec=$lt_library_names_spec
4581209ff23fSmrg
4582209ff23fSmrg# The coded name of the library, if different from the real name.
4583209ff23fSmrgsoname_spec=$lt_soname_spec
4584209ff23fSmrg
4585209ff23fSmrg# Commands used to build and install an old-style archive.
4586209ff23fSmrgRANLIB=$lt_RANLIB
4587209ff23fSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4588209ff23fSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
4589209ff23fSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
4590209ff23fSmrg
4591209ff23fSmrg# Create an old-style archive from a shared archive.
4592209ff23fSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4593209ff23fSmrg
4594209ff23fSmrg# Create a temporary old-style archive to link instead of a shared archive.
4595209ff23fSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4596209ff23fSmrg
4597209ff23fSmrg# Commands used to build and install a shared archive.
4598209ff23fSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4599209ff23fSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4600209ff23fSmrgpostinstall_cmds=$lt_postinstall_cmds
4601209ff23fSmrgpostuninstall_cmds=$lt_postuninstall_cmds
4602209ff23fSmrg
4603209ff23fSmrg# Commands used to build a loadable module (assumed same as above if empty)
4604209ff23fSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4605209ff23fSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4606209ff23fSmrg
4607209ff23fSmrg# Commands to strip libraries.
4608209ff23fSmrgold_striplib=$lt_old_striplib
4609209ff23fSmrgstriplib=$lt_striplib
4610209ff23fSmrg
4611209ff23fSmrg# Dependencies to place before the objects being linked to create a
4612209ff23fSmrg# shared library.
4613209ff23fSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4614209ff23fSmrg
4615209ff23fSmrg# Dependencies to place after the objects being linked to create a
4616209ff23fSmrg# shared library.
4617209ff23fSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4618209ff23fSmrg
4619209ff23fSmrg# Dependencies to place before the objects being linked to create a
4620209ff23fSmrg# shared library.
4621209ff23fSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4622209ff23fSmrg
4623209ff23fSmrg# Dependencies to place after the objects being linked to create a
4624209ff23fSmrg# shared library.
4625209ff23fSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4626209ff23fSmrg
4627209ff23fSmrg# The directories searched by this compiler when creating a shared
4628209ff23fSmrg# library
4629209ff23fSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4630209ff23fSmrg
4631209ff23fSmrg# The library search path used internally by the compiler when linking
4632209ff23fSmrg# a shared library.
4633209ff23fSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4634209ff23fSmrg
4635209ff23fSmrg# Method to check whether dependent libraries are shared objects.
4636209ff23fSmrgdeplibs_check_method=$lt_deplibs_check_method
4637209ff23fSmrg
4638209ff23fSmrg# Command to use when deplibs_check_method == file_magic.
4639209ff23fSmrgfile_magic_cmd=$lt_file_magic_cmd
4640209ff23fSmrg
4641209ff23fSmrg# Flag that allows shared libraries with undefined symbols to be built.
4642209ff23fSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4643209ff23fSmrg
4644209ff23fSmrg# Flag that forces no undefined symbols.
4645209ff23fSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4646209ff23fSmrg
4647209ff23fSmrg# Commands used to finish a libtool library installation in a directory.
4648209ff23fSmrgfinish_cmds=$lt_finish_cmds
4649209ff23fSmrg
4650209ff23fSmrg# Same as above, but a single script fragment to be evaled but not shown.
4651209ff23fSmrgfinish_eval=$lt_finish_eval
4652209ff23fSmrg
4653209ff23fSmrg# Take the output of nm and produce a listing of raw symbols and C names.
4654209ff23fSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4655209ff23fSmrg
4656209ff23fSmrg# Transform the output of nm in a proper C declaration
4657209ff23fSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4658209ff23fSmrg
4659209ff23fSmrg# Transform the output of nm in a C name address pair
4660209ff23fSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4661209ff23fSmrg
4662209ff23fSmrg# This is the shared library runtime path variable.
4663209ff23fSmrgrunpath_var=$runpath_var
4664209ff23fSmrg
4665209ff23fSmrg# This is the shared library path variable.
4666209ff23fSmrgshlibpath_var=$shlibpath_var
4667209ff23fSmrg
4668209ff23fSmrg# Is shlibpath searched before the hard-coded library search path?
4669209ff23fSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4670209ff23fSmrg
4671209ff23fSmrg# How to hardcode a shared library path into an executable.
4672209ff23fSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4673209ff23fSmrg
4674209ff23fSmrg# Whether we should hardcode library paths into libraries.
4675209ff23fSmrghardcode_into_libs=$hardcode_into_libs
4676209ff23fSmrg
4677209ff23fSmrg# Flag to hardcode \$libdir into a binary during linking.
4678209ff23fSmrg# This must work even if \$libdir does not exist.
4679209ff23fSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4680209ff23fSmrg
4681209ff23fSmrg# If ld is used when linking, flag to hardcode \$libdir into
4682209ff23fSmrg# a binary during linking. This must work even if \$libdir does
4683209ff23fSmrg# not exist.
4684209ff23fSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4685209ff23fSmrg
4686209ff23fSmrg# Whether we need a single -rpath flag with a separated argument.
4687209ff23fSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4688209ff23fSmrg
4689209ff23fSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4690209ff23fSmrg# resulting binary.
4691209ff23fSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4692209ff23fSmrg
4693209ff23fSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4694209ff23fSmrg# resulting binary.
4695209ff23fSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4696209ff23fSmrg
4697209ff23fSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4698209ff23fSmrg# the resulting binary.
4699209ff23fSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4700209ff23fSmrg
4701209ff23fSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
4702209ff23fSmrg# and all subsequent libraries and executables linked against it.
4703209ff23fSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4704209ff23fSmrg
4705209ff23fSmrg# Variables whose values should be saved in libtool wrapper scripts and
4706209ff23fSmrg# restored at relink time.
4707209ff23fSmrgvariables_saved_for_relink="$variables_saved_for_relink"
4708209ff23fSmrg
4709209ff23fSmrg# Whether libtool must link a program against all its dependency libraries.
4710209ff23fSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4711209ff23fSmrg
4712209ff23fSmrg# Compile-time system search path for libraries
4713209ff23fSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4714209ff23fSmrg
4715209ff23fSmrg# Run-time system search path for libraries
4716209ff23fSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4717209ff23fSmrg
4718209ff23fSmrg# Fix the shell variable \$srcfile for the compiler.
4719209ff23fSmrgfix_srcfile_path=$lt_fix_srcfile_path
4720209ff23fSmrg
4721209ff23fSmrg# Set to yes if exported symbols are required.
4722209ff23fSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4723209ff23fSmrg
4724209ff23fSmrg# The commands to list exported symbols.
4725209ff23fSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4726209ff23fSmrg
4727209ff23fSmrg# The commands to extract the exported symbol list from a shared archive.
4728209ff23fSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
4729209ff23fSmrg
4730209ff23fSmrg# Symbols that should not be listed in the preloaded symbols.
4731209ff23fSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4732209ff23fSmrg
4733209ff23fSmrg# Symbols that must always be exported.
4734209ff23fSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4735209ff23fSmrg
4736209ff23fSmrgifelse([$1],[],
4737209ff23fSmrg[# ### END LIBTOOL CONFIG],
4738209ff23fSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
4739209ff23fSmrg
4740209ff23fSmrg__EOF__
4741209ff23fSmrg
4742209ff23fSmrgifelse([$1],[], [
4743209ff23fSmrg  case $host_os in
4744209ff23fSmrg  aix3*)
4745209ff23fSmrg    cat <<\EOF >> "$cfgfile"
4746209ff23fSmrg
4747209ff23fSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
4748209ff23fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
4749209ff23fSmrg# vanish in a puff of smoke.
4750209ff23fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
4751209ff23fSmrg  COLLECT_NAMES=
4752209ff23fSmrg  export COLLECT_NAMES
4753209ff23fSmrgfi
4754209ff23fSmrgEOF
4755209ff23fSmrg    ;;
4756209ff23fSmrg  esac
4757209ff23fSmrg
4758209ff23fSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
4759209ff23fSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4760209ff23fSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
4761209ff23fSmrg  # is reportedly fixed, but why not run on old versions too?
4762209ff23fSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4763209ff23fSmrg
4764209ff23fSmrg  mv -f "$cfgfile" "$ofile" || \
4765209ff23fSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4766209ff23fSmrg  chmod +x "$ofile"
4767209ff23fSmrg])
4768209ff23fSmrgelse
4769209ff23fSmrg  # If there is no Makefile yet, we rely on a make rule to execute
4770209ff23fSmrg  # `config.status --recheck' to rerun these tests and create the
4771209ff23fSmrg  # libtool script then.
4772209ff23fSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4773209ff23fSmrg  if test -f "$ltmain_in"; then
4774209ff23fSmrg    test -f Makefile && make "$ltmain"
4775209ff23fSmrg  fi
4776209ff23fSmrgfi
4777209ff23fSmrg])# AC_LIBTOOL_CONFIG
4778209ff23fSmrg
4779209ff23fSmrg
4780209ff23fSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4781209ff23fSmrg# -------------------------------------------
4782209ff23fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4783209ff23fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4784209ff23fSmrg
4785209ff23fSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4786209ff23fSmrg
4787209ff23fSmrgif test "$GCC" = yes; then
4788209ff23fSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4789209ff23fSmrg
4790209ff23fSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4791209ff23fSmrg    lt_cv_prog_compiler_rtti_exceptions,
4792209ff23fSmrg    [-fno-rtti -fno-exceptions], [],
4793209ff23fSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4794209ff23fSmrgfi
4795209ff23fSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4796209ff23fSmrg
4797209ff23fSmrg
4798209ff23fSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4799209ff23fSmrg# ---------------------------------
4800209ff23fSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4801209ff23fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
4802209ff23fSmrgAC_REQUIRE([LT_AC_PROG_SED])
4803209ff23fSmrgAC_REQUIRE([AC_PROG_NM])
4804209ff23fSmrgAC_REQUIRE([AC_OBJEXT])
4805209ff23fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
4806209ff23fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4807209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4808209ff23fSmrg[
4809209ff23fSmrg# These are sane defaults that work on at least a few old systems.
4810209ff23fSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4811209ff23fSmrg
4812209ff23fSmrg# Character class describing NM global symbol codes.
4813209ff23fSmrgsymcode='[[BCDEGRST]]'
4814209ff23fSmrg
4815209ff23fSmrg# Regexp to match symbols that can be accessed directly from C.
4816209ff23fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4817209ff23fSmrg
4818209ff23fSmrg# Transform an extracted symbol line into a proper C declaration
4819209ff23fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4820209ff23fSmrg
4821209ff23fSmrg# Transform an extracted symbol line into symbol name and symbol address
4822209ff23fSmrglt_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'"
4823209ff23fSmrg
4824209ff23fSmrg# Define system-specific variables.
4825209ff23fSmrgcase $host_os in
4826209ff23fSmrgaix*)
4827209ff23fSmrg  symcode='[[BCDT]]'
4828209ff23fSmrg  ;;
4829209ff23fSmrgcygwin* | mingw* | pw32*)
4830209ff23fSmrg  symcode='[[ABCDGISTW]]'
4831209ff23fSmrg  ;;
4832209ff23fSmrghpux*) # Its linker distinguishes data from code symbols
4833209ff23fSmrg  if test "$host_cpu" = ia64; then
4834209ff23fSmrg    symcode='[[ABCDEGRST]]'
4835209ff23fSmrg  fi
4836209ff23fSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4837209ff23fSmrg  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'"
4838209ff23fSmrg  ;;
4839209ff23fSmrglinux* | k*bsd*-gnu)
4840209ff23fSmrg  if test "$host_cpu" = ia64; then
4841209ff23fSmrg    symcode='[[ABCDGIRSTW]]'
4842209ff23fSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4843209ff23fSmrg    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'"
4844209ff23fSmrg  fi
4845209ff23fSmrg  ;;
4846209ff23fSmrgirix* | nonstopux*)
4847209ff23fSmrg  symcode='[[BCDEGRST]]'
4848209ff23fSmrg  ;;
4849209ff23fSmrgosf*)
4850209ff23fSmrg  symcode='[[BCDEGQRST]]'
4851209ff23fSmrg  ;;
4852209ff23fSmrgsolaris*)
4853209ff23fSmrg  symcode='[[BDRT]]'
4854209ff23fSmrg  ;;
4855209ff23fSmrgsco3.2v5*)
4856209ff23fSmrg  symcode='[[DT]]'
4857209ff23fSmrg  ;;
4858209ff23fSmrgsysv4.2uw2*)
4859209ff23fSmrg  symcode='[[DT]]'
4860209ff23fSmrg  ;;
4861209ff23fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
4862209ff23fSmrg  symcode='[[ABDT]]'
4863209ff23fSmrg  ;;
4864209ff23fSmrgsysv4)
4865209ff23fSmrg  symcode='[[DFNSTU]]'
4866209ff23fSmrg  ;;
4867209ff23fSmrgesac
4868209ff23fSmrg
4869209ff23fSmrg# Handle CRLF in mingw tool chain
4870209ff23fSmrgopt_cr=
4871209ff23fSmrgcase $build_os in
4872209ff23fSmrgmingw*)
4873209ff23fSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4874209ff23fSmrg  ;;
4875209ff23fSmrgesac
4876209ff23fSmrg
4877209ff23fSmrg# If we're using GNU nm, then use its standard symbol codes.
4878209ff23fSmrgcase `$NM -V 2>&1` in
4879209ff23fSmrg*GNU* | *'with BFD'*)
4880209ff23fSmrg  symcode='[[ABCDGIRSTW]]' ;;
4881209ff23fSmrgesac
4882209ff23fSmrg
4883209ff23fSmrg# Try without a prefix undercore, then with it.
4884209ff23fSmrgfor ac_symprfx in "" "_"; do
4885209ff23fSmrg
4886209ff23fSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4887209ff23fSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4888209ff23fSmrg
4889209ff23fSmrg  # Write the raw and C identifiers.
4890209ff23fSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4891209ff23fSmrg
4892209ff23fSmrg  # Check to see that the pipe works correctly.
4893209ff23fSmrg  pipe_works=no
4894209ff23fSmrg
4895209ff23fSmrg  rm -f conftest*
4896209ff23fSmrg  cat > conftest.$ac_ext <<EOF
4897209ff23fSmrg#ifdef __cplusplus
4898209ff23fSmrgextern "C" {
4899209ff23fSmrg#endif
4900209ff23fSmrgchar nm_test_var;
4901209ff23fSmrgvoid nm_test_func(){}
4902209ff23fSmrg#ifdef __cplusplus
4903209ff23fSmrg}
4904209ff23fSmrg#endif
4905209ff23fSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
4906209ff23fSmrgEOF
4907209ff23fSmrg
4908209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
4909209ff23fSmrg    # Now try to grab the symbols.
4910209ff23fSmrg    nlist=conftest.nm
4911209ff23fSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4912209ff23fSmrg      # Try sorting and uniquifying the output.
4913209ff23fSmrg      if sort "$nlist" | uniq > "$nlist"T; then
4914209ff23fSmrg	mv -f "$nlist"T "$nlist"
4915209ff23fSmrg      else
4916209ff23fSmrg	rm -f "$nlist"T
4917209ff23fSmrg      fi
4918209ff23fSmrg
4919209ff23fSmrg      # Make sure that we snagged all the symbols we need.
4920209ff23fSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4921209ff23fSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4922209ff23fSmrg	  cat <<EOF > conftest.$ac_ext
4923209ff23fSmrg#ifdef __cplusplus
4924209ff23fSmrgextern "C" {
4925209ff23fSmrg#endif
4926209ff23fSmrg
4927209ff23fSmrgEOF
4928209ff23fSmrg	  # Now generate the symbol file.
4929209ff23fSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4930209ff23fSmrg
4931209ff23fSmrg	  cat <<EOF >> conftest.$ac_ext
4932209ff23fSmrg#if defined (__STDC__) && __STDC__
4933209ff23fSmrg# define lt_ptr_t void *
4934209ff23fSmrg#else
4935209ff23fSmrg# define lt_ptr_t char *
4936209ff23fSmrg# define const
4937209ff23fSmrg#endif
4938209ff23fSmrg
4939209ff23fSmrg/* The mapping between symbol names and symbols. */
4940209ff23fSmrgconst struct {
4941209ff23fSmrg  const char *name;
4942209ff23fSmrg  lt_ptr_t address;
4943209ff23fSmrg}
4944209ff23fSmrglt_preloaded_symbols[[]] =
4945209ff23fSmrg{
4946209ff23fSmrgEOF
4947209ff23fSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4948209ff23fSmrg	  cat <<\EOF >> conftest.$ac_ext
4949209ff23fSmrg  {0, (lt_ptr_t) 0}
4950209ff23fSmrg};
4951209ff23fSmrg
4952209ff23fSmrg#ifdef __cplusplus
4953209ff23fSmrg}
4954209ff23fSmrg#endif
4955209ff23fSmrgEOF
4956209ff23fSmrg	  # Now try linking the two files.
4957209ff23fSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
4958209ff23fSmrg	  lt_save_LIBS="$LIBS"
4959209ff23fSmrg	  lt_save_CFLAGS="$CFLAGS"
4960209ff23fSmrg	  LIBS="conftstm.$ac_objext"
4961209ff23fSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4962209ff23fSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4963209ff23fSmrg	    pipe_works=yes
4964209ff23fSmrg	  fi
4965209ff23fSmrg	  LIBS="$lt_save_LIBS"
4966209ff23fSmrg	  CFLAGS="$lt_save_CFLAGS"
4967209ff23fSmrg	else
4968209ff23fSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4969209ff23fSmrg	fi
4970209ff23fSmrg      else
4971209ff23fSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4972209ff23fSmrg      fi
4973209ff23fSmrg    else
4974209ff23fSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4975209ff23fSmrg    fi
4976209ff23fSmrg  else
4977209ff23fSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4978209ff23fSmrg    cat conftest.$ac_ext >&5
4979209ff23fSmrg  fi
4980209ff23fSmrg  rm -rf conftest* conftst*
4981209ff23fSmrg
4982209ff23fSmrg  # Do not use the global_symbol_pipe unless it works.
4983209ff23fSmrg  if test "$pipe_works" = yes; then
4984209ff23fSmrg    break
4985209ff23fSmrg  else
4986209ff23fSmrg    lt_cv_sys_global_symbol_pipe=
4987209ff23fSmrg  fi
4988209ff23fSmrgdone
4989209ff23fSmrg])
4990209ff23fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4991209ff23fSmrg  lt_cv_sys_global_symbol_to_cdecl=
4992209ff23fSmrgfi
4993209ff23fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4994209ff23fSmrg  AC_MSG_RESULT(failed)
4995209ff23fSmrgelse
4996209ff23fSmrg  AC_MSG_RESULT(ok)
4997209ff23fSmrgfi
4998209ff23fSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4999209ff23fSmrg
5000209ff23fSmrg
5001209ff23fSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5002209ff23fSmrg# ---------------------------------------
5003209ff23fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5004209ff23fSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5005209ff23fSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5006209ff23fSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5007209ff23fSmrg
5008209ff23fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
5009209ff23fSmrg ifelse([$1],[CXX],[
5010209ff23fSmrg  # C++ specific cases for pic, static, wl, etc.
5011209ff23fSmrg  if test "$GXX" = yes; then
5012209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5013209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5014209ff23fSmrg
5015209ff23fSmrg    case $host_os in
5016209ff23fSmrg    aix*)
5017209ff23fSmrg      # All AIX code is PIC.
5018209ff23fSmrg      if test "$host_cpu" = ia64; then
5019209ff23fSmrg	# AIX 5 now supports IA64 processor
5020209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5021209ff23fSmrg      fi
5022209ff23fSmrg      ;;
5023209ff23fSmrg    amigaos*)
5024209ff23fSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
5025209ff23fSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
5026209ff23fSmrg      # like `-m68040'.
5027209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5028209ff23fSmrg      ;;
5029209ff23fSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5030209ff23fSmrg      # PIC is the default for these OSes.
5031209ff23fSmrg      ;;
5032209ff23fSmrg    mingw* | cygwin* | os2* | pw32*)
5033209ff23fSmrg      # This hack is so that the source file can tell whether it is being
5034209ff23fSmrg      # built for inclusion in a dll (and should export symbols for example).
5035209ff23fSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5036209ff23fSmrg      # (--disable-auto-import) libraries
5037209ff23fSmrg      m4_if([$1], [GCJ], [],
5038209ff23fSmrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5039209ff23fSmrg      ;;
5040209ff23fSmrg    darwin* | rhapsody*)
5041209ff23fSmrg      # PIC is the default on this platform
5042209ff23fSmrg      # Common symbols not allowed in MH_DYLIB files
5043209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5044209ff23fSmrg      ;;
5045209ff23fSmrg    *djgpp*)
5046209ff23fSmrg      # DJGPP does not support shared libraries at all
5047209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5048209ff23fSmrg      ;;
5049209ff23fSmrg    interix[[3-9]]*)
5050209ff23fSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5051209ff23fSmrg      # Instead, we relocate shared libraries at runtime.
5052209ff23fSmrg      ;;
5053209ff23fSmrg    sysv4*MP*)
5054209ff23fSmrg      if test -d /usr/nec; then
5055209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5056209ff23fSmrg      fi
5057209ff23fSmrg      ;;
5058209ff23fSmrg    hpux*)
5059209ff23fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5060209ff23fSmrg      # not for PA HP-UX.
5061209ff23fSmrg      case $host_cpu in
5062209ff23fSmrg      hppa*64*|ia64*)
5063209ff23fSmrg	;;
5064209ff23fSmrg      *)
5065209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5066209ff23fSmrg	;;
5067209ff23fSmrg      esac
5068209ff23fSmrg      ;;
5069209ff23fSmrg    *)
5070209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5071209ff23fSmrg      ;;
5072209ff23fSmrg    esac
5073209ff23fSmrg  else
5074209ff23fSmrg    case $host_os in
5075209ff23fSmrg      aix[[4-9]]*)
5076209ff23fSmrg	# All AIX code is PIC.
5077209ff23fSmrg	if test "$host_cpu" = ia64; then
5078209ff23fSmrg	  # AIX 5 now supports IA64 processor
5079209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5080209ff23fSmrg	else
5081209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5082209ff23fSmrg	fi
5083209ff23fSmrg	;;
5084209ff23fSmrg      chorus*)
5085209ff23fSmrg	case $cc_basename in
5086209ff23fSmrg	cxch68*)
5087209ff23fSmrg	  # Green Hills C++ Compiler
5088209ff23fSmrg	  # _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"
5089209ff23fSmrg	  ;;
5090209ff23fSmrg	esac
5091209ff23fSmrg	;;
5092209ff23fSmrg       darwin*)
5093209ff23fSmrg         # PIC is the default on this platform
5094209ff23fSmrg         # Common symbols not allowed in MH_DYLIB files
5095209ff23fSmrg         case $cc_basename in
5096209ff23fSmrg           xlc*)
5097209ff23fSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5098209ff23fSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5099209ff23fSmrg           ;;
5100209ff23fSmrg         esac
5101209ff23fSmrg       ;;
5102209ff23fSmrg      dgux*)
5103209ff23fSmrg	case $cc_basename in
5104209ff23fSmrg	  ec++*)
5105209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5106209ff23fSmrg	    ;;
5107209ff23fSmrg	  ghcx*)
5108209ff23fSmrg	    # Green Hills C++ Compiler
5109209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5110209ff23fSmrg	    ;;
5111209ff23fSmrg	  *)
5112209ff23fSmrg	    ;;
5113209ff23fSmrg	esac
5114209ff23fSmrg	;;
5115209ff23fSmrg      freebsd* | dragonfly*)
5116209ff23fSmrg	# FreeBSD uses GNU C++
5117209ff23fSmrg	;;
5118209ff23fSmrg      hpux9* | hpux10* | hpux11*)
5119209ff23fSmrg	case $cc_basename in
5120209ff23fSmrg	  CC*)
5121209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5122209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5123209ff23fSmrg	    if test "$host_cpu" != ia64; then
5124209ff23fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5125209ff23fSmrg	    fi
5126209ff23fSmrg	    ;;
5127209ff23fSmrg	  aCC*)
5128209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5129209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5130209ff23fSmrg	    case $host_cpu in
5131209ff23fSmrg	    hppa*64*|ia64*)
5132209ff23fSmrg	      # +Z the default
5133209ff23fSmrg	      ;;
5134209ff23fSmrg	    *)
5135209ff23fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5136209ff23fSmrg	      ;;
5137209ff23fSmrg	    esac
5138209ff23fSmrg	    ;;
5139209ff23fSmrg	  *)
5140209ff23fSmrg	    ;;
5141209ff23fSmrg	esac
5142209ff23fSmrg	;;
5143209ff23fSmrg      interix*)
5144209ff23fSmrg	# This is c89, which is MS Visual C++ (no shared libs)
5145209ff23fSmrg	# Anyone wants to do a port?
5146209ff23fSmrg	;;
5147209ff23fSmrg      irix5* | irix6* | nonstopux*)
5148209ff23fSmrg	case $cc_basename in
5149209ff23fSmrg	  CC*)
5150209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5151209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5152209ff23fSmrg	    # CC pic flag -KPIC is the default.
5153209ff23fSmrg	    ;;
5154209ff23fSmrg	  *)
5155209ff23fSmrg	    ;;
5156209ff23fSmrg	esac
5157209ff23fSmrg	;;
5158209ff23fSmrg      linux* | k*bsd*-gnu)
5159209ff23fSmrg	case $cc_basename in
5160209ff23fSmrg	  KCC*)
5161209ff23fSmrg	    # KAI C++ Compiler
5162209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5163209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5164209ff23fSmrg	    ;;
5165209ff23fSmrg	  icpc* | ecpc*)
5166209ff23fSmrg	    # Intel C++
5167209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5168209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5169209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5170209ff23fSmrg	    ;;
5171209ff23fSmrg	  pgCC* | pgcpp*)
5172209ff23fSmrg	    # Portland Group C++ compiler.
5173209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5174209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5175209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5176209ff23fSmrg	    ;;
5177209ff23fSmrg	  cxx*)
5178209ff23fSmrg	    # Compaq C++
5179209ff23fSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5180209ff23fSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5181209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5182209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5183209ff23fSmrg	    ;;
5184209ff23fSmrg	  *)
5185209ff23fSmrg	    case `$CC -V 2>&1 | sed 5q` in
5186209ff23fSmrg	    *Sun\ C*)
5187209ff23fSmrg	      # Sun C++ 5.9
5188209ff23fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5189209ff23fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5190209ff23fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5191209ff23fSmrg	      ;;
5192209ff23fSmrg	    esac
5193209ff23fSmrg	    ;;
5194209ff23fSmrg	esac
5195209ff23fSmrg	;;
5196209ff23fSmrg      lynxos*)
5197209ff23fSmrg	;;
5198209ff23fSmrg      m88k*)
5199209ff23fSmrg	;;
5200209ff23fSmrg      mvs*)
5201209ff23fSmrg	case $cc_basename in
5202209ff23fSmrg	  cxx*)
5203209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5204209ff23fSmrg	    ;;
5205209ff23fSmrg	  *)
5206209ff23fSmrg	    ;;
5207209ff23fSmrg	esac
5208209ff23fSmrg	;;
5209c503f109Smrg      netbsd*)
5210209ff23fSmrg	;;
5211209ff23fSmrg      osf3* | osf4* | osf5*)
5212209ff23fSmrg	case $cc_basename in
5213209ff23fSmrg	  KCC*)
5214209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5215209ff23fSmrg	    ;;
5216209ff23fSmrg	  RCC*)
5217209ff23fSmrg	    # Rational C++ 2.4.1
5218209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5219209ff23fSmrg	    ;;
5220209ff23fSmrg	  cxx*)
5221209ff23fSmrg	    # Digital/Compaq C++
5222209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5223209ff23fSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5224209ff23fSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5225209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5226209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5227209ff23fSmrg	    ;;
5228209ff23fSmrg	  *)
5229209ff23fSmrg	    ;;
5230209ff23fSmrg	esac
5231209ff23fSmrg	;;
5232209ff23fSmrg      psos*)
5233209ff23fSmrg	;;
5234209ff23fSmrg      solaris*)
5235209ff23fSmrg	case $cc_basename in
5236209ff23fSmrg	  CC*)
5237209ff23fSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
5238209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5239209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5240209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5241209ff23fSmrg	    ;;
5242209ff23fSmrg	  gcx*)
5243209ff23fSmrg	    # Green Hills C++ Compiler
5244209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5245209ff23fSmrg	    ;;
5246209ff23fSmrg	  *)
5247209ff23fSmrg	    ;;
5248209ff23fSmrg	esac
5249209ff23fSmrg	;;
5250209ff23fSmrg      sunos4*)
5251209ff23fSmrg	case $cc_basename in
5252209ff23fSmrg	  CC*)
5253209ff23fSmrg	    # Sun C++ 4.x
5254209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5255209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5256209ff23fSmrg	    ;;
5257209ff23fSmrg	  lcc*)
5258209ff23fSmrg	    # Lucid
5259209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5260209ff23fSmrg	    ;;
5261209ff23fSmrg	  *)
5262209ff23fSmrg	    ;;
5263209ff23fSmrg	esac
5264209ff23fSmrg	;;
5265209ff23fSmrg      tandem*)
5266209ff23fSmrg	case $cc_basename in
5267209ff23fSmrg	  NCC*)
5268209ff23fSmrg	    # NonStop-UX NCC 3.20
5269209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5270209ff23fSmrg	    ;;
5271209ff23fSmrg	  *)
5272209ff23fSmrg	    ;;
5273209ff23fSmrg	esac
5274209ff23fSmrg	;;
5275209ff23fSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5276209ff23fSmrg	case $cc_basename in
5277209ff23fSmrg	  CC*)
5278209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5279209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5280209ff23fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5281209ff23fSmrg	    ;;
5282209ff23fSmrg	esac
5283209ff23fSmrg	;;
5284209ff23fSmrg      vxworks*)
5285209ff23fSmrg	;;
5286209ff23fSmrg      *)
5287209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5288209ff23fSmrg	;;
5289209ff23fSmrg    esac
5290209ff23fSmrg  fi
5291209ff23fSmrg],
5292209ff23fSmrg[
5293209ff23fSmrg  if test "$GCC" = yes; then
5294209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5295209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5296209ff23fSmrg
5297209ff23fSmrg    case $host_os in
5298209ff23fSmrg      aix*)
5299209ff23fSmrg      # All AIX code is PIC.
5300209ff23fSmrg      if test "$host_cpu" = ia64; then
5301209ff23fSmrg	# AIX 5 now supports IA64 processor
5302209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5303209ff23fSmrg      fi
5304209ff23fSmrg      ;;
5305209ff23fSmrg
5306209ff23fSmrg    amigaos*)
5307209ff23fSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
5308209ff23fSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
5309209ff23fSmrg      # like `-m68040'.
5310209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5311209ff23fSmrg      ;;
5312209ff23fSmrg
5313209ff23fSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5314209ff23fSmrg      # PIC is the default for these OSes.
5315209ff23fSmrg      ;;
5316209ff23fSmrg
5317209ff23fSmrg    mingw* | cygwin* | pw32* | os2*)
5318209ff23fSmrg      # This hack is so that the source file can tell whether it is being
5319209ff23fSmrg      # built for inclusion in a dll (and should export symbols for example).
5320209ff23fSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5321209ff23fSmrg      # (--disable-auto-import) libraries
5322209ff23fSmrg      m4_if([$1], [GCJ], [],
5323209ff23fSmrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5324209ff23fSmrg      ;;
5325209ff23fSmrg
5326209ff23fSmrg    darwin* | rhapsody*)
5327209ff23fSmrg      # PIC is the default on this platform
5328209ff23fSmrg      # Common symbols not allowed in MH_DYLIB files
5329209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5330209ff23fSmrg      ;;
5331209ff23fSmrg
5332209ff23fSmrg    interix[[3-9]]*)
5333209ff23fSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5334209ff23fSmrg      # Instead, we relocate shared libraries at runtime.
5335209ff23fSmrg      ;;
5336209ff23fSmrg
5337209ff23fSmrg    msdosdjgpp*)
5338209ff23fSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5339209ff23fSmrg      # on systems that don't support them.
5340209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5341209ff23fSmrg      enable_shared=no
5342209ff23fSmrg      ;;
5343209ff23fSmrg
5344209ff23fSmrg    sysv4*MP*)
5345209ff23fSmrg      if test -d /usr/nec; then
5346209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5347209ff23fSmrg      fi
5348209ff23fSmrg      ;;
5349209ff23fSmrg
5350209ff23fSmrg    hpux*)
5351209ff23fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5352209ff23fSmrg      # not for PA HP-UX.
5353209ff23fSmrg      case $host_cpu in
5354209ff23fSmrg      hppa*64*|ia64*)
5355209ff23fSmrg	# +Z the default
5356209ff23fSmrg	;;
5357209ff23fSmrg      *)
5358209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5359209ff23fSmrg	;;
5360209ff23fSmrg      esac
5361209ff23fSmrg      ;;
5362209ff23fSmrg
5363209ff23fSmrg    *)
5364209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5365209ff23fSmrg      ;;
5366209ff23fSmrg    esac
5367209ff23fSmrg  else
5368209ff23fSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
5369209ff23fSmrg    case $host_os in
5370209ff23fSmrg    aix*)
5371209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372209ff23fSmrg      if test "$host_cpu" = ia64; then
5373209ff23fSmrg	# AIX 5 now supports IA64 processor
5374209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5375209ff23fSmrg      else
5376209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5377209ff23fSmrg      fi
5378209ff23fSmrg      ;;
5379209ff23fSmrg      darwin*)
5380209ff23fSmrg        # PIC is the default on this platform
5381209ff23fSmrg        # Common symbols not allowed in MH_DYLIB files
5382209ff23fSmrg       case $cc_basename in
5383209ff23fSmrg         xlc*)
5384209ff23fSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5385209ff23fSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5386209ff23fSmrg         ;;
5387209ff23fSmrg       esac
5388209ff23fSmrg       ;;
5389209ff23fSmrg
5390209ff23fSmrg    mingw* | cygwin* | pw32* | os2*)
5391209ff23fSmrg      # This hack is so that the source file can tell whether it is being
5392209ff23fSmrg      # built for inclusion in a dll (and should export symbols for example).
5393209ff23fSmrg      m4_if([$1], [GCJ], [],
5394209ff23fSmrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5395209ff23fSmrg      ;;
5396209ff23fSmrg
5397209ff23fSmrg    hpux9* | hpux10* | hpux11*)
5398209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5399209ff23fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5400209ff23fSmrg      # not for PA HP-UX.
5401209ff23fSmrg      case $host_cpu in
5402209ff23fSmrg      hppa*64*|ia64*)
5403209ff23fSmrg	# +Z the default
5404209ff23fSmrg	;;
5405209ff23fSmrg      *)
5406209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5407209ff23fSmrg	;;
5408209ff23fSmrg      esac
5409209ff23fSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5410209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5411209ff23fSmrg      ;;
5412209ff23fSmrg
5413209ff23fSmrg    irix5* | irix6* | nonstopux*)
5414209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5415209ff23fSmrg      # PIC (with -KPIC) is the default.
5416209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5417209ff23fSmrg      ;;
5418209ff23fSmrg
5419209ff23fSmrg    newsos6)
5420209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5421209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5422209ff23fSmrg      ;;
5423209ff23fSmrg
5424209ff23fSmrg    linux* | k*bsd*-gnu)
5425209ff23fSmrg      case $cc_basename in
5426209ff23fSmrg      icc* | ecc*)
5427209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5428209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5429209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5430209ff23fSmrg        ;;
5431209ff23fSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
5432209ff23fSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
5433209ff23fSmrg	# which looks to be a dead project)
5434209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5435209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5436209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5437209ff23fSmrg        ;;
5438209ff23fSmrg      ccc*)
5439209ff23fSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5440209ff23fSmrg        # All Alpha code is PIC.
5441209ff23fSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5442209ff23fSmrg        ;;
5443209ff23fSmrg      *)
5444209ff23fSmrg        case `$CC -V 2>&1 | sed 5q` in
5445209ff23fSmrg	*Sun\ C*)
5446209ff23fSmrg	  # Sun C 5.9
5447209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5448209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5449209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450209ff23fSmrg	  ;;
5451209ff23fSmrg	*Sun\ F*)
5452209ff23fSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5453209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5454209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5455209ff23fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5456209ff23fSmrg	  ;;
5457209ff23fSmrg	esac
5458209ff23fSmrg	;;
5459209ff23fSmrg      esac
5460209ff23fSmrg      ;;
5461209ff23fSmrg
5462209ff23fSmrg    osf3* | osf4* | osf5*)
5463209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5464209ff23fSmrg      # All OSF/1 code is PIC.
5465209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5466209ff23fSmrg      ;;
5467209ff23fSmrg
5468209ff23fSmrg    rdos*)
5469209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5470209ff23fSmrg      ;;
5471209ff23fSmrg
5472209ff23fSmrg    solaris*)
5473209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5474209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5475209ff23fSmrg      case $cc_basename in
5476209ff23fSmrg      f77* | f90* | f95*)
5477209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5478209ff23fSmrg      *)
5479209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5480209ff23fSmrg      esac
5481209ff23fSmrg      ;;
5482209ff23fSmrg
5483209ff23fSmrg    sunos4*)
5484209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5485209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5486209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5487209ff23fSmrg      ;;
5488209ff23fSmrg
5489209ff23fSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
5490209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5491209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5492209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5493209ff23fSmrg      ;;
5494209ff23fSmrg
5495209ff23fSmrg    sysv4*MP*)
5496209ff23fSmrg      if test -d /usr/nec ;then
5497209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5498209ff23fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5499209ff23fSmrg      fi
5500209ff23fSmrg      ;;
5501209ff23fSmrg
5502209ff23fSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5503209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5504209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5505209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5506209ff23fSmrg      ;;
5507209ff23fSmrg
5508209ff23fSmrg    unicos*)
5509209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5510209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5511209ff23fSmrg      ;;
5512209ff23fSmrg
5513209ff23fSmrg    uts4*)
5514209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5515209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5516209ff23fSmrg      ;;
5517209ff23fSmrg
5518209ff23fSmrg    *)
5519209ff23fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5520209ff23fSmrg      ;;
5521209ff23fSmrg    esac
5522209ff23fSmrg  fi
5523209ff23fSmrg])
5524209ff23fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5525209ff23fSmrg
5526209ff23fSmrg#
5527209ff23fSmrg# Check to make sure the PIC flag actually works.
5528209ff23fSmrg#
5529209ff23fSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5530209ff23fSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5531209ff23fSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5532209ff23fSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5533209ff23fSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5534209ff23fSmrg     "" | " "*) ;;
5535209ff23fSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5536209ff23fSmrg     esac],
5537209ff23fSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5538209ff23fSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5539209ff23fSmrgfi
5540209ff23fSmrgcase $host_os in
5541209ff23fSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
5542209ff23fSmrg  *djgpp*)
5543209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5544209ff23fSmrg    ;;
5545209ff23fSmrg  *)
5546209ff23fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5547209ff23fSmrg    ;;
5548209ff23fSmrgesac
5549209ff23fSmrg
5550209ff23fSmrg#
5551209ff23fSmrg# Check to make sure the static flag actually works.
5552209ff23fSmrg#
5553209ff23fSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5554209ff23fSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5555209ff23fSmrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5556209ff23fSmrg  $lt_tmp_static_flag,
5557209ff23fSmrg  [],
5558209ff23fSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5559209ff23fSmrg])
5560209ff23fSmrg
5561209ff23fSmrg
5562209ff23fSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5563209ff23fSmrg# ------------------------------------
5564209ff23fSmrg# See if the linker supports building shared libraries.
5565209ff23fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5566209ff23fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
5567209ff23fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5568209ff23fSmrgifelse([$1],[CXX],[
5569209ff23fSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5570209ff23fSmrg  case $host_os in
5571209ff23fSmrg  aix[[4-9]]*)
5572209ff23fSmrg    # If we're using GNU nm, then we don't want the "-C" option.
5573209ff23fSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5574209ff23fSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5575209ff23fSmrg      _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'
5576209ff23fSmrg    else
5577209ff23fSmrg      _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'
5578209ff23fSmrg    fi
5579209ff23fSmrg    ;;
5580209ff23fSmrg  pw32*)
5581209ff23fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5582209ff23fSmrg  ;;
5583209ff23fSmrg  cygwin* | mingw*)
5584209ff23fSmrg    _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'
5585209ff23fSmrg  ;;
5586209ff23fSmrg  *)
5587209ff23fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5588209ff23fSmrg  ;;
5589209ff23fSmrg  esac
5590209ff23fSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5591209ff23fSmrg],[
5592209ff23fSmrg  runpath_var=
5593209ff23fSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5594209ff23fSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5595209ff23fSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
5596209ff23fSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5597209ff23fSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5598209ff23fSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5599209ff23fSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5600209ff23fSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5601209ff23fSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5602209ff23fSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5603209ff23fSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5604209ff23fSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5605209ff23fSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5606209ff23fSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5607209ff23fSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5608209ff23fSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5609209ff23fSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5610209ff23fSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
5611209ff23fSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5612209ff23fSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5613209ff23fSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5614209ff23fSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
5615209ff23fSmrg  # included in the symbol list
5616209ff23fSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
5617209ff23fSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5618209ff23fSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5619209ff23fSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5620209ff23fSmrg  # as well as any symbol that contains `d'.
5621209ff23fSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5622209ff23fSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5623209ff23fSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5624209ff23fSmrg  # the symbol is explicitly referenced.  Since portable code cannot
5625209ff23fSmrg  # rely on this symbol name, it's probably fine to never include it in
5626209ff23fSmrg  # preloaded symbol tables.
5627209ff23fSmrg  # Exclude shared library initialization/finalization symbols.
5628209ff23fSmrgdnl Note also adjust exclude_expsyms for C++ above.
5629209ff23fSmrg  extract_expsyms_cmds=
5630209ff23fSmrg  # Just being paranoid about ensuring that cc_basename is set.
5631209ff23fSmrg  _LT_CC_BASENAME([$compiler])
5632209ff23fSmrg  case $host_os in
5633209ff23fSmrg  cygwin* | mingw* | pw32*)
5634209ff23fSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5635209ff23fSmrg    # When not using gcc, we currently assume that we are using
5636209ff23fSmrg    # Microsoft Visual C++.
5637209ff23fSmrg    if test "$GCC" != yes; then
5638209ff23fSmrg      with_gnu_ld=no
5639209ff23fSmrg    fi
5640209ff23fSmrg    ;;
5641209ff23fSmrg  interix*)
5642209ff23fSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
5643209ff23fSmrg    with_gnu_ld=yes
5644209ff23fSmrg    ;;
5645209ff23fSmrg  openbsd*)
5646209ff23fSmrg    with_gnu_ld=no
5647209ff23fSmrg    ;;
5648209ff23fSmrg  esac
5649209ff23fSmrg
5650209ff23fSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5651209ff23fSmrg  if test "$with_gnu_ld" = yes; then
5652209ff23fSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5653209ff23fSmrg    wlarc='${wl}'
5654209ff23fSmrg
5655209ff23fSmrg    # Set some defaults for GNU ld with shared library support. These
5656209ff23fSmrg    # are reset later if shared libraries are not supported. Putting them
5657209ff23fSmrg    # here allows them to be overridden if necessary.
5658209ff23fSmrg    runpath_var=LD_RUN_PATH
5659209ff23fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5660209ff23fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5661209ff23fSmrg    # ancient GNU ld didn't support --whole-archive et. al.
5662209ff23fSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5663209ff23fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5664209ff23fSmrg      else
5665209ff23fSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5666209ff23fSmrg    fi
5667209ff23fSmrg    supports_anon_versioning=no
5668209ff23fSmrg    case `$LD -v 2>/dev/null` in
5669209ff23fSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5670209ff23fSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5671209ff23fSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5672209ff23fSmrg      *\ 2.11.*) ;; # other 2.11 versions
5673209ff23fSmrg      *) supports_anon_versioning=yes ;;
5674209ff23fSmrg    esac
5675209ff23fSmrg
5676209ff23fSmrg    # See if GNU ld supports shared libraries.
5677209ff23fSmrg    case $host_os in
5678209ff23fSmrg    aix[[3-9]]*)
5679209ff23fSmrg      # On AIX/PPC, the GNU linker is very broken
5680209ff23fSmrg      if test "$host_cpu" != ia64; then
5681209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5682209ff23fSmrg	cat <<EOF 1>&2
5683209ff23fSmrg
5684209ff23fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5685209ff23fSmrg*** to be unable to reliably create shared libraries on AIX.
5686209ff23fSmrg*** Therefore, libtool is disabling shared libraries support.  If you
5687209ff23fSmrg*** really care for shared libraries, you may want to modify your PATH
5688209ff23fSmrg*** so that a non-GNU linker is found, and then restart.
5689209ff23fSmrg
5690209ff23fSmrgEOF
5691209ff23fSmrg      fi
5692209ff23fSmrg      ;;
5693209ff23fSmrg
5694209ff23fSmrg    amigaos*)
5695209ff23fSmrg      _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)'
5696209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5697209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5698209ff23fSmrg
5699209ff23fSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5700209ff23fSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
5701209ff23fSmrg      # to version 4, is to share data among multiple programs linked
5702209ff23fSmrg      # with the same dynamic library.  Since this doesn't match the
5703209ff23fSmrg      # behavior of shared libraries on other platforms, we can't use
5704209ff23fSmrg      # them.
5705209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5706209ff23fSmrg      ;;
5707209ff23fSmrg
5708209ff23fSmrg    beos*)
5709209ff23fSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5710209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5711209ff23fSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5712209ff23fSmrg	# support --undefined.  This deserves some investigation.  FIXME
5713209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5714209ff23fSmrg      else
5715209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5716209ff23fSmrg      fi
5717209ff23fSmrg      ;;
5718209ff23fSmrg
5719209ff23fSmrg    cygwin* | mingw* | pw32*)
5720209ff23fSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5721209ff23fSmrg      # as there is no search path for DLLs.
5722209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5723209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5724209ff23fSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5725209ff23fSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5726209ff23fSmrg      _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'
5727209ff23fSmrg
5728209ff23fSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5729209ff23fSmrg        _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'
5730209ff23fSmrg	# If the export-symbols file already is a .def file (1st line
5731209ff23fSmrg	# is EXPORTS), use it as is; otherwise, prepend...
5732209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5733209ff23fSmrg	  cp $export_symbols $output_objdir/$soname.def;
5734209ff23fSmrg	else
5735209ff23fSmrg	  echo EXPORTS > $output_objdir/$soname.def;
5736209ff23fSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
5737209ff23fSmrg	fi~
5738209ff23fSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5739209ff23fSmrg      else
5740209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5741209ff23fSmrg      fi
5742209ff23fSmrg      ;;
5743209ff23fSmrg
5744209ff23fSmrg    interix[[3-9]]*)
5745209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5746209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5747209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5748209ff23fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749209ff23fSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5750209ff23fSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5751209ff23fSmrg      # default) and relocated if they conflict, which is a slow very memory
5752209ff23fSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5753209ff23fSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5754209ff23fSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5755209ff23fSmrg      _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'
5756209ff23fSmrg      _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'
5757209ff23fSmrg      ;;
5758209ff23fSmrg
5759209ff23fSmrg    gnu* | linux* | k*bsd*-gnu)
5760209ff23fSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5761209ff23fSmrg	tmp_addflag=
5762209ff23fSmrg	case $cc_basename,$host_cpu in
5763209ff23fSmrg	pgcc*)				# Portland Group C compiler
5764209ff23fSmrg	  _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'
5765209ff23fSmrg	  tmp_addflag=' $pic_flag'
5766209ff23fSmrg	  ;;
5767209ff23fSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5768209ff23fSmrg	  _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'
5769209ff23fSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5770209ff23fSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5771209ff23fSmrg	  tmp_addflag=' -i_dynamic' ;;
5772209ff23fSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5773209ff23fSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5774209ff23fSmrg	ifc* | ifort*)			# Intel Fortran compiler
5775209ff23fSmrg	  tmp_addflag=' -nofor_main' ;;
5776209ff23fSmrg	esac
5777209ff23fSmrg	case `$CC -V 2>&1 | sed 5q` in
5778209ff23fSmrg	*Sun\ C*)			# Sun C 5.9
5779209ff23fSmrg	  _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'
5780209ff23fSmrg	  tmp_sharedflag='-G' ;;
5781209ff23fSmrg	*Sun\ F*)			# Sun Fortran 8.3
5782209ff23fSmrg	  tmp_sharedflag='-G' ;;
5783209ff23fSmrg	*)
5784209ff23fSmrg	  tmp_sharedflag='-shared' ;;
5785209ff23fSmrg	esac
5786209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5787209ff23fSmrg
5788209ff23fSmrg	if test $supports_anon_versioning = yes; then
5789209ff23fSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5790209ff23fSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5791209ff23fSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
5792209ff23fSmrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5793209ff23fSmrg	fi
5794209ff23fSmrg      else
5795209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5796209ff23fSmrg      fi
5797209ff23fSmrg      ;;
5798209ff23fSmrg
5799c503f109Smrg    netbsd*)
5800209ff23fSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5801209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5802209ff23fSmrg	wlarc=
5803209ff23fSmrg      else
5804209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5805209ff23fSmrg	_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'
5806209ff23fSmrg      fi
5807209ff23fSmrg      ;;
5808209ff23fSmrg
5809209ff23fSmrg    solaris*)
5810209ff23fSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5811209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5812209ff23fSmrg	cat <<EOF 1>&2
5813209ff23fSmrg
5814209ff23fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5815209ff23fSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
5816209ff23fSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5817209ff23fSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5818209ff23fSmrg*** your PATH or compiler configuration so that the native linker is
5819209ff23fSmrg*** used, and then restart.
5820209ff23fSmrg
5821209ff23fSmrgEOF
5822209ff23fSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5823209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5824209ff23fSmrg	_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'
5825209ff23fSmrg      else
5826209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5827209ff23fSmrg      fi
5828209ff23fSmrg      ;;
5829209ff23fSmrg
5830209ff23fSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5831209ff23fSmrg      case `$LD -v 2>&1` in
5832209ff23fSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5833209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5834209ff23fSmrg	cat <<_LT_EOF 1>&2
5835209ff23fSmrg
5836209ff23fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5837209ff23fSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5838209ff23fSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5839209ff23fSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5840209ff23fSmrg*** your PATH or compiler configuration so that the native linker is
5841209ff23fSmrg*** used, and then restart.
5842209ff23fSmrg
5843209ff23fSmrg_LT_EOF
5844209ff23fSmrg	;;
5845209ff23fSmrg	*)
5846209ff23fSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5847209ff23fSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5848209ff23fSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5849209ff23fSmrg	    _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'
5850209ff23fSmrg	  else
5851209ff23fSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5852209ff23fSmrg	  fi
5853209ff23fSmrg	;;
5854209ff23fSmrg      esac
5855209ff23fSmrg      ;;
5856209ff23fSmrg
5857209ff23fSmrg    sunos4*)
5858209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5859209ff23fSmrg      wlarc=
5860209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5861209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5862209ff23fSmrg      ;;
5863209ff23fSmrg
5864209ff23fSmrg    *)
5865209ff23fSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5866209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5867209ff23fSmrg	_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'
5868209ff23fSmrg      else
5869209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5870209ff23fSmrg      fi
5871209ff23fSmrg      ;;
5872209ff23fSmrg    esac
5873209ff23fSmrg
5874209ff23fSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5875209ff23fSmrg      runpath_var=
5876209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5877209ff23fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5878209ff23fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5879209ff23fSmrg    fi
5880209ff23fSmrg  else
5881209ff23fSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
5882209ff23fSmrg    case $host_os in
5883209ff23fSmrg    aix3*)
5884209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5885209ff23fSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5886209ff23fSmrg      _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'
5887209ff23fSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
5888209ff23fSmrg      # are no directories specified by -L.
5889209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5890209ff23fSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5891209ff23fSmrg	# Neither direct hardcoding nor static linking is supported with a
5892209ff23fSmrg	# broken collect2.
5893209ff23fSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5894209ff23fSmrg      fi
5895209ff23fSmrg      ;;
5896209ff23fSmrg
5897209ff23fSmrg    aix[[4-9]]*)
5898209ff23fSmrg      if test "$host_cpu" = ia64; then
5899209ff23fSmrg	# On IA64, the linker does run time linking by default, so we don't
5900209ff23fSmrg	# have to do anything special.
5901209ff23fSmrg	aix_use_runtimelinking=no
5902209ff23fSmrg	exp_sym_flag='-Bexport'
5903209ff23fSmrg	no_entry_flag=""
5904209ff23fSmrg      else
5905209ff23fSmrg	# If we're using GNU nm, then we don't want the "-C" option.
5906209ff23fSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5907209ff23fSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5908209ff23fSmrg	  _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'
5909209ff23fSmrg	else
5910209ff23fSmrg	  _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'
5911209ff23fSmrg	fi
5912209ff23fSmrg	aix_use_runtimelinking=no
5913209ff23fSmrg
5914209ff23fSmrg	# Test if we are trying to use run time linking or normal
5915209ff23fSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5916209ff23fSmrg	# need to do runtime linking.
5917209ff23fSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5918209ff23fSmrg	  for ld_flag in $LDFLAGS; do
5919209ff23fSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5920209ff23fSmrg  	    aix_use_runtimelinking=yes
5921209ff23fSmrg  	    break
5922209ff23fSmrg  	  fi
5923209ff23fSmrg	  done
5924209ff23fSmrg	  ;;
5925209ff23fSmrg	esac
5926209ff23fSmrg
5927209ff23fSmrg	exp_sym_flag='-bexport'
5928209ff23fSmrg	no_entry_flag='-bnoentry'
5929209ff23fSmrg      fi
5930209ff23fSmrg
5931209ff23fSmrg      # When large executables or shared objects are built, AIX ld can
5932209ff23fSmrg      # have problems creating the table of contents.  If linking a library
5933209ff23fSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5934209ff23fSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5935209ff23fSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5936209ff23fSmrg
5937209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
5938209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5939209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5940209ff23fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5941209ff23fSmrg
5942209ff23fSmrg      if test "$GCC" = yes; then
5943209ff23fSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5944209ff23fSmrg	# We only want to do this on AIX 4.2 and lower, the check
5945209ff23fSmrg	# below for broken collect2 doesn't work under 4.3+
5946209ff23fSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5947209ff23fSmrg	  if test -f "$collect2name" && \
5948209ff23fSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5949209ff23fSmrg	  then
5950209ff23fSmrg  	  # We have reworked collect2
5951209ff23fSmrg  	  :
5952209ff23fSmrg	  else
5953209ff23fSmrg  	  # We have old collect2
5954209ff23fSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5955209ff23fSmrg  	  # It fails to find uninstalled libraries when the uninstalled
5956209ff23fSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5957209ff23fSmrg  	  # to unsupported forces relinking
5958209ff23fSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5959209ff23fSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5960209ff23fSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5961209ff23fSmrg	  fi
5962209ff23fSmrg	  ;;
5963209ff23fSmrg	esac
5964209ff23fSmrg	shared_flag='-shared'
5965209ff23fSmrg	if test "$aix_use_runtimelinking" = yes; then
5966209ff23fSmrg	  shared_flag="$shared_flag "'${wl}-G'
5967209ff23fSmrg	fi
5968209ff23fSmrg      else
5969209ff23fSmrg	# not using gcc
5970209ff23fSmrg	if test "$host_cpu" = ia64; then
5971209ff23fSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5972209ff23fSmrg  	# chokes on -Wl,-G. The following line is correct:
5973209ff23fSmrg	  shared_flag='-G'
5974209ff23fSmrg	else
5975209ff23fSmrg	  if test "$aix_use_runtimelinking" = yes; then
5976209ff23fSmrg	    shared_flag='${wl}-G'
5977209ff23fSmrg	  else
5978209ff23fSmrg	    shared_flag='${wl}-bM:SRE'
5979209ff23fSmrg	  fi
5980209ff23fSmrg	fi
5981209ff23fSmrg      fi
5982209ff23fSmrg
5983209ff23fSmrg      # It seems that -bexpall does not export symbols beginning with
5984209ff23fSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5985209ff23fSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5986209ff23fSmrg      if test "$aix_use_runtimelinking" = yes; then
5987209ff23fSmrg	# Warning - without using the other runtime loading flags (-brtl),
5988209ff23fSmrg	# -berok will link without error, but may produce a broken library.
5989209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5990209ff23fSmrg       # Determine the default libpath from the value encoded in an empty executable.
5991209ff23fSmrg       _LT_AC_SYS_LIBPATH_AIX
5992209ff23fSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5993209ff23fSmrg	_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"
5994209ff23fSmrg       else
5995209ff23fSmrg	if test "$host_cpu" = ia64; then
5996209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5997209ff23fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5998209ff23fSmrg	  _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"
5999209ff23fSmrg	else
6000209ff23fSmrg	 # Determine the default libpath from the value encoded in an empty executable.
6001209ff23fSmrg	 _LT_AC_SYS_LIBPATH_AIX
6002209ff23fSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6003209ff23fSmrg	  # Warning - without using the other run time loading flags,
6004209ff23fSmrg	  # -berok will link without error, but may produce a broken library.
6005209ff23fSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6006209ff23fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6007209ff23fSmrg	  # Exported symbols can be pulled into shared objects from archives
6008209ff23fSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6009209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6010209ff23fSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
6011209ff23fSmrg	  _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'
6012209ff23fSmrg	fi
6013209ff23fSmrg      fi
6014209ff23fSmrg      ;;
6015209ff23fSmrg
6016209ff23fSmrg    amigaos*)
6017209ff23fSmrg      _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)'
6018209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6019209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6020209ff23fSmrg      # see comment about different semantics on the GNU ld section
6021209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6022209ff23fSmrg      ;;
6023209ff23fSmrg
6024209ff23fSmrg    bsdi[[45]]*)
6025209ff23fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6026209ff23fSmrg      ;;
6027209ff23fSmrg
6028209ff23fSmrg    cygwin* | mingw* | pw32*)
6029209ff23fSmrg      # When not using gcc, we currently assume that we are using
6030209ff23fSmrg      # Microsoft Visual C++.
6031209ff23fSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
6032209ff23fSmrg      # no search path for DLLs.
6033209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6034209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6035209ff23fSmrg      # Tell ltmain to make .lib files, not .a files.
6036209ff23fSmrg      libext=lib
6037209ff23fSmrg      # Tell ltmain to make .dll files, not .so files.
6038209ff23fSmrg      shrext_cmds=".dll"
6039209ff23fSmrg      # FIXME: Setting linknames here is a bad hack.
6040209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6041209ff23fSmrg      # The linker will automatically build a .lib file if we build a DLL.
6042209ff23fSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6043209ff23fSmrg      # FIXME: Should let the user specify the lib program.
6044209ff23fSmrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6045209ff23fSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6046209ff23fSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6047209ff23fSmrg      ;;
6048209ff23fSmrg
6049209ff23fSmrg    darwin* | rhapsody*)
6050209ff23fSmrg      case $host_os in
6051209ff23fSmrg        rhapsody* | darwin1.[[012]])
6052209ff23fSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6053209ff23fSmrg         ;;
6054209ff23fSmrg       *) # Darwin 1.3 on
6055209ff23fSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6056209ff23fSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6057209ff23fSmrg         else
6058209ff23fSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
6059209ff23fSmrg             10.[[012]])
6060209ff23fSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6061209ff23fSmrg               ;;
6062209ff23fSmrg             10.*)
6063209ff23fSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6064209ff23fSmrg               ;;
6065209ff23fSmrg           esac
6066209ff23fSmrg         fi
6067209ff23fSmrg         ;;
6068209ff23fSmrg      esac
6069209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6070209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6071209ff23fSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6072209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6073209ff23fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6074209ff23fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6075209ff23fSmrg    if test "$GCC" = yes ; then
6076209ff23fSmrg    	output_verbose_link_cmd='echo'
6077209ff23fSmrg        _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}"
6078209ff23fSmrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6079209ff23fSmrg        _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}"
6080209ff23fSmrg        _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}"
6081209ff23fSmrg    else
6082209ff23fSmrg      case $cc_basename in
6083209ff23fSmrg        xlc*)
6084209ff23fSmrg         output_verbose_link_cmd='echo'
6085209ff23fSmrg         _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'
6086209ff23fSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6087209ff23fSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6088209ff23fSmrg         _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}'
6089209ff23fSmrg          _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}'
6090209ff23fSmrg          ;;
6091209ff23fSmrg       *)
6092209ff23fSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6093209ff23fSmrg          ;;
6094209ff23fSmrg      esac
6095209ff23fSmrg    fi
6096209ff23fSmrg      ;;
6097209ff23fSmrg
6098209ff23fSmrg    dgux*)
6099209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6100209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6101209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6102209ff23fSmrg      ;;
6103209ff23fSmrg
6104209ff23fSmrg    freebsd1*)
6105209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6106209ff23fSmrg      ;;
6107209ff23fSmrg
6108209ff23fSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6109209ff23fSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
6110209ff23fSmrg    # does not break anything, and helps significantly (at the cost of a little
6111209ff23fSmrg    # extra space).
6112209ff23fSmrg    freebsd2.2*)
6113209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6114209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6115209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6116209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6117209ff23fSmrg      ;;
6118209ff23fSmrg
6119209ff23fSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6120209ff23fSmrg    freebsd2*)
6121209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6122209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6123209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6124209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6125209ff23fSmrg      ;;
6126209ff23fSmrg
6127209ff23fSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6128209ff23fSmrg    freebsd* | dragonfly*)
6129209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6130209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6131209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6132209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6133209ff23fSmrg      ;;
6134209ff23fSmrg
6135209ff23fSmrg    hpux9*)
6136209ff23fSmrg      if test "$GCC" = yes; then
6137209ff23fSmrg	_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'
6138209ff23fSmrg      else
6139209ff23fSmrg	_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'
6140209ff23fSmrg      fi
6141209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6142209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6143209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6144209ff23fSmrg
6145209ff23fSmrg      # hardcode_minus_L: Not really in the search PATH,
6146209ff23fSmrg      # but as the default location of the library.
6147209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6148209ff23fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6149209ff23fSmrg      ;;
6150209ff23fSmrg
6151209ff23fSmrg    hpux10*)
6152209ff23fSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6153209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6154209ff23fSmrg      else
6155209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6156209ff23fSmrg      fi
6157209ff23fSmrg      if test "$with_gnu_ld" = no; then
6158209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6159209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6160209ff23fSmrg
6161209ff23fSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6162209ff23fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6163209ff23fSmrg
6164209ff23fSmrg	# hardcode_minus_L: Not really in the search PATH,
6165209ff23fSmrg	# but as the default location of the library.
6166209ff23fSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6167209ff23fSmrg      fi
6168209ff23fSmrg      ;;
6169209ff23fSmrg
6170209ff23fSmrg    hpux11*)
6171209ff23fSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6172209ff23fSmrg	case $host_cpu in
6173209ff23fSmrg	hppa*64*)
6174209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6175209ff23fSmrg	  ;;
6176209ff23fSmrg	ia64*)
6177209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6178209ff23fSmrg	  ;;
6179209ff23fSmrg	*)
6180209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6181209ff23fSmrg	  ;;
6182209ff23fSmrg	esac
6183209ff23fSmrg      else
6184209ff23fSmrg	case $host_cpu in
6185209ff23fSmrg	hppa*64*)
6186209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6187209ff23fSmrg	  ;;
6188209ff23fSmrg	ia64*)
6189209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6190209ff23fSmrg	  ;;
6191209ff23fSmrg	*)
6192209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6193209ff23fSmrg	  ;;
6194209ff23fSmrg	esac
6195209ff23fSmrg      fi
6196209ff23fSmrg      if test "$with_gnu_ld" = no; then
6197209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6198209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6199209ff23fSmrg
6200209ff23fSmrg	case $host_cpu in
6201209ff23fSmrg	hppa*64*|ia64*)
6202209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6203209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6204209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6205209ff23fSmrg	  ;;
6206209ff23fSmrg	*)
6207209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6208209ff23fSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6209209ff23fSmrg
6210209ff23fSmrg	  # hardcode_minus_L: Not really in the search PATH,
6211209ff23fSmrg	  # but as the default location of the library.
6212209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6213209ff23fSmrg	  ;;
6214209ff23fSmrg	esac
6215209ff23fSmrg      fi
6216209ff23fSmrg      ;;
6217209ff23fSmrg
6218209ff23fSmrg    irix5* | irix6* | nonstopux*)
6219209ff23fSmrg      if test "$GCC" = yes; then
6220209ff23fSmrg	_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'
6221209ff23fSmrg      else
6222209ff23fSmrg	_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'
6223209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6224209ff23fSmrg      fi
6225209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6226209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6227209ff23fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6228209ff23fSmrg      ;;
6229209ff23fSmrg
6230c503f109Smrg    netbsd*)
6231209ff23fSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6232209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6233209ff23fSmrg      else
6234209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6235209ff23fSmrg      fi
6236209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6237209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6238209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6239209ff23fSmrg      ;;
6240209ff23fSmrg
6241209ff23fSmrg    newsos6)
6242209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6243209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6244209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6245209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6246209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6247209ff23fSmrg      ;;
6248209ff23fSmrg
6249209ff23fSmrg    openbsd*)
6250209ff23fSmrg      if test -f /usr/libexec/ld.so; then
6251209ff23fSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6252209ff23fSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6253209ff23fSmrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6254209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6255209ff23fSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6256209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6257209ff23fSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6258209ff23fSmrg	else
6259209ff23fSmrg	  case $host_os in
6260209ff23fSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6261209ff23fSmrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6262209ff23fSmrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6263209ff23fSmrg	     ;;
6264209ff23fSmrg	   *)
6265209ff23fSmrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6266209ff23fSmrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6267209ff23fSmrg	     ;;
6268209ff23fSmrg	  esac
6269209ff23fSmrg        fi
6270209ff23fSmrg      else
6271209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6272209ff23fSmrg      fi
6273209ff23fSmrg      ;;
6274209ff23fSmrg
6275209ff23fSmrg    os2*)
6276209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6277209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6278209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6279209ff23fSmrg      _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'
6280209ff23fSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6281209ff23fSmrg      ;;
6282209ff23fSmrg
6283209ff23fSmrg    osf3*)
6284209ff23fSmrg      if test "$GCC" = yes; then
6285209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6286209ff23fSmrg	_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'
6287209ff23fSmrg      else
6288209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6289209ff23fSmrg	_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'
6290209ff23fSmrg      fi
6291209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6292209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6293209ff23fSmrg      ;;
6294209ff23fSmrg
6295209ff23fSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6296209ff23fSmrg      if test "$GCC" = yes; then
6297209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6298209ff23fSmrg	_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'
6299209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6300209ff23fSmrg      else
6301209ff23fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6302209ff23fSmrg	_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'
6303209ff23fSmrg	_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~
6304209ff23fSmrg	$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'
6305209ff23fSmrg
6306209ff23fSmrg	# Both c and cxx compiler support -rpath directly
6307209ff23fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6308209ff23fSmrg      fi
6309209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6310209ff23fSmrg      ;;
6311209ff23fSmrg
6312209ff23fSmrg    solaris*)
6313209ff23fSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6314209ff23fSmrg      if test "$GCC" = yes; then
6315209ff23fSmrg	wlarc='${wl}'
6316209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6317209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6318209ff23fSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6319209ff23fSmrg      else
6320209ff23fSmrg	wlarc=''
6321209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6322209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6323209ff23fSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6324209ff23fSmrg      fi
6325209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6326209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6327209ff23fSmrg      case $host_os in
6328209ff23fSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6329209ff23fSmrg      *)
6330209ff23fSmrg	# The compiler driver will combine and reorder linker options,
6331209ff23fSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6332209ff23fSmrg	# but is careful enough not to reorder.
6333209ff23fSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6334209ff23fSmrg	if test "$GCC" = yes; then
6335209ff23fSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6336209ff23fSmrg	else
6337209ff23fSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6338209ff23fSmrg	fi
6339209ff23fSmrg	;;
6340209ff23fSmrg      esac
6341209ff23fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6342209ff23fSmrg      ;;
6343209ff23fSmrg
6344209ff23fSmrg    sunos4*)
6345209ff23fSmrg      if test "x$host_vendor" = xsequent; then
6346209ff23fSmrg	# Use $CC to link under sequent, because it throws in some extra .o
6347209ff23fSmrg	# files that make .init and .fini sections work.
6348209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6349209ff23fSmrg      else
6350209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6351209ff23fSmrg      fi
6352209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6353209ff23fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6354209ff23fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6355209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6356209ff23fSmrg      ;;
6357209ff23fSmrg
6358209ff23fSmrg    sysv4)
6359209ff23fSmrg      case $host_vendor in
6360209ff23fSmrg	sni)
6361209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6362209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6363209ff23fSmrg	;;
6364209ff23fSmrg	siemens)
6365209ff23fSmrg	  ## LD is ld it makes a PLAMLIB
6366209ff23fSmrg	  ## CC just makes a GrossModule.
6367209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6368209ff23fSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6369209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6370209ff23fSmrg        ;;
6371209ff23fSmrg	motorola)
6372209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373209ff23fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6374209ff23fSmrg	;;
6375209ff23fSmrg      esac
6376209ff23fSmrg      runpath_var='LD_RUN_PATH'
6377209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6378209ff23fSmrg      ;;
6379209ff23fSmrg
6380209ff23fSmrg    sysv4.3*)
6381209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6382209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6383209ff23fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6384209ff23fSmrg      ;;
6385209ff23fSmrg
6386209ff23fSmrg    sysv4*MP*)
6387209ff23fSmrg      if test -d /usr/nec; then
6388209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6389209ff23fSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6390209ff23fSmrg	runpath_var=LD_RUN_PATH
6391209ff23fSmrg	hardcode_runpath_var=yes
6392209ff23fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6393209ff23fSmrg      fi
6394209ff23fSmrg      ;;
6395209ff23fSmrg
6396209ff23fSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6397209ff23fSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6398209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6399209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6400209ff23fSmrg      runpath_var='LD_RUN_PATH'
6401209ff23fSmrg
6402209ff23fSmrg      if test "$GCC" = yes; then
6403209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6404209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6405209ff23fSmrg      else
6406209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6407209ff23fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6408209ff23fSmrg      fi
6409209ff23fSmrg      ;;
6410209ff23fSmrg
6411209ff23fSmrg    sysv5* | sco3.2v5* | sco5v6*)
6412209ff23fSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
6413209ff23fSmrg      # link with -lc, and that would cause any symbols used from libc to
6414209ff23fSmrg      # always be unresolved, which means just about no library would
6415209ff23fSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
6416209ff23fSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
6417209ff23fSmrg      # as -z defs.
6418209ff23fSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6419209ff23fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6420209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6421209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6422209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6423209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6424209ff23fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6425209ff23fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6426209ff23fSmrg      runpath_var='LD_RUN_PATH'
6427209ff23fSmrg
6428209ff23fSmrg      if test "$GCC" = yes; then
6429209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6430209ff23fSmrg	_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'
6431209ff23fSmrg      else
6432209ff23fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6433209ff23fSmrg	_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'
6434209ff23fSmrg      fi
6435209ff23fSmrg      ;;
6436209ff23fSmrg
6437209ff23fSmrg    uts4*)
6438209ff23fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6439209ff23fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6440209ff23fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6441209ff23fSmrg      ;;
6442209ff23fSmrg
6443209ff23fSmrg    *)
6444209ff23fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6445209ff23fSmrg      ;;
6446209ff23fSmrg    esac
6447209ff23fSmrg  fi
6448209ff23fSmrg])
6449209ff23fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6450209ff23fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6451209ff23fSmrg
6452209ff23fSmrg#
6453209ff23fSmrg# Do we need to explicitly link libc?
6454209ff23fSmrg#
6455209ff23fSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6456209ff23fSmrgx|xyes)
6457209ff23fSmrg  # Assume -lc should be added
6458209ff23fSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6459209ff23fSmrg
6460209ff23fSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6461209ff23fSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6462209ff23fSmrg    *'~'*)
6463209ff23fSmrg      # FIXME: we may have to deal with multi-command sequences.
6464209ff23fSmrg      ;;
6465209ff23fSmrg    '$CC '*)
6466209ff23fSmrg      # Test whether the compiler implicitly links with -lc since on some
6467209ff23fSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6468209ff23fSmrg      # to ld, don't add -lc before -lgcc.
6469209ff23fSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6470209ff23fSmrg      $rm conftest*
6471209ff23fSmrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6472209ff23fSmrg
6473209ff23fSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6474209ff23fSmrg        soname=conftest
6475209ff23fSmrg        lib=conftest
6476209ff23fSmrg        libobjs=conftest.$ac_objext
6477209ff23fSmrg        deplibs=
6478209ff23fSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6479209ff23fSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6480209ff23fSmrg        compiler_flags=-v
6481209ff23fSmrg        linker_flags=-v
6482209ff23fSmrg        verstring=
6483209ff23fSmrg        output_objdir=.
6484209ff23fSmrg        libname=conftest
6485209ff23fSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6486209ff23fSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6487209ff23fSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6488209ff23fSmrg        then
6489209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6490209ff23fSmrg        else
6491209ff23fSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6492209ff23fSmrg        fi
6493209ff23fSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6494209ff23fSmrg      else
6495209ff23fSmrg        cat conftest.err 1>&5
6496209ff23fSmrg      fi
6497209ff23fSmrg      $rm conftest*
6498209ff23fSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6499209ff23fSmrg      ;;
6500209ff23fSmrg    esac
6501209ff23fSmrg  fi
6502209ff23fSmrg  ;;
6503209ff23fSmrgesac
6504209ff23fSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
6505209ff23fSmrg
6506209ff23fSmrg
6507209ff23fSmrg# _LT_AC_FILE_LTDLL_C
6508209ff23fSmrg# -------------------
6509209ff23fSmrg# Be careful that the start marker always follows a newline.
6510209ff23fSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6511209ff23fSmrg# /* ltdll.c starts here */
6512209ff23fSmrg# #define WIN32_LEAN_AND_MEAN
6513209ff23fSmrg# #include <windows.h>
6514209ff23fSmrg# #undef WIN32_LEAN_AND_MEAN
6515209ff23fSmrg# #include <stdio.h>
6516209ff23fSmrg#
6517209ff23fSmrg# #ifndef __CYGWIN__
6518209ff23fSmrg# #  ifdef __CYGWIN32__
6519209ff23fSmrg# #    define __CYGWIN__ __CYGWIN32__
6520209ff23fSmrg# #  endif
6521209ff23fSmrg# #endif
6522209ff23fSmrg#
6523209ff23fSmrg# #ifdef __cplusplus
6524209ff23fSmrg# extern "C" {
6525209ff23fSmrg# #endif
6526209ff23fSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6527209ff23fSmrg# #ifdef __cplusplus
6528209ff23fSmrg# }
6529209ff23fSmrg# #endif
6530209ff23fSmrg#
6531209ff23fSmrg# #ifdef __CYGWIN__
6532209ff23fSmrg# #include <cygwin/cygwin_dll.h>
6533209ff23fSmrg# DECLARE_CYGWIN_DLL( DllMain );
6534209ff23fSmrg# #endif
6535209ff23fSmrg# HINSTANCE __hDllInstance_base;
6536209ff23fSmrg#
6537209ff23fSmrg# BOOL APIENTRY
6538209ff23fSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6539209ff23fSmrg# {
6540209ff23fSmrg#   __hDllInstance_base = hInst;
6541209ff23fSmrg#   return TRUE;
6542209ff23fSmrg# }
6543209ff23fSmrg# /* ltdll.c ends here */
6544209ff23fSmrg])# _LT_AC_FILE_LTDLL_C
6545209ff23fSmrg
6546209ff23fSmrg
6547209ff23fSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6548209ff23fSmrg# ---------------------------------
6549209ff23fSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6550209ff23fSmrg
6551209ff23fSmrg
6552209ff23fSmrg# old names
6553209ff23fSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6554209ff23fSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6555209ff23fSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6556209ff23fSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6557209ff23fSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6558209ff23fSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6559209ff23fSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6560209ff23fSmrg
6561209ff23fSmrg# This is just to silence aclocal about the macro not being used
6562209ff23fSmrgifelse([AC_DISABLE_FAST_INSTALL])
6563209ff23fSmrg
6564209ff23fSmrgAC_DEFUN([LT_AC_PROG_GCJ],
6565209ff23fSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
6566209ff23fSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6567209ff23fSmrg  AC_SUBST(GCJFLAGS)
6568209ff23fSmrg])
6569209ff23fSmrg
6570209ff23fSmrgAC_DEFUN([LT_AC_PROG_RC],
6571209ff23fSmrg[AC_CHECK_TOOL(RC, windres, no)
6572209ff23fSmrg])
6573209ff23fSmrg
6574209ff23fSmrg
6575209ff23fSmrg# Cheap backport of AS_EXECUTABLE_P and required macros
6576209ff23fSmrg# from Autoconf 2.59; we should not use $as_executable_p directly.
6577209ff23fSmrg
6578209ff23fSmrg# _AS_TEST_PREPARE
6579209ff23fSmrg# ----------------
6580209ff23fSmrgm4_ifndef([_AS_TEST_PREPARE],
6581209ff23fSmrg[m4_defun([_AS_TEST_PREPARE],
6582209ff23fSmrg[if test -x / >/dev/null 2>&1; then
6583209ff23fSmrg  as_executable_p='test -x'
6584209ff23fSmrgelse
6585209ff23fSmrg  as_executable_p='test -f'
6586209ff23fSmrgfi
6587209ff23fSmrg])])# _AS_TEST_PREPARE
6588209ff23fSmrg
6589209ff23fSmrg# AS_EXECUTABLE_P
6590209ff23fSmrg# ---------------
6591209ff23fSmrg# Check whether a file is executable.
6592209ff23fSmrgm4_ifndef([AS_EXECUTABLE_P],
6593209ff23fSmrg[m4_defun([AS_EXECUTABLE_P],
6594209ff23fSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
6595209ff23fSmrg$as_executable_p $1[]dnl
6596209ff23fSmrg])])# AS_EXECUTABLE_P
6597209ff23fSmrg
6598209ff23fSmrg# NOTE: This macro has been submitted for inclusion into   #
6599209ff23fSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6600209ff23fSmrg#  a released version of Autoconf we should remove this    #
6601209ff23fSmrg#  macro and use it instead.                               #
6602209ff23fSmrg# LT_AC_PROG_SED
6603209ff23fSmrg# --------------
6604209ff23fSmrg# Check for a fully-functional sed program, that truncates
6605209ff23fSmrg# as few characters as possible.  Prefer GNU sed if found.
6606209ff23fSmrgAC_DEFUN([LT_AC_PROG_SED],
6607209ff23fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
6608209ff23fSmrgAC_CACHE_VAL(lt_cv_path_SED,
6609209ff23fSmrg[# Loop through the user's path and test for sed and gsed.
6610209ff23fSmrg# Then use that list of sed's as ones to test for truncation.
6611209ff23fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6612209ff23fSmrgfor as_dir in $PATH
6613209ff23fSmrgdo
6614209ff23fSmrg  IFS=$as_save_IFS
6615209ff23fSmrg  test -z "$as_dir" && as_dir=.
6616209ff23fSmrg  for lt_ac_prog in sed gsed; do
6617209ff23fSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
6618209ff23fSmrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6619209ff23fSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6620209ff23fSmrg      fi
6621209ff23fSmrg    done
6622209ff23fSmrg  done
6623209ff23fSmrgdone
6624209ff23fSmrgIFS=$as_save_IFS
6625209ff23fSmrglt_ac_max=0
6626209ff23fSmrglt_ac_count=0
6627209ff23fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6628209ff23fSmrg# along with /bin/sed that truncates output.
6629209ff23fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6630209ff23fSmrg  test ! -f $lt_ac_sed && continue
6631209ff23fSmrg  cat /dev/null > conftest.in
6632209ff23fSmrg  lt_ac_count=0
6633209ff23fSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6634209ff23fSmrg  # Check for GNU sed and select it if it is found.
6635209ff23fSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6636209ff23fSmrg    lt_cv_path_SED=$lt_ac_sed
6637209ff23fSmrg    break
6638209ff23fSmrg  fi
6639209ff23fSmrg  while true; do
6640209ff23fSmrg    cat conftest.in conftest.in >conftest.tmp
6641209ff23fSmrg    mv conftest.tmp conftest.in
6642209ff23fSmrg    cp conftest.in conftest.nl
6643209ff23fSmrg    echo >>conftest.nl
6644209ff23fSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6645209ff23fSmrg    cmp -s conftest.out conftest.nl || break
6646209ff23fSmrg    # 10000 chars as input seems more than enough
6647209ff23fSmrg    test $lt_ac_count -gt 10 && break
6648209ff23fSmrg    lt_ac_count=`expr $lt_ac_count + 1`
6649209ff23fSmrg    if test $lt_ac_count -gt $lt_ac_max; then
6650209ff23fSmrg      lt_ac_max=$lt_ac_count
6651209ff23fSmrg      lt_cv_path_SED=$lt_ac_sed
6652209ff23fSmrg    fi
6653209ff23fSmrg  done
6654209ff23fSmrgdone
6655209ff23fSmrg])
6656209ff23fSmrgSED=$lt_cv_path_SED
6657209ff23fSmrgAC_SUBST([SED])
6658209ff23fSmrgAC_MSG_RESULT([$SED])
6659209ff23fSmrg])
6660209ff23fSmrg
6661209ff23fSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6662209ff23fSmrg# 
6663209ff23fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6664209ff23fSmrg#
6665209ff23fSmrg# This program is free software; you can redistribute it and/or modify
6666209ff23fSmrg# it under the terms of the GNU General Public License as published by
6667209ff23fSmrg# the Free Software Foundation; either version 2 of the License, or
6668209ff23fSmrg# (at your option) any later version.
6669209ff23fSmrg#
6670209ff23fSmrg# This program is distributed in the hope that it will be useful, but
6671209ff23fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
6672209ff23fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6673209ff23fSmrg# General Public License for more details.
6674209ff23fSmrg#
6675209ff23fSmrg# You should have received a copy of the GNU General Public License
6676209ff23fSmrg# along with this program; if not, write to the Free Software
6677209ff23fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6678209ff23fSmrg#
6679209ff23fSmrg# As a special exception to the GNU General Public License, if you
6680209ff23fSmrg# distribute this file as part of a program that contains a
6681209ff23fSmrg# configuration script generated by Autoconf, you may include it under
6682209ff23fSmrg# the same distribution terms that you use for the rest of that program.
6683209ff23fSmrg
6684209ff23fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6685209ff23fSmrg# ----------------------------------
6686209ff23fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
6687209ff23fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6688209ff23fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6689209ff23fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6690209ff23fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6691209ff23fSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6692209ff23fSmrgfi
6693209ff23fSmrgif test -n "$PKG_CONFIG"; then
6694209ff23fSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
6695209ff23fSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6696209ff23fSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6697209ff23fSmrg		AC_MSG_RESULT([yes])
6698209ff23fSmrg	else
6699209ff23fSmrg		AC_MSG_RESULT([no])
6700209ff23fSmrg		PKG_CONFIG=""
6701209ff23fSmrg	fi
6702209ff23fSmrg		
6703209ff23fSmrgfi[]dnl
6704209ff23fSmrg])# PKG_PROG_PKG_CONFIG
6705209ff23fSmrg
6706209ff23fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6707209ff23fSmrg#
6708209ff23fSmrg# Check to see whether a particular set of modules exists.  Similar
6709209ff23fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6710209ff23fSmrg#
6711209ff23fSmrg#
6712209ff23fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6713209ff23fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
6714209ff23fSmrg# PKG_CHECK_EXISTS manually
6715209ff23fSmrg# --------------------------------------------------------------
6716209ff23fSmrgAC_DEFUN([PKG_CHECK_EXISTS],
6717209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6718209ff23fSmrgif test -n "$PKG_CONFIG" && \
6719209ff23fSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6720209ff23fSmrg  m4_ifval([$2], [$2], [:])
6721209ff23fSmrgm4_ifvaln([$3], [else
6722209ff23fSmrg  $3])dnl
6723209ff23fSmrgfi])
6724209ff23fSmrg
6725209ff23fSmrg
6726209ff23fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6727209ff23fSmrg# ---------------------------------------------
6728209ff23fSmrgm4_define([_PKG_CONFIG],
6729c503f109Smrg[if test -n "$$1"; then
6730c503f109Smrg    pkg_cv_[]$1="$$1"
6731c503f109Smrg elif test -n "$PKG_CONFIG"; then
6732c503f109Smrg    PKG_CHECK_EXISTS([$3],
6733c503f109Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6734c503f109Smrg		     [pkg_failed=yes])
6735c503f109Smrg else
6736c503f109Smrg    pkg_failed=untried
6737209ff23fSmrgfi[]dnl
6738209ff23fSmrg])# _PKG_CONFIG
6739209ff23fSmrg
6740209ff23fSmrg# _PKG_SHORT_ERRORS_SUPPORTED
6741209ff23fSmrg# -----------------------------
6742209ff23fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6743209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6744209ff23fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6745209ff23fSmrg        _pkg_short_errors_supported=yes
6746209ff23fSmrgelse
6747209ff23fSmrg        _pkg_short_errors_supported=no
6748209ff23fSmrgfi[]dnl
6749209ff23fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
6750209ff23fSmrg
6751209ff23fSmrg
6752209ff23fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6753209ff23fSmrg# [ACTION-IF-NOT-FOUND])
6754209ff23fSmrg#
6755209ff23fSmrg#
6756209ff23fSmrg# Note that if there is a possibility the first call to
6757209ff23fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
6758209ff23fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6759209ff23fSmrg#
6760209ff23fSmrg#
6761209ff23fSmrg# --------------------------------------------------------------
6762209ff23fSmrgAC_DEFUN([PKG_CHECK_MODULES],
6763209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6764209ff23fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6765209ff23fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6766209ff23fSmrg
6767209ff23fSmrgpkg_failed=no
6768209ff23fSmrgAC_MSG_CHECKING([for $1])
6769209ff23fSmrg
6770209ff23fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6771209ff23fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6772209ff23fSmrg
6773209ff23fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6774209ff23fSmrgand $1[]_LIBS to avoid the need to call pkg-config.
6775209ff23fSmrgSee the pkg-config man page for more details.])
6776209ff23fSmrg
6777209ff23fSmrgif test $pkg_failed = yes; then
6778209ff23fSmrg        _PKG_SHORT_ERRORS_SUPPORTED
6779209ff23fSmrg        if test $_pkg_short_errors_supported = yes; then
6780c503f109Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
6781209ff23fSmrg        else 
6782c503f109Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
6783209ff23fSmrg        fi
6784209ff23fSmrg	# Put the nasty error message in config.log where it belongs
6785209ff23fSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6786209ff23fSmrg
6787209ff23fSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
6788209ff23fSmrg[Package requirements ($2) were not met:
6789209ff23fSmrg
6790209ff23fSmrg$$1_PKG_ERRORS
6791209ff23fSmrg
6792209ff23fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
6793209ff23fSmrginstalled software in a non-standard prefix.
6794209ff23fSmrg
6795209ff23fSmrg_PKG_TEXT
6796209ff23fSmrg])],
6797209ff23fSmrg		[AC_MSG_RESULT([no])
6798209ff23fSmrg                $4])
6799209ff23fSmrgelif test $pkg_failed = untried; then
6800209ff23fSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
6801209ff23fSmrg[The pkg-config script could not be found or is too old.  Make sure it
6802209ff23fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
6803209ff23fSmrgpath to pkg-config.
6804209ff23fSmrg
6805209ff23fSmrg_PKG_TEXT
6806209ff23fSmrg
6807209ff23fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
6808209ff23fSmrg		[$4])
6809209ff23fSmrgelse
6810209ff23fSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6811209ff23fSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6812209ff23fSmrg        AC_MSG_RESULT([yes])
6813209ff23fSmrg	ifelse([$3], , :, [$3])
6814209ff23fSmrgfi[]dnl
6815209ff23fSmrg])# PKG_CHECK_MODULES
6816209ff23fSmrg
6817c503f109Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
6818c503f109Smrgdnl
6819c503f109Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
6820c503f109Smrgdnl 
6821c503f109Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
6822c503f109Smrgdnl copy of this software and associated documentation files (the
6823c503f109Smrgdnl "Software"), to deal in the Software without restriction, including
6824c503f109Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
6825c503f109Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
6826c503f109Smrgdnl to whom the Software is furnished to do so, provided that the above
6827c503f109Smrgdnl copyright notice(s) and this permission notice appear in all copies of
6828c503f109Smrgdnl the Software and that both the above copyright notice(s) and this
6829c503f109Smrgdnl permission notice appear in supporting documentation.
6830c503f109Smrgdnl
6831c503f109Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6832c503f109Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6833c503f109Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
6834c503f109Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
6835c503f109Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
6836c503f109Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
6837c503f109Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
6838c503f109Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
6839c503f109Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6840c503f109Smrgdnl
6841c503f109Smrgdnl Except as contained in this notice, the name of a copyright holder
6842c503f109Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
6843c503f109Smrgdnl or other dealings in this Software without prior written authorization
6844c503f109Smrgdnl of the copyright holder.
6845209ff23fSmrg
6846c503f109Smrg# XORG_MACROS_VERSION(required-version)
6847c503f109Smrg# -------------------------------------
6848c503f109Smrg# Minimum version: 1.1.0
6849209ff23fSmrg#
6850c503f109Smrg# If you're using a macro added in Version 1.1 or newer, include this in
6851c503f109Smrg# your configure.ac with the minimum required version, such as:
6852c503f109Smrg# XORG_MACROS_VERSION(1.1)
6853209ff23fSmrg#
6854c503f109Smrg# To force at least a version with this macro defined, also add:
6855c503f109Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
6856209ff23fSmrg#
6857209ff23fSmrg#
6858c503f109Smrg# See the "minimum version" comment for each macro you use to see what 
6859c503f109Smrg# version you require.
6860c503f109SmrgAC_DEFUN([XORG_MACROS_VERSION],[
6861c503f109Smrg	[XORG_MACROS_needed_version=$1
6862c503f109Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
6863c503f109Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6864c503f109Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
6865c503f109Smrg	[XORG_MACROS_version=1.2.1
6866c503f109Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
6867c503f109Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6868c503f109Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
6869c503f109Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
6870c503f109Smrg	fi
6871c503f109Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
6872c503f109Smrg		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])
6873c503f109Smrg	fi
6874c503f109Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
6875c503f109Smrg]) # XORG_MACROS_VERSION
6876209ff23fSmrg
6877c503f109Smrg# XORG_PROG_RAWCPP()
6878c503f109Smrg# ------------------
6879c503f109Smrg# Minimum version: 1.0.0
6880209ff23fSmrg#
6881c503f109Smrg# Find cpp program and necessary flags for use in pre-processing text files
6882c503f109Smrg# such as man pages and config files
6883c503f109SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
6884c503f109SmrgAC_REQUIRE([AC_PROG_CPP])
6885c503f109SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
6886c503f109Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
6887209ff23fSmrg
6888c503f109Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
6889c503f109Smrg# which is not the best choice for supporting other OS'es, but covers most
6890c503f109Smrg# of the ones we need for now.
6891c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
6892c503f109SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
6893c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6894c503f109Smrg	AC_MSG_RESULT([no])
6895c503f109Smrgelse
6896c503f109Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6897c503f109Smrg		RAWCPPFLAGS=-undef
6898c503f109Smrg		AC_MSG_RESULT([yes])
6899c503f109Smrg	# under Cygwin unix is still defined even with -undef
6900c503f109Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6901c503f109Smrg		RAWCPPFLAGS="-undef -ansi"
6902c503f109Smrg		AC_MSG_RESULT([yes, with -ansi])
6903c503f109Smrg	else
6904c503f109Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
6905c503f109Smrg	fi
6906c503f109Smrgfi
6907c503f109Smrgrm -f conftest.$ac_ext
6908209ff23fSmrg
6909c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
6910c503f109SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
6911c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
6912c503f109Smrg	AC_MSG_RESULT([no])
6913209ff23fSmrgelse
6914c503f109Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
6915c503f109Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
6916c503f109Smrg		AC_MSG_RESULT([yes])
6917c503f109Smrg	else
6918c503f109Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
6919c503f109Smrg	fi
6920209ff23fSmrgfi
6921c503f109Smrgrm -f conftest.$ac_ext
6922c503f109SmrgAC_SUBST(RAWCPPFLAGS)
6923c503f109Smrg]) # XORG_PROG_RAWCPP
6924209ff23fSmrg
6925c503f109Smrg# XORG_MANPAGE_SECTIONS()
6926c503f109Smrg# -----------------------
6927c503f109Smrg# Minimum version: 1.0.0
6928209ff23fSmrg#
6929c503f109Smrg# Determine which sections man pages go in for the different man page types
6930c503f109Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
6931c503f109Smrg# Not sure if there's any better way than just hardcoding by OS name.
6932c503f109Smrg# Override default settings by setting environment variables
6933209ff23fSmrg
6934c503f109SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
6935c503f109SmrgAC_REQUIRE([AC_CANONICAL_HOST])
6936209ff23fSmrg
6937c503f109Smrgif test x$APP_MAN_SUFFIX = x    ; then
6938c503f109Smrg    APP_MAN_SUFFIX=1
6939c503f109Smrgfi
6940c503f109Smrgif test x$APP_MAN_DIR = x    ; then
6941c503f109Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
6942c503f109Smrgfi
6943209ff23fSmrg
6944c503f109Smrgif test x$LIB_MAN_SUFFIX = x    ; then
6945c503f109Smrg    LIB_MAN_SUFFIX=3
6946c503f109Smrgfi
6947c503f109Smrgif test x$LIB_MAN_DIR = x    ; then
6948c503f109Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
6949c503f109Smrgfi
6950209ff23fSmrg
6951c503f109Smrgif test x$FILE_MAN_SUFFIX = x    ; then
6952c503f109Smrg    case $host_os in
6953c503f109Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
6954c503f109Smrg	*)		FILE_MAN_SUFFIX=5  ;;
6955c503f109Smrg    esac
6956c503f109Smrgfi
6957c503f109Smrgif test x$FILE_MAN_DIR = x    ; then
6958c503f109Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
6959c503f109Smrgfi
6960209ff23fSmrg
6961c503f109Smrgif test x$MISC_MAN_SUFFIX = x    ; then
6962c503f109Smrg    case $host_os in
6963c503f109Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
6964c503f109Smrg	*)		MISC_MAN_SUFFIX=7  ;;
6965209ff23fSmrg    esac
6966c503f109Smrgfi
6967c503f109Smrgif test x$MISC_MAN_DIR = x    ; then
6968c503f109Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
6969c503f109Smrgfi
6970209ff23fSmrg
6971c503f109Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
6972c503f109Smrg    case $host_os in
6973c503f109Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
6974c503f109Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
6975c503f109Smrg    esac
6976c503f109Smrgfi
6977c503f109Smrgif test x$DRIVER_MAN_DIR = x    ; then
6978c503f109Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
6979209ff23fSmrgfi
6980209ff23fSmrg
6981c503f109Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
6982c503f109Smrg    case $host_os in
6983c503f109Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
6984c503f109Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
6985c503f109Smrg    esac
6986c503f109Smrgfi
6987c503f109Smrgif test x$ADMIN_MAN_DIR = x    ; then
6988c503f109Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
6989c503f109Smrgfi
6990209ff23fSmrg
6991209ff23fSmrg
6992c503f109SmrgAC_SUBST([APP_MAN_SUFFIX])
6993c503f109SmrgAC_SUBST([LIB_MAN_SUFFIX])
6994c503f109SmrgAC_SUBST([FILE_MAN_SUFFIX])
6995c503f109SmrgAC_SUBST([MISC_MAN_SUFFIX])
6996c503f109SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
6997c503f109SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
6998c503f109SmrgAC_SUBST([APP_MAN_DIR])
6999c503f109SmrgAC_SUBST([LIB_MAN_DIR])
7000c503f109SmrgAC_SUBST([FILE_MAN_DIR])
7001c503f109SmrgAC_SUBST([MISC_MAN_DIR])
7002c503f109SmrgAC_SUBST([DRIVER_MAN_DIR])
7003c503f109SmrgAC_SUBST([ADMIN_MAN_DIR])
7004c503f109Smrg]) # XORG_MANPAGE_SECTIONS
7005209ff23fSmrg
7006c503f109Smrg# XORG_CHECK_LINUXDOC
7007c503f109Smrg# -------------------
7008c503f109Smrg# Minimum version: 1.0.0
7009c503f109Smrg#
7010c503f109Smrg# Defines the variable MAKE_TEXT if the necessary tools and
7011c503f109Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
7012c503f109Smrg# Whether or not the necessary tools and files are found can be checked
7013c503f109Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
7014c503f109SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
7015c503f109Smrgif test x$XORG_SGML_PATH = x ; then
7016c503f109Smrg    XORG_SGML_PATH=$prefix/share/sgml
7017209ff23fSmrgfi
7018c503f109SmrgHAVE_DEFS_ENT=
7019209ff23fSmrg
7020c503f109Smrgif test x"$cross_compiling" = x"yes" ; then
7021c503f109Smrg  HAVE_DEFS_ENT=no
7022c503f109Smrgelse
7023c503f109Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7024c503f109Smrgfi
7025209ff23fSmrg
7026c503f109SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
7027c503f109SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
7028209ff23fSmrg
7029c503f109SmrgAC_MSG_CHECKING([Whether to build documentation])
7030209ff23fSmrg
7031c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
7032c503f109Smrg   BUILDDOC=yes
7033c503f109Smrgelse
7034c503f109Smrg   BUILDDOC=no
7035c503f109Smrgfi
7036209ff23fSmrg
7037c503f109SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
7038209ff23fSmrg
7039c503f109SmrgAC_MSG_RESULT([$BUILDDOC])
7040209ff23fSmrg
7041c503f109SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
7042209ff23fSmrg
7043c503f109Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
7044c503f109Smrg   BUILDPDFDOC=yes
7045c503f109Smrgelse
7046c503f109Smrg   BUILDPDFDOC=no
7047c503f109Smrgfi
7048209ff23fSmrg
7049c503f109SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7050209ff23fSmrg
7051c503f109SmrgAC_MSG_RESULT([$BUILDPDFDOC])
7052209ff23fSmrg
7053c503f109SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
7054c503f109SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
7055c503f109SmrgMAKE_PDF="$PS2PDF"
7056c503f109SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
7057209ff23fSmrg
7058c503f109SmrgAC_SUBST(MAKE_TEXT)
7059c503f109SmrgAC_SUBST(MAKE_PS)
7060c503f109SmrgAC_SUBST(MAKE_PDF)
7061c503f109SmrgAC_SUBST(MAKE_HTML)
7062c503f109Smrg]) # XORG_CHECK_LINUXDOC
7063209ff23fSmrg
7064c503f109Smrg# XORG_CHECK_DOCBOOK
7065c503f109Smrg# -------------------
7066c503f109Smrg# Minimum version: 1.0.0
7067c503f109Smrg#
7068c503f109Smrg# Checks for the ability to build output formats from SGML DocBook source.
7069c503f109Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
7070c503f109Smrg# indicates whether the necessary tools and files are found and, if set,
7071c503f109Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
7072c503f109SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
7073c503f109Smrgif test x$XORG_SGML_PATH = x ; then
7074c503f109Smrg    XORG_SGML_PATH=$prefix/share/sgml
7075209ff23fSmrgfi
7076c503f109SmrgHAVE_DEFS_ENT=
7077c503f109SmrgBUILDTXTDOC=no
7078c503f109SmrgBUILDPDFDOC=no
7079c503f109SmrgBUILDPSDOC=no
7080c503f109SmrgBUILDHTMLDOC=no
7081209ff23fSmrg
7082c503f109SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7083209ff23fSmrg
7084c503f109SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
7085c503f109SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
7086c503f109SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
7087c503f109SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
7088209ff23fSmrg
7089c503f109SmrgAC_MSG_CHECKING([Whether to build text documentation])
7090c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
7091c503f109Smrg   test x$BUILD_TXTDOC != xno; then
7092c503f109Smrg	BUILDTXTDOC=yes
7093c503f109Smrgfi
7094c503f109SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
7095c503f109SmrgAC_MSG_RESULT([$BUILDTXTDOC])
7096209ff23fSmrg
7097c503f109SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
7098c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
7099c503f109Smrg   test x$BUILD_PDFDOC != xno; then
7100c503f109Smrg	BUILDPDFDOC=yes
7101c503f109Smrgfi
7102c503f109SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7103c503f109SmrgAC_MSG_RESULT([$BUILDPDFDOC])
7104209ff23fSmrg
7105c503f109SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
7106c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
7107c503f109Smrg   test x$BUILD_PSDOC != xno; then
7108c503f109Smrg	BUILDPSDOC=yes
7109c503f109Smrgfi
7110c503f109SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
7111c503f109SmrgAC_MSG_RESULT([$BUILDPSDOC])
7112209ff23fSmrg
7113c503f109SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
7114c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
7115c503f109Smrg   test x$BUILD_HTMLDOC != xno; then
7116c503f109Smrg	BUILDHTMLDOC=yes
7117c503f109Smrgfi
7118c503f109SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
7119c503f109SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
7120209ff23fSmrg
7121c503f109SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
7122c503f109SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
7123c503f109SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
7124c503f109SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
7125209ff23fSmrg
7126c503f109SmrgAC_SUBST(MAKE_TEXT)
7127c503f109SmrgAC_SUBST(MAKE_PS)
7128c503f109SmrgAC_SUBST(MAKE_PDF)
7129c503f109SmrgAC_SUBST(MAKE_HTML)
7130c503f109Smrg]) # XORG_CHECK_DOCBOOK
7131209ff23fSmrg
7132c503f109Smrg# XORG_CHECK_MALLOC_ZERO
7133c503f109Smrg# ----------------------
7134c503f109Smrg# Minimum version: 1.0.0
7135209ff23fSmrg#
7136c503f109Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
7137c503f109Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
7138c503f109Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
7139c503f109SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
7140c503f109SmrgAC_ARG_ENABLE(malloc0returnsnull,
7141c503f109Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
7142c503f109Smrg		       [malloc(0) returns NULL (default: auto)]),
7143c503f109Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
7144c503f109Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
7145209ff23fSmrg
7146c503f109SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
7147c503f109Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
7148c503f109Smrg	AC_RUN_IFELSE([
7149c503f109Smrgchar *malloc();
7150c503f109Smrgchar *realloc();
7151c503f109Smrgchar *calloc();
7152c503f109Smrgmain() {
7153c503f109Smrg    char *m0, *r0, *c0, *p;
7154c503f109Smrg    m0 = malloc(0);
7155c503f109Smrg    p = malloc(10);
7156c503f109Smrg    r0 = realloc(p,0);
7157c503f109Smrg    c0 = calloc(0);
7158c503f109Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
7159c503f109Smrg}],
7160c503f109Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
7161c503f109Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
7162c503f109Smrgfi
7163c503f109SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
7164209ff23fSmrg
7165c503f109Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
7166c503f109Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
7167c503f109Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
7168c503f109Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
7169209ff23fSmrgelse
7170c503f109Smrg	MALLOC_ZERO_CFLAGS=""
7171c503f109Smrg	XMALLOC_ZERO_CFLAGS=""
7172c503f109Smrg	XTMALLOC_ZERO_CFLAGS=""
7173209ff23fSmrgfi
7174209ff23fSmrg
7175c503f109SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
7176c503f109SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
7177c503f109SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
7178c503f109Smrg]) # XORG_CHECK_MALLOC_ZERO
7179209ff23fSmrg
7180c503f109Smrg# XORG_WITH_LINT()
7181c503f109Smrg# ----------------
7182c503f109Smrg# Minimum version: 1.1.0
7183209ff23fSmrg#
7184c503f109Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
7185c503f109Smrg# is specified.   (Use --with-lint=sparse for sparse.)
7186c503f109Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
7187c503f109Smrg# Sets $LINT_FLAGS to flags to pass to source checker
7188c503f109Smrg# Sets LINT automake conditional if enabled (default: disabled)
7189c503f109Smrg#
7190c503f109SmrgAC_DEFUN([XORG_WITH_LINT],[
7191209ff23fSmrg
7192c503f109Smrg# Allow checking code with lint, sparse, etc.
7193c503f109SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
7194c503f109Smrg		[Use a lint-style source code checker (default: disabled)])],
7195c503f109Smrg		[use_lint=$withval], [use_lint=no])
7196c503f109Smrgif test "x$use_lint" = "xyes" ; then
7197c503f109Smrg	LINT="lint"
7198c503f109Smrgelse
7199c503f109Smrg	LINT="$use_lint"
7200c503f109Smrgfi
7201c503f109Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
7202c503f109Smrg    case $LINT in
7203c503f109Smrg	lint|*/lint)
7204c503f109Smrg	    case $host_os in
7205c503f109Smrg		solaris*)
7206c503f109Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
7207c503f109Smrg			;;
7208c503f109Smrg	    esac
7209c503f109Smrg	    ;;
7210c503f109Smrg    esac
7211c503f109Smrgfi
7212209ff23fSmrg
7213c503f109SmrgAC_SUBST(LINT)
7214c503f109SmrgAC_SUBST(LINT_FLAGS)
7215c503f109SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
7216209ff23fSmrg
7217c503f109Smrg]) # XORG_WITH_LINT
7218209ff23fSmrg
7219c503f109Smrg# XORG_LINT_LIBRARY(LIBNAME)
7220c503f109Smrg# --------------------------
7221c503f109Smrg# Minimum version: 1.1.0
7222c503f109Smrg#
7223c503f109Smrg# Sets up flags for building lint libraries for checking programs that call
7224c503f109Smrg# functions in the library.
7225c503f109Smrg# Disabled by default, enable with --enable-lint-library
7226c503f109Smrg# Sets: 
7227c503f109Smrg#	@LINTLIB@		- name of lint library file to make
7228c503f109Smrg#	MAKE_LINT_LIB		- automake conditional
7229209ff23fSmrg#
7230209ff23fSmrg
7231c503f109SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
7232c503f109SmrgAC_REQUIRE([XORG_WITH_LINT])
7233c503f109Smrg# Build lint "library" for more indepth checks of programs calling this library
7234c503f109SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
7235c503f109Smrg	[Create lint library (default: disabled)])],
7236c503f109Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
7237c503f109Smrgif test "x$make_lint_lib" != "xno" ; then
7238c503f109Smrg	if test "x$LINT" = "xno" ; then
7239c503f109Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
7240c503f109Smrg	fi
7241c503f109Smrg	if test "x$make_lint_lib" = "xyes" ; then
7242c503f109Smrg		LINTLIB=llib-l$1.ln
7243c503f109Smrg	else
7244c503f109Smrg		LINTLIB=$make_lint_lib
7245c503f109Smrg	fi
7246209ff23fSmrgfi
7247c503f109SmrgAC_SUBST(LINTLIB)
7248c503f109SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
7249209ff23fSmrg
7250c503f109Smrg]) # XORG_LINT_LIBRARY
7251209ff23fSmrg
7252c503f109Smrg# XORG_CWARNFLAGS
7253c503f109Smrg# ---------------
7254c503f109Smrg# Minimum version: 1.2.0
7255209ff23fSmrg#
7256c503f109Smrg# Defines CWARNFLAGS to enable C compiler warnings.
7257c503f109Smrg#
7258c503f109SmrgAC_DEFUN([XORG_CWARNFLAGS], [
7259c503f109SmrgAC_REQUIRE([AC_PROG_CC])
7260c503f109Smrgif  test "x$GCC" = xyes ; then
7261c503f109Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
7262c503f109Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
7263c503f109Smrg-Wbad-function-cast"
7264c503f109Smrg    case `gcc -dumpversion` in
7265c503f109Smrg    3.4.* | 4.*)
7266c503f109Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
7267c503f109Smrg	;;
7268c503f109Smrg    esac
7269c503f109Smrgelse
7270c503f109Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
7271c503f109Smrg    if test "x$SUNCC" = "xyes"; then
7272c503f109Smrg	CWARNFLAGS="-v"
7273c503f109Smrg    fi
7274c503f109Smrgfi
7275c503f109SmrgAC_SUBST(CWARNFLAGS)
7276c503f109Smrg]) # XORG_CWARNFLAGS
7277c503f109Smrgdnl Copyright 2005 Red Hat, Inc
7278c503f109Smrgdnl
7279c503f109Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
7280c503f109Smrgdnl documentation for any purpose is hereby granted without fee, provided that
7281c503f109Smrgdnl the above copyright notice appear in all copies and that both that
7282c503f109Smrgdnl copyright notice and this permission notice appear in supporting
7283c503f109Smrgdnl documentation.
7284c503f109Smrgdnl
7285c503f109Smrgdnl The above copyright notice and this permission notice shall be included
7286c503f109Smrgdnl in all copies or substantial portions of the Software.
7287c503f109Smrgdnl
7288c503f109Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7289c503f109Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7290c503f109Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7291c503f109Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
7292c503f109Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
7293c503f109Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7294c503f109Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
7295c503f109Smrgdnl
7296c503f109Smrgdnl Except as contained in this notice, the name of the copyright holders shall
7297c503f109Smrgdnl not be used in advertising or otherwise to promote the sale, use or
7298c503f109Smrgdnl other dealings in this Software without prior written authorization
7299c503f109Smrgdnl from the copyright holders.
7300c503f109Smrgdnl
7301209ff23fSmrg
7302c503f109Smrg# XORG_RELEASE_VERSION
7303c503f109Smrg# --------------------
7304c503f109Smrg# Adds --with/without-release-string and changes the PACKAGE and
7305c503f109Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
7306c503f109Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
7307c503f109Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
7308c503f109Smrg 
7309c503f109SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
7310c503f109Smrg	AC_ARG_WITH(release-version,
7311c503f109Smrg			AC_HELP_STRING([--with-release-version=STRING],
7312c503f109Smrg				[Use release version string in package name]),
7313c503f109Smrg			[RELEASE_VERSION="$withval"],
7314c503f109Smrg			[RELEASE_VERSION=""])
7315c503f109Smrg	if test "x$RELEASE_VERSION" != "x"; then
7316c503f109Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
7317c503f109Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
7318c503f109Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
7319c503f109Smrg	fi
7320c503f109Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
7321c503f109Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
7322c503f109Smrg		[Major version of this package])
7323c503f109Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
7324c503f109Smrg	if test "x$PVM" = "x"; then
7325c503f109Smrg		PVM="0"
7326c503f109Smrg	fi
7327c503f109Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
7328c503f109Smrg		[$PVM],
7329c503f109Smrg		[Minor version of this package])
7330c503f109Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
7331c503f109Smrg	if test "x$PVP" = "x"; then
7332c503f109Smrg		PVP="0"
7333c503f109Smrg	fi
7334c503f109Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
7335c503f109Smrg		[$PVP],
7336c503f109Smrg		[Patch version of this package])
7337c503f109Smrg])
7338209ff23fSmrg
7339c503f109Smrg# XORG_CHANGELOG()
7340c503f109Smrg# ----------------
7341c503f109Smrg# Minimum version: 1.2.0
7342c503f109Smrg#
7343c503f109Smrg# Defines the variable CHANGELOG_CMD as the command to generate
7344c503f109Smrg# ChangeLog from git.
7345c503f109Smrg#
7346c503f109Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
7347c503f109Smrg#
7348c503f109SmrgAC_DEFUN([XORG_CHANGELOG], [
7349c503f109SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
7350c503f109Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
7351c503f109Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
7352c503f109SmrgAC_SUBST([CHANGELOG_CMD])
7353c503f109SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
7354c503f109Smrg]) # XORG_CHANGELOG
7355c503f109Smrg
7356c503f109Smrgdnl Copyright 2005 Red Hat, Inc
7357c503f109Smrgdnl 
7358c503f109Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
7359c503f109Smrgdnl documentation for any purpose is hereby granted without fee, provided that
7360c503f109Smrgdnl the above copyright notice appear in all copies and that both that
7361c503f109Smrgdnl copyright notice and this permission notice appear in supporting
7362c503f109Smrgdnl documentation.
7363c503f109Smrgdnl 
7364c503f109Smrgdnl The above copyright notice and this permission notice shall be included
7365c503f109Smrgdnl in all copies or substantial portions of the Software.
7366c503f109Smrgdnl 
7367c503f109Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7368c503f109Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7369c503f109Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7370c503f109Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
7371c503f109Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
7372c503f109Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7373c503f109Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
7374c503f109Smrgdnl 
7375c503f109Smrgdnl Except as contained in this notice, the name of the copyright holders shall
7376c503f109Smrgdnl not be used in advertising or otherwise to promote the sale, use or
7377c503f109Smrgdnl other dealings in this Software without prior written authorization
7378c503f109Smrgdnl from the copyright holders.
7379c503f109Smrgdnl 
7380209ff23fSmrg
7381c503f109Smrg# XORG_DRIVER_CHECK_EXT()
7382c503f109Smrg# --------------------------
7383c503f109Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
7384c503f109Smrg# is defined, then add $1 to $REQUIRED_MODULES.
7385209ff23fSmrg
7386c503f109SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
7387c503f109Smrg	SAVE_CFLAGS="$CFLAGS"
7388c503f109Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
7389c503f109Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
7390c503f109Smrg#include "xorg-server.h"
7391c503f109Smrg#if !defined $1
7392c503f109Smrg#error $1 not defined
7393c503f109Smrg#endif
7394c503f109Smrg		]])],
7395c503f109Smrg		[_EXT_CHECK=yes],
7396c503f109Smrg		[_EXT_CHECK=no])
7397c503f109Smrg	CFLAGS="$SAVE_CFLAGS"
7398c503f109Smrg	AC_MSG_CHECKING([if $1 is defined])
7399c503f109Smrg	AC_MSG_RESULT([$_EXT_CHECK])
7400c503f109Smrg	if test "$_EXT_CHECK" != no; then
7401c503f109Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
7402c503f109Smrg	fi
7403209ff23fSmrg])
7404209ff23fSmrg
7405c503f109Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
7406209ff23fSmrg#
7407209ff23fSmrg# This file is free software; the Free Software Foundation
7408209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
7409209ff23fSmrg# with or without modifications, as long as this notice is preserved.
7410209ff23fSmrg
7411c503f109Smrg# AM_AUTOMAKE_VERSION(VERSION)
7412c503f109Smrg# ----------------------------
7413c503f109Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
7414c503f109Smrg# generated from the m4 files accompanying Automake X.Y.
7415c503f109Smrg# (This private macro should not be called outside this file.)
7416c503f109SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
7417c503f109Smrg[am__api_version='1.11'
7418c503f109Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
7419c503f109Smrgdnl require some minimum version.  Point them to the right macro.
7420c503f109Smrgm4_if([$1], [1.11], [],
7421c503f109Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
7422209ff23fSmrg])
7423209ff23fSmrg
7424c503f109Smrg# _AM_AUTOCONF_VERSION(VERSION)
7425c503f109Smrg# -----------------------------
7426c503f109Smrg# aclocal traces this macro to find the Autoconf version.
7427c503f109Smrg# This is a private macro too.  Using m4_define simplifies
7428c503f109Smrg# the logic in aclocal, which can simply ignore this definition.
7429c503f109Smrgm4_define([_AM_AUTOCONF_VERSION], [])
7430c503f109Smrg
7431c503f109Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
7432c503f109Smrg# -------------------------------
7433c503f109Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
7434c503f109Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
7435c503f109SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7436c503f109Smrg[AM_AUTOMAKE_VERSION([1.11])dnl
7437c503f109Smrgm4_ifndef([AC_AUTOCONF_VERSION],
7438c503f109Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
7439c503f109Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
7440209ff23fSmrg
7441c503f109Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
7442c503f109Smrg
7443c503f109Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7444209ff23fSmrg#
7445209ff23fSmrg# This file is free software; the Free Software Foundation
7446209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
7447209ff23fSmrg# with or without modifications, as long as this notice is preserved.
7448209ff23fSmrg
7449c503f109Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7450c503f109Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
7451c503f109Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7452c503f109Smrg#
7453c503f109Smrg# Of course, Automake must honor this variable whenever it calls a
7454c503f109Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7455c503f109Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7456c503f109Smrg# depending on how configure is run.  This is pretty annoying, since
7457c503f109Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7458c503f109Smrg# source directory, any form will work fine, but in subdirectories a
7459c503f109Smrg# relative path needs to be adjusted first.
7460c503f109Smrg#
7461c503f109Smrg# $ac_aux_dir/missing
7462c503f109Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
7463c503f109Smrg# $top_srcdir/$ac_aux_dir/missing
7464c503f109Smrg#    fails if $ac_aux_dir is absolute,
7465c503f109Smrg#    fails when called from a subdirectory in a VPATH build with
7466c503f109Smrg#          a relative $ac_aux_dir
7467c503f109Smrg#
7468c503f109Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7469c503f109Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
7470c503f109Smrg# harmless because $srcdir is `.', but things will broke when you
7471c503f109Smrg# start a VPATH build or use an absolute $srcdir.
7472c503f109Smrg#
7473c503f109Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7474c503f109Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
7475c503f109Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7476c503f109Smrg# and then we would define $MISSING as
7477c503f109Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
7478c503f109Smrg# This will work as long as MISSING is not called from configure, because
7479c503f109Smrg# unfortunately $(top_srcdir) has no meaning in configure.
7480c503f109Smrg# However there are other variables, like CC, which are often used in
7481c503f109Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
7482c503f109Smrg#
7483c503f109Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
7484c503f109Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
7485c503f109Smrg# configured tree to be moved without reconfiguration.
7486209ff23fSmrg
7487c503f109SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
7488c503f109Smrg[dnl Rely on autoconf to set up CDPATH properly.
7489c503f109SmrgAC_PREREQ([2.50])dnl
7490c503f109Smrg# expand $ac_aux_dir to an absolute path
7491c503f109Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
7492c503f109Smrg])
7493209ff23fSmrg
7494c503f109Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
7495209ff23fSmrg
7496c503f109Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
7497209ff23fSmrg# Free Software Foundation, Inc.
7498209ff23fSmrg#
7499209ff23fSmrg# This file is free software; the Free Software Foundation
7500209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
7501209ff23fSmrg# with or without modifications, as long as this notice is preserved.
7502209ff23fSmrg
7503c503f109Smrg# serial 9
7504209ff23fSmrg
7505c503f109Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
7506c503f109Smrg# -------------------------------------
7507c503f109Smrg# Define a conditional.
7508c503f109SmrgAC_DEFUN([AM_CONDITIONAL],
7509c503f109Smrg[AC_PREREQ(2.52)dnl
7510c503f109Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
7511c503f109Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7512c503f109SmrgAC_SUBST([$1_TRUE])dnl
7513c503f109SmrgAC_SUBST([$1_FALSE])dnl
7514c503f109Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
7515c503f109Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
7516c503f109Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
7517c503f109Smrgif $2; then
7518c503f109Smrg  $1_TRUE=
7519c503f109Smrg  $1_FALSE='#'
7520209ff23fSmrgelse
7521c503f109Smrg  $1_TRUE='#'
7522c503f109Smrg  $1_FALSE=
7523209ff23fSmrgfi
7524c503f109SmrgAC_CONFIG_COMMANDS_PRE(
7525c503f109Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7526c503f109Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
7527c503f109SmrgUsually this means the macro was only invoked conditionally.]])
7528c503f109Smrgfi])])
7529209ff23fSmrg
7530c503f109Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
7531c503f109Smrg# Free Software Foundation, Inc.
7532209ff23fSmrg#
7533209ff23fSmrg# This file is free software; the Free Software Foundation
7534209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
7535209ff23fSmrg# with or without modifications, as long as this notice is preserved.
7536209ff23fSmrg
7537c503f109Smrg# serial 10
7538209ff23fSmrg
7539c503f109Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7540c503f109Smrg# written in clear, in which case automake, when reading aclocal.m4,
7541c503f109Smrg# will think it sees a *use*, and therefore will trigger all it's
7542c503f109Smrg# C support machinery.  Also note that it means that autoscan, seeing
7543c503f109Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7544209ff23fSmrg
7545209ff23fSmrg
7546c503f109Smrg# _AM_DEPENDENCIES(NAME)
7547c503f109Smrg# ----------------------
7548c503f109Smrg# See how the compiler implements dependency checking.
7549c503f109Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
7550c503f109Smrg# We try a few techniques and use that to set a single cache variable.
7551209ff23fSmrg#
7552c503f109Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7553c503f109Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7554c503f109Smrg# dependency, and given that the user is not expected to run this macro,
7555c503f109Smrg# just rely on AC_PROG_CC.
7556c503f109SmrgAC_DEFUN([_AM_DEPENDENCIES],
7557c503f109Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
7558c503f109SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7559c503f109SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
7560c503f109SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
7561209ff23fSmrg
7562c503f109Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
7563c503f109Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
7564c503f109Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7565c503f109Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
7566c503f109Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
7567c503f109Smrg                   [depcc="$$1"   am_compiler_list=])
7568209ff23fSmrg
7569c503f109SmrgAC_CACHE_CHECK([dependency style of $depcc],
7570c503f109Smrg               [am_cv_$1_dependencies_compiler_type],
7571c503f109Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7572c503f109Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
7573c503f109Smrg  # making bogus files that we don't know about and never remove.  For
7574c503f109Smrg  # instance it was reported that on HP-UX the gcc test will end up
7575c503f109Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
7576c503f109Smrg  # in D'.
7577c503f109Smrg  mkdir conftest.dir
7578c503f109Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
7579c503f109Smrg  # using a relative directory.
7580c503f109Smrg  cp "$am_depcomp" conftest.dir
7581c503f109Smrg  cd conftest.dir
7582c503f109Smrg  # We will build objects and dependencies in a subdirectory because
7583c503f109Smrg  # it helps to detect inapplicable dependency modes.  For instance
7584c503f109Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
7585c503f109Smrg  # side effect of compilation, but ICC will put the dependencies in
7586c503f109Smrg  # the current directory while Tru64 will put them in the object
7587c503f109Smrg  # directory.
7588c503f109Smrg  mkdir sub
7589c503f109Smrg
7590c503f109Smrg  am_cv_$1_dependencies_compiler_type=none
7591c503f109Smrg  if test "$am_compiler_list" = ""; then
7592c503f109Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7593c503f109Smrg  fi
7594c503f109Smrg  am__universal=false
7595c503f109Smrg  m4_case([$1], [CC],
7596c503f109Smrg    [case " $depcc " in #(
7597c503f109Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
7598c503f109Smrg     esac],
7599c503f109Smrg    [CXX],
7600c503f109Smrg    [case " $depcc " in #(
7601c503f109Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
7602c503f109Smrg     esac])
7603c503f109Smrg
7604c503f109Smrg  for depmode in $am_compiler_list; do
7605c503f109Smrg    # Setup a source with many dependencies, because some compilers
7606c503f109Smrg    # like to wrap large dependency lists on column 80 (with \), and
7607c503f109Smrg    # we should not choose a depcomp mode which is confused by this.
7608c503f109Smrg    #
7609c503f109Smrg    # We need to recreate these files for each test, as the compiler may
7610c503f109Smrg    # overwrite some of them when testing with obscure command lines.
7611c503f109Smrg    # This happens at least with the AIX C compiler.
7612c503f109Smrg    : > sub/conftest.c
7613c503f109Smrg    for i in 1 2 3 4 5 6; do
7614c503f109Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
7615c503f109Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7616c503f109Smrg      # Solaris 8's {/usr,}/bin/sh.
7617c503f109Smrg      touch sub/conftst$i.h
7618209ff23fSmrg    done
7619c503f109Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7620209ff23fSmrg
7621c503f109Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
7622c503f109Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
7623c503f109Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
7624c503f109Smrg    # versions had trouble with output in subdirs
7625c503f109Smrg    am__obj=sub/conftest.${OBJEXT-o}
7626c503f109Smrg    am__minus_obj="-o $am__obj"
7627c503f109Smrg    case $depmode in
7628c503f109Smrg    gcc)
7629c503f109Smrg      # This depmode causes a compiler race in universal mode.
7630c503f109Smrg      test "$am__universal" = false || continue
7631c503f109Smrg      ;;
7632c503f109Smrg    nosideeffect)
7633c503f109Smrg      # after this tag, mechanisms are not by side-effect, so they'll
7634c503f109Smrg      # only be used when explicitly requested
7635c503f109Smrg      if test "x$enable_dependency_tracking" = xyes; then
7636c503f109Smrg	continue
7637c503f109Smrg      else
7638c503f109Smrg	break
7639c503f109Smrg      fi
7640c503f109Smrg      ;;
7641c503f109Smrg    msvisualcpp | msvcmsys)
7642c503f109Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
7643c503f109Smrg      # not run yet.  These depmodes are late enough in the game, and
7644c503f109Smrg      # so weak that their functioning should not be impacted.
7645c503f109Smrg      am__obj=conftest.${OBJEXT-o}
7646c503f109Smrg      am__minus_obj=
7647c503f109Smrg      ;;
7648c503f109Smrg    none) break ;;
7649c503f109Smrg    esac
7650c503f109Smrg    if depmode=$depmode \
7651c503f109Smrg       source=sub/conftest.c object=$am__obj \
7652c503f109Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7653c503f109Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7654c503f109Smrg         >/dev/null 2>conftest.err &&
7655c503f109Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7656c503f109Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7657c503f109Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7658c503f109Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7659c503f109Smrg      # icc doesn't choke on unknown options, it will just issue warnings
7660c503f109Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
7661c503f109Smrg      # that says an option was ignored or not supported.
7662c503f109Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
7663c503f109Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
7664c503f109Smrg      # The diagnosis changed in icc 8.0:
7665c503f109Smrg      #   icc: Command line remark: option '-MP' not supported
7666c503f109Smrg      if (grep 'ignoring option' conftest.err ||
7667c503f109Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7668c503f109Smrg        am_cv_$1_dependencies_compiler_type=$depmode
7669c503f109Smrg        break
7670c503f109Smrg      fi
7671c503f109Smrg    fi
7672c503f109Smrg  done
7673209ff23fSmrg
7674c503f109Smrg  cd ..
7675209ff23fSmrg  rm -rf conftest.dir
7676c503f109Smrgelse
7677c503f109Smrg  am_cv_$1_dependencies_compiler_type=none
7678c503f109Smrgfi
7679c503f109Smrg])
7680c503f109SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7681c503f109SmrgAM_CONDITIONAL([am__fastdep$1], [
7682c503f109Smrg  test "x$enable_dependency_tracking" != xno \
7683c503f109Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7684c503f109Smrg])
7685209ff23fSmrg
7686209ff23fSmrg
7687c503f109Smrg# AM_SET_DEPDIR
7688c503f109Smrg# -------------
7689c503f109Smrg# Choose a directory name for dependency files.
7690c503f109Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7691c503f109SmrgAC_DEFUN([AM_SET_DEPDIR],
7692c503f109Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7693c503f109SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7694c503f109Smrg])
7695209ff23fSmrg
7696209ff23fSmrg
7697c503f109Smrg# AM_DEP_TRACK
7698c503f109Smrg# ------------
7699c503f109SmrgAC_DEFUN([AM_DEP_TRACK],
7700c503f109Smrg[AC_ARG_ENABLE(dependency-tracking,
7701c503f109Smrg[  --disable-dependency-tracking  speeds up one-time build
7702c503f109Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
7703c503f109Smrgif test "x$enable_dependency_tracking" != xno; then
7704c503f109Smrg  am_depcomp="$ac_aux_dir/depcomp"
7705c503f109Smrg  AMDEPBACKSLASH='\'
7706209ff23fSmrgfi
7707c503f109SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7708c503f109SmrgAC_SUBST([AMDEPBACKSLASH])dnl
7709c503f109Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
7710c503f109Smrg])
7711209ff23fSmrg
7712c503f109Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
7713209ff23fSmrg
7714c503f109Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
7715c503f109Smrg# Free Software Foundation, Inc.
7716209ff23fSmrg#
7717c503f109Smrg# This file is free software; the Free Software Foundation
7718c503f109Smrg# gives unlimited permission to copy and/or distribute it,
7719c503f109Smrg# with or without modifications, as long as this notice is preserved.
7720209ff23fSmrg
7721c503f109Smrg#serial 5
7722209ff23fSmrg
7723c503f109Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
7724c503f109Smrg# ------------------------------
7725c503f109SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7726c503f109Smrg[{
7727c503f109Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
7728c503f109Smrg  # are listed without --file.  Let's play safe and only enable the eval
7729c503f109Smrg  # if we detect the quoting.
7730c503f109Smrg  case $CONFIG_FILES in
7731c503f109Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
7732c503f109Smrg  *)   set x $CONFIG_FILES ;;
7733c503f109Smrg  esac
7734c503f109Smrg  shift
7735c503f109Smrg  for mf
7736c503f109Smrg  do
7737c503f109Smrg    # Strip MF so we end up with the name of the file.
7738c503f109Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
7739c503f109Smrg    # Check whether this is an Automake generated Makefile or not.
7740c503f109Smrg    # We used to match only the files named `Makefile.in', but
7741c503f109Smrg    # some people rename them; so instead we look at the file content.
7742c503f109Smrg    # Grep'ing the first line is not enough: some people post-process
7743c503f109Smrg    # each Makefile.in and add a new line on top of each file to say so.
7744c503f109Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
7745c503f109Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
7746c503f109Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
7747c503f109Smrg      dirpart=`AS_DIRNAME("$mf")`
7748c503f109Smrg    else
7749c503f109Smrg      continue
7750c503f109Smrg    fi
7751c503f109Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
7752c503f109Smrg    # from the Makefile without running `make'.
7753c503f109Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7754c503f109Smrg    test -z "$DEPDIR" && continue
7755c503f109Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
7756c503f109Smrg    test -z "am__include" && continue
7757c503f109Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7758c503f109Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
7759c503f109Smrg    U=`sed -n 's/^U = //p' < "$mf"`
7760c503f109Smrg    # Find all dependency output files, they are included files with
7761c503f109Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
7762c503f109Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
7763c503f109Smrg    # expansion.
7764c503f109Smrg    for file in `sed -n "
7765c503f109Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7766c503f109Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7767c503f109Smrg      # Make sure the directory exists.
7768c503f109Smrg      test -f "$dirpart/$file" && continue
7769c503f109Smrg      fdir=`AS_DIRNAME(["$file"])`
7770c503f109Smrg      AS_MKDIR_P([$dirpart/$fdir])
7771c503f109Smrg      # echo "creating $dirpart/$file"
7772c503f109Smrg      echo '# dummy' > "$dirpart/$file"
7773c503f109Smrg    done
7774c503f109Smrg  done
7775c503f109Smrg}
7776c503f109Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7777209ff23fSmrg
7778209ff23fSmrg
7779c503f109Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
7780c503f109Smrg# -----------------------------
7781c503f109Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
7782c503f109Smrg#
7783c503f109Smrg# This code is only required when automatic dependency tracking
7784c503f109Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
7785c503f109Smrg# need in order to bootstrap the dependency handling code.
7786c503f109SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7787c503f109Smrg[AC_CONFIG_COMMANDS([depfiles],
7788c503f109Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7789c503f109Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7790c503f109Smrg])
7791209ff23fSmrg
7792c503f109Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7793c503f109Smrg# Free Software Foundation, Inc.
7794c503f109Smrg#
7795c503f109Smrg# This file is free software; the Free Software Foundation
7796c503f109Smrg# gives unlimited permission to copy and/or distribute it,
7797c503f109Smrg# with or without modifications, as long as this notice is preserved.
7798209ff23fSmrg
7799c503f109Smrg# serial 8
7800209ff23fSmrg
7801c503f109Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
7802c503f109SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7803209ff23fSmrg
7804c503f109Smrg# Do all the work for Automake.                             -*- Autoconf -*-
7805209ff23fSmrg
7806c503f109Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7807c503f109Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
7808209ff23fSmrg#
7809c503f109Smrg# This file is free software; the Free Software Foundation
7810c503f109Smrg# gives unlimited permission to copy and/or distribute it,
7811c503f109Smrg# with or without modifications, as long as this notice is preserved.
7812209ff23fSmrg
7813c503f109Smrg# serial 16
7814209ff23fSmrg
7815c503f109Smrg# This macro actually does too much.  Some checks are only needed if
7816c503f109Smrg# your package does certain things.  But this isn't really a big deal.
7817209ff23fSmrg
7818c503f109Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7819c503f109Smrg# AM_INIT_AUTOMAKE([OPTIONS])
7820c503f109Smrg# -----------------------------------------------
7821c503f109Smrg# The call with PACKAGE and VERSION arguments is the old style
7822c503f109Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
7823c503f109Smrg# and VERSION should now be passed to AC_INIT and removed from
7824c503f109Smrg# the call to AM_INIT_AUTOMAKE.
7825c503f109Smrg# We support both call styles for the transition.  After
7826c503f109Smrg# the next Automake release, Autoconf can make the AC_INIT
7827c503f109Smrg# arguments mandatory, and then we can depend on a new Autoconf
7828c503f109Smrg# release and drop the old call support.
7829c503f109SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
7830c503f109Smrg[AC_PREREQ([2.62])dnl
7831c503f109Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
7832c503f109Smrgdnl the ones we care about.
7833c503f109Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7834c503f109SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7835c503f109SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
7836c503f109Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
7837c503f109Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7838c503f109Smrg  # is not polluted with repeated "-I."
7839c503f109Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
7840c503f109Smrg  # test to see if srcdir already configured
7841c503f109Smrg  if test -f $srcdir/config.status; then
7842c503f109Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7843c503f109Smrg  fi
7844209ff23fSmrgfi
7845209ff23fSmrg
7846c503f109Smrg# test whether we have cygpath
7847c503f109Smrgif test -z "$CYGPATH_W"; then
7848c503f109Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
7849c503f109Smrg    CYGPATH_W='cygpath -w'
7850c503f109Smrg  else
7851c503f109Smrg    CYGPATH_W=echo
7852c503f109Smrg  fi
7853c503f109Smrgfi
7854c503f109SmrgAC_SUBST([CYGPATH_W])
7855209ff23fSmrg
7856c503f109Smrg# Define the identity of the package.
7857c503f109Smrgdnl Distinguish between old-style and new-style calls.
7858c503f109Smrgm4_ifval([$2],
7859c503f109Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7860c503f109Smrg AC_SUBST([PACKAGE], [$1])dnl
7861c503f109Smrg AC_SUBST([VERSION], [$2])],
7862c503f109Smrg[_AM_SET_OPTIONS([$1])dnl
7863c503f109Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
7864c503f109Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
7865c503f109Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
7866c503f109Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7867c503f109Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7868209ff23fSmrg
7869c503f109Smrg_AM_IF_OPTION([no-define],,
7870c503f109Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7871c503f109Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7872209ff23fSmrg
7873c503f109Smrg# Some tools Automake needs.
7874c503f109SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
7875c503f109SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
7876c503f109SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7877c503f109SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
7878c503f109SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7879c503f109SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
7880c503f109SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
7881c503f109SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7882c503f109SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
7883c503f109SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
7884c503f109Smrg# We need awk for the "check" target.  The system "awk" is bad on
7885c503f109Smrg# some platforms.
7886c503f109SmrgAC_REQUIRE([AC_PROG_AWK])dnl
7887c503f109SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
7888c503f109SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
7889c503f109Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7890c503f109Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7891c503f109Smrg			     [_AM_PROG_TAR([v7])])])
7892c503f109Smrg_AM_IF_OPTION([no-dependencies],,
7893c503f109Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
7894c503f109Smrg		  [_AM_DEPENDENCIES(CC)],
7895c503f109Smrg		  [define([AC_PROG_CC],
7896c503f109Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7897c503f109SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
7898c503f109Smrg		  [_AM_DEPENDENCIES(CXX)],
7899c503f109Smrg		  [define([AC_PROG_CXX],
7900c503f109Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7901c503f109SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
7902c503f109Smrg		  [_AM_DEPENDENCIES(OBJC)],
7903c503f109Smrg		  [define([AC_PROG_OBJC],
7904c503f109Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7905c503f109Smrg])
7906c503f109Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
7907c503f109Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
7908c503f109Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
7909c503f109Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
7910c503f109SmrgAC_CONFIG_COMMANDS_PRE(dnl
7911c503f109Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
7912c503f109Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
7913c503f109Smrg])
7914209ff23fSmrg
7915c503f109Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
7916c503f109Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
7917c503f109Smrgdnl mangled by Autoconf and run in a shell conditional statement.
7918c503f109Smrgm4_define([_AC_COMPILER_EXEEXT],
7919c503f109Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
7920209ff23fSmrg
7921209ff23fSmrg
7922c503f109Smrg# When config.status generates a header, we must update the stamp-h file.
7923c503f109Smrg# This file resides in the same directory as the config header
7924c503f109Smrg# that is generated.  The stamp files are numbered to have different names.
7925209ff23fSmrg
7926c503f109Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7927c503f109Smrg# loop where config.status creates the headers, so we can generate
7928c503f109Smrg# our stamp files there.
7929c503f109SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7930c503f109Smrg[# Compute $1's index in $config_headers.
7931c503f109Smrg_am_arg=$1
7932c503f109Smrg_am_stamp_count=1
7933c503f109Smrgfor _am_header in $config_headers :; do
7934c503f109Smrg  case $_am_header in
7935c503f109Smrg    $_am_arg | $_am_arg:* )
7936c503f109Smrg      break ;;
7937c503f109Smrg    * )
7938c503f109Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7939c503f109Smrg  esac
7940c503f109Smrgdone
7941c503f109Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7942209ff23fSmrg
7943c503f109Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
7944209ff23fSmrg#
7945c503f109Smrg# This file is free software; the Free Software Foundation
7946c503f109Smrg# gives unlimited permission to copy and/or distribute it,
7947c503f109Smrg# with or without modifications, as long as this notice is preserved.
7948209ff23fSmrg
7949c503f109Smrg# AM_PROG_INSTALL_SH
7950c503f109Smrg# ------------------
7951c503f109Smrg# Define $install_sh.
7952c503f109SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
7953c503f109Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7954c503f109Smrgif test x"${install_sh}" != xset; then
7955c503f109Smrg  case $am_aux_dir in
7956c503f109Smrg  *\ * | *\	*)
7957c503f109Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7958c503f109Smrg  *)
7959c503f109Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
7960c503f109Smrg  esac
7961c503f109Smrgfi
7962c503f109SmrgAC_SUBST(install_sh)])
7963209ff23fSmrg
7964c503f109Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7965c503f109Smrg#
7966c503f109Smrg# This file is free software; the Free Software Foundation
7967c503f109Smrg# gives unlimited permission to copy and/or distribute it,
7968c503f109Smrg# with or without modifications, as long as this notice is preserved.
7969209ff23fSmrg
7970c503f109Smrg# serial 2
7971209ff23fSmrg
7972c503f109Smrg# Check whether the underlying file-system supports filenames
7973c503f109Smrg# with a leading dot.  For instance MS-DOS doesn't.
7974c503f109SmrgAC_DEFUN([AM_SET_LEADING_DOT],
7975c503f109Smrg[rm -rf .tst 2>/dev/null
7976c503f109Smrgmkdir .tst 2>/dev/null
7977c503f109Smrgif test -d .tst; then
7978c503f109Smrg  am__leading_dot=.
7979c503f109Smrgelse
7980c503f109Smrg  am__leading_dot=_
7981209ff23fSmrgfi
7982c503f109Smrgrmdir .tst 2>/dev/null
7983c503f109SmrgAC_SUBST([am__leading_dot])])
7984209ff23fSmrg
7985c503f109Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7986c503f109Smrg# From Jim Meyering
7987209ff23fSmrg
7988c503f109Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
7989c503f109Smrg# Free Software Foundation, Inc.
7990c503f109Smrg#
7991c503f109Smrg# This file is free software; the Free Software Foundation
7992c503f109Smrg# gives unlimited permission to copy and/or distribute it,
7993c503f109Smrg# with or without modifications, as long as this notice is preserved.
7994209ff23fSmrg
7995c503f109Smrg# serial 5
7996209ff23fSmrg
7997c503f109Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
7998c503f109Smrg# ----------------------------------
7999c503f109Smrg# Control maintainer-specific portions of Makefiles.
8000c503f109Smrg# Default is to disable them, unless `enable' is passed literally.
8001c503f109Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
8002c503f109Smrg# can override the default with the --enable/--disable switch.
8003c503f109SmrgAC_DEFUN([AM_MAINTAINER_MODE],
8004c503f109Smrg[m4_case(m4_default([$1], [disable]),
8005c503f109Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
8006c503f109Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
8007c503f109Smrg       [m4_define([am_maintainer_other], [enable])
8008c503f109Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8009c503f109SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
8010c503f109Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
8011c503f109Smrg  AC_ARG_ENABLE([maintainer-mode],
8012c503f109Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
8013c503f109Smrg			  (and sometimes confusing) to the casual installer],
8014c503f109Smrg      [USE_MAINTAINER_MODE=$enableval],
8015c503f109Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
8016c503f109Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8017c503f109Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
8018c503f109Smrg  MAINT=$MAINTAINER_MODE_TRUE
8019c503f109Smrg  AC_SUBST([MAINT])dnl
8020c503f109Smrg]
8021c503f109Smrg)
8022209ff23fSmrg
8023c503f109SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8024c503f109Smrg
8025c503f109Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
8026c503f109Smrg
8027c503f109Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
8028209ff23fSmrg#
8029c503f109Smrg# This file is free software; the Free Software Foundation
8030c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8031c503f109Smrg# with or without modifications, as long as this notice is preserved.
8032209ff23fSmrg
8033c503f109Smrg# serial 4
8034209ff23fSmrg
8035c503f109Smrg# AM_MAKE_INCLUDE()
8036c503f109Smrg# -----------------
8037c503f109Smrg# Check to see how make treats includes.
8038c503f109SmrgAC_DEFUN([AM_MAKE_INCLUDE],
8039c503f109Smrg[am_make=${MAKE-make}
8040c503f109Smrgcat > confinc << 'END'
8041c503f109Smrgam__doit:
8042c503f109Smrg	@echo this is the am__doit target
8043c503f109Smrg.PHONY: am__doit
8044c503f109SmrgEND
8045c503f109Smrg# If we don't find an include directive, just comment out the code.
8046c503f109SmrgAC_MSG_CHECKING([for style of include used by $am_make])
8047c503f109Smrgam__include="#"
8048c503f109Smrgam__quote=
8049c503f109Smrg_am_result=none
8050c503f109Smrg# First try GNU make style include.
8051c503f109Smrgecho "include confinc" > confmf
8052c503f109Smrg# Ignore all kinds of additional output from `make'.
8053c503f109Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
8054c503f109Smrg*the\ am__doit\ target*)
8055c503f109Smrg  am__include=include
8056c503f109Smrg  am__quote=
8057c503f109Smrg  _am_result=GNU
8058c503f109Smrg  ;;
8059c503f109Smrgesac
8060c503f109Smrg# Now try BSD make style include.
8061c503f109Smrgif test "$am__include" = "#"; then
8062c503f109Smrg   echo '.include "confinc"' > confmf
8063c503f109Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
8064c503f109Smrg   *the\ am__doit\ target*)
8065c503f109Smrg     am__include=.include
8066c503f109Smrg     am__quote="\""
8067c503f109Smrg     _am_result=BSD
8068c503f109Smrg     ;;
8069c503f109Smrg   esac
8070209ff23fSmrgfi
8071c503f109SmrgAC_SUBST([am__include])
8072c503f109SmrgAC_SUBST([am__quote])
8073c503f109SmrgAC_MSG_RESULT([$_am_result])
8074c503f109Smrgrm -f confinc confmf
8075c503f109Smrg])
8076209ff23fSmrg
8077c503f109Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8078209ff23fSmrg
8079c503f109Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8080c503f109Smrg# Free Software Foundation, Inc.
8081209ff23fSmrg#
8082c503f109Smrg# This file is free software; the Free Software Foundation
8083c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8084c503f109Smrg# with or without modifications, as long as this notice is preserved.
8085209ff23fSmrg
8086c503f109Smrg# serial 6
8087c503f109Smrg
8088c503f109Smrg# AM_MISSING_PROG(NAME, PROGRAM)
8089c503f109Smrg# ------------------------------
8090c503f109SmrgAC_DEFUN([AM_MISSING_PROG],
8091c503f109Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
8092c503f109Smrg$1=${$1-"${am_missing_run}$2"}
8093c503f109SmrgAC_SUBST($1)])
8094c503f109Smrg
8095c503f109Smrg
8096c503f109Smrg# AM_MISSING_HAS_RUN
8097c503f109Smrg# ------------------
8098c503f109Smrg# Define MISSING if not defined so far and test if it supports --run.
8099c503f109Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
8100c503f109SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
8101c503f109Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8102c503f109SmrgAC_REQUIRE_AUX_FILE([missing])dnl
8103c503f109Smrgif test x"${MISSING+set}" != xset; then
8104c503f109Smrg  case $am_aux_dir in
8105c503f109Smrg  *\ * | *\	*)
8106c503f109Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8107c503f109Smrg  *)
8108c503f109Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8109c503f109Smrg  esac
8110209ff23fSmrgfi
8111c503f109Smrg# Use eval to expand $SHELL
8112c503f109Smrgif eval "$MISSING --run true"; then
8113c503f109Smrg  am_missing_run="$MISSING --run "
8114c503f109Smrgelse
8115c503f109Smrg  am_missing_run=
8116c503f109Smrg  AC_MSG_WARN([`missing' script is too old or missing])
8117209ff23fSmrgfi
8118c503f109Smrg])
8119209ff23fSmrg
8120c503f109Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8121c503f109Smrg#
8122c503f109Smrg# This file is free software; the Free Software Foundation
8123c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8124c503f109Smrg# with or without modifications, as long as this notice is preserved.
8125209ff23fSmrg
8126c503f109Smrg# AM_PROG_MKDIR_P
8127c503f109Smrg# ---------------
8128c503f109Smrg# Check for `mkdir -p'.
8129c503f109SmrgAC_DEFUN([AM_PROG_MKDIR_P],
8130c503f109Smrg[AC_PREREQ([2.60])dnl
8131c503f109SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8132c503f109Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8133c503f109Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
8134c503f109Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8135c503f109Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8136c503f109Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
8137c503f109Smrgdnl adjustment using top_builddir (which is defined more often than
8138c503f109Smrgdnl MKDIR_P).
8139c503f109SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8140c503f109Smrgcase $mkdir_p in
8141c503f109Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
8142c503f109Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8143c503f109Smrgesac
8144c503f109Smrg])
8145209ff23fSmrg
8146c503f109Smrg# Helper functions for option handling.                     -*- Autoconf -*-
8147c503f109Smrg
8148c503f109Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8149209ff23fSmrg#
8150c503f109Smrg# This file is free software; the Free Software Foundation
8151c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8152c503f109Smrg# with or without modifications, as long as this notice is preserved.
8153209ff23fSmrg
8154c503f109Smrg# serial 4
8155209ff23fSmrg
8156c503f109Smrg# _AM_MANGLE_OPTION(NAME)
8157c503f109Smrg# -----------------------
8158c503f109SmrgAC_DEFUN([_AM_MANGLE_OPTION],
8159c503f109Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8160209ff23fSmrg
8161c503f109Smrg# _AM_SET_OPTION(NAME)
8162c503f109Smrg# ------------------------------
8163c503f109Smrg# Set option NAME.  Presently that only means defining a flag for this option.
8164c503f109SmrgAC_DEFUN([_AM_SET_OPTION],
8165c503f109Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8166209ff23fSmrg
8167c503f109Smrg# _AM_SET_OPTIONS(OPTIONS)
8168c503f109Smrg# ----------------------------------
8169c503f109Smrg# OPTIONS is a space-separated list of Automake options.
8170c503f109SmrgAC_DEFUN([_AM_SET_OPTIONS],
8171c503f109Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8172209ff23fSmrg
8173c503f109Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8174c503f109Smrg# -------------------------------------------
8175c503f109Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8176c503f109SmrgAC_DEFUN([_AM_IF_OPTION],
8177c503f109Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8178209ff23fSmrg
8179c503f109Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8180209ff23fSmrg
8181c503f109Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8182c503f109Smrg# Free Software Foundation, Inc.
8183c503f109Smrg#
8184c503f109Smrg# This file is free software; the Free Software Foundation
8185c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8186c503f109Smrg# with or without modifications, as long as this notice is preserved.
8187c503f109Smrg
8188c503f109Smrg# serial 5
8189c503f109Smrg
8190c503f109Smrg# AM_SANITY_CHECK
8191c503f109Smrg# ---------------
8192c503f109SmrgAC_DEFUN([AM_SANITY_CHECK],
8193c503f109Smrg[AC_MSG_CHECKING([whether build environment is sane])
8194c503f109Smrg# Just in case
8195c503f109Smrgsleep 1
8196c503f109Smrgecho timestamp > conftest.file
8197c503f109Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8198c503f109Smrg# name.  Accept space and tab only in the latter.
8199c503f109Smrgam_lf='
8200c503f109Smrg'
8201c503f109Smrgcase `pwd` in
8202c503f109Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8203c503f109Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8204c503f109Smrgesac
8205c503f109Smrgcase $srcdir in
8206c503f109Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8207c503f109Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8208c503f109Smrgesac
8209c503f109Smrg
8210c503f109Smrg# Do `set' in a subshell so we don't clobber the current shell's
8211c503f109Smrg# arguments.  Must try -L first in case configure is actually a
8212c503f109Smrg# symlink; some systems play weird games with the mod time of symlinks
8213c503f109Smrg# (eg FreeBSD returns the mod time of the symlink's containing
8214c503f109Smrg# directory).
8215c503f109Smrgif (
8216c503f109Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8217c503f109Smrg   if test "$[*]" = "X"; then
8218c503f109Smrg      # -L didn't work.
8219c503f109Smrg      set X `ls -t "$srcdir/configure" conftest.file`
8220c503f109Smrg   fi
8221c503f109Smrg   rm -f conftest.file
8222c503f109Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8223c503f109Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8224c503f109Smrg
8225c503f109Smrg      # If neither matched, then we have a broken ls.  This can happen
8226c503f109Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8227c503f109Smrg      # broken ls alias from the environment.  This has actually
8228c503f109Smrg      # happened.  Such a system could not be considered "sane".
8229c503f109Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8230c503f109Smrgalias in your environment])
8231c503f109Smrg   fi
8232c503f109Smrg
8233c503f109Smrg   test "$[2]" = conftest.file
8234c503f109Smrg   )
8235c503f109Smrgthen
8236c503f109Smrg   # Ok.
8237c503f109Smrg   :
8238c503f109Smrgelse
8239c503f109Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
8240c503f109SmrgCheck your system clock])
8241c503f109Smrgfi
8242c503f109SmrgAC_MSG_RESULT(yes)])
8243c503f109Smrg
8244c503f109Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8245c503f109Smrg#
8246c503f109Smrg# This file is free software; the Free Software Foundation
8247c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8248c503f109Smrg# with or without modifications, as long as this notice is preserved.
8249c503f109Smrg
8250c503f109Smrg# AM_PROG_INSTALL_STRIP
8251c503f109Smrg# ---------------------
8252c503f109Smrg# One issue with vendor `install' (even GNU) is that you can't
8253c503f109Smrg# specify the program used to strip binaries.  This is especially
8254c503f109Smrg# annoying in cross-compiling environments, where the build's strip
8255c503f109Smrg# is unlikely to handle the host's binaries.
8256c503f109Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
8257c503f109Smrg# always use install-sh in `make install-strip', and initialize
8258c503f109Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
8259c503f109SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
8260c503f109Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8261c503f109Smrg# Installed binaries are usually stripped using `strip' when the user
8262c503f109Smrg# run `make install-strip'.  However `strip' might not be the right
8263c503f109Smrg# tool to use in cross-compilation environments, therefore Automake
8264c503f109Smrg# will honor the `STRIP' environment variable to overrule this program.
8265c503f109Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8266c503f109Smrgif test "$cross_compiling" != no; then
8267c503f109Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
8268c503f109Smrgfi
8269c503f109SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8270c503f109SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
8271c503f109Smrg
8272c503f109Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
8273c503f109Smrg#
8274c503f109Smrg# This file is free software; the Free Software Foundation
8275c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8276c503f109Smrg# with or without modifications, as long as this notice is preserved.
8277c503f109Smrg
8278c503f109Smrg# serial 2
8279c503f109Smrg
8280c503f109Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
8281c503f109Smrg# ---------------------------
8282c503f109Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
8283c503f109Smrg# This macro is traced by Automake.
8284c503f109SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
8285c503f109Smrg
8286c503f109Smrg# AM_SUBST_NOTMAKE(VARIABLE)
8287c503f109Smrg# ---------------------------
8288c503f109Smrg# Public sister of _AM_SUBST_NOTMAKE.
8289c503f109SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
8290c503f109Smrg
8291c503f109Smrg# Check how to create a tarball.                            -*- Autoconf -*-
8292c503f109Smrg
8293c503f109Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
8294c503f109Smrg#
8295c503f109Smrg# This file is free software; the Free Software Foundation
8296c503f109Smrg# gives unlimited permission to copy and/or distribute it,
8297c503f109Smrg# with or without modifications, as long as this notice is preserved.
8298c503f109Smrg
8299c503f109Smrg# serial 2
8300c503f109Smrg
8301c503f109Smrg# _AM_PROG_TAR(FORMAT)
8302209ff23fSmrg# --------------------
8303c503f109Smrg# Check how to create a tarball in format FORMAT.
8304c503f109Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
8305c503f109Smrg#
8306c503f109Smrg# Substitute a variable $(am__tar) that is a command
8307c503f109Smrg# writing to stdout a FORMAT-tarball containing the directory
8308c503f109Smrg# $tardir.
8309c503f109Smrg#     tardir=directory && $(am__tar) > result.tar
8310c503f109Smrg#
8311c503f109Smrg# Substitute a variable $(am__untar) that extract such
8312c503f109Smrg# a tarball read from stdin.
8313c503f109Smrg#     $(am__untar) < result.tar
8314c503f109SmrgAC_DEFUN([_AM_PROG_TAR],
8315c503f109Smrg[# Always define AMTAR for backward compatibility.
8316c503f109SmrgAM_MISSING_PROG([AMTAR], [tar])
8317c503f109Smrgm4_if([$1], [v7],
8318c503f109Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8319c503f109Smrg     [m4_case([$1], [ustar],, [pax],,
8320c503f109Smrg              [m4_fatal([Unknown tar format])])
8321c503f109SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
8322c503f109Smrg# Loop over all known methods to create a tar archive until one works.
8323c503f109Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8324c503f109Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
8325c503f109Smrg# Do not fold the above two line into one, because Tru64 sh and
8326c503f109Smrg# Solaris sh will not grok spaces in the rhs of `-'.
8327c503f109Smrgfor _am_tool in $_am_tools
8328c503f109Smrgdo
8329c503f109Smrg  case $_am_tool in
8330c503f109Smrg  gnutar)
8331c503f109Smrg    for _am_tar in tar gnutar gtar;
8332c503f109Smrg    do
8333c503f109Smrg      AM_RUN_LOG([$_am_tar --version]) && break
8334c503f109Smrg    done
8335c503f109Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8336c503f109Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8337c503f109Smrg    am__untar="$_am_tar -xf -"
8338c503f109Smrg    ;;
8339c503f109Smrg  plaintar)
8340c503f109Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
8341c503f109Smrg    # ustar tarball either.
8342c503f109Smrg    (tar --version) >/dev/null 2>&1 && continue
8343c503f109Smrg    am__tar='tar chf - "$$tardir"'
8344c503f109Smrg    am__tar_='tar chf - "$tardir"'
8345c503f109Smrg    am__untar='tar xf -'
8346c503f109Smrg    ;;
8347c503f109Smrg  pax)
8348c503f109Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
8349c503f109Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
8350c503f109Smrg    am__untar='pax -r'
8351c503f109Smrg    ;;
8352c503f109Smrg  cpio)
8353c503f109Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8354c503f109Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8355c503f109Smrg    am__untar='cpio -i -H $1 -d'
8356c503f109Smrg    ;;
8357c503f109Smrg  none)
8358c503f109Smrg    am__tar=false
8359c503f109Smrg    am__tar_=false
8360c503f109Smrg    am__untar=false
8361c503f109Smrg    ;;
8362c503f109Smrg  esac
8363c503f109Smrg
8364c503f109Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
8365c503f109Smrg  # and am__untar set.
8366c503f109Smrg  test -n "${am_cv_prog_tar_$1}" && break
8367c503f109Smrg
8368c503f109Smrg  # tar/untar a dummy directory, and stop if the command works
8369c503f109Smrg  rm -rf conftest.dir
8370c503f109Smrg  mkdir conftest.dir
8371c503f109Smrg  echo GrepMe > conftest.dir/file
8372c503f109Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8373c503f109Smrg  rm -rf conftest.dir
8374c503f109Smrg  if test -s conftest.tar; then
8375c503f109Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
8376c503f109Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
8377c503f109Smrg  fi
8378c503f109Smrgdone
8379c503f109Smrgrm -rf conftest.dir
8380c503f109Smrg
8381c503f109SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8382c503f109SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
8383c503f109SmrgAC_SUBST([am__tar])
8384c503f109SmrgAC_SUBST([am__untar])
8385c503f109Smrg]) # _AM_PROG_TAR
8386209ff23fSmrg
8387