aclocal.m4 revision 966bf024
1966bf024Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2966bf024Smrg
3966bf024Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4966bf024Smrg# Free Software Foundation, Inc.
5966bf024Smrg# This file is free software; the Free Software Foundation
6966bf024Smrg# gives unlimited permission to copy and/or distribute it,
7966bf024Smrg# with or without modifications, as long as this notice is preserved.
8966bf024Smrg
9966bf024Smrg# This program is distributed in the hope that it will be useful,
10966bf024Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11966bf024Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12966bf024Smrg# PARTICULAR PURPOSE.
13966bf024Smrg
14966bf024Smrg# Do all the work for Automake.                            -*- Autoconf -*-
15966bf024Smrg
16966bf024Smrg# This macro actually does too much some checks are only needed if
17966bf024Smrg# your package does certain things.  But this isn't really a big deal.
18966bf024Smrg
19966bf024Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20966bf024Smrg# Free Software Foundation, Inc.
21966bf024Smrg
22966bf024Smrg# This program is free software; you can redistribute it and/or modify
23966bf024Smrg# it under the terms of the GNU General Public License as published by
24966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
25966bf024Smrg# any later version.
26966bf024Smrg
27966bf024Smrg# This program is distributed in the hope that it will be useful,
28966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
29966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30966bf024Smrg# GNU General Public License for more details.
31966bf024Smrg
32966bf024Smrg# You should have received a copy of the GNU General Public License
33966bf024Smrg# along with this program; if not, write to the Free Software
34966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35966bf024Smrg# 02111-1307, USA.
36966bf024Smrg
37966bf024Smrg# serial 10
38966bf024Smrg
39966bf024SmrgAC_PREREQ([2.54])
40966bf024Smrg
41966bf024Smrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42966bf024Smrg# the ones we care about.
43966bf024Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44966bf024Smrg
45966bf024Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46966bf024Smrg# AM_INIT_AUTOMAKE([OPTIONS])
47966bf024Smrg# -----------------------------------------------
48966bf024Smrg# The call with PACKAGE and VERSION arguments is the old style
49966bf024Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50966bf024Smrg# and VERSION should now be passed to AC_INIT and removed from
51966bf024Smrg# the call to AM_INIT_AUTOMAKE.
52966bf024Smrg# We support both call styles for the transition.  After
53966bf024Smrg# the next Automake release, Autoconf can make the AC_INIT
54966bf024Smrg# arguments mandatory, and then we can depend on a new Autoconf
55966bf024Smrg# release and drop the old call support.
56966bf024SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
57966bf024Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58966bf024Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl
59966bf024Smrg# test to see if srcdir already configured
60966bf024Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
61966bf024Smrg   test -f $srcdir/config.status; then
62966bf024Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63966bf024Smrgfi
64966bf024Smrg
65966bf024Smrg# test whether we have cygpath
66966bf024Smrgif test -z "$CYGPATH_W"; then
67966bf024Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
68966bf024Smrg    CYGPATH_W='cygpath -w'
69966bf024Smrg  else
70966bf024Smrg    CYGPATH_W=echo
71966bf024Smrg  fi
72966bf024Smrgfi
73966bf024SmrgAC_SUBST([CYGPATH_W])
74966bf024Smrg
75966bf024Smrg# Define the identity of the package.
76966bf024Smrgdnl Distinguish between old-style and new-style calls.
77966bf024Smrgm4_ifval([$2],
78966bf024Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79966bf024Smrg AC_SUBST([PACKAGE], [$1])dnl
80966bf024Smrg AC_SUBST([VERSION], [$2])],
81966bf024Smrg[_AM_SET_OPTIONS([$1])dnl
82966bf024Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83966bf024Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84966bf024Smrg
85966bf024Smrg_AM_IF_OPTION([no-define],,
86966bf024Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87966bf024Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88966bf024Smrg
89966bf024Smrg# Some tools Automake needs.
90966bf024SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
91966bf024SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
92966bf024SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93966bf024SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
94966bf024SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95966bf024SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
96966bf024SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
97966bf024SmrgAM_MISSING_PROG(AMTAR, tar)
98966bf024SmrgAM_PROG_INSTALL_SH
99966bf024SmrgAM_PROG_INSTALL_STRIP
100966bf024Smrg# We need awk for the "check" target.  The system "awk" is bad on
101966bf024Smrg# some platforms.
102966bf024SmrgAC_REQUIRE([AC_PROG_AWK])dnl
103966bf024SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
104966bf024SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
105966bf024Smrg
106966bf024Smrg_AM_IF_OPTION([no-dependencies],,
107966bf024Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
108966bf024Smrg                  [_AM_DEPENDENCIES(CC)],
109966bf024Smrg                  [define([AC_PROG_CC],
110966bf024Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111966bf024SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
112966bf024Smrg                  [_AM_DEPENDENCIES(CXX)],
113966bf024Smrg                  [define([AC_PROG_CXX],
114966bf024Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115966bf024Smrg])
116966bf024Smrg])
117966bf024Smrg
118966bf024Smrg
119966bf024Smrg# When config.status generates a header, we must update the stamp-h file.
120966bf024Smrg# This file resides in the same directory as the config header
121966bf024Smrg# that is generated.  The stamp files are numbered to have different names.
122966bf024Smrg
123966bf024Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124966bf024Smrg# loop where config.status creates the headers, so we can generate
125966bf024Smrg# our stamp files there.
126966bf024SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127966bf024Smrg[# Compute $1's index in $config_headers.
128966bf024Smrg_am_stamp_count=1
129966bf024Smrgfor _am_header in $config_headers :; do
130966bf024Smrg  case $_am_header in
131966bf024Smrg    $1 | $1:* )
132966bf024Smrg      break ;;
133966bf024Smrg    * )
134966bf024Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135966bf024Smrg  esac
136966bf024Smrgdone
137966bf024Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138966bf024Smrg
139966bf024Smrg# Copyright 2002  Free Software Foundation, Inc.
140966bf024Smrg
141966bf024Smrg# This program is free software; you can redistribute it and/or modify
142966bf024Smrg# it under the terms of the GNU General Public License as published by
143966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
144966bf024Smrg# any later version.
145966bf024Smrg
146966bf024Smrg# This program is distributed in the hope that it will be useful,
147966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
148966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149966bf024Smrg# GNU General Public License for more details.
150966bf024Smrg
151966bf024Smrg# You should have received a copy of the GNU General Public License
152966bf024Smrg# along with this program; if not, write to the Free Software
153966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154966bf024Smrg
155966bf024Smrg# AM_AUTOMAKE_VERSION(VERSION)
156966bf024Smrg# ----------------------------
157966bf024Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
158966bf024Smrg# generated from the m4 files accompanying Automake X.Y.
159966bf024SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160966bf024Smrg
161966bf024Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
162966bf024Smrg# -------------------------------
163966bf024Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
164966bf024Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165966bf024SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166966bf024Smrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
167966bf024Smrg
168966bf024Smrg# Helper functions for option handling.                    -*- Autoconf -*-
169966bf024Smrg
170966bf024Smrg# Copyright 2001, 2002  Free Software Foundation, Inc.
171966bf024Smrg
172966bf024Smrg# This program is free software; you can redistribute it and/or modify
173966bf024Smrg# it under the terms of the GNU General Public License as published by
174966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
175966bf024Smrg# any later version.
176966bf024Smrg
177966bf024Smrg# This program is distributed in the hope that it will be useful,
178966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
179966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180966bf024Smrg# GNU General Public License for more details.
181966bf024Smrg
182966bf024Smrg# You should have received a copy of the GNU General Public License
183966bf024Smrg# along with this program; if not, write to the Free Software
184966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185966bf024Smrg# 02111-1307, USA.
186966bf024Smrg
187966bf024Smrg# serial 2
188966bf024Smrg
189966bf024Smrg# _AM_MANGLE_OPTION(NAME)
190966bf024Smrg# -----------------------
191966bf024SmrgAC_DEFUN([_AM_MANGLE_OPTION],
192966bf024Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193966bf024Smrg
194966bf024Smrg# _AM_SET_OPTION(NAME)
195966bf024Smrg# ------------------------------
196966bf024Smrg# Set option NAME.  Presently that only means defining a flag for this option.
197966bf024SmrgAC_DEFUN([_AM_SET_OPTION],
198966bf024Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199966bf024Smrg
200966bf024Smrg# _AM_SET_OPTIONS(OPTIONS)
201966bf024Smrg# ----------------------------------
202966bf024Smrg# OPTIONS is a space-separated list of Automake options.
203966bf024SmrgAC_DEFUN([_AM_SET_OPTIONS],
204966bf024Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205966bf024Smrg
206966bf024Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207966bf024Smrg# -------------------------------------------
208966bf024Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209966bf024SmrgAC_DEFUN([_AM_IF_OPTION],
210966bf024Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211966bf024Smrg
212966bf024Smrg#
213966bf024Smrg# Check to make sure that the build environment is sane.
214966bf024Smrg#
215966bf024Smrg
216966bf024Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217966bf024Smrg
218966bf024Smrg# This program is free software; you can redistribute it and/or modify
219966bf024Smrg# it under the terms of the GNU General Public License as published by
220966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
221966bf024Smrg# any later version.
222966bf024Smrg
223966bf024Smrg# This program is distributed in the hope that it will be useful,
224966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
225966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226966bf024Smrg# GNU General Public License for more details.
227966bf024Smrg
228966bf024Smrg# You should have received a copy of the GNU General Public License
229966bf024Smrg# along with this program; if not, write to the Free Software
230966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231966bf024Smrg# 02111-1307, USA.
232966bf024Smrg
233966bf024Smrg# serial 3
234966bf024Smrg
235966bf024Smrg# AM_SANITY_CHECK
236966bf024Smrg# ---------------
237966bf024SmrgAC_DEFUN([AM_SANITY_CHECK],
238966bf024Smrg[AC_MSG_CHECKING([whether build environment is sane])
239966bf024Smrg# Just in case
240966bf024Smrgsleep 1
241966bf024Smrgecho timestamp > conftest.file
242966bf024Smrg# Do `set' in a subshell so we don't clobber the current shell's
243966bf024Smrg# arguments.  Must try -L first in case configure is actually a
244966bf024Smrg# symlink; some systems play weird games with the mod time of symlinks
245966bf024Smrg# (eg FreeBSD returns the mod time of the symlink's containing
246966bf024Smrg# directory).
247966bf024Smrgif (
248966bf024Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249966bf024Smrg   if test "$[*]" = "X"; then
250966bf024Smrg      # -L didn't work.
251966bf024Smrg      set X `ls -t $srcdir/configure conftest.file`
252966bf024Smrg   fi
253966bf024Smrg   rm -f conftest.file
254966bf024Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
255966bf024Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256966bf024Smrg
257966bf024Smrg      # If neither matched, then we have a broken ls.  This can happen
258966bf024Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
259966bf024Smrg      # broken ls alias from the environment.  This has actually
260966bf024Smrg      # happened.  Such a system could not be considered "sane".
261966bf024Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262966bf024Smrgalias in your environment])
263966bf024Smrg   fi
264966bf024Smrg
265966bf024Smrg   test "$[2]" = conftest.file
266966bf024Smrg   )
267966bf024Smrgthen
268966bf024Smrg   # Ok.
269966bf024Smrg   :
270966bf024Smrgelse
271966bf024Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
272966bf024SmrgCheck your system clock])
273966bf024Smrgfi
274966bf024SmrgAC_MSG_RESULT(yes)])
275966bf024Smrg
276966bf024Smrg#  -*- Autoconf -*-
277966bf024Smrg
278966bf024Smrg
279966bf024Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280966bf024Smrg
281966bf024Smrg# This program is free software; you can redistribute it and/or modify
282966bf024Smrg# it under the terms of the GNU General Public License as published by
283966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
284966bf024Smrg# any later version.
285966bf024Smrg
286966bf024Smrg# This program is distributed in the hope that it will be useful,
287966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
288966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289966bf024Smrg# GNU General Public License for more details.
290966bf024Smrg
291966bf024Smrg# You should have received a copy of the GNU General Public License
292966bf024Smrg# along with this program; if not, write to the Free Software
293966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294966bf024Smrg# 02111-1307, USA.
295966bf024Smrg
296966bf024Smrg# serial 3
297966bf024Smrg
298966bf024Smrg# AM_MISSING_PROG(NAME, PROGRAM)
299966bf024Smrg# ------------------------------
300966bf024SmrgAC_DEFUN([AM_MISSING_PROG],
301966bf024Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
302966bf024Smrg$1=${$1-"${am_missing_run}$2"}
303966bf024SmrgAC_SUBST($1)])
304966bf024Smrg
305966bf024Smrg
306966bf024Smrg# AM_MISSING_HAS_RUN
307966bf024Smrg# ------------------
308966bf024Smrg# Define MISSING if not defined so far and test if it supports --run.
309966bf024Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
310966bf024SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
311966bf024Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312966bf024Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313966bf024Smrg# Use eval to expand $SHELL
314966bf024Smrgif eval "$MISSING --run true"; then
315966bf024Smrg  am_missing_run="$MISSING --run "
316966bf024Smrgelse
317966bf024Smrg  am_missing_run=
318966bf024Smrg  AC_MSG_WARN([`missing' script is too old or missing])
319966bf024Smrgfi
320966bf024Smrg])
321966bf024Smrg
322966bf024Smrg# AM_AUX_DIR_EXPAND
323966bf024Smrg
324966bf024Smrg# Copyright 2001 Free Software Foundation, Inc.
325966bf024Smrg
326966bf024Smrg# This program is free software; you can redistribute it and/or modify
327966bf024Smrg# it under the terms of the GNU General Public License as published by
328966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
329966bf024Smrg# any later version.
330966bf024Smrg
331966bf024Smrg# This program is distributed in the hope that it will be useful,
332966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
333966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334966bf024Smrg# GNU General Public License for more details.
335966bf024Smrg
336966bf024Smrg# You should have received a copy of the GNU General Public License
337966bf024Smrg# along with this program; if not, write to the Free Software
338966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339966bf024Smrg# 02111-1307, USA.
340966bf024Smrg
341966bf024Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342966bf024Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343966bf024Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344966bf024Smrg#
345966bf024Smrg# Of course, Automake must honor this variable whenever it calls a
346966bf024Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
347966bf024Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
348966bf024Smrg# depending on how configure is run.  This is pretty annoying, since
349966bf024Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350966bf024Smrg# source directory, any form will work fine, but in subdirectories a
351966bf024Smrg# relative path needs to be adjusted first.
352966bf024Smrg#
353966bf024Smrg# $ac_aux_dir/missing
354966bf024Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
355966bf024Smrg# $top_srcdir/$ac_aux_dir/missing
356966bf024Smrg#    fails if $ac_aux_dir is absolute,
357966bf024Smrg#    fails when called from a subdirectory in a VPATH build with
358966bf024Smrg#          a relative $ac_aux_dir
359966bf024Smrg#
360966bf024Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361966bf024Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
362966bf024Smrg# harmless because $srcdir is `.', but things will broke when you
363966bf024Smrg# start a VPATH build or use an absolute $srcdir.
364966bf024Smrg#
365966bf024Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366966bf024Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367966bf024Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368966bf024Smrg# and then we would define $MISSING as
369966bf024Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
370966bf024Smrg# This will work as long as MISSING is not called from configure, because
371966bf024Smrg# unfortunately $(top_srcdir) has no meaning in configure.
372966bf024Smrg# However there are other variables, like CC, which are often used in
373966bf024Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
374966bf024Smrg#
375966bf024Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
376966bf024Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
377966bf024Smrg# configured tree to be moved without reconfiguration.
378966bf024Smrg
379966bf024Smrg# Rely on autoconf to set up CDPATH properly.
380966bf024SmrgAC_PREREQ([2.50])
381966bf024Smrg
382966bf024SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
383966bf024Smrg# expand $ac_aux_dir to an absolute path
384966bf024Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
385966bf024Smrg])
386966bf024Smrg
387966bf024Smrg# AM_PROG_INSTALL_SH
388966bf024Smrg# ------------------
389966bf024Smrg# Define $install_sh.
390966bf024Smrg
391966bf024Smrg# Copyright 2001 Free Software Foundation, Inc.
392966bf024Smrg
393966bf024Smrg# This program is free software; you can redistribute it and/or modify
394966bf024Smrg# it under the terms of the GNU General Public License as published by
395966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
396966bf024Smrg# any later version.
397966bf024Smrg
398966bf024Smrg# This program is distributed in the hope that it will be useful,
399966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
400966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401966bf024Smrg# GNU General Public License for more details.
402966bf024Smrg
403966bf024Smrg# You should have received a copy of the GNU General Public License
404966bf024Smrg# along with this program; if not, write to the Free Software
405966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406966bf024Smrg# 02111-1307, USA.
407966bf024Smrg
408966bf024SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
409966bf024Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410966bf024Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
411966bf024SmrgAC_SUBST(install_sh)])
412966bf024Smrg
413966bf024Smrg# AM_PROG_INSTALL_STRIP
414966bf024Smrg
415966bf024Smrg# Copyright 2001 Free Software Foundation, Inc.
416966bf024Smrg
417966bf024Smrg# This program is free software; you can redistribute it and/or modify
418966bf024Smrg# it under the terms of the GNU General Public License as published by
419966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
420966bf024Smrg# any later version.
421966bf024Smrg
422966bf024Smrg# This program is distributed in the hope that it will be useful,
423966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
424966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425966bf024Smrg# GNU General Public License for more details.
426966bf024Smrg
427966bf024Smrg# You should have received a copy of the GNU General Public License
428966bf024Smrg# along with this program; if not, write to the Free Software
429966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430966bf024Smrg# 02111-1307, USA.
431966bf024Smrg
432966bf024Smrg# One issue with vendor `install' (even GNU) is that you can't
433966bf024Smrg# specify the program used to strip binaries.  This is especially
434966bf024Smrg# annoying in cross-compiling environments, where the build's strip
435966bf024Smrg# is unlikely to handle the host's binaries.
436966bf024Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
437966bf024Smrg# always use install-sh in `make install-strip', and initialize
438966bf024Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
439966bf024SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
440966bf024Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441966bf024Smrg# Installed binaries are usually stripped using `strip' when the user
442966bf024Smrg# run `make install-strip'.  However `strip' might not be the right
443966bf024Smrg# tool to use in cross-compilation environments, therefore Automake
444966bf024Smrg# will honor the `STRIP' environment variable to overrule this program.
445966bf024Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446966bf024Smrgif test "$cross_compiling" != no; then
447966bf024Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
448966bf024Smrgfi
449966bf024SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450966bf024SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
451966bf024Smrg
452966bf024Smrg#                                                          -*- Autoconf -*-
453966bf024Smrg# Copyright (C) 2003  Free Software Foundation, Inc.
454966bf024Smrg
455966bf024Smrg# This program is free software; you can redistribute it and/or modify
456966bf024Smrg# it under the terms of the GNU General Public License as published by
457966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
458966bf024Smrg# any later version.
459966bf024Smrg
460966bf024Smrg# This program is distributed in the hope that it will be useful,
461966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
462966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463966bf024Smrg# GNU General Public License for more details.
464966bf024Smrg
465966bf024Smrg# You should have received a copy of the GNU General Public License
466966bf024Smrg# along with this program; if not, write to the Free Software
467966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468966bf024Smrg# 02111-1307, USA.
469966bf024Smrg
470966bf024Smrg# serial 1
471966bf024Smrg
472966bf024Smrg# Check whether the underlying file-system supports filenames
473966bf024Smrg# with a leading dot.  For instance MS-DOS doesn't.
474966bf024SmrgAC_DEFUN([AM_SET_LEADING_DOT],
475966bf024Smrg[rm -rf .tst 2>/dev/null
476966bf024Smrgmkdir .tst 2>/dev/null
477966bf024Smrgif test -d .tst; then
478966bf024Smrg  am__leading_dot=.
479966bf024Smrgelse
480966bf024Smrg  am__leading_dot=_
481966bf024Smrgfi
482966bf024Smrgrmdir .tst 2>/dev/null
483966bf024SmrgAC_SUBST([am__leading_dot])])
484966bf024Smrg
485966bf024Smrg# serial 5						-*- Autoconf -*-
486966bf024Smrg
487966bf024Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488966bf024Smrg
489966bf024Smrg# This program is free software; you can redistribute it and/or modify
490966bf024Smrg# it under the terms of the GNU General Public License as published by
491966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
492966bf024Smrg# any later version.
493966bf024Smrg
494966bf024Smrg# This program is distributed in the hope that it will be useful,
495966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
496966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497966bf024Smrg# GNU General Public License for more details.
498966bf024Smrg
499966bf024Smrg# You should have received a copy of the GNU General Public License
500966bf024Smrg# along with this program; if not, write to the Free Software
501966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502966bf024Smrg# 02111-1307, USA.
503966bf024Smrg
504966bf024Smrg
505966bf024Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506966bf024Smrg# written in clear, in which case automake, when reading aclocal.m4,
507966bf024Smrg# will think it sees a *use*, and therefore will trigger all it's
508966bf024Smrg# C support machinery.  Also note that it means that autoscan, seeing
509966bf024Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510966bf024Smrg
511966bf024Smrg
512966bf024Smrg
513966bf024Smrg# _AM_DEPENDENCIES(NAME)
514966bf024Smrg# ----------------------
515966bf024Smrg# See how the compiler implements dependency checking.
516966bf024Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
517966bf024Smrg# We try a few techniques and use that to set a single cache variable.
518966bf024Smrg#
519966bf024Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520966bf024Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521966bf024Smrg# dependency, and given that the user is not expected to run this macro,
522966bf024Smrg# just rely on AC_PROG_CC.
523966bf024SmrgAC_DEFUN([_AM_DEPENDENCIES],
524966bf024Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
525966bf024SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526966bf024SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
527966bf024SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
528966bf024Smrg
529966bf024Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530966bf024Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531966bf024Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532966bf024Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533966bf024Smrg                   [depcc="$$1"   am_compiler_list=])
534966bf024Smrg
535966bf024SmrgAC_CACHE_CHECK([dependency style of $depcc],
536966bf024Smrg               [am_cv_$1_dependencies_compiler_type],
537966bf024Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538966bf024Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
539966bf024Smrg  # making bogus files that we don't know about and never remove.  For
540966bf024Smrg  # instance it was reported that on HP-UX the gcc test will end up
541966bf024Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
542966bf024Smrg  # in D'.
543966bf024Smrg  mkdir conftest.dir
544966bf024Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
545966bf024Smrg  # using a relative directory.
546966bf024Smrg  cp "$am_depcomp" conftest.dir
547966bf024Smrg  cd conftest.dir
548966bf024Smrg  # We will build objects and dependencies in a subdirectory because
549966bf024Smrg  # it helps to detect inapplicable dependency modes.  For instance
550966bf024Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
551966bf024Smrg  # side effect of compilation, but ICC will put the dependencies in
552966bf024Smrg  # the current directory while Tru64 will put them in the object
553966bf024Smrg  # directory.
554966bf024Smrg  mkdir sub
555966bf024Smrg
556966bf024Smrg  am_cv_$1_dependencies_compiler_type=none
557966bf024Smrg  if test "$am_compiler_list" = ""; then
558966bf024Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
559966bf024Smrg  fi
560966bf024Smrg  for depmode in $am_compiler_list; do
561966bf024Smrg    # Setup a source with many dependencies, because some compilers
562966bf024Smrg    # like to wrap large dependency lists on column 80 (with \), and
563966bf024Smrg    # we should not choose a depcomp mode which is confused by this.
564966bf024Smrg    #
565966bf024Smrg    # We need to recreate these files for each test, as the compiler may
566966bf024Smrg    # overwrite some of them when testing with obscure command lines.
567966bf024Smrg    # This happens at least with the AIX C compiler.
568966bf024Smrg    : > sub/conftest.c
569966bf024Smrg    for i in 1 2 3 4 5 6; do
570966bf024Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
571966bf024Smrg      : > sub/conftst$i.h
572966bf024Smrg    done
573966bf024Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574966bf024Smrg
575966bf024Smrg    case $depmode in
576966bf024Smrg    nosideeffect)
577966bf024Smrg      # after this tag, mechanisms are not by side-effect, so they'll
578966bf024Smrg      # only be used when explicitly requested
579966bf024Smrg      if test "x$enable_dependency_tracking" = xyes; then
580966bf024Smrg	continue
581966bf024Smrg      else
582966bf024Smrg	break
583966bf024Smrg      fi
584966bf024Smrg      ;;
585966bf024Smrg    none) break ;;
586966bf024Smrg    esac
587966bf024Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
588966bf024Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
589966bf024Smrg    # handle `-M -o', and we need to detect this.
590966bf024Smrg    if depmode=$depmode \
591966bf024Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592966bf024Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593966bf024Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594966bf024Smrg         >/dev/null 2>conftest.err &&
595966bf024Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596966bf024Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597966bf024Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598966bf024Smrg      # icc doesn't choke on unknown options, it will just issue warnings
599966bf024Smrg      # (even with -Werror).  So we grep stderr for any message
600966bf024Smrg      # that says an option was ignored.
601966bf024Smrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602966bf024Smrg        am_cv_$1_dependencies_compiler_type=$depmode
603966bf024Smrg        break
604966bf024Smrg      fi
605966bf024Smrg    fi
606966bf024Smrg  done
607966bf024Smrg
608966bf024Smrg  cd ..
609966bf024Smrg  rm -rf conftest.dir
610966bf024Smrgelse
611966bf024Smrg  am_cv_$1_dependencies_compiler_type=none
612966bf024Smrgfi
613966bf024Smrg])
614966bf024SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615966bf024SmrgAM_CONDITIONAL([am__fastdep$1], [
616966bf024Smrg  test "x$enable_dependency_tracking" != xno \
617966bf024Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
618966bf024Smrg])
619966bf024Smrg
620966bf024Smrg
621966bf024Smrg# AM_SET_DEPDIR
622966bf024Smrg# -------------
623966bf024Smrg# Choose a directory name for dependency files.
624966bf024Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625966bf024SmrgAC_DEFUN([AM_SET_DEPDIR],
626966bf024Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627966bf024SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
628966bf024Smrg])
629966bf024Smrg
630966bf024Smrg
631966bf024Smrg# AM_DEP_TRACK
632966bf024Smrg# ------------
633966bf024SmrgAC_DEFUN([AM_DEP_TRACK],
634966bf024Smrg[AC_ARG_ENABLE(dependency-tracking,
635966bf024Smrg[  --disable-dependency-tracking Speeds up one-time builds
636966bf024Smrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
637966bf024Smrgif test "x$enable_dependency_tracking" != xno; then
638966bf024Smrg  am_depcomp="$ac_aux_dir/depcomp"
639966bf024Smrg  AMDEPBACKSLASH='\'
640966bf024Smrgfi
641966bf024SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642966bf024SmrgAC_SUBST([AMDEPBACKSLASH])
643966bf024Smrg])
644966bf024Smrg
645966bf024Smrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
646966bf024Smrg
647966bf024Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648966bf024Smrg
649966bf024Smrg# This program is free software; you can redistribute it and/or modify
650966bf024Smrg# it under the terms of the GNU General Public License as published by
651966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
652966bf024Smrg# any later version.
653966bf024Smrg
654966bf024Smrg# This program is distributed in the hope that it will be useful,
655966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
656966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
657966bf024Smrg# GNU General Public License for more details.
658966bf024Smrg
659966bf024Smrg# You should have received a copy of the GNU General Public License
660966bf024Smrg# along with this program; if not, write to the Free Software
661966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662966bf024Smrg# 02111-1307, USA.
663966bf024Smrg
664966bf024Smrg#serial 2
665966bf024Smrg
666966bf024Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
667966bf024Smrg# ------------------------------
668966bf024SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669966bf024Smrg[for mf in $CONFIG_FILES; do
670966bf024Smrg  # Strip MF so we end up with the name of the file.
671966bf024Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
672966bf024Smrg  # Check whether this is an Automake generated Makefile or not.
673966bf024Smrg  # We used to match only the files named `Makefile.in', but
674966bf024Smrg  # some people rename them; so instead we look at the file content.
675966bf024Smrg  # Grep'ing the first line is not enough: some people post-process
676966bf024Smrg  # each Makefile.in and add a new line on top of each file to say so.
677966bf024Smrg  # So let's grep whole file.
678966bf024Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679966bf024Smrg    dirpart=`AS_DIRNAME("$mf")`
680966bf024Smrg  else
681966bf024Smrg    continue
682966bf024Smrg  fi
683966bf024Smrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684966bf024Smrg  # Extract the definition of DEP_FILES from the Makefile without
685966bf024Smrg  # running `make'.
686966bf024Smrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687966bf024Smrg  test -z "$DEPDIR" && continue
688966bf024Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
689966bf024Smrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
690966bf024Smrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691966bf024Smrg  # We invoke sed twice because it is the simplest approach to
692966bf024Smrg  # changing $(DEPDIR) to its actual value in the expansion.
693966bf024Smrg  for file in `sed -n -e '
694966bf024Smrg    /^DEP_FILES = .*\\\\$/ {
695966bf024Smrg      s/^DEP_FILES = //
696966bf024Smrg      :loop
697966bf024Smrg	s/\\\\$//
698966bf024Smrg	p
699966bf024Smrg	n
700966bf024Smrg	/\\\\$/ b loop
701966bf024Smrg      p
702966bf024Smrg    }
703966bf024Smrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704966bf024Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705966bf024Smrg    # Make sure the directory exists.
706966bf024Smrg    test -f "$dirpart/$file" && continue
707966bf024Smrg    fdir=`AS_DIRNAME(["$file"])`
708966bf024Smrg    AS_MKDIR_P([$dirpart/$fdir])
709966bf024Smrg    # echo "creating $dirpart/$file"
710966bf024Smrg    echo '# dummy' > "$dirpart/$file"
711966bf024Smrg  done
712966bf024Smrgdone
713966bf024Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
714966bf024Smrg
715966bf024Smrg
716966bf024Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
717966bf024Smrg# -----------------------------
718966bf024Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
719966bf024Smrg#
720966bf024Smrg# This code is only required when automatic dependency tracking
721966bf024Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
722966bf024Smrg# need in order to bootstrap the dependency handling code.
723966bf024SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724966bf024Smrg[AC_CONFIG_COMMANDS([depfiles],
725966bf024Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726966bf024Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727966bf024Smrg])
728966bf024Smrg
729966bf024Smrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
730966bf024Smrg
731966bf024Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732966bf024Smrg
733966bf024Smrg# This program is free software; you can redistribute it and/or modify
734966bf024Smrg# it under the terms of the GNU General Public License as published by
735966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
736966bf024Smrg# any later version.
737966bf024Smrg
738966bf024Smrg# This program is distributed in the hope that it will be useful,
739966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
740966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741966bf024Smrg# GNU General Public License for more details.
742966bf024Smrg
743966bf024Smrg# You should have received a copy of the GNU General Public License
744966bf024Smrg# along with this program; if not, write to the Free Software
745966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746966bf024Smrg# 02111-1307, USA.
747966bf024Smrg
748966bf024Smrg# serial 2
749966bf024Smrg
750966bf024Smrg# AM_MAKE_INCLUDE()
751966bf024Smrg# -----------------
752966bf024Smrg# Check to see how make treats includes.
753966bf024SmrgAC_DEFUN([AM_MAKE_INCLUDE],
754966bf024Smrg[am_make=${MAKE-make}
755966bf024Smrgcat > confinc << 'END'
756966bf024Smrgam__doit:
757966bf024Smrg	@echo done
758966bf024Smrg.PHONY: am__doit
759966bf024SmrgEND
760966bf024Smrg# If we don't find an include directive, just comment out the code.
761966bf024SmrgAC_MSG_CHECKING([for style of include used by $am_make])
762966bf024Smrgam__include="#"
763966bf024Smrgam__quote=
764966bf024Smrg_am_result=none
765966bf024Smrg# First try GNU make style include.
766966bf024Smrgecho "include confinc" > confmf
767966bf024Smrg# We grep out `Entering directory' and `Leaving directory'
768966bf024Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
769966bf024Smrg# In particular we don't look at `^make:' because GNU make might
770966bf024Smrg# be invoked under some other name (usually "gmake"), in which
771966bf024Smrg# case it prints its new name instead of `make'.
772966bf024Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
773966bf024Smrg   am__include=include
774966bf024Smrg   am__quote=
775966bf024Smrg   _am_result=GNU
776966bf024Smrgfi
777966bf024Smrg# Now try BSD make style include.
778966bf024Smrgif test "$am__include" = "#"; then
779966bf024Smrg   echo '.include "confinc"' > confmf
780966bf024Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
781966bf024Smrg      am__include=.include
782966bf024Smrg      am__quote="\""
783966bf024Smrg      _am_result=BSD
784966bf024Smrg   fi
785966bf024Smrgfi
786966bf024SmrgAC_SUBST([am__include])
787966bf024SmrgAC_SUBST([am__quote])
788966bf024SmrgAC_MSG_RESULT([$_am_result])
789966bf024Smrgrm -f confinc confmf
790966bf024Smrg])
791966bf024Smrg
792966bf024Smrg# AM_CONDITIONAL                                              -*- Autoconf -*-
793966bf024Smrg
794966bf024Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795966bf024Smrg
796966bf024Smrg# This program is free software; you can redistribute it and/or modify
797966bf024Smrg# it under the terms of the GNU General Public License as published by
798966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
799966bf024Smrg# any later version.
800966bf024Smrg
801966bf024Smrg# This program is distributed in the hope that it will be useful,
802966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
803966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
804966bf024Smrg# GNU General Public License for more details.
805966bf024Smrg
806966bf024Smrg# You should have received a copy of the GNU General Public License
807966bf024Smrg# along with this program; if not, write to the Free Software
808966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809966bf024Smrg# 02111-1307, USA.
810966bf024Smrg
811966bf024Smrg# serial 5
812966bf024Smrg
813966bf024SmrgAC_PREREQ(2.52)
814966bf024Smrg
815966bf024Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816966bf024Smrg# -------------------------------------
817966bf024Smrg# Define a conditional.
818966bf024SmrgAC_DEFUN([AM_CONDITIONAL],
819966bf024Smrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820966bf024Smrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821966bf024SmrgAC_SUBST([$1_TRUE])
822966bf024SmrgAC_SUBST([$1_FALSE])
823966bf024Smrgif $2; then
824966bf024Smrg  $1_TRUE=
825966bf024Smrg  $1_FALSE='#'
826966bf024Smrgelse
827966bf024Smrg  $1_TRUE='#'
828966bf024Smrg  $1_FALSE=
829966bf024Smrgfi
830966bf024SmrgAC_CONFIG_COMMANDS_PRE(
831966bf024Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832966bf024Smrg  AC_MSG_ERROR([conditional "$1" was never defined.
833966bf024SmrgUsually this means the macro was only invoked conditionally.])
834966bf024Smrgfi])])
835966bf024Smrg
836966bf024Smrg# Add --enable-maintainer-mode option to configure.
837966bf024Smrg# From Jim Meyering
838966bf024Smrg
839966bf024Smrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
840966bf024Smrg
841966bf024Smrg# This program is free software; you can redistribute it and/or modify
842966bf024Smrg# it under the terms of the GNU General Public License as published by
843966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
844966bf024Smrg# any later version.
845966bf024Smrg
846966bf024Smrg# This program is distributed in the hope that it will be useful,
847966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
848966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
849966bf024Smrg# GNU General Public License for more details.
850966bf024Smrg
851966bf024Smrg# You should have received a copy of the GNU General Public License
852966bf024Smrg# along with this program; if not, write to the Free Software
853966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
854966bf024Smrg# 02111-1307, USA.
855966bf024Smrg
856966bf024Smrg# serial 2
857966bf024Smrg
858966bf024SmrgAC_DEFUN([AM_MAINTAINER_MODE],
859966bf024Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
860966bf024Smrg  dnl maintainer-mode is disabled by default
861966bf024Smrg  AC_ARG_ENABLE(maintainer-mode,
862966bf024Smrg[  --enable-maintainer-mode enable make rules and dependencies not useful
863966bf024Smrg                          (and sometimes confusing) to the casual installer],
864966bf024Smrg      USE_MAINTAINER_MODE=$enableval,
865966bf024Smrg      USE_MAINTAINER_MODE=no)
866966bf024Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
867966bf024Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
868966bf024Smrg  MAINT=$MAINTAINER_MODE_TRUE
869966bf024Smrg  AC_SUBST(MAINT)dnl
870966bf024Smrg]
871966bf024Smrg)
872966bf024Smrg
873966bf024SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
874966bf024Smrg
875966bf024Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
876966bf024Smrg
877966bf024Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
878966bf024Smrg
879966bf024Smrg# This program is free software; you can redistribute it and/or modify
880966bf024Smrg# it under the terms of the GNU General Public License as published by
881966bf024Smrg# the Free Software Foundation; either version 2, or (at your option)
882966bf024Smrg# any later version.
883966bf024Smrg
884966bf024Smrg# This program is distributed in the hope that it will be useful,
885966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
886966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
887966bf024Smrg# GNU General Public License for more details.
888966bf024Smrg
889966bf024Smrg# You should have received a copy of the GNU General Public License
890966bf024Smrg# along with this program; if not, write to the Free Software
891966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
892966bf024Smrg# 02111-1307, USA.
893966bf024Smrg
894966bf024SmrgAC_PREREQ([2.52])
895966bf024Smrg
896966bf024Smrg# serial 6
897966bf024Smrg
898966bf024Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
899966bf024SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
900966bf024Smrg
901966bf024Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
902966bf024Smrg
903966bf024Smrg# serial 47 AC_PROG_LIBTOOL
904966bf024Smrg
905966bf024Smrg
906966bf024Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
907966bf024Smrg# -----------------------------------------------------------
908966bf024Smrg# If this macro is not defined by Autoconf, define it here.
909966bf024Smrgm4_ifdef([AC_PROVIDE_IFELSE],
910966bf024Smrg         [],
911966bf024Smrg         [m4_define([AC_PROVIDE_IFELSE],
912966bf024Smrg	         [m4_ifdef([AC_PROVIDE_$1],
913966bf024Smrg		           [$2], [$3])])])
914966bf024Smrg
915966bf024Smrg
916966bf024Smrg# AC_PROG_LIBTOOL
917966bf024Smrg# ---------------
918966bf024SmrgAC_DEFUN([AC_PROG_LIBTOOL],
919966bf024Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
920966bf024Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
921966bf024Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
922966bf024Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
923966bf024Smrg    [AC_LIBTOOL_CXX],
924966bf024Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
925966bf024Smrg  ])])
926966bf024Smrgdnl And a similar setup for Fortran 77 support
927966bf024Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
928966bf024Smrg    [AC_LIBTOOL_F77],
929966bf024Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
930966bf024Smrg])])
931966bf024Smrg
932966bf024Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
933966bf024Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
934966bf024Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
935966bf024Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
936966bf024Smrg    [AC_LIBTOOL_GCJ],
937966bf024Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
938966bf024Smrg      [AC_LIBTOOL_GCJ],
939966bf024Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
940966bf024Smrg	[AC_LIBTOOL_GCJ],
941966bf024Smrg      [ifdef([AC_PROG_GCJ],
942966bf024Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
943966bf024Smrg       ifdef([A][M_PROG_GCJ],
944966bf024Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
945966bf024Smrg       ifdef([LT_AC_PROG_GCJ],
946966bf024Smrg	     [define([LT_AC_PROG_GCJ],
947966bf024Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
948966bf024Smrg])])# AC_PROG_LIBTOOL
949966bf024Smrg
950966bf024Smrg
951966bf024Smrg# _AC_PROG_LIBTOOL
952966bf024Smrg# ----------------
953966bf024SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
954966bf024Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
955966bf024SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
956966bf024SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
957966bf024SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
958966bf024Smrg
959966bf024Smrg# This can be used to rebuild libtool when needed
960966bf024SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
961966bf024Smrg
962966bf024Smrg# Always use our own libtool.
963966bf024SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
964966bf024SmrgAC_SUBST(LIBTOOL)dnl
965966bf024Smrg
966966bf024Smrg# Prevent multiple expansion
967966bf024Smrgdefine([AC_PROG_LIBTOOL], [])
968966bf024Smrg])# _AC_PROG_LIBTOOL
969966bf024Smrg
970966bf024Smrg
971966bf024Smrg# AC_LIBTOOL_SETUP
972966bf024Smrg# ----------------
973966bf024SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
974966bf024Smrg[AC_PREREQ(2.50)dnl
975966bf024SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
976966bf024SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
977966bf024SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
978966bf024SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
979966bf024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
980966bf024SmrgAC_REQUIRE([AC_PROG_CC])dnl
981966bf024SmrgAC_REQUIRE([AC_PROG_LD])dnl
982966bf024SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
983966bf024SmrgAC_REQUIRE([AC_PROG_NM])dnl
984966bf024Smrg
985966bf024SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
986966bf024SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
987966bf024Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
988966bf024SmrgAC_REQUIRE([AC_OBJEXT])dnl
989966bf024SmrgAC_REQUIRE([AC_EXEEXT])dnl
990966bf024Smrgdnl
991966bf024Smrg
992966bf024SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
993966bf024SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
994966bf024SmrgAC_LIBTOOL_OBJDIR
995966bf024Smrg
996966bf024SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
997966bf024Smrg_LT_AC_PROG_ECHO_BACKSLASH
998966bf024Smrg
999966bf024Smrgcase $host_os in
1000966bf024Smrgaix3*)
1001966bf024Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1002966bf024Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1003966bf024Smrg  # vanish in a puff of smoke.
1004966bf024Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1005966bf024Smrg    COLLECT_NAMES=
1006966bf024Smrg    export COLLECT_NAMES
1007966bf024Smrg  fi
1008966bf024Smrg  ;;
1009966bf024Smrgesac
1010966bf024Smrg
1011966bf024Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
1012966bf024Smrg# metacharacters that are still active within double-quoted strings.
1013966bf024SmrgXsed='sed -e s/^X//'
1014966bf024Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1015966bf024Smrg
1016966bf024Smrg# Same as above, but do not quote variable references.
1017966bf024Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1018966bf024Smrg
1019966bf024Smrg# Sed substitution to delay expansion of an escaped shell variable in a
1020966bf024Smrg# double_quote_subst'ed string.
1021966bf024Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1022966bf024Smrg
1023966bf024Smrg# Sed substitution to avoid accidental globbing in evaled expressions
1024966bf024Smrgno_glob_subst='s/\*/\\\*/g'
1025966bf024Smrg
1026966bf024Smrg# Constants:
1027966bf024Smrgrm="rm -f"
1028966bf024Smrg
1029966bf024Smrg# Global variables:
1030966bf024Smrgdefault_ofile=libtool
1031966bf024Smrgcan_build_shared=yes
1032966bf024Smrg
1033966bf024Smrg# All known linkers require a `.a' archive for static linking (except M$VC,
1034966bf024Smrg# which needs '.lib').
1035966bf024Smrglibext=a
1036966bf024Smrgltmain="$ac_aux_dir/ltmain.sh"
1037966bf024Smrgofile="$default_ofile"
1038966bf024Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1039966bf024Smrg
1040966bf024SmrgAC_CHECK_TOOL(AR, ar, false)
1041966bf024SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1042966bf024SmrgAC_CHECK_TOOL(STRIP, strip, :)
1043966bf024Smrg
1044966bf024Smrgold_CC="$CC"
1045966bf024Smrgold_CFLAGS="$CFLAGS"
1046966bf024Smrg
1047966bf024Smrg# Set sane defaults for various variables
1048966bf024Smrgtest -z "$AR" && AR=ar
1049966bf024Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1050966bf024Smrgtest -z "$AS" && AS=as
1051966bf024Smrgtest -z "$CC" && CC=cc
1052966bf024Smrgtest -z "$LTCC" && LTCC=$CC
1053966bf024Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1054966bf024Smrgtest -z "$LD" && LD=ld
1055966bf024Smrgtest -z "$LN_S" && LN_S="ln -s"
1056966bf024Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1057966bf024Smrgtest -z "$NM" && NM=nm
1058966bf024Smrgtest -z "$SED" && SED=sed
1059966bf024Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1060966bf024Smrgtest -z "$RANLIB" && RANLIB=:
1061966bf024Smrgtest -z "$STRIP" && STRIP=:
1062966bf024Smrgtest -z "$ac_objext" && ac_objext=o
1063966bf024Smrg
1064966bf024Smrg# Determine commands to create old-style static archives.
1065966bf024Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1066966bf024Smrgold_postinstall_cmds='chmod 644 $oldlib'
1067966bf024Smrgold_postuninstall_cmds=
1068966bf024Smrg
1069966bf024Smrgif test -n "$RANLIB"; then
1070966bf024Smrg  case $host_os in
1071966bf024Smrg  openbsd*)
1072966bf024Smrg    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1073966bf024Smrg    ;;
1074966bf024Smrg  *)
1075966bf024Smrg    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1076966bf024Smrg    ;;
1077966bf024Smrg  esac
1078966bf024Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1079966bf024Smrgfi
1080966bf024Smrg
1081966bf024Smrg# Only perform the check for file, if the check method requires it
1082966bf024Smrgcase $deplibs_check_method in
1083966bf024Smrgfile_magic*)
1084966bf024Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1085966bf024Smrg    AC_PATH_MAGIC
1086966bf024Smrg  fi
1087966bf024Smrg  ;;
1088966bf024Smrgesac
1089966bf024Smrg
1090966bf024SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1091966bf024SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1092966bf024Smrgenable_win32_dll=yes, enable_win32_dll=no)
1093966bf024Smrg
1094966bf024SmrgAC_ARG_ENABLE([libtool-lock],
1095966bf024Smrg    [AC_HELP_STRING([--disable-libtool-lock],
1096966bf024Smrg	[avoid locking (might break parallel builds)])])
1097966bf024Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1098966bf024Smrg
1099966bf024SmrgAC_ARG_WITH([pic],
1100966bf024Smrg    [AC_HELP_STRING([--with-pic],
1101966bf024Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1102966bf024Smrg    [pic_mode="$withval"],
1103966bf024Smrg    [pic_mode=default])
1104966bf024Smrgtest -z "$pic_mode" && pic_mode=default
1105966bf024Smrg
1106966bf024Smrg# Use C for the default configuration in the libtool script
1107966bf024Smrgtagname=
1108966bf024SmrgAC_LIBTOOL_LANG_C_CONFIG
1109966bf024Smrg_LT_AC_TAGCONFIG
1110966bf024Smrg])# AC_LIBTOOL_SETUP
1111966bf024Smrg
1112966bf024Smrg
1113966bf024Smrg# _LT_AC_SYS_COMPILER
1114966bf024Smrg# -------------------
1115966bf024SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
1116966bf024Smrg[AC_REQUIRE([AC_PROG_CC])dnl
1117966bf024Smrg
1118966bf024Smrg# If no C compiler was specified, use CC.
1119966bf024SmrgLTCC=${LTCC-"$CC"}
1120966bf024Smrg
1121966bf024Smrg# Allow CC to be a program name with arguments.
1122966bf024Smrgcompiler=$CC
1123966bf024Smrg])# _LT_AC_SYS_COMPILER
1124966bf024Smrg
1125966bf024Smrg
1126966bf024Smrg# _LT_AC_SYS_LIBPATH_AIX
1127966bf024Smrg# ----------------------
1128966bf024Smrg# Links a minimal program and checks the executable
1129966bf024Smrg# for the system default hardcoded library path. In most cases,
1130966bf024Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
1131966bf024Smrg# the location of the communication and MPI libs are included too.
1132966bf024Smrg# If we don't find anything, use the default library path according
1133966bf024Smrg# to the aix ld manual.
1134966bf024SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1135966bf024Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1136966bf024Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1137966bf024Smrg}'`
1138966bf024Smrg# Check for a 64-bit object if we didn't find anything.
1139966bf024Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1140966bf024Smrg}'`; fi],[])
1141966bf024Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1142966bf024Smrg])# _LT_AC_SYS_LIBPATH_AIX
1143966bf024Smrg
1144966bf024Smrg
1145966bf024Smrg# _LT_AC_SHELL_INIT(ARG)
1146966bf024Smrg# ----------------------
1147966bf024SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
1148966bf024Smrg[ifdef([AC_DIVERSION_NOTICE],
1149966bf024Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1150966bf024Smrg	 [AC_DIVERT_PUSH(NOTICE)])
1151966bf024Smrg$1
1152966bf024SmrgAC_DIVERT_POP
1153966bf024Smrg])# _LT_AC_SHELL_INIT
1154966bf024Smrg
1155966bf024Smrg
1156966bf024Smrg# _LT_AC_PROG_ECHO_BACKSLASH
1157966bf024Smrg# --------------------------
1158966bf024Smrg# Add some code to the start of the generated configure script which
1159966bf024Smrg# will find an echo command which doesn't interpret backslashes.
1160966bf024SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1161966bf024Smrg[_LT_AC_SHELL_INIT([
1162966bf024Smrg# Check that we are running under the correct shell.
1163966bf024SmrgSHELL=${CONFIG_SHELL-/bin/sh}
1164966bf024Smrg
1165966bf024Smrgcase X$ECHO in
1166966bf024SmrgX*--fallback-echo)
1167966bf024Smrg  # Remove one level of quotation (which was required for Make).
1168966bf024Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1169966bf024Smrg  ;;
1170966bf024Smrgesac
1171966bf024Smrg
1172966bf024Smrgecho=${ECHO-echo}
1173966bf024Smrgif test "X[$]1" = X--no-reexec; then
1174966bf024Smrg  # Discard the --no-reexec flag, and continue.
1175966bf024Smrg  shift
1176966bf024Smrgelif test "X[$]1" = X--fallback-echo; then
1177966bf024Smrg  # Avoid inline document here, it may be left over
1178966bf024Smrg  :
1179966bf024Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1180966bf024Smrg  # Yippee, $echo works!
1181966bf024Smrg  :
1182966bf024Smrgelse
1183966bf024Smrg  # Restart under the correct shell.
1184966bf024Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1185966bf024Smrgfi
1186966bf024Smrg
1187966bf024Smrgif test "X[$]1" = X--fallback-echo; then
1188966bf024Smrg  # used as fallback echo
1189966bf024Smrg  shift
1190966bf024Smrg  cat <<EOF
1191966bf024Smrg[$]*
1192966bf024SmrgEOF
1193966bf024Smrg  exit 0
1194966bf024Smrgfi
1195966bf024Smrg
1196966bf024Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1197966bf024Smrg# if CDPATH is set.
1198966bf024Smrgif test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1199966bf024Smrg
1200966bf024Smrgif test -z "$ECHO"; then
1201966bf024Smrgif test "X${echo_test_string+set}" != Xset; then
1202966bf024Smrg# find a string as large as possible, as long as the shell can cope with it
1203966bf024Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1204966bf024Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1205966bf024Smrg    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1206966bf024Smrg       echo_test_string="`eval $cmd`" &&
1207966bf024Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1208966bf024Smrg    then
1209966bf024Smrg      break
1210966bf024Smrg    fi
1211966bf024Smrg  done
1212966bf024Smrgfi
1213966bf024Smrg
1214966bf024Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1215966bf024Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1216966bf024Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
1217966bf024Smrg  :
1218966bf024Smrgelse
1219966bf024Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
1220966bf024Smrg  # backslashes.  This makes it impossible to quote backslashes using
1221966bf024Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
1222966bf024Smrg  #
1223966bf024Smrg  # So, first we look for a working echo in the user's PATH.
1224966bf024Smrg
1225966bf024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1226966bf024Smrg  for dir in $PATH /usr/ucb; do
1227966bf024Smrg    IFS="$lt_save_ifs"
1228966bf024Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1229966bf024Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1230966bf024Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1231966bf024Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
1232966bf024Smrg      echo="$dir/echo"
1233966bf024Smrg      break
1234966bf024Smrg    fi
1235966bf024Smrg  done
1236966bf024Smrg  IFS="$lt_save_ifs"
1237966bf024Smrg
1238966bf024Smrg  if test "X$echo" = Xecho; then
1239966bf024Smrg    # We didn't find a better echo, so look for alternatives.
1240966bf024Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1241966bf024Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1242966bf024Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
1243966bf024Smrg      # This shell has a builtin print -r that does the trick.
1244966bf024Smrg      echo='print -r'
1245966bf024Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1246966bf024Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1247966bf024Smrg      # If we have ksh, try running configure again with it.
1248966bf024Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1249966bf024Smrg      export ORIGINAL_CONFIG_SHELL
1250966bf024Smrg      CONFIG_SHELL=/bin/ksh
1251966bf024Smrg      export CONFIG_SHELL
1252966bf024Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1253966bf024Smrg    else
1254966bf024Smrg      # Try using printf.
1255966bf024Smrg      echo='printf %s\n'
1256966bf024Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1257966bf024Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1258966bf024Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
1259966bf024Smrg	# Cool, printf works
1260966bf024Smrg	:
1261966bf024Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1262966bf024Smrg	   test "X$echo_testing_string" = 'X\t' &&
1263966bf024Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1264966bf024Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1265966bf024Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1266966bf024Smrg	export CONFIG_SHELL
1267966bf024Smrg	SHELL="$CONFIG_SHELL"
1268966bf024Smrg	export SHELL
1269966bf024Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1270966bf024Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1271966bf024Smrg	   test "X$echo_testing_string" = 'X\t' &&
1272966bf024Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1273966bf024Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1274966bf024Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1275966bf024Smrg      else
1276966bf024Smrg	# maybe with a smaller string...
1277966bf024Smrg	prev=:
1278966bf024Smrg
1279966bf024Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1280966bf024Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1281966bf024Smrg	  then
1282966bf024Smrg	    break
1283966bf024Smrg	  fi
1284966bf024Smrg	  prev="$cmd"
1285966bf024Smrg	done
1286966bf024Smrg
1287966bf024Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
1288966bf024Smrg	  echo_test_string=`eval $prev`
1289966bf024Smrg	  export echo_test_string
1290966bf024Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1291966bf024Smrg	else
1292966bf024Smrg	  # Oops.  We lost completely, so just stick with echo.
1293966bf024Smrg	  echo=echo
1294966bf024Smrg	fi
1295966bf024Smrg      fi
1296966bf024Smrg    fi
1297966bf024Smrg  fi
1298966bf024Smrgfi
1299966bf024Smrgfi
1300966bf024Smrg
1301966bf024Smrg# Copy echo and quote the copy suitably for passing to libtool from
1302966bf024Smrg# the Makefile, instead of quoting the original, which is used later.
1303966bf024SmrgECHO=$echo
1304966bf024Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1305966bf024Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1306966bf024Smrgfi
1307966bf024Smrg
1308966bf024SmrgAC_SUBST(ECHO)
1309966bf024Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
1310966bf024Smrg
1311966bf024Smrg
1312966bf024Smrg# _LT_AC_LOCK
1313966bf024Smrg# -----------
1314966bf024SmrgAC_DEFUN([_LT_AC_LOCK],
1315966bf024Smrg[AC_ARG_ENABLE([libtool-lock],
1316966bf024Smrg    [AC_HELP_STRING([--disable-libtool-lock],
1317966bf024Smrg	[avoid locking (might break parallel builds)])])
1318966bf024Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1319966bf024Smrg
1320966bf024Smrg# Some flags need to be propagated to the compiler or linker for good
1321966bf024Smrg# libtool support.
1322966bf024Smrgcase $host in
1323966bf024Smrgia64-*-hpux*)
1324966bf024Smrg  # Find out which ABI we are using.
1325966bf024Smrg  echo 'int i;' > conftest.$ac_ext
1326966bf024Smrg  if AC_TRY_EVAL(ac_compile); then
1327966bf024Smrg    case `/usr/bin/file conftest.$ac_objext` in
1328966bf024Smrg    *ELF-32*)
1329966bf024Smrg      HPUX_IA64_MODE="32"
1330966bf024Smrg      ;;
1331966bf024Smrg    *ELF-64*)
1332966bf024Smrg      HPUX_IA64_MODE="64"
1333966bf024Smrg      ;;
1334966bf024Smrg    esac
1335966bf024Smrg  fi
1336966bf024Smrg  rm -rf conftest*
1337966bf024Smrg  ;;
1338966bf024Smrg*-*-irix6*)
1339966bf024Smrg  # Find out which ABI we are using.
1340966bf024Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1341966bf024Smrg  if AC_TRY_EVAL(ac_compile); then
1342966bf024Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
1343966bf024Smrg    case `/usr/bin/file conftest.$ac_objext` in
1344966bf024Smrg    *32-bit*)
1345966bf024Smrg      LD="${LD-ld} -melf32bsmip"
1346966bf024Smrg      ;;
1347966bf024Smrg    *N32*)
1348966bf024Smrg      LD="${LD-ld} -melf32bmipn32"
1349966bf024Smrg      ;;
1350966bf024Smrg    *64-bit*)
1351966bf024Smrg      LD="${LD-ld} -melf64bmip"
1352966bf024Smrg      ;;
1353966bf024Smrg    esac
1354966bf024Smrg   else
1355966bf024Smrg    case `/usr/bin/file conftest.$ac_objext` in
1356966bf024Smrg    *32-bit*)
1357966bf024Smrg      LD="${LD-ld} -32"
1358966bf024Smrg      ;;
1359966bf024Smrg    *N32*)
1360966bf024Smrg      LD="${LD-ld} -n32"
1361966bf024Smrg      ;;
1362966bf024Smrg    *64-bit*)
1363966bf024Smrg      LD="${LD-ld} -64"
1364966bf024Smrg      ;;
1365966bf024Smrg    esac
1366966bf024Smrg   fi
1367966bf024Smrg  fi
1368966bf024Smrg  rm -rf conftest*
1369966bf024Smrg  ;;
1370966bf024Smrg
1371966bf024Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1372966bf024Smrg  # Find out which ABI we are using.
1373966bf024Smrg  echo 'int i;' > conftest.$ac_ext
1374966bf024Smrg  if AC_TRY_EVAL(ac_compile); then
1375966bf024Smrg    case "`/usr/bin/file conftest.o`" in
1376966bf024Smrg    *32-bit*)
1377966bf024Smrg      case $host in
1378966bf024Smrg        x86_64-*linux*)
1379966bf024Smrg          LD="${LD-ld} -m elf_i386"
1380966bf024Smrg          ;;
1381966bf024Smrg        ppc64-*linux*|powerpc64-*linux*)
1382966bf024Smrg          LD="${LD-ld} -m elf32ppclinux"
1383966bf024Smrg          ;;
1384966bf024Smrg        s390x-*linux*)
1385966bf024Smrg          LD="${LD-ld} -m elf_s390"
1386966bf024Smrg          ;;
1387966bf024Smrg        sparc64-*linux*)
1388966bf024Smrg          LD="${LD-ld} -m elf32_sparc"
1389966bf024Smrg          ;;
1390966bf024Smrg      esac
1391966bf024Smrg      ;;
1392966bf024Smrg    *64-bit*)
1393966bf024Smrg      case $host in
1394966bf024Smrg        x86_64-*linux*)
1395966bf024Smrg          LD="${LD-ld} -m elf_x86_64"
1396966bf024Smrg          ;;
1397966bf024Smrg        ppc*-*linux*|powerpc*-*linux*)
1398966bf024Smrg          LD="${LD-ld} -m elf64ppc"
1399966bf024Smrg          ;;
1400966bf024Smrg        s390*-*linux*)
1401966bf024Smrg          LD="${LD-ld} -m elf64_s390"
1402966bf024Smrg          ;;
1403966bf024Smrg        sparc*-*linux*)
1404966bf024Smrg          LD="${LD-ld} -m elf64_sparc"
1405966bf024Smrg          ;;
1406966bf024Smrg      esac
1407966bf024Smrg      ;;
1408966bf024Smrg    esac
1409966bf024Smrg  fi
1410966bf024Smrg  rm -rf conftest*
1411966bf024Smrg  ;;
1412966bf024Smrg
1413966bf024Smrg*-*-sco3.2v5*)
1414966bf024Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1415966bf024Smrg  SAVE_CFLAGS="$CFLAGS"
1416966bf024Smrg  CFLAGS="$CFLAGS -belf"
1417966bf024Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1418966bf024Smrg    [AC_LANG_PUSH(C)
1419966bf024Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1420966bf024Smrg     AC_LANG_POP])
1421966bf024Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1422966bf024Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1423966bf024Smrg    CFLAGS="$SAVE_CFLAGS"
1424966bf024Smrg  fi
1425966bf024Smrg  ;;
1426966bf024SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1427966bf024Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1428966bf024Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1429966bf024Smrg  AC_CHECK_TOOL(AS, as, false)
1430966bf024Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1431966bf024Smrg  ;;
1432966bf024Smrg  ])
1433966bf024Smrgesac
1434966bf024Smrg
1435966bf024Smrgneed_locks="$enable_libtool_lock"
1436966bf024Smrg
1437966bf024Smrg])# _LT_AC_LOCK
1438966bf024Smrg
1439966bf024Smrg
1440966bf024Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1441966bf024Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1442966bf024Smrg# ----------------------------------------------------------------
1443966bf024Smrg# Check whether the given compiler option works
1444966bf024SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1445966bf024Smrg[AC_REQUIRE([LT_AC_PROG_SED])
1446966bf024SmrgAC_CACHE_CHECK([$1], [$2],
1447966bf024Smrg  [$2=no
1448966bf024Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1449966bf024Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1450966bf024Smrg   lt_compiler_flag="$3"
1451966bf024Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1452966bf024Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1453966bf024Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1454966bf024Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1455966bf024Smrg   # The option is referenced via a variable to avoid confusing sed.
1456966bf024Smrg   lt_compile=`echo "$ac_compile" | $SED \
1457966bf024Smrg   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1458966bf024Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1459966bf024Smrg   -e 's:$: $lt_compiler_flag:'`
1460966bf024Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1461966bf024Smrg   (eval "$lt_compile" 2>conftest.err)
1462966bf024Smrg   ac_status=$?
1463966bf024Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1464966bf024Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1465966bf024Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1466966bf024Smrg     # The compiler can only warn and ignore the option if not recognized
1467966bf024Smrg     # So say no if there are warnings
1468966bf024Smrg     if test ! -s conftest.err; then
1469966bf024Smrg       $2=yes
1470966bf024Smrg     fi
1471966bf024Smrg   fi
1472966bf024Smrg   $rm conftest*
1473966bf024Smrg])
1474966bf024Smrg
1475966bf024Smrgif test x"[$]$2" = xyes; then
1476966bf024Smrg    ifelse([$5], , :, [$5])
1477966bf024Smrgelse
1478966bf024Smrg    ifelse([$6], , :, [$6])
1479966bf024Smrgfi
1480966bf024Smrg])# AC_LIBTOOL_COMPILER_OPTION
1481966bf024Smrg
1482966bf024Smrg
1483966bf024Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1484966bf024Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1485966bf024Smrg# ------------------------------------------------------------
1486966bf024Smrg# Check whether the given compiler option works
1487966bf024SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1488966bf024Smrg[AC_CACHE_CHECK([$1], [$2],
1489966bf024Smrg  [$2=no
1490966bf024Smrg   save_LDFLAGS="$LDFLAGS"
1491966bf024Smrg   LDFLAGS="$LDFLAGS $3"
1492966bf024Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1493966bf024Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1494966bf024Smrg     # The compiler can only warn and ignore the option if not recognized
1495966bf024Smrg     # So say no if there are warnings
1496966bf024Smrg     if test -s conftest.err; then
1497966bf024Smrg       # Append any errors to the config.log.
1498966bf024Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1499966bf024Smrg     else
1500966bf024Smrg       $2=yes
1501966bf024Smrg     fi
1502966bf024Smrg   fi
1503966bf024Smrg   $rm conftest*
1504966bf024Smrg   LDFLAGS="$save_LDFLAGS"
1505966bf024Smrg])
1506966bf024Smrg
1507966bf024Smrgif test x"[$]$2" = xyes; then
1508966bf024Smrg    ifelse([$4], , :, [$4])
1509966bf024Smrgelse
1510966bf024Smrg    ifelse([$5], , :, [$5])
1511966bf024Smrgfi
1512966bf024Smrg])# AC_LIBTOOL_LINKER_OPTION
1513966bf024Smrg
1514966bf024Smrg
1515966bf024Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
1516966bf024Smrg# --------------------------
1517966bf024SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1518966bf024Smrg[# find the maximum length of command line arguments
1519966bf024SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1520966bf024SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1521966bf024Smrg  i=0
1522966bf024Smrg  teststring="ABCD"
1523966bf024Smrg
1524966bf024Smrg  case $build_os in
1525966bf024Smrg  msdosdjgpp*)
1526966bf024Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1527966bf024Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1528966bf024Smrg    # during glob expansion).  Even if it were fixed, the result of this
1529966bf024Smrg    # check would be larger than it should be.
1530966bf024Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1531966bf024Smrg    ;;
1532966bf024Smrg
1533966bf024Smrg  gnu*)
1534966bf024Smrg    # Under GNU Hurd, this test is not required because there is
1535966bf024Smrg    # no limit to the length of command line arguments.
1536966bf024Smrg    # Libtool will interpret -1 as no limit whatsoever
1537966bf024Smrg    lt_cv_sys_max_cmd_len=-1;
1538966bf024Smrg    ;;
1539966bf024Smrg
1540966bf024Smrg  cygwin* | mingw*)
1541966bf024Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1542966bf024Smrg    # about 5 minutes as the teststring grows exponentially.
1543966bf024Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1544966bf024Smrg    # you end up with a "frozen" computer, even though with patience
1545966bf024Smrg    # the test eventually succeeds (with a max line length of 256k).
1546966bf024Smrg    # Instead, let's just punt: use the minimum linelength reported by
1547966bf024Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1548966bf024Smrg    lt_cv_sys_max_cmd_len=8192;
1549966bf024Smrg    ;;
1550966bf024Smrg
1551966bf024Smrg  amigaos*)
1552966bf024Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
1553966bf024Smrg    # So we just punt and use a minimum line length of 8192.
1554966bf024Smrg    lt_cv_sys_max_cmd_len=8192;
1555966bf024Smrg    ;;
1556966bf024Smrg
1557966bf024Smrg *)
1558966bf024Smrg    # If test is not a shell built-in, we'll probably end up computing a
1559966bf024Smrg    # maximum length that is only half of the actual maximum length, but
1560966bf024Smrg    # we can't tell.
1561966bf024Smrg    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1562966bf024Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
1563966bf024Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
1564966bf024Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
1565966bf024Smrg	    test $i != 17 # 1/2 MB should be enough
1566966bf024Smrg    do
1567966bf024Smrg      i=`expr $i + 1`
1568966bf024Smrg      teststring=$teststring$teststring
1569966bf024Smrg    done
1570966bf024Smrg    teststring=
1571966bf024Smrg    # Add a significant safety factor because C++ compilers can tack on massive
1572966bf024Smrg    # amounts of additional arguments before passing them to the linker.
1573966bf024Smrg    # It appears as though 1/2 is a usable value.
1574966bf024Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1575966bf024Smrg    ;;
1576966bf024Smrg  esac
1577966bf024Smrg])
1578966bf024Smrgif test -n $lt_cv_sys_max_cmd_len ; then
1579966bf024Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1580966bf024Smrgelse
1581966bf024Smrg  AC_MSG_RESULT(none)
1582966bf024Smrgfi
1583966bf024Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1584966bf024Smrg
1585966bf024Smrg
1586966bf024Smrg# _LT_AC_CHECK_DLFCN
1587966bf024Smrg# --------------------
1588966bf024SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
1589966bf024Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
1590966bf024Smrg])# _LT_AC_CHECK_DLFCN
1591966bf024Smrg
1592966bf024Smrg
1593966bf024Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1594966bf024Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1595966bf024Smrg# ------------------------------------------------------------------
1596966bf024SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1597966bf024Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1598966bf024Smrgif test "$cross_compiling" = yes; then :
1599966bf024Smrg  [$4]
1600966bf024Smrgelse
1601966bf024Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1602966bf024Smrg  lt_status=$lt_dlunknown
1603966bf024Smrg  cat > conftest.$ac_ext <<EOF
1604966bf024Smrg[#line __oline__ "configure"
1605966bf024Smrg#include "confdefs.h"
1606966bf024Smrg
1607966bf024Smrg#if HAVE_DLFCN_H
1608966bf024Smrg#include <dlfcn.h>
1609966bf024Smrg#endif
1610966bf024Smrg
1611966bf024Smrg#include <stdio.h>
1612966bf024Smrg
1613966bf024Smrg#ifdef RTLD_GLOBAL
1614966bf024Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1615966bf024Smrg#else
1616966bf024Smrg#  ifdef DL_GLOBAL
1617966bf024Smrg#    define LT_DLGLOBAL		DL_GLOBAL
1618966bf024Smrg#  else
1619966bf024Smrg#    define LT_DLGLOBAL		0
1620966bf024Smrg#  endif
1621966bf024Smrg#endif
1622966bf024Smrg
1623966bf024Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1624966bf024Smrg   find out it does not work in some platform. */
1625966bf024Smrg#ifndef LT_DLLAZY_OR_NOW
1626966bf024Smrg#  ifdef RTLD_LAZY
1627966bf024Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1628966bf024Smrg#  else
1629966bf024Smrg#    ifdef DL_LAZY
1630966bf024Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1631966bf024Smrg#    else
1632966bf024Smrg#      ifdef RTLD_NOW
1633966bf024Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1634966bf024Smrg#      else
1635966bf024Smrg#        ifdef DL_NOW
1636966bf024Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1637966bf024Smrg#        else
1638966bf024Smrg#          define LT_DLLAZY_OR_NOW	0
1639966bf024Smrg#        endif
1640966bf024Smrg#      endif
1641966bf024Smrg#    endif
1642966bf024Smrg#  endif
1643966bf024Smrg#endif
1644966bf024Smrg
1645966bf024Smrg#ifdef __cplusplus
1646966bf024Smrgextern "C" void exit (int);
1647966bf024Smrg#endif
1648966bf024Smrg
1649966bf024Smrgvoid fnord() { int i=42;}
1650966bf024Smrgint main ()
1651966bf024Smrg{
1652966bf024Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1653966bf024Smrg  int status = $lt_dlunknown;
1654966bf024Smrg
1655966bf024Smrg  if (self)
1656966bf024Smrg    {
1657966bf024Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1658966bf024Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1659966bf024Smrg      /* dlclose (self); */
1660966bf024Smrg    }
1661966bf024Smrg
1662966bf024Smrg    exit (status);
1663966bf024Smrg}]
1664966bf024SmrgEOF
1665966bf024Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1666966bf024Smrg    (./conftest; exit; ) 2>/dev/null
1667966bf024Smrg    lt_status=$?
1668966bf024Smrg    case x$lt_status in
1669966bf024Smrg      x$lt_dlno_uscore) $1 ;;
1670966bf024Smrg      x$lt_dlneed_uscore) $2 ;;
1671966bf024Smrg      x$lt_unknown|x*) $3 ;;
1672966bf024Smrg    esac
1673966bf024Smrg  else :
1674966bf024Smrg    # compilation failed
1675966bf024Smrg    $3
1676966bf024Smrg  fi
1677966bf024Smrgfi
1678966bf024Smrgrm -fr conftest*
1679966bf024Smrg])# _LT_AC_TRY_DLOPEN_SELF
1680966bf024Smrg
1681966bf024Smrg
1682966bf024Smrg# AC_LIBTOOL_DLOPEN_SELF
1683966bf024Smrg# -------------------
1684966bf024SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1685966bf024Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1686966bf024Smrgif test "x$enable_dlopen" != xyes; then
1687966bf024Smrg  enable_dlopen=unknown
1688966bf024Smrg  enable_dlopen_self=unknown
1689966bf024Smrg  enable_dlopen_self_static=unknown
1690966bf024Smrgelse
1691966bf024Smrg  lt_cv_dlopen=no
1692966bf024Smrg  lt_cv_dlopen_libs=
1693966bf024Smrg
1694966bf024Smrg  case $host_os in
1695966bf024Smrg  beos*)
1696966bf024Smrg    lt_cv_dlopen="load_add_on"
1697966bf024Smrg    lt_cv_dlopen_libs=
1698966bf024Smrg    lt_cv_dlopen_self=yes
1699966bf024Smrg    ;;
1700966bf024Smrg
1701966bf024Smrg  mingw* | pw32*)
1702966bf024Smrg    lt_cv_dlopen="LoadLibrary"
1703966bf024Smrg    lt_cv_dlopen_libs=
1704966bf024Smrg   ;;
1705966bf024Smrg
1706966bf024Smrg  cygwin*)
1707966bf024Smrg    lt_cv_dlopen="dlopen"
1708966bf024Smrg    lt_cv_dlopen_libs=
1709966bf024Smrg   ;;
1710966bf024Smrg
1711966bf024Smrg  darwin*)
1712966bf024Smrg  # if libdl is installed we need to link against it
1713966bf024Smrg    AC_CHECK_LIB([dl], [dlopen],
1714966bf024Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1715966bf024Smrg    lt_cv_dlopen="dyld"
1716966bf024Smrg    lt_cv_dlopen_libs=
1717966bf024Smrg    lt_cv_dlopen_self=yes
1718966bf024Smrg    ])
1719966bf024Smrg   ;;
1720966bf024Smrg
1721966bf024Smrg  *)
1722966bf024Smrg    AC_CHECK_FUNC([shl_load],
1723966bf024Smrg	  [lt_cv_dlopen="shl_load"],
1724966bf024Smrg      [AC_CHECK_LIB([dld], [shl_load],
1725966bf024Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1726966bf024Smrg	[AC_CHECK_FUNC([dlopen],
1727966bf024Smrg	      [lt_cv_dlopen="dlopen"],
1728966bf024Smrg	  [AC_CHECK_LIB([dl], [dlopen],
1729966bf024Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1730966bf024Smrg	    [AC_CHECK_LIB([svld], [dlopen],
1731966bf024Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1732966bf024Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1733966bf024Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1734966bf024Smrg	      ])
1735966bf024Smrg	    ])
1736966bf024Smrg	  ])
1737966bf024Smrg	])
1738966bf024Smrg      ])
1739966bf024Smrg    ;;
1740966bf024Smrg  esac
1741966bf024Smrg
1742966bf024Smrg  if test "x$lt_cv_dlopen" != xno; then
1743966bf024Smrg    enable_dlopen=yes
1744966bf024Smrg  else
1745966bf024Smrg    enable_dlopen=no
1746966bf024Smrg  fi
1747966bf024Smrg
1748966bf024Smrg  case $lt_cv_dlopen in
1749966bf024Smrg  dlopen)
1750966bf024Smrg    save_CPPFLAGS="$CPPFLAGS"
1751966bf024Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1752966bf024Smrg
1753966bf024Smrg    save_LDFLAGS="$LDFLAGS"
1754966bf024Smrg    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1755966bf024Smrg
1756966bf024Smrg    save_LIBS="$LIBS"
1757966bf024Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1758966bf024Smrg
1759966bf024Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1760966bf024Smrg	  lt_cv_dlopen_self, [dnl
1761966bf024Smrg	  _LT_AC_TRY_DLOPEN_SELF(
1762966bf024Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1763966bf024Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1764966bf024Smrg    ])
1765966bf024Smrg
1766966bf024Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
1767966bf024Smrg      LDFLAGS="$LDFLAGS $link_static_flag"
1768966bf024Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1769966bf024Smrg    	  lt_cv_dlopen_self_static, [dnl
1770966bf024Smrg	  _LT_AC_TRY_DLOPEN_SELF(
1771966bf024Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1772966bf024Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1773966bf024Smrg      ])
1774966bf024Smrg    fi
1775966bf024Smrg
1776966bf024Smrg    CPPFLAGS="$save_CPPFLAGS"
1777966bf024Smrg    LDFLAGS="$save_LDFLAGS"
1778966bf024Smrg    LIBS="$save_LIBS"
1779966bf024Smrg    ;;
1780966bf024Smrg  esac
1781966bf024Smrg
1782966bf024Smrg  case $lt_cv_dlopen_self in
1783966bf024Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1784966bf024Smrg  *) enable_dlopen_self=unknown ;;
1785966bf024Smrg  esac
1786966bf024Smrg
1787966bf024Smrg  case $lt_cv_dlopen_self_static in
1788966bf024Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1789966bf024Smrg  *) enable_dlopen_self_static=unknown ;;
1790966bf024Smrg  esac
1791966bf024Smrgfi
1792966bf024Smrg])# AC_LIBTOOL_DLOPEN_SELF
1793966bf024Smrg
1794966bf024Smrg
1795966bf024Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1796966bf024Smrg# ---------------------------------
1797966bf024Smrg# Check to see if options -c and -o are simultaneously supported by compiler
1798966bf024SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1799966bf024Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1800966bf024SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1801966bf024Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1802966bf024Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1803966bf024Smrg   $rm -r conftest 2>/dev/null
1804966bf024Smrg   mkdir conftest
1805966bf024Smrg   cd conftest
1806966bf024Smrg   mkdir out
1807966bf024Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1808966bf024Smrg
1809966bf024Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1810966bf024Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1811966bf024Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1812966bf024Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1813966bf024Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1814966bf024Smrg   lt_compile=`echo "$ac_compile" | $SED \
1815966bf024Smrg   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1816966bf024Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1817966bf024Smrg   -e 's:$: $lt_compiler_flag:'`
1818966bf024Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1819966bf024Smrg   (eval "$lt_compile" 2>out/conftest.err)
1820966bf024Smrg   ac_status=$?
1821966bf024Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1822966bf024Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1823966bf024Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1824966bf024Smrg   then
1825966bf024Smrg     # The compiler can only warn and ignore the option if not recognized
1826966bf024Smrg     # So say no if there are warnings
1827966bf024Smrg     if test ! -s out/conftest.err; then
1828966bf024Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1829966bf024Smrg     fi
1830966bf024Smrg   fi
1831966bf024Smrg   chmod u+w .
1832966bf024Smrg   $rm conftest*
1833966bf024Smrg   # SGI C++ compiler will create directory out/ii_files/ for
1834966bf024Smrg   # template instantiation
1835966bf024Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1836966bf024Smrg   $rm out/* && rmdir out
1837966bf024Smrg   cd ..
1838966bf024Smrg   rmdir conftest
1839966bf024Smrg   $rm conftest*
1840966bf024Smrg])
1841966bf024Smrg])# AC_LIBTOOL_PROG_CC_C_O
1842966bf024Smrg
1843966bf024Smrg
1844966bf024Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1845966bf024Smrg# -----------------------------------------
1846966bf024Smrg# Check to see if we can do hard links to lock some files if needed
1847966bf024SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1848966bf024Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
1849966bf024Smrg
1850966bf024Smrghard_links="nottested"
1851966bf024Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1852966bf024Smrg  # do not overwrite the value of need_locks provided by the user
1853966bf024Smrg  AC_MSG_CHECKING([if we can lock with hard links])
1854966bf024Smrg  hard_links=yes
1855966bf024Smrg  $rm conftest*
1856966bf024Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1857966bf024Smrg  touch conftest.a
1858966bf024Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1859966bf024Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1860966bf024Smrg  AC_MSG_RESULT([$hard_links])
1861966bf024Smrg  if test "$hard_links" = no; then
1862966bf024Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1863966bf024Smrg    need_locks=warn
1864966bf024Smrg  fi
1865966bf024Smrgelse
1866966bf024Smrg  need_locks=no
1867966bf024Smrgfi
1868966bf024Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1869966bf024Smrg
1870966bf024Smrg
1871966bf024Smrg# AC_LIBTOOL_OBJDIR
1872966bf024Smrg# -----------------
1873966bf024SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
1874966bf024Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1875966bf024Smrg[rm -f .libs 2>/dev/null
1876966bf024Smrgmkdir .libs 2>/dev/null
1877966bf024Smrgif test -d .libs; then
1878966bf024Smrg  lt_cv_objdir=.libs
1879966bf024Smrgelse
1880966bf024Smrg  # MS-DOS does not allow filenames that begin with a dot.
1881966bf024Smrg  lt_cv_objdir=_libs
1882966bf024Smrgfi
1883966bf024Smrgrmdir .libs 2>/dev/null])
1884966bf024Smrgobjdir=$lt_cv_objdir
1885966bf024Smrg])# AC_LIBTOOL_OBJDIR
1886966bf024Smrg
1887966bf024Smrg
1888966bf024Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1889966bf024Smrg# ----------------------------------------------
1890966bf024Smrg# Check hardcoding attributes.
1891966bf024SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1892966bf024Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1893966bf024Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
1894966bf024Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1895966bf024Smrg   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1896966bf024Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1897966bf024Smrg
1898966bf024Smrg  # We can hardcode non-existant directories.
1899966bf024Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1900966bf024Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1901966bf024Smrg     # have to relink, otherwise we might link with an installed library
1902966bf024Smrg     # when we should be linking with a yet-to-be-installed one
1903966bf024Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1904966bf024Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1905966bf024Smrg    # Linking always hardcodes the temporary library directory.
1906966bf024Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1907966bf024Smrg  else
1908966bf024Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1909966bf024Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1910966bf024Smrg  fi
1911966bf024Smrgelse
1912966bf024Smrg  # We cannot hardcode anything, or else we can only hardcode existing
1913966bf024Smrg  # directories.
1914966bf024Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1915966bf024Smrgfi
1916966bf024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1917966bf024Smrg
1918966bf024Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1919966bf024Smrg  # Fast installation is not supported
1920966bf024Smrg  enable_fast_install=no
1921966bf024Smrgelif test "$shlibpath_overrides_runpath" = yes ||
1922966bf024Smrg     test "$enable_shared" = no; then
1923966bf024Smrg  # Fast installation is not necessary
1924966bf024Smrg  enable_fast_install=needless
1925966bf024Smrgfi
1926966bf024Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1927966bf024Smrg
1928966bf024Smrg
1929966bf024Smrg# AC_LIBTOOL_SYS_LIB_STRIP
1930966bf024Smrg# ------------------------
1931966bf024SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1932966bf024Smrg[striplib=
1933966bf024Smrgold_striplib=
1934966bf024SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
1935966bf024Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1936966bf024Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1937966bf024Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1938966bf024Smrg  AC_MSG_RESULT([yes])
1939966bf024Smrgelse
1940966bf024Smrg# FIXME - insert some real tests, host_os isn't really good enough
1941966bf024Smrg  case $host_os in
1942966bf024Smrg   darwin*)
1943966bf024Smrg       if test -n "$STRIP" ; then
1944966bf024Smrg         striplib="$STRIP -x"
1945966bf024Smrg         AC_MSG_RESULT([yes])
1946966bf024Smrg       else
1947966bf024Smrg  AC_MSG_RESULT([no])
1948966bf024Smrgfi
1949966bf024Smrg       ;;
1950966bf024Smrg   *)
1951966bf024Smrg  AC_MSG_RESULT([no])
1952966bf024Smrg    ;;
1953966bf024Smrg  esac
1954966bf024Smrgfi
1955966bf024Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
1956966bf024Smrg
1957966bf024Smrg
1958966bf024Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1959966bf024Smrg# -----------------------------
1960966bf024Smrg# PORTME Fill in your ld.so characteristics
1961966bf024SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1962966bf024Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
1963966bf024Smrglibrary_names_spec=
1964966bf024Smrglibname_spec='lib$name'
1965966bf024Smrgsoname_spec=
1966966bf024Smrgshrext_cmds=".so"
1967966bf024Smrgpostinstall_cmds=
1968966bf024Smrgpostuninstall_cmds=
1969966bf024Smrgfinish_cmds=
1970966bf024Smrgfinish_eval=
1971966bf024Smrgshlibpath_var=
1972966bf024Smrgshlibpath_overrides_runpath=unknown
1973966bf024Smrgversion_type=none
1974966bf024Smrgdynamic_linker="$host_os ld.so"
1975966bf024Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1976966bf024Smrgif test "$GCC" = yes; then
1977966bf024Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1978966bf024Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1979966bf024Smrg    # if the path contains ";" then we assume it to be the separator
1980966bf024Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
1981966bf024Smrg    # assumed that no part of a normal pathname contains ";" but that should
1982966bf024Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
1983966bf024Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1984966bf024Smrg  else
1985966bf024Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1986966bf024Smrg  fi
1987966bf024Smrgelse
1988966bf024Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1989966bf024Smrgfi
1990966bf024Smrgneed_lib_prefix=unknown
1991966bf024Smrghardcode_into_libs=no
1992966bf024Smrg
1993966bf024Smrg# when you set need_version to no, make sure it does not cause -set_version
1994966bf024Smrg# flags to be left without arguments
1995966bf024Smrgneed_version=unknown
1996966bf024Smrg
1997966bf024Smrgcase $host_os in
1998966bf024Smrgaix3*)
1999966bf024Smrg  version_type=linux
2000966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2001966bf024Smrg  shlibpath_var=LIBPATH
2002966bf024Smrg
2003966bf024Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
2004966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2005966bf024Smrg  ;;
2006966bf024Smrg
2007966bf024Smrgaix4* | aix5*)
2008966bf024Smrg  version_type=linux
2009966bf024Smrg  need_lib_prefix=no
2010966bf024Smrg  need_version=no
2011966bf024Smrg  hardcode_into_libs=yes
2012966bf024Smrg  if test "$host_cpu" = ia64; then
2013966bf024Smrg    # AIX 5 supports IA64
2014966bf024Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2015966bf024Smrg    shlibpath_var=LD_LIBRARY_PATH
2016966bf024Smrg  else
2017966bf024Smrg    # With GCC up to 2.95.x, collect2 would create an import file
2018966bf024Smrg    # for dependence libraries.  The import file would start with
2019966bf024Smrg    # the line `#! .'.  This would cause the generated library to
2020966bf024Smrg    # depend on `.', always an invalid library.  This was fixed in
2021966bf024Smrg    # development snapshots of GCC prior to 3.0.
2022966bf024Smrg    case $host_os in
2023966bf024Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2024966bf024Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2025966bf024Smrg	   echo ' yes '
2026966bf024Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2027966bf024Smrg	:
2028966bf024Smrg      else
2029966bf024Smrg	can_build_shared=no
2030966bf024Smrg      fi
2031966bf024Smrg      ;;
2032966bf024Smrg    esac
2033966bf024Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2034966bf024Smrg    # soname into executable. Probably we can add versioning support to
2035966bf024Smrg    # collect2, so additional links can be useful in future.
2036966bf024Smrg    if test "$aix_use_runtimelinking" = yes; then
2037966bf024Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2038966bf024Smrg      # instead of lib<name>.a to let people know that these are not
2039966bf024Smrg      # typical AIX shared libraries.
2040966bf024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2041966bf024Smrg    else
2042966bf024Smrg      # We preserve .a as extension for shared libraries through AIX4.2
2043966bf024Smrg      # and later when we are not doing run time linking.
2044966bf024Smrg      library_names_spec='${libname}${release}.a $libname.a'
2045966bf024Smrg      soname_spec='${libname}${release}${shared_ext}$major'
2046966bf024Smrg    fi
2047966bf024Smrg    shlibpath_var=LIBPATH
2048966bf024Smrg  fi
2049966bf024Smrg  ;;
2050966bf024Smrg
2051966bf024Smrgamigaos*)
2052966bf024Smrg  library_names_spec='$libname.ixlibrary $libname.a'
2053966bf024Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2054966bf024Smrg  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'
2055966bf024Smrg  ;;
2056966bf024Smrg
2057966bf024Smrgbeos*)
2058966bf024Smrg  library_names_spec='${libname}${shared_ext}'
2059966bf024Smrg  dynamic_linker="$host_os ld.so"
2060966bf024Smrg  shlibpath_var=LIBRARY_PATH
2061966bf024Smrg  ;;
2062966bf024Smrg
2063966bf024Smrgbsdi4*)
2064966bf024Smrg  version_type=linux
2065966bf024Smrg  need_version=no
2066966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2067966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2068966bf024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2069966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2070966bf024Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2071966bf024Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2072966bf024Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
2073966bf024Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2074966bf024Smrg  # libtool to hard-code these into programs
2075966bf024Smrg  ;;
2076966bf024Smrg
2077966bf024Smrgcygwin* | mingw* | pw32*)
2078966bf024Smrg  version_type=windows
2079966bf024Smrg  shrext_cmds=".dll"
2080966bf024Smrg  need_version=no
2081966bf024Smrg  need_lib_prefix=no
2082966bf024Smrg
2083966bf024Smrg  case $GCC,$host_os in
2084966bf024Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
2085966bf024Smrg    library_names_spec='$libname.dll.a'
2086966bf024Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2087966bf024Smrg    postinstall_cmds='base_file=`basename \${file}`~
2088966bf024Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2089966bf024Smrg      dldir=$destdir/`dirname \$dlpath`~
2090966bf024Smrg      test -d \$dldir || mkdir -p \$dldir~
2091966bf024Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
2092966bf024Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2093966bf024Smrg      dlpath=$dir/\$dldll~
2094966bf024Smrg       $rm \$dlpath'
2095966bf024Smrg    shlibpath_overrides_runpath=yes
2096966bf024Smrg
2097966bf024Smrg    case $host_os in
2098966bf024Smrg    cygwin*)
2099966bf024Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2100966bf024Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2101966bf024Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2102966bf024Smrg      ;;
2103966bf024Smrg    mingw*)
2104966bf024Smrg      # MinGW DLLs use traditional 'lib' prefix
2105966bf024Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2106966bf024Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2107966bf024Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2108966bf024Smrg        # It is most probably a Windows format PATH printed by
2109966bf024Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2110966bf024Smrg        # path with ; separators, and with drive letters. We can handle the
2111966bf024Smrg        # drive letters (cygwin fileutils understands them), so leave them,
2112966bf024Smrg        # especially as we might pass files found there to a mingw objdump,
2113966bf024Smrg        # which wouldn't understand a cygwinified path. Ahh.
2114966bf024Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2115966bf024Smrg      else
2116966bf024Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2117966bf024Smrg      fi
2118966bf024Smrg      ;;
2119966bf024Smrg    pw32*)
2120966bf024Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2121966bf024Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2122966bf024Smrg      ;;
2123966bf024Smrg    esac
2124966bf024Smrg    ;;
2125966bf024Smrg
2126966bf024Smrg  *)
2127966bf024Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2128966bf024Smrg    ;;
2129966bf024Smrg  esac
2130966bf024Smrg  dynamic_linker='Win32 ld.exe'
2131966bf024Smrg  # FIXME: first we should search . and the directory the executable is in
2132966bf024Smrg  shlibpath_var=PATH
2133966bf024Smrg  ;;
2134966bf024Smrg
2135966bf024Smrgdarwin* | rhapsody*)
2136966bf024Smrg  dynamic_linker="$host_os dyld"
2137966bf024Smrg  version_type=darwin
2138966bf024Smrg  need_lib_prefix=no
2139966bf024Smrg  need_version=no
2140966bf024Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2141966bf024Smrg  soname_spec='${libname}${release}${major}$shared_ext'
2142966bf024Smrg  shlibpath_overrides_runpath=yes
2143966bf024Smrg  shlibpath_var=DYLD_LIBRARY_PATH
2144966bf024Smrg  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2145966bf024Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2146966bf024Smrg  if test "$GCC" = yes; then
2147966bf024Smrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2148966bf024Smrg  else
2149966bf024Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2150966bf024Smrg  fi
2151966bf024Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2152966bf024Smrg  ;;
2153966bf024Smrg
2154966bf024Smrgdgux*)
2155966bf024Smrg  version_type=linux
2156966bf024Smrg  need_lib_prefix=no
2157966bf024Smrg  need_version=no
2158966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2159966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2160966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2161966bf024Smrg  ;;
2162966bf024Smrg
2163966bf024Smrgfreebsd1*)
2164966bf024Smrg  dynamic_linker=no
2165966bf024Smrg  ;;
2166966bf024Smrg
2167966bf024Smrgkfreebsd*-gnu)
2168966bf024Smrg  version_type=linux
2169966bf024Smrg  need_lib_prefix=no
2170966bf024Smrg  need_version=no
2171966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2172966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2173966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2174966bf024Smrg  shlibpath_overrides_runpath=no
2175966bf024Smrg  hardcode_into_libs=yes
2176966bf024Smrg  dynamic_linker='GNU ld.so'
2177966bf024Smrg  ;;
2178966bf024Smrg
2179966bf024Smrgfreebsd*)
2180966bf024Smrg  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2181966bf024Smrg  version_type=freebsd-$objformat
2182966bf024Smrg  case $version_type in
2183966bf024Smrg    freebsd-elf*)
2184966bf024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2185966bf024Smrg      need_version=no
2186966bf024Smrg      need_lib_prefix=no
2187966bf024Smrg      ;;
2188966bf024Smrg    freebsd-*)
2189966bf024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2190966bf024Smrg      need_version=yes
2191966bf024Smrg      ;;
2192966bf024Smrg  esac
2193966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2194966bf024Smrg  case $host_os in
2195966bf024Smrg  freebsd2*)
2196966bf024Smrg    shlibpath_overrides_runpath=yes
2197966bf024Smrg    ;;
2198966bf024Smrg  freebsd3.[01]* | freebsdelf3.[01]*)
2199966bf024Smrg    shlibpath_overrides_runpath=yes
2200966bf024Smrg    hardcode_into_libs=yes
2201966bf024Smrg    ;;
2202966bf024Smrg  *) # from 3.2 on
2203966bf024Smrg    shlibpath_overrides_runpath=no
2204966bf024Smrg    hardcode_into_libs=yes
2205966bf024Smrg    ;;
2206966bf024Smrg  esac
2207966bf024Smrg  ;;
2208966bf024Smrg
2209966bf024Smrggnu*)
2210966bf024Smrg  version_type=linux
2211966bf024Smrg  need_lib_prefix=no
2212966bf024Smrg  need_version=no
2213966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2214966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2215966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2216966bf024Smrg  hardcode_into_libs=yes
2217966bf024Smrg  ;;
2218966bf024Smrg
2219966bf024Smrghpux9* | hpux10* | hpux11*)
2220966bf024Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2221966bf024Smrg  # link against other versions.
2222966bf024Smrg  version_type=sunos
2223966bf024Smrg  need_lib_prefix=no
2224966bf024Smrg  need_version=no
2225966bf024Smrg  case "$host_cpu" in
2226966bf024Smrg  ia64*)
2227966bf024Smrg    shrext_cmds='.so'
2228966bf024Smrg    hardcode_into_libs=yes
2229966bf024Smrg    dynamic_linker="$host_os dld.so"
2230966bf024Smrg    shlibpath_var=LD_LIBRARY_PATH
2231966bf024Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2232966bf024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2233966bf024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2234966bf024Smrg    if test "X$HPUX_IA64_MODE" = X32; then
2235966bf024Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2236966bf024Smrg    else
2237966bf024Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2238966bf024Smrg    fi
2239966bf024Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2240966bf024Smrg    ;;
2241966bf024Smrg   hppa*64*)
2242966bf024Smrg     shrext_cmds='.sl'
2243966bf024Smrg     hardcode_into_libs=yes
2244966bf024Smrg     dynamic_linker="$host_os dld.sl"
2245966bf024Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2246966bf024Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2247966bf024Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2248966bf024Smrg     soname_spec='${libname}${release}${shared_ext}$major'
2249966bf024Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2250966bf024Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2251966bf024Smrg     ;;
2252966bf024Smrg   *)
2253966bf024Smrg    shrext_cmds='.sl'
2254966bf024Smrg    dynamic_linker="$host_os dld.sl"
2255966bf024Smrg    shlibpath_var=SHLIB_PATH
2256966bf024Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2257966bf024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2258966bf024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2259966bf024Smrg    ;;
2260966bf024Smrg  esac
2261966bf024Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2262966bf024Smrg  postinstall_cmds='chmod 555 $lib'
2263966bf024Smrg  ;;
2264966bf024Smrg
2265966bf024Smrgirix5* | irix6* | nonstopux*)
2266966bf024Smrg  case $host_os in
2267966bf024Smrg    nonstopux*) version_type=nonstopux ;;
2268966bf024Smrg    *)
2269966bf024Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2270966bf024Smrg		version_type=linux
2271966bf024Smrg	else
2272966bf024Smrg		version_type=irix
2273966bf024Smrg	fi ;;
2274966bf024Smrg  esac
2275966bf024Smrg  need_lib_prefix=no
2276966bf024Smrg  need_version=no
2277966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2278966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2279966bf024Smrg  case $host_os in
2280966bf024Smrg  irix5* | nonstopux*)
2281966bf024Smrg    libsuff= shlibsuff=
2282966bf024Smrg    ;;
2283966bf024Smrg  *)
2284966bf024Smrg    case $LD in # libtool.m4 will add one of these switches to LD
2285966bf024Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2286966bf024Smrg      libsuff= shlibsuff= libmagic=32-bit;;
2287966bf024Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2288966bf024Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2289966bf024Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2290966bf024Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2291966bf024Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
2292966bf024Smrg    esac
2293966bf024Smrg    ;;
2294966bf024Smrg  esac
2295966bf024Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2296966bf024Smrg  shlibpath_overrides_runpath=no
2297966bf024Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2298966bf024Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2299966bf024Smrg  hardcode_into_libs=yes
2300966bf024Smrg  ;;
2301966bf024Smrg
2302966bf024Smrg# No shared lib support for Linux oldld, aout, or coff.
2303966bf024Smrglinux*oldld* | linux*aout* | linux*coff*)
2304966bf024Smrg  dynamic_linker=no
2305966bf024Smrg  ;;
2306966bf024Smrg
2307966bf024Smrg# This must be Linux ELF.
2308966bf024Smrglinux*)
2309966bf024Smrg  version_type=linux
2310966bf024Smrg  need_lib_prefix=no
2311966bf024Smrg  need_version=no
2312966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2313966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2314966bf024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2315966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2316966bf024Smrg  shlibpath_overrides_runpath=no
2317966bf024Smrg  # This implies no fast_install, which is unacceptable.
2318966bf024Smrg  # Some rework will be needed to allow for fast_install
2319966bf024Smrg  # before this can be enabled.
2320966bf024Smrg  hardcode_into_libs=yes
2321966bf024Smrg
2322966bf024Smrg  # find out which ABI we are using
2323966bf024Smrg  libsuff=
2324966bf024Smrg  case "$host_cpu" in
2325966bf024Smrg  x86_64*|s390x*|powerpc64*)
2326966bf024Smrg    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2327966bf024Smrg    if AC_TRY_EVAL(ac_compile); then
2328966bf024Smrg      case `/usr/bin/file conftest.$ac_objext` in
2329966bf024Smrg      *64-bit*)
2330966bf024Smrg        libsuff=64
2331966bf024Smrg        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
2332966bf024Smrg        ;;
2333966bf024Smrg      esac
2334966bf024Smrg    fi
2335966bf024Smrg    rm -rf conftest*
2336966bf024Smrg    ;;
2337966bf024Smrg  esac
2338966bf024Smrg
2339966bf024Smrg  # Append ld.so.conf contents to the search path
2340966bf024Smrg  if test -f /etc/ld.so.conf; then
2341966bf024Smrg    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2342966bf024Smrg    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
2343966bf024Smrg  fi
2344966bf024Smrg
2345966bf024Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2346966bf024Smrg  # powerpc, because MkLinux only supported shared libraries with the
2347966bf024Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2348966bf024Smrg  # most powerpc-linux boxes support dynamic linking these days and
2349966bf024Smrg  # people can always --disable-shared, the test was removed, and we
2350966bf024Smrg  # assume the GNU/Linux dynamic linker is in use.
2351966bf024Smrg  dynamic_linker='GNU/Linux ld.so'
2352966bf024Smrg  ;;
2353966bf024Smrg
2354966bf024Smrgknetbsd*-gnu)
2355966bf024Smrg  version_type=linux
2356966bf024Smrg  need_lib_prefix=no
2357966bf024Smrg  need_version=no
2358966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2359966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2360966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2361966bf024Smrg  shlibpath_overrides_runpath=no
2362966bf024Smrg  hardcode_into_libs=yes
2363966bf024Smrg  dynamic_linker='GNU ld.so'
2364966bf024Smrg  ;;
2365966bf024Smrg
2366966bf024Smrgnetbsd*)
2367966bf024Smrg  version_type=sunos
2368966bf024Smrg  need_lib_prefix=no
2369966bf024Smrg  need_version=no
2370966bf024Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2371966bf024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2372966bf024Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2373966bf024Smrg    dynamic_linker='NetBSD (a.out) ld.so'
2374966bf024Smrg  else
2375966bf024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2376966bf024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2377966bf024Smrg    dynamic_linker='NetBSD ld.elf_so'
2378966bf024Smrg  fi
2379966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2380966bf024Smrg  shlibpath_overrides_runpath=yes
2381966bf024Smrg  hardcode_into_libs=yes
2382966bf024Smrg  ;;
2383966bf024Smrg
2384966bf024Smrgnewsos6)
2385966bf024Smrg  version_type=linux
2386966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2387966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2388966bf024Smrg  shlibpath_overrides_runpath=yes
2389966bf024Smrg  ;;
2390966bf024Smrg
2391966bf024Smrgnto-qnx*)
2392966bf024Smrg  version_type=linux
2393966bf024Smrg  need_lib_prefix=no
2394966bf024Smrg  need_version=no
2395966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2396966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2397966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2398966bf024Smrg  shlibpath_overrides_runpath=yes
2399966bf024Smrg  ;;
2400966bf024Smrg
2401966bf024Smrgopenbsd*)
2402966bf024Smrg  version_type=sunos
2403966bf024Smrg  need_lib_prefix=no
2404966bf024Smrg  need_version=yes
2405966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2406966bf024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2407966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2408966bf024Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2409966bf024Smrg    case $host_os in
2410966bf024Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2411966bf024Smrg	shlibpath_overrides_runpath=no
2412966bf024Smrg	;;
2413966bf024Smrg      *)
2414966bf024Smrg	shlibpath_overrides_runpath=yes
2415966bf024Smrg	;;
2416966bf024Smrg      esac
2417966bf024Smrg  else
2418966bf024Smrg    shlibpath_overrides_runpath=yes
2419966bf024Smrg  fi
2420966bf024Smrg  ;;
2421966bf024Smrg
2422966bf024Smrgos2*)
2423966bf024Smrg  libname_spec='$name'
2424966bf024Smrg  shrext_cmds=".dll"
2425966bf024Smrg  need_lib_prefix=no
2426966bf024Smrg  library_names_spec='$libname${shared_ext} $libname.a'
2427966bf024Smrg  dynamic_linker='OS/2 ld.exe'
2428966bf024Smrg  shlibpath_var=LIBPATH
2429966bf024Smrg  ;;
2430966bf024Smrg
2431966bf024Smrgosf3* | osf4* | osf5*)
2432966bf024Smrg  version_type=osf
2433966bf024Smrg  need_lib_prefix=no
2434966bf024Smrg  need_version=no
2435966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2436966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2437966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2438966bf024Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2439966bf024Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2440966bf024Smrg  ;;
2441966bf024Smrg
2442966bf024Smrgsco3.2v5*)
2443966bf024Smrg  version_type=osf
2444966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2445966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2446966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2447966bf024Smrg  ;;
2448966bf024Smrg
2449966bf024Smrgsolaris*)
2450966bf024Smrg  version_type=linux
2451966bf024Smrg  need_lib_prefix=no
2452966bf024Smrg  need_version=no
2453966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2454966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2455966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2456966bf024Smrg  shlibpath_overrides_runpath=yes
2457966bf024Smrg  hardcode_into_libs=yes
2458966bf024Smrg  # ldd complains unless libraries are executable
2459966bf024Smrg  postinstall_cmds='chmod +x $lib'
2460966bf024Smrg  ;;
2461966bf024Smrg
2462966bf024Smrgsunos4*)
2463966bf024Smrg  version_type=sunos
2464966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2465966bf024Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2466966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2467966bf024Smrg  shlibpath_overrides_runpath=yes
2468966bf024Smrg  if test "$with_gnu_ld" = yes; then
2469966bf024Smrg    need_lib_prefix=no
2470966bf024Smrg  fi
2471966bf024Smrg  need_version=yes
2472966bf024Smrg  ;;
2473966bf024Smrg
2474966bf024Smrgsysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2475966bf024Smrg  version_type=linux
2476966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2477966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2478966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2479966bf024Smrg  case $host_vendor in
2480966bf024Smrg    sni)
2481966bf024Smrg      shlibpath_overrides_runpath=no
2482966bf024Smrg      need_lib_prefix=no
2483966bf024Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
2484966bf024Smrg      runpath_var=LD_RUN_PATH
2485966bf024Smrg      ;;
2486966bf024Smrg    siemens)
2487966bf024Smrg      need_lib_prefix=no
2488966bf024Smrg      ;;
2489966bf024Smrg    motorola)
2490966bf024Smrg      need_lib_prefix=no
2491966bf024Smrg      need_version=no
2492966bf024Smrg      shlibpath_overrides_runpath=no
2493966bf024Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2494966bf024Smrg      ;;
2495966bf024Smrg  esac
2496966bf024Smrg  ;;
2497966bf024Smrg
2498966bf024Smrgsysv4*MP*)
2499966bf024Smrg  if test -d /usr/nec ;then
2500966bf024Smrg    version_type=linux
2501966bf024Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2502966bf024Smrg    soname_spec='$libname${shared_ext}.$major'
2503966bf024Smrg    shlibpath_var=LD_LIBRARY_PATH
2504966bf024Smrg  fi
2505966bf024Smrg  ;;
2506966bf024Smrg
2507966bf024Smrguts4*)
2508966bf024Smrg  version_type=linux
2509966bf024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2510966bf024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2511966bf024Smrg  shlibpath_var=LD_LIBRARY_PATH
2512966bf024Smrg  ;;
2513966bf024Smrg
2514966bf024Smrg*)
2515966bf024Smrg  dynamic_linker=no
2516966bf024Smrg  ;;
2517966bf024Smrgesac
2518966bf024SmrgAC_MSG_RESULT([$dynamic_linker])
2519966bf024Smrgtest "$dynamic_linker" = no && can_build_shared=no
2520966bf024Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2521966bf024Smrg
2522966bf024Smrg
2523966bf024Smrg# _LT_AC_TAGCONFIG
2524966bf024Smrg# ----------------
2525966bf024SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
2526966bf024Smrg[AC_ARG_WITH([tags],
2527966bf024Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2528966bf024Smrg        [include additional configurations @<:@automatic@:>@])],
2529966bf024Smrg    [tagnames="$withval"])
2530966bf024Smrg
2531966bf024Smrgif test -f "$ltmain" && test -n "$tagnames"; then
2532966bf024Smrg  if test ! -f "${ofile}"; then
2533966bf024Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
2534966bf024Smrg  fi
2535966bf024Smrg
2536966bf024Smrg  if test -z "$LTCC"; then
2537966bf024Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2538966bf024Smrg    if test -z "$LTCC"; then
2539966bf024Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2540966bf024Smrg    else
2541966bf024Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2542966bf024Smrg    fi
2543966bf024Smrg  fi
2544966bf024Smrg
2545966bf024Smrg  # Extract list of available tagged configurations in $ofile.
2546966bf024Smrg  # Note that this assumes the entire list is on one line.
2547966bf024Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2548966bf024Smrg
2549966bf024Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2550966bf024Smrg  for tagname in $tagnames; do
2551966bf024Smrg    IFS="$lt_save_ifs"
2552966bf024Smrg    # Check whether tagname contains only valid characters
2553966bf024Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2554966bf024Smrg    "") ;;
2555966bf024Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2556966bf024Smrg	;;
2557966bf024Smrg    esac
2558966bf024Smrg
2559966bf024Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2560966bf024Smrg    then
2561966bf024Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2562966bf024Smrg    fi
2563966bf024Smrg
2564966bf024Smrg    # Update the list of available tags.
2565966bf024Smrg    if test -n "$tagname"; then
2566966bf024Smrg      echo appending configuration tag \"$tagname\" to $ofile
2567966bf024Smrg
2568966bf024Smrg      case $tagname in
2569966bf024Smrg      CXX)
2570966bf024Smrg	if test -n "$CXX" && test "X$CXX" != "Xno"; then
2571966bf024Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
2572966bf024Smrg	else
2573966bf024Smrg	  tagname=""
2574966bf024Smrg	fi
2575966bf024Smrg	;;
2576966bf024Smrg
2577966bf024Smrg      F77)
2578966bf024Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
2579966bf024Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
2580966bf024Smrg	else
2581966bf024Smrg	  tagname=""
2582966bf024Smrg	fi
2583966bf024Smrg	;;
2584966bf024Smrg
2585966bf024Smrg      GCJ)
2586966bf024Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2587966bf024Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
2588966bf024Smrg	else
2589966bf024Smrg	  tagname=""
2590966bf024Smrg	fi
2591966bf024Smrg	;;
2592966bf024Smrg
2593966bf024Smrg      RC)
2594966bf024Smrg	AC_LIBTOOL_LANG_RC_CONFIG
2595966bf024Smrg	;;
2596966bf024Smrg
2597966bf024Smrg      *)
2598966bf024Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
2599966bf024Smrg	;;
2600966bf024Smrg      esac
2601966bf024Smrg
2602966bf024Smrg      # Append the new tag name to the list of available tags.
2603966bf024Smrg      if test -n "$tagname" ; then
2604966bf024Smrg      available_tags="$available_tags $tagname"
2605966bf024Smrg    fi
2606966bf024Smrg    fi
2607966bf024Smrg  done
2608966bf024Smrg  IFS="$lt_save_ifs"
2609966bf024Smrg
2610966bf024Smrg  # Now substitute the updated list of available tags.
2611966bf024Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2612966bf024Smrg    mv "${ofile}T" "$ofile"
2613966bf024Smrg    chmod +x "$ofile"
2614966bf024Smrg  else
2615966bf024Smrg    rm -f "${ofile}T"
2616966bf024Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2617966bf024Smrg  fi
2618966bf024Smrgfi
2619966bf024Smrg])# _LT_AC_TAGCONFIG
2620966bf024Smrg
2621966bf024Smrg
2622966bf024Smrg# AC_LIBTOOL_DLOPEN
2623966bf024Smrg# -----------------
2624966bf024Smrg# enable checks for dlopen support
2625966bf024SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
2626966bf024Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2627966bf024Smrg])# AC_LIBTOOL_DLOPEN
2628966bf024Smrg
2629966bf024Smrg
2630966bf024Smrg# AC_LIBTOOL_WIN32_DLL
2631966bf024Smrg# --------------------
2632966bf024Smrg# declare package support for building win32 dll's
2633966bf024SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2634966bf024Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2635966bf024Smrg])# AC_LIBTOOL_WIN32_DLL
2636966bf024Smrg
2637966bf024Smrg
2638966bf024Smrg# AC_ENABLE_SHARED([DEFAULT])
2639966bf024Smrg# ---------------------------
2640966bf024Smrg# implement the --enable-shared flag
2641966bf024Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2642966bf024SmrgAC_DEFUN([AC_ENABLE_SHARED],
2643966bf024Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2644966bf024SmrgAC_ARG_ENABLE([shared],
2645966bf024Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2646966bf024Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2647966bf024Smrg    [p=${PACKAGE-default}
2648966bf024Smrg    case $enableval in
2649966bf024Smrg    yes) enable_shared=yes ;;
2650966bf024Smrg    no) enable_shared=no ;;
2651966bf024Smrg    *)
2652966bf024Smrg      enable_shared=no
2653966bf024Smrg      # Look at the argument we got.  We use all the common list separators.
2654966bf024Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2655966bf024Smrg      for pkg in $enableval; do
2656966bf024Smrg	IFS="$lt_save_ifs"
2657966bf024Smrg	if test "X$pkg" = "X$p"; then
2658966bf024Smrg	  enable_shared=yes
2659966bf024Smrg	fi
2660966bf024Smrg      done
2661966bf024Smrg      IFS="$lt_save_ifs"
2662966bf024Smrg      ;;
2663966bf024Smrg    esac],
2664966bf024Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2665966bf024Smrg])# AC_ENABLE_SHARED
2666966bf024Smrg
2667966bf024Smrg
2668966bf024Smrg# AC_DISABLE_SHARED
2669966bf024Smrg# -----------------
2670966bf024Smrg#- set the default shared flag to --disable-shared
2671966bf024SmrgAC_DEFUN([AC_DISABLE_SHARED],
2672966bf024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2673966bf024SmrgAC_ENABLE_SHARED(no)
2674966bf024Smrg])# AC_DISABLE_SHARED
2675966bf024Smrg
2676966bf024Smrg
2677966bf024Smrg# AC_ENABLE_STATIC([DEFAULT])
2678966bf024Smrg# ---------------------------
2679966bf024Smrg# implement the --enable-static flag
2680966bf024Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2681966bf024SmrgAC_DEFUN([AC_ENABLE_STATIC],
2682966bf024Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2683966bf024SmrgAC_ARG_ENABLE([static],
2684966bf024Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2685966bf024Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2686966bf024Smrg    [p=${PACKAGE-default}
2687966bf024Smrg    case $enableval in
2688966bf024Smrg    yes) enable_static=yes ;;
2689966bf024Smrg    no) enable_static=no ;;
2690966bf024Smrg    *)
2691966bf024Smrg     enable_static=no
2692966bf024Smrg      # Look at the argument we got.  We use all the common list separators.
2693966bf024Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2694966bf024Smrg      for pkg in $enableval; do
2695966bf024Smrg	IFS="$lt_save_ifs"
2696966bf024Smrg	if test "X$pkg" = "X$p"; then
2697966bf024Smrg	  enable_static=yes
2698966bf024Smrg	fi
2699966bf024Smrg      done
2700966bf024Smrg      IFS="$lt_save_ifs"
2701966bf024Smrg      ;;
2702966bf024Smrg    esac],
2703966bf024Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2704966bf024Smrg])# AC_ENABLE_STATIC
2705966bf024Smrg
2706966bf024Smrg
2707966bf024Smrg# AC_DISABLE_STATIC
2708966bf024Smrg# -----------------
2709966bf024Smrg# set the default static flag to --disable-static
2710966bf024SmrgAC_DEFUN([AC_DISABLE_STATIC],
2711966bf024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2712966bf024SmrgAC_ENABLE_STATIC(no)
2713966bf024Smrg])# AC_DISABLE_STATIC
2714966bf024Smrg
2715966bf024Smrg
2716966bf024Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
2717966bf024Smrg# ---------------------------------
2718966bf024Smrg# implement the --enable-fast-install flag
2719966bf024Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2720966bf024SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
2721966bf024Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2722966bf024SmrgAC_ARG_ENABLE([fast-install],
2723966bf024Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2724966bf024Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2725966bf024Smrg    [p=${PACKAGE-default}
2726966bf024Smrg    case $enableval in
2727966bf024Smrg    yes) enable_fast_install=yes ;;
2728966bf024Smrg    no) enable_fast_install=no ;;
2729966bf024Smrg    *)
2730966bf024Smrg      enable_fast_install=no
2731966bf024Smrg      # Look at the argument we got.  We use all the common list separators.
2732966bf024Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2733966bf024Smrg      for pkg in $enableval; do
2734966bf024Smrg	IFS="$lt_save_ifs"
2735966bf024Smrg	if test "X$pkg" = "X$p"; then
2736966bf024Smrg	  enable_fast_install=yes
2737966bf024Smrg	fi
2738966bf024Smrg      done
2739966bf024Smrg      IFS="$lt_save_ifs"
2740966bf024Smrg      ;;
2741966bf024Smrg    esac],
2742966bf024Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2743966bf024Smrg])# AC_ENABLE_FAST_INSTALL
2744966bf024Smrg
2745966bf024Smrg
2746966bf024Smrg# AC_DISABLE_FAST_INSTALL
2747966bf024Smrg# -----------------------
2748966bf024Smrg# set the default to --disable-fast-install
2749966bf024SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2750966bf024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2751966bf024SmrgAC_ENABLE_FAST_INSTALL(no)
2752966bf024Smrg])# AC_DISABLE_FAST_INSTALL
2753966bf024Smrg
2754966bf024Smrg
2755966bf024Smrg# AC_LIBTOOL_PICMODE([MODE])
2756966bf024Smrg# --------------------------
2757966bf024Smrg# implement the --with-pic flag
2758966bf024Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2759966bf024SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
2760966bf024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2761966bf024Smrgpic_mode=ifelse($#,1,$1,default)
2762966bf024Smrg])# AC_LIBTOOL_PICMODE
2763966bf024Smrg
2764966bf024Smrg
2765966bf024Smrg# AC_PROG_EGREP
2766966bf024Smrg# -------------
2767966bf024Smrg# This is predefined starting with Autoconf 2.54, so this conditional
2768966bf024Smrg# definition can be removed once we require Autoconf 2.54 or later.
2769966bf024Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2770966bf024Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2771966bf024Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2772966bf024Smrg    then ac_cv_prog_egrep='grep -E'
2773966bf024Smrg    else ac_cv_prog_egrep='egrep'
2774966bf024Smrg    fi])
2775966bf024Smrg EGREP=$ac_cv_prog_egrep
2776966bf024Smrg AC_SUBST([EGREP])
2777966bf024Smrg])])
2778966bf024Smrg
2779966bf024Smrg
2780966bf024Smrg# AC_PATH_TOOL_PREFIX
2781966bf024Smrg# -------------------
2782966bf024Smrg# find a file program which can recognise shared library
2783966bf024SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
2784966bf024Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2785966bf024SmrgAC_MSG_CHECKING([for $1])
2786966bf024SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2787966bf024Smrg[case $MAGIC_CMD in
2788966bf024Smrg[[\\/*] |  ?:[\\/]*])
2789966bf024Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2790966bf024Smrg  ;;
2791966bf024Smrg*)
2792966bf024Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2793966bf024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2794966bf024Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2795966bf024Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2796966bf024Smrgdnl not every word.  This closes a longstanding sh security hole.
2797966bf024Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
2798966bf024Smrg  for ac_dir in $ac_dummy; do
2799966bf024Smrg    IFS="$lt_save_ifs"
2800966bf024Smrg    test -z "$ac_dir" && ac_dir=.
2801966bf024Smrg    if test -f $ac_dir/$1; then
2802966bf024Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2803966bf024Smrg      if test -n "$file_magic_test_file"; then
2804966bf024Smrg	case $deplibs_check_method in
2805966bf024Smrg	"file_magic "*)
2806966bf024Smrg	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2807966bf024Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2808966bf024Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2809966bf024Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
2810966bf024Smrg	    :
2811966bf024Smrg	  else
2812966bf024Smrg	    cat <<EOF 1>&2
2813966bf024Smrg
2814966bf024Smrg*** Warning: the command libtool uses to detect shared libraries,
2815966bf024Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2816966bf024Smrg*** The result is that libtool may fail to recognize shared libraries
2817966bf024Smrg*** as such.  This will affect the creation of libtool libraries that
2818966bf024Smrg*** depend on shared libraries, but programs linked with such libtool
2819966bf024Smrg*** libraries will work regardless of this problem.  Nevertheless, you
2820966bf024Smrg*** may want to report the problem to your system manager and/or to
2821966bf024Smrg*** bug-libtool@gnu.org
2822966bf024Smrg
2823966bf024SmrgEOF
2824966bf024Smrg	  fi ;;
2825966bf024Smrg	esac
2826966bf024Smrg      fi
2827966bf024Smrg      break
2828966bf024Smrg    fi
2829966bf024Smrg  done
2830966bf024Smrg  IFS="$lt_save_ifs"
2831966bf024Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2832966bf024Smrg  ;;
2833966bf024Smrgesac])
2834966bf024SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2835966bf024Smrgif test -n "$MAGIC_CMD"; then
2836966bf024Smrg  AC_MSG_RESULT($MAGIC_CMD)
2837966bf024Smrgelse
2838966bf024Smrg  AC_MSG_RESULT(no)
2839966bf024Smrgfi
2840966bf024Smrg])# AC_PATH_TOOL_PREFIX
2841966bf024Smrg
2842966bf024Smrg
2843966bf024Smrg# AC_PATH_MAGIC
2844966bf024Smrg# -------------
2845966bf024Smrg# find a file program which can recognise a shared library
2846966bf024SmrgAC_DEFUN([AC_PATH_MAGIC],
2847966bf024Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2848966bf024Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2849966bf024Smrg  if test -n "$ac_tool_prefix"; then
2850966bf024Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2851966bf024Smrg  else
2852966bf024Smrg    MAGIC_CMD=:
2853966bf024Smrg  fi
2854966bf024Smrgfi
2855966bf024Smrg])# AC_PATH_MAGIC
2856966bf024Smrg
2857966bf024Smrg
2858966bf024Smrg# AC_PROG_LD
2859966bf024Smrg# ----------
2860966bf024Smrg# find the pathname to the GNU or non-GNU linker
2861966bf024SmrgAC_DEFUN([AC_PROG_LD],
2862966bf024Smrg[AC_ARG_WITH([gnu-ld],
2863966bf024Smrg    [AC_HELP_STRING([--with-gnu-ld],
2864966bf024Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2865966bf024Smrg    [test "$withval" = no || with_gnu_ld=yes],
2866966bf024Smrg    [with_gnu_ld=no])
2867966bf024SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
2868966bf024SmrgAC_REQUIRE([AC_PROG_CC])dnl
2869966bf024SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2870966bf024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2871966bf024Smrgac_prog=ld
2872966bf024Smrgif test "$GCC" = yes; then
2873966bf024Smrg  # Check if gcc -print-prog-name=ld gives a path.
2874966bf024Smrg  AC_MSG_CHECKING([for ld used by $CC])
2875966bf024Smrg  case $host in
2876966bf024Smrg  *-*-mingw*)
2877966bf024Smrg    # gcc leaves a trailing carriage return which upsets mingw
2878966bf024Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2879966bf024Smrg  *)
2880966bf024Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2881966bf024Smrg  esac
2882966bf024Smrg  case $ac_prog in
2883966bf024Smrg    # Accept absolute paths.
2884966bf024Smrg    [[\\/]]* | ?:[[\\/]]*)
2885966bf024Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2886966bf024Smrg      # Canonicalize the pathname of ld
2887966bf024Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2888966bf024Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2889966bf024Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2890966bf024Smrg      done
2891966bf024Smrg      test -z "$LD" && LD="$ac_prog"
2892966bf024Smrg      ;;
2893966bf024Smrg  "")
2894966bf024Smrg    # If it fails, then pretend we aren't using GCC.
2895966bf024Smrg    ac_prog=ld
2896966bf024Smrg    ;;
2897966bf024Smrg  *)
2898966bf024Smrg    # If it is relative, then search for the first ld in PATH.
2899966bf024Smrg    with_gnu_ld=unknown
2900966bf024Smrg    ;;
2901966bf024Smrg  esac
2902966bf024Smrgelif test "$with_gnu_ld" = yes; then
2903966bf024Smrg  AC_MSG_CHECKING([for GNU ld])
2904966bf024Smrgelse
2905966bf024Smrg  AC_MSG_CHECKING([for non-GNU ld])
2906966bf024Smrgfi
2907966bf024SmrgAC_CACHE_VAL(lt_cv_path_LD,
2908966bf024Smrg[if test -z "$LD"; then
2909966bf024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2910966bf024Smrg  for ac_dir in $PATH; do
2911966bf024Smrg    IFS="$lt_save_ifs"
2912966bf024Smrg    test -z "$ac_dir" && ac_dir=.
2913966bf024Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2914966bf024Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2915966bf024Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2916966bf024Smrg      # but apparently some GNU ld's only accept -v.
2917966bf024Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2918966bf024Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2919966bf024Smrg      *GNU* | *'with BFD'*)
2920966bf024Smrg	test "$with_gnu_ld" != no && break
2921966bf024Smrg	;;
2922966bf024Smrg      *)
2923966bf024Smrg	test "$with_gnu_ld" != yes && break
2924966bf024Smrg	;;
2925966bf024Smrg      esac
2926966bf024Smrg    fi
2927966bf024Smrg  done
2928966bf024Smrg  IFS="$lt_save_ifs"
2929966bf024Smrgelse
2930966bf024Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2931966bf024Smrgfi])
2932966bf024SmrgLD="$lt_cv_path_LD"
2933966bf024Smrgif test -n "$LD"; then
2934966bf024Smrg  AC_MSG_RESULT($LD)
2935966bf024Smrgelse
2936966bf024Smrg  AC_MSG_RESULT(no)
2937966bf024Smrgfi
2938966bf024Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2939966bf024SmrgAC_PROG_LD_GNU
2940966bf024Smrg])# AC_PROG_LD
2941966bf024Smrg
2942966bf024Smrg
2943966bf024Smrg# AC_PROG_LD_GNU
2944966bf024Smrg# --------------
2945966bf024SmrgAC_DEFUN([AC_PROG_LD_GNU],
2946966bf024Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2947966bf024SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2948966bf024Smrg[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2949966bf024Smrgcase `$LD -v 2>&1 </dev/null` in
2950966bf024Smrg*GNU* | *'with BFD'*)
2951966bf024Smrg  lt_cv_prog_gnu_ld=yes
2952966bf024Smrg  ;;
2953966bf024Smrg*)
2954966bf024Smrg  lt_cv_prog_gnu_ld=no
2955966bf024Smrg  ;;
2956966bf024Smrgesac])
2957966bf024Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2958966bf024Smrg])# AC_PROG_LD_GNU
2959966bf024Smrg
2960966bf024Smrg
2961966bf024Smrg# AC_PROG_LD_RELOAD_FLAG
2962966bf024Smrg# ----------------------
2963966bf024Smrg# find reload flag for linker
2964966bf024Smrg#   -- PORTME Some linkers may need a different reload flag.
2965966bf024SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2966966bf024Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
2967966bf024Smrg  lt_cv_ld_reload_flag,
2968966bf024Smrg  [lt_cv_ld_reload_flag='-r'])
2969966bf024Smrgreload_flag=$lt_cv_ld_reload_flag
2970966bf024Smrgcase $reload_flag in
2971966bf024Smrg"" | " "*) ;;
2972966bf024Smrg*) reload_flag=" $reload_flag" ;;
2973966bf024Smrgesac
2974966bf024Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2975966bf024Smrg])# AC_PROG_LD_RELOAD_FLAG
2976966bf024Smrg
2977966bf024Smrg
2978966bf024Smrg# AC_DEPLIBS_CHECK_METHOD
2979966bf024Smrg# -----------------------
2980966bf024Smrg# how to check for library dependencies
2981966bf024Smrg#  -- PORTME fill in with the dynamic library characteristics
2982966bf024SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2983966bf024Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
2984966bf024Smrglt_cv_deplibs_check_method,
2985966bf024Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2986966bf024Smrglt_cv_file_magic_test_file=
2987966bf024Smrglt_cv_deplibs_check_method='unknown'
2988966bf024Smrg# Need to set the preceding variable on all platforms that support
2989966bf024Smrg# interlibrary dependencies.
2990966bf024Smrg# 'none' -- dependencies not supported.
2991966bf024Smrg# `unknown' -- same as none, but documents that we really don't know.
2992966bf024Smrg# 'pass_all' -- all dependencies passed with no checks.
2993966bf024Smrg# 'test_compile' -- check by making test program.
2994966bf024Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
2995966bf024Smrg# which responds to the $file_magic_cmd with a given extended regex.
2996966bf024Smrg# If you have `file' or equivalent on your system and you're not sure
2997966bf024Smrg# whether `pass_all' will *always* work, you probably want this one.
2998966bf024Smrg
2999966bf024Smrgcase $host_os in
3000966bf024Smrgaix4* | aix5*)
3001966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3002966bf024Smrg  ;;
3003966bf024Smrg
3004966bf024Smrgbeos*)
3005966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3006966bf024Smrg  ;;
3007966bf024Smrg
3008966bf024Smrgbsdi4*)
3009966bf024Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3010966bf024Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3011966bf024Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
3012966bf024Smrg  ;;
3013966bf024Smrg
3014966bf024Smrgcygwin*)
3015966bf024Smrg  # func_win32_libid is a shell function defined in ltmain.sh
3016966bf024Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3017966bf024Smrg  lt_cv_file_magic_cmd='func_win32_libid'
3018966bf024Smrg  ;;
3019966bf024Smrg
3020966bf024Smrgmingw* | pw32*)
3021966bf024Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3022966bf024Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3023966bf024Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3024966bf024Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3025966bf024Smrg  ;;
3026966bf024Smrg
3027966bf024Smrgdarwin* | rhapsody*)
3028966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3029966bf024Smrg  ;;
3030966bf024Smrg
3031966bf024Smrgfreebsd* | kfreebsd*-gnu)
3032966bf024Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3033966bf024Smrg    case $host_cpu in
3034966bf024Smrg    i*86 )
3035966bf024Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
3036966bf024Smrg      # Let's accept both of them until this is cleared up.
3037966bf024Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3038966bf024Smrg      lt_cv_file_magic_cmd=/usr/bin/file
3039966bf024Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3040966bf024Smrg      ;;
3041966bf024Smrg    esac
3042966bf024Smrg  else
3043966bf024Smrg    lt_cv_deplibs_check_method=pass_all
3044966bf024Smrg  fi
3045966bf024Smrg  ;;
3046966bf024Smrg
3047966bf024Smrggnu*)
3048966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3049966bf024Smrg  ;;
3050966bf024Smrg
3051966bf024Smrghpux10.20* | hpux11*)
3052966bf024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3053966bf024Smrg  case "$host_cpu" in
3054966bf024Smrg  ia64*)
3055966bf024Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3056966bf024Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3057966bf024Smrg    ;;
3058966bf024Smrg  hppa*64*)
3059966bf024Smrg    [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]']
3060966bf024Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3061966bf024Smrg    ;;
3062966bf024Smrg  *)
3063966bf024Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3064966bf024Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3065966bf024Smrg    ;;
3066966bf024Smrg  esac
3067966bf024Smrg  ;;
3068966bf024Smrg
3069966bf024Smrgirix5* | irix6* | nonstopux*)
3070966bf024Smrg  case $LD in
3071966bf024Smrg  *-32|*"-32 ") libmagic=32-bit;;
3072966bf024Smrg  *-n32|*"-n32 ") libmagic=N32;;
3073966bf024Smrg  *-64|*"-64 ") libmagic=64-bit;;
3074966bf024Smrg  *) libmagic=never-match;;
3075966bf024Smrg  esac
3076966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3077966bf024Smrg  ;;
3078966bf024Smrg
3079966bf024Smrg# This must be Linux ELF.
3080966bf024Smrglinux*)
3081966bf024Smrg  case $host_cpu in
3082966bf024Smrg  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
3083966bf024Smrg    lt_cv_deplibs_check_method=pass_all ;;
3084966bf024Smrg  *)
3085966bf024Smrg    # glibc up to 2.1.1 does not perform some relocations on ARM
3086966bf024Smrg    # this will be overridden with pass_all, but let us keep it just in case
3087966bf024Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3088966bf024Smrg  esac
3089966bf024Smrg  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3090966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3091966bf024Smrg  ;;
3092966bf024Smrg
3093966bf024Smrgnetbsd*)
3094966bf024Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3095966bf024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3096966bf024Smrg  else
3097966bf024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3098966bf024Smrg  fi
3099966bf024Smrg  ;;
3100966bf024Smrg
3101966bf024Smrgnewos6*)
3102966bf024Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3103966bf024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3104966bf024Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3105966bf024Smrg  ;;
3106966bf024Smrg
3107966bf024Smrgnto-qnx*)
3108966bf024Smrg  lt_cv_deplibs_check_method=unknown
3109966bf024Smrg  ;;
3110966bf024Smrg
3111966bf024Smrgopenbsd*)
3112966bf024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3113966bf024Smrg  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3114966bf024Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3115966bf024Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3116966bf024Smrg  else
3117966bf024Smrg    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3118966bf024Smrg  fi
3119966bf024Smrg  ;;
3120966bf024Smrg
3121966bf024Smrgosf3* | osf4* | osf5*)
3122966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3123966bf024Smrg  ;;
3124966bf024Smrg
3125966bf024Smrgsco3.2v5*)
3126966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3127966bf024Smrg  ;;
3128966bf024Smrg
3129966bf024Smrgsolaris*)
3130966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3131966bf024Smrg  ;;
3132966bf024Smrg
3133966bf024Smrgsysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3134966bf024Smrg  case $host_vendor in
3135966bf024Smrg  motorola)
3136966bf024Smrg    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]]'
3137966bf024Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3138966bf024Smrg    ;;
3139966bf024Smrg  ncr)
3140966bf024Smrg    lt_cv_deplibs_check_method=pass_all
3141966bf024Smrg    ;;
3142966bf024Smrg  sequent)
3143966bf024Smrg    lt_cv_file_magic_cmd='/bin/file'
3144966bf024Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3145966bf024Smrg    ;;
3146966bf024Smrg  sni)
3147966bf024Smrg    lt_cv_file_magic_cmd='/bin/file'
3148966bf024Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3149966bf024Smrg    lt_cv_file_magic_test_file=/lib/libc.so
3150966bf024Smrg    ;;
3151966bf024Smrg  siemens)
3152966bf024Smrg    lt_cv_deplibs_check_method=pass_all
3153966bf024Smrg    ;;
3154966bf024Smrg  esac
3155966bf024Smrg  ;;
3156966bf024Smrg
3157966bf024Smrgsysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3158966bf024Smrg  lt_cv_deplibs_check_method=pass_all
3159966bf024Smrg  ;;
3160966bf024Smrgesac
3161966bf024Smrg])
3162966bf024Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
3163966bf024Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
3164966bf024Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3165966bf024Smrg])# AC_DEPLIBS_CHECK_METHOD
3166966bf024Smrg
3167966bf024Smrg
3168966bf024Smrg# AC_PROG_NM
3169966bf024Smrg# ----------
3170966bf024Smrg# find the pathname to a BSD-compatible name lister
3171966bf024SmrgAC_DEFUN([AC_PROG_NM],
3172966bf024Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3173966bf024Smrg[if test -n "$NM"; then
3174966bf024Smrg  # Let the user override the test.
3175966bf024Smrg  lt_cv_path_NM="$NM"
3176966bf024Smrgelse
3177966bf024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3178966bf024Smrg  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3179966bf024Smrg    IFS="$lt_save_ifs"
3180966bf024Smrg    test -z "$ac_dir" && ac_dir=.
3181966bf024Smrg    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3182966bf024Smrg    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3183966bf024Smrg      # Check to see if the nm accepts a BSD-compat flag.
3184966bf024Smrg      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3185966bf024Smrg      #   nm: unknown option "B" ignored
3186966bf024Smrg      # Tru64's nm complains that /dev/null is an invalid object file
3187966bf024Smrg      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3188966bf024Smrg      */dev/null* | *'Invalid file or object type'*)
3189966bf024Smrg	lt_cv_path_NM="$tmp_nm -B"
3190966bf024Smrg	break
3191966bf024Smrg        ;;
3192966bf024Smrg      *)
3193966bf024Smrg	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3194966bf024Smrg	*/dev/null*)
3195966bf024Smrg	  lt_cv_path_NM="$tmp_nm -p"
3196966bf024Smrg	  break
3197966bf024Smrg	  ;;
3198966bf024Smrg	*)
3199966bf024Smrg	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3200966bf024Smrg	  continue # so that we can try to find one that supports BSD flags
3201966bf024Smrg	  ;;
3202966bf024Smrg	esac
3203966bf024Smrg      esac
3204966bf024Smrg    fi
3205966bf024Smrg  done
3206966bf024Smrg  IFS="$lt_save_ifs"
3207966bf024Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3208966bf024Smrgfi])
3209966bf024SmrgNM="$lt_cv_path_NM"
3210966bf024Smrg])# AC_PROG_NM
3211966bf024Smrg
3212966bf024Smrg
3213966bf024Smrg# AC_CHECK_LIBM
3214966bf024Smrg# -------------
3215966bf024Smrg# check for math library
3216966bf024SmrgAC_DEFUN([AC_CHECK_LIBM],
3217966bf024Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3218966bf024SmrgLIBM=
3219966bf024Smrgcase $host in
3220966bf024Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3221966bf024Smrg  # These system don't have libm, or don't need it
3222966bf024Smrg  ;;
3223966bf024Smrg*-ncr-sysv4.3*)
3224966bf024Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3225966bf024Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3226966bf024Smrg  ;;
3227966bf024Smrg*)
3228966bf024Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3229966bf024Smrg  ;;
3230966bf024Smrgesac
3231966bf024Smrg])# AC_CHECK_LIBM
3232966bf024Smrg
3233966bf024Smrg
3234966bf024Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3235966bf024Smrg# -----------------------------------
3236966bf024Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
3237966bf024Smrg# LTDLINCL to the include flags for the libltdl header and adds
3238966bf024Smrg# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
3239966bf024Smrg# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
3240966bf024Smrg# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
3241966bf024Smrg# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3242966bf024Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
3243966bf024Smrg# flat and you're not using automake, define top_builddir and
3244966bf024Smrg# top_srcdir appropriately in the Makefiles.
3245966bf024SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3246966bf024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3247966bf024Smrg  case $enable_ltdl_convenience in
3248966bf024Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3249966bf024Smrg  "") enable_ltdl_convenience=yes
3250966bf024Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3251966bf024Smrg  esac
3252966bf024Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3253966bf024Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3254966bf024Smrg  # For backwards non-gettext consistent compatibility...
3255966bf024Smrg  INCLTDL="$LTDLINCL"
3256966bf024Smrg])# AC_LIBLTDL_CONVENIENCE
3257966bf024Smrg
3258966bf024Smrg
3259966bf024Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3260966bf024Smrg# -----------------------------------
3261966bf024Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
3262966bf024Smrg# LTDLINCL to the include flags for the libltdl header and adds
3263966bf024Smrg# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
3264966bf024Smrg# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
3265966bf024Smrg# DIRECTORY is not provided and an installed libltdl is not found, it is
3266966bf024Smrg# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
3267966bf024Smrg# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3268966bf024Smrg# quotes!).  If your package is not flat and you're not using automake,
3269966bf024Smrg# define top_builddir and top_srcdir appropriately in the Makefiles.
3270966bf024Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3271966bf024SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3272966bf024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3273966bf024Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
3274966bf024Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3275966bf024Smrg  [if test x"$enable_ltdl_install" = xno; then
3276966bf024Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
3277966bf024Smrg   else
3278966bf024Smrg     enable_ltdl_install=yes
3279966bf024Smrg   fi
3280966bf024Smrg  ])
3281966bf024Smrg  if test x"$enable_ltdl_install" = x"yes"; then
3282966bf024Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3283966bf024Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3284966bf024Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3285966bf024Smrg  else
3286966bf024Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3287966bf024Smrg    LIBLTDL="-lltdl"
3288966bf024Smrg    LTDLINCL=
3289966bf024Smrg  fi
3290966bf024Smrg  # For backwards non-gettext consistent compatibility...
3291966bf024Smrg  INCLTDL="$LTDLINCL"
3292966bf024Smrg])# AC_LIBLTDL_INSTALLABLE
3293966bf024Smrg
3294966bf024Smrg
3295966bf024Smrg# AC_LIBTOOL_CXX
3296966bf024Smrg# --------------
3297966bf024Smrg# enable support for C++ libraries
3298966bf024SmrgAC_DEFUN([AC_LIBTOOL_CXX],
3299966bf024Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
3300966bf024Smrg])# AC_LIBTOOL_CXX
3301966bf024Smrg
3302966bf024Smrg
3303966bf024Smrg# _LT_AC_LANG_CXX
3304966bf024Smrg# ---------------
3305966bf024SmrgAC_DEFUN([_LT_AC_LANG_CXX],
3306966bf024Smrg[AC_REQUIRE([AC_PROG_CXX])
3307966bf024SmrgAC_REQUIRE([AC_PROG_CXXCPP])
3308966bf024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3309966bf024Smrg])# _LT_AC_LANG_CXX
3310966bf024Smrg
3311966bf024Smrg
3312966bf024Smrg# AC_LIBTOOL_F77
3313966bf024Smrg# --------------
3314966bf024Smrg# enable support for Fortran 77 libraries
3315966bf024SmrgAC_DEFUN([AC_LIBTOOL_F77],
3316966bf024Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
3317966bf024Smrg])# AC_LIBTOOL_F77
3318966bf024Smrg
3319966bf024Smrg
3320966bf024Smrg# _LT_AC_LANG_F77
3321966bf024Smrg# ---------------
3322966bf024SmrgAC_DEFUN([_LT_AC_LANG_F77],
3323966bf024Smrg[AC_REQUIRE([AC_PROG_F77])
3324966bf024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3325966bf024Smrg])# _LT_AC_LANG_F77
3326966bf024Smrg
3327966bf024Smrg
3328966bf024Smrg# AC_LIBTOOL_GCJ
3329966bf024Smrg# --------------
3330966bf024Smrg# enable support for GCJ libraries
3331966bf024SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
3332966bf024Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
3333966bf024Smrg])# AC_LIBTOOL_GCJ
3334966bf024Smrg
3335966bf024Smrg
3336966bf024Smrg# _LT_AC_LANG_GCJ
3337966bf024Smrg# ---------------
3338966bf024SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
3339966bf024Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3340966bf024Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3341966bf024Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3342966bf024Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3343966bf024Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3344966bf024Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3345966bf024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3346966bf024Smrg])# _LT_AC_LANG_GCJ
3347966bf024Smrg
3348966bf024Smrg
3349966bf024Smrg# AC_LIBTOOL_RC
3350966bf024Smrg# --------------
3351966bf024Smrg# enable support for Windows resource files
3352966bf024SmrgAC_DEFUN([AC_LIBTOOL_RC],
3353966bf024Smrg[AC_REQUIRE([LT_AC_PROG_RC])
3354966bf024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3355966bf024Smrg])# AC_LIBTOOL_RC
3356966bf024Smrg
3357966bf024Smrg
3358966bf024Smrg# AC_LIBTOOL_LANG_C_CONFIG
3359966bf024Smrg# ------------------------
3360966bf024Smrg# Ensure that the configuration vars for the C compiler are
3361966bf024Smrg# suitably defined.  Those variables are subsequently used by
3362966bf024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3363966bf024SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3364966bf024SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
3365966bf024Smrg[lt_save_CC="$CC"
3366966bf024SmrgAC_LANG_PUSH(C)
3367966bf024Smrg
3368966bf024Smrg# Source file extension for C test sources.
3369966bf024Smrgac_ext=c
3370966bf024Smrg
3371966bf024Smrg# Object file extension for compiled C test sources.
3372966bf024Smrgobjext=o
3373966bf024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
3374966bf024Smrg
3375966bf024Smrg# Code to be used in simple compile tests
3376966bf024Smrglt_simple_compile_test_code="int some_variable = 0;\n"
3377966bf024Smrg
3378966bf024Smrg# Code to be used in simple link tests
3379966bf024Smrglt_simple_link_test_code='int main(){return(0);}\n'
3380966bf024Smrg
3381966bf024Smrg_LT_AC_SYS_COMPILER
3382966bf024Smrg
3383966bf024Smrg#
3384966bf024Smrg# Check for any special shared library compilation flags.
3385966bf024Smrg#
3386966bf024Smrg_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3387966bf024Smrgif test "$GCC" = no; then
3388966bf024Smrg  case $host_os in
3389966bf024Smrg  sco3.2v5*)
3390966bf024Smrg    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3391966bf024Smrg    ;;
3392966bf024Smrg  esac
3393966bf024Smrgfi
3394966bf024Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3395966bf024Smrg  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3396966bf024Smrg  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
3397966bf024Smrg  else
3398966bf024Smrg    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3399966bf024Smrg    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3400966bf024Smrg  fi
3401966bf024Smrgfi
3402966bf024Smrg
3403966bf024Smrg
3404966bf024Smrg#
3405966bf024Smrg# Check to make sure the static flag actually works.
3406966bf024Smrg#
3407966bf024SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3408966bf024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3409966bf024Smrg  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3410966bf024Smrg  [],
3411966bf024Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3412966bf024Smrg
3413966bf024Smrg
3414966bf024SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3415966bf024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3416966bf024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
3417966bf024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3418966bf024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3419966bf024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3420966bf024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3421966bf024SmrgAC_LIBTOOL_SYS_LIB_STRIP
3422966bf024SmrgAC_LIBTOOL_DLOPEN_SELF($1)
3423966bf024Smrg
3424966bf024Smrg# Report which librarie types wil actually be built
3425966bf024SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
3426966bf024SmrgAC_MSG_RESULT([$can_build_shared])
3427966bf024Smrg
3428966bf024SmrgAC_MSG_CHECKING([whether to build shared libraries])
3429966bf024Smrgtest "$can_build_shared" = "no" && enable_shared=no
3430966bf024Smrg
3431966bf024Smrg# On AIX, shared libraries and static libraries use the same namespace, and
3432966bf024Smrg# are all built from PIC.
3433966bf024Smrgcase "$host_os" in
3434966bf024Smrgaix3*)
3435966bf024Smrg  test "$enable_shared" = yes && enable_static=no
3436966bf024Smrg  if test -n "$RANLIB"; then
3437966bf024Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3438966bf024Smrg    postinstall_cmds='$RANLIB $lib'
3439966bf024Smrg  fi
3440966bf024Smrg  ;;
3441966bf024Smrg
3442966bf024Smrgaix4* | aix5*)
3443966bf024Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3444966bf024Smrg    test "$enable_shared" = yes && enable_static=no
3445966bf024Smrg  fi
3446966bf024Smrg  ;;
3447966bf024Smrg  darwin* | rhapsody*)
3448966bf024Smrg  if test "$GCC" = yes; then
3449966bf024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3450966bf024Smrg    case "$host_os" in
3451966bf024Smrg    rhapsody* | darwin1.[[012]])
3452966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3453966bf024Smrg      ;;
3454966bf024Smrg    *) # Darwin 1.3 on
3455966bf024Smrg      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3456966bf024Smrg      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3457966bf024Smrg      else
3458966bf024Smrg        case ${MACOSX_DEPLOYMENT_TARGET} in
3459966bf024Smrg          10.[[012]])
3460966bf024Smrg            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3461966bf024Smrg            ;;
3462966bf024Smrg          10.*)
3463966bf024Smrg            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3464966bf024Smrg            ;;
3465966bf024Smrg        esac
3466966bf024Smrg      fi
3467966bf024Smrg      ;;
3468966bf024Smrg    esac
3469966bf024Smrg    output_verbose_link_cmd='echo'
3470966bf024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3471966bf024Smrg    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3472966bf024Smrg    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3473966bf024Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3474966bf024Smrg    _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}'
3475966bf024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3476966bf024Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3477966bf024Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3478966bf024Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3479966bf024Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3480966bf024Smrg  else
3481966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3482966bf024Smrg  fi
3483966bf024Smrg    ;;
3484966bf024Smrgesac
3485966bf024SmrgAC_MSG_RESULT([$enable_shared])
3486966bf024Smrg
3487966bf024SmrgAC_MSG_CHECKING([whether to build static libraries])
3488966bf024Smrg# Make sure either enable_shared or enable_static is yes.
3489966bf024Smrgtest "$enable_shared" = yes || enable_static=yes
3490966bf024SmrgAC_MSG_RESULT([$enable_static])
3491966bf024Smrg
3492966bf024SmrgAC_LIBTOOL_CONFIG($1)
3493966bf024Smrg
3494966bf024SmrgAC_LANG_POP
3495966bf024SmrgCC="$lt_save_CC"
3496966bf024Smrg])# AC_LIBTOOL_LANG_C_CONFIG
3497966bf024Smrg
3498966bf024Smrg
3499966bf024Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
3500966bf024Smrg# --------------------------
3501966bf024Smrg# Ensure that the configuration vars for the C compiler are
3502966bf024Smrg# suitably defined.  Those variables are subsequently used by
3503966bf024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3504966bf024SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3505966bf024SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3506966bf024Smrg[AC_LANG_PUSH(C++)
3507966bf024SmrgAC_REQUIRE([AC_PROG_CXX])
3508966bf024SmrgAC_REQUIRE([AC_PROG_CXXCPP])
3509966bf024Smrg
3510966bf024Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3511966bf024Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3512966bf024Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
3513966bf024Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3514966bf024Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3515966bf024Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
3516966bf024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3517966bf024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3518966bf024Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3519966bf024Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3520966bf024Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3521966bf024Smrg_LT_AC_TAGVAR(module_cmds, $1)=
3522966bf024Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3523966bf024Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3524966bf024Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3525966bf024Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
3526966bf024Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3527966bf024Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3528966bf024Smrg
3529966bf024Smrg# Dependencies to place before and after the object being linked:
3530966bf024Smrg_LT_AC_TAGVAR(predep_objects, $1)=
3531966bf024Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
3532966bf024Smrg_LT_AC_TAGVAR(predeps, $1)=
3533966bf024Smrg_LT_AC_TAGVAR(postdeps, $1)=
3534966bf024Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3535966bf024Smrg
3536966bf024Smrg# Source file extension for C++ test sources.
3537966bf024Smrgac_ext=cc
3538966bf024Smrg
3539966bf024Smrg# Object file extension for compiled C++ test sources.
3540966bf024Smrgobjext=o
3541966bf024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
3542966bf024Smrg
3543966bf024Smrg# Code to be used in simple compile tests
3544966bf024Smrglt_simple_compile_test_code="int some_variable = 0;\n"
3545966bf024Smrg
3546966bf024Smrg# Code to be used in simple link tests
3547966bf024Smrglt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3548966bf024Smrg
3549966bf024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3550966bf024Smrg_LT_AC_SYS_COMPILER
3551966bf024Smrg
3552966bf024Smrg# Allow CC to be a program name with arguments.
3553966bf024Smrglt_save_CC=$CC
3554966bf024Smrglt_save_LD=$LD
3555966bf024Smrglt_save_GCC=$GCC
3556966bf024SmrgGCC=$GXX
3557966bf024Smrglt_save_with_gnu_ld=$with_gnu_ld
3558966bf024Smrglt_save_path_LD=$lt_cv_path_LD
3559966bf024Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3560966bf024Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3561966bf024Smrgelse
3562966bf024Smrg  unset lt_cv_prog_gnu_ld
3563966bf024Smrgfi
3564966bf024Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
3565966bf024Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
3566966bf024Smrgelse
3567966bf024Smrg  unset lt_cv_path_LD
3568966bf024Smrgfi
3569966bf024Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
3570966bf024SmrgCC=${CXX-"c++"}
3571966bf024Smrgcompiler=$CC
3572966bf024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
3573966bf024Smrgcc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3574966bf024Smrg
3575966bf024Smrg# We don't want -fno-exception wen compiling C++ code, so set the
3576966bf024Smrg# no_builtin_flag separately
3577966bf024Smrgif test "$GXX" = yes; then
3578966bf024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3579966bf024Smrgelse
3580966bf024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3581966bf024Smrgfi
3582966bf024Smrg
3583966bf024Smrgif test "$GXX" = yes; then
3584966bf024Smrg  # Set up default GNU C++ configuration
3585966bf024Smrg
3586966bf024Smrg  AC_PROG_LD
3587966bf024Smrg
3588966bf024Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3589966bf024Smrg  # archiving commands below assume that GNU ld is being used.
3590966bf024Smrg  if test "$with_gnu_ld" = yes; then
3591966bf024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3592966bf024Smrg    _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'
3593966bf024Smrg
3594966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3595966bf024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3596966bf024Smrg
3597966bf024Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
3598966bf024Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3599966bf024Smrg    #     investigate it a little bit more. (MM)
3600966bf024Smrg    wlarc='${wl}'
3601966bf024Smrg
3602966bf024Smrg    # ancient GNU ld didn't support --whole-archive et. al.
3603966bf024Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3604966bf024Smrg	grep 'no-whole-archive' > /dev/null; then
3605966bf024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3606966bf024Smrg    else
3607966bf024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3608966bf024Smrg    fi
3609966bf024Smrg  else
3610966bf024Smrg    with_gnu_ld=no
3611966bf024Smrg    wlarc=
3612966bf024Smrg
3613966bf024Smrg    # A generic and very simple default shared library creation
3614966bf024Smrg    # command for GNU C++ for the case where it uses the native
3615966bf024Smrg    # linker, instead of GNU ld.  If possible, this setting should
3616966bf024Smrg    # overridden to take advantage of the native linker features on
3617966bf024Smrg    # the platform it is being used on.
3618966bf024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3619966bf024Smrg  fi
3620966bf024Smrg
3621966bf024Smrg  # Commands to make compiler produce verbose output that lists
3622966bf024Smrg  # what "hidden" libraries, object files and flags are used when
3623966bf024Smrg  # linking a shared library.
3624966bf024Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3625966bf024Smrg
3626966bf024Smrgelse
3627966bf024Smrg  GXX=no
3628966bf024Smrg  with_gnu_ld=no
3629966bf024Smrg  wlarc=
3630966bf024Smrgfi
3631966bf024Smrg
3632966bf024Smrg# PORTME: fill in a description of your system's C++ link characteristics
3633966bf024SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3634966bf024Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3635966bf024Smrgcase $host_os in
3636966bf024Smrg  aix3*)
3637966bf024Smrg    # FIXME: insert proper C++ library support
3638966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3639966bf024Smrg    ;;
3640966bf024Smrg  aix4* | aix5*)
3641966bf024Smrg    if test "$host_cpu" = ia64; then
3642966bf024Smrg      # On IA64, the linker does run time linking by default, so we don't
3643966bf024Smrg      # have to do anything special.
3644966bf024Smrg      aix_use_runtimelinking=no
3645966bf024Smrg      exp_sym_flag='-Bexport'
3646966bf024Smrg      no_entry_flag=""
3647966bf024Smrg    else
3648966bf024Smrg      aix_use_runtimelinking=no
3649966bf024Smrg
3650966bf024Smrg      # Test if we are trying to use run time linking or normal
3651966bf024Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3652966bf024Smrg      # need to do runtime linking.
3653966bf024Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3654966bf024Smrg	for ld_flag in $LDFLAGS; do
3655966bf024Smrg	  case $ld_flag in
3656966bf024Smrg	  *-brtl*)
3657966bf024Smrg	    aix_use_runtimelinking=yes
3658966bf024Smrg	    break
3659966bf024Smrg	    ;;
3660966bf024Smrg	  esac
3661966bf024Smrg	done
3662966bf024Smrg      esac
3663966bf024Smrg
3664966bf024Smrg      exp_sym_flag='-bexport'
3665966bf024Smrg      no_entry_flag='-bnoentry'
3666966bf024Smrg    fi
3667966bf024Smrg
3668966bf024Smrg    # When large executables or shared objects are built, AIX ld can
3669966bf024Smrg    # have problems creating the table of contents.  If linking a library
3670966bf024Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
3671966bf024Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3672966bf024Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3673966bf024Smrg
3674966bf024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
3675966bf024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3676966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3677966bf024Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3678966bf024Smrg
3679966bf024Smrg    if test "$GXX" = yes; then
3680966bf024Smrg      case $host_os in aix4.[012]|aix4.[012].*)
3681966bf024Smrg      # We only want to do this on AIX 4.2 and lower, the check
3682966bf024Smrg      # below for broken collect2 doesn't work under 4.3+
3683966bf024Smrg	collect2name=`${CC} -print-prog-name=collect2`
3684966bf024Smrg	if test -f "$collect2name" && \
3685966bf024Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3686966bf024Smrg	then
3687966bf024Smrg	  # We have reworked collect2
3688966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3689966bf024Smrg	else
3690966bf024Smrg	  # We have old collect2
3691966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3692966bf024Smrg	  # It fails to find uninstalled libraries when the uninstalled
3693966bf024Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
3694966bf024Smrg	  # to unsupported forces relinking
3695966bf024Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3696966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3697966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3698966bf024Smrg	fi
3699966bf024Smrg      esac
3700966bf024Smrg      shared_flag='-shared'
3701966bf024Smrg    else
3702966bf024Smrg      # not using gcc
3703966bf024Smrg      if test "$host_cpu" = ia64; then
3704966bf024Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3705966bf024Smrg	# chokes on -Wl,-G. The following line is correct:
3706966bf024Smrg	shared_flag='-G'
3707966bf024Smrg      else
3708966bf024Smrg	if test "$aix_use_runtimelinking" = yes; then
3709966bf024Smrg	  shared_flag='${wl}-G'
3710966bf024Smrg	else
3711966bf024Smrg	  shared_flag='${wl}-bM:SRE'
3712966bf024Smrg	fi
3713966bf024Smrg      fi
3714966bf024Smrg    fi
3715966bf024Smrg
3716966bf024Smrg    # It seems that -bexpall does not export symbols beginning with
3717966bf024Smrg    # underscore (_), so it is better to generate a list of symbols to export.
3718966bf024Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3719966bf024Smrg    if test "$aix_use_runtimelinking" = yes; then
3720966bf024Smrg      # Warning - without using the other runtime loading flags (-brtl),
3721966bf024Smrg      # -berok will link without error, but may produce a broken library.
3722966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3723966bf024Smrg      # Determine the default libpath from the value encoded in an empty executable.
3724966bf024Smrg      _LT_AC_SYS_LIBPATH_AIX
3725966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3726966bf024Smrg
3727966bf024Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3728966bf024Smrg     else
3729966bf024Smrg      if test "$host_cpu" = ia64; then
3730966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3731966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3732966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3733966bf024Smrg      else
3734966bf024Smrg	# Determine the default libpath from the value encoded in an empty executable.
3735966bf024Smrg	_LT_AC_SYS_LIBPATH_AIX
3736966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3737966bf024Smrg	# Warning - without using the other run time loading flags,
3738966bf024Smrg	# -berok will link without error, but may produce a broken library.
3739966bf024Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3740966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3741966bf024Smrg	# -bexpall does not export symbols beginning with underscore (_)
3742966bf024Smrg	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3743966bf024Smrg	# Exported symbols can be pulled into shared objects from archives
3744966bf024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3745966bf024Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3746966bf024Smrg	# This is similar to how AIX traditionally builds it's shared libraries.
3747966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3748966bf024Smrg      fi
3749966bf024Smrg    fi
3750966bf024Smrg    ;;
3751966bf024Smrg  chorus*)
3752966bf024Smrg    case $cc_basename in
3753966bf024Smrg      *)
3754966bf024Smrg	# FIXME: insert proper C++ library support
3755966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3756966bf024Smrg	;;
3757966bf024Smrg    esac
3758966bf024Smrg    ;;
3759966bf024Smrg
3760966bf024Smrg  cygwin* | mingw* | pw32*)
3761966bf024Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3762966bf024Smrg    # as there is no search path for DLLs.
3763966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3764966bf024Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3765966bf024Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3766966bf024Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3767966bf024Smrg
3768966bf024Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3769966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3770966bf024Smrg      # If the export-symbols file already is a .def file (1st line
3771966bf024Smrg      # is EXPORTS), use it as is; otherwise, prepend...
3772966bf024Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3773966bf024Smrg	cp $export_symbols $output_objdir/$soname.def;
3774966bf024Smrg      else
3775966bf024Smrg	echo EXPORTS > $output_objdir/$soname.def;
3776966bf024Smrg	cat $export_symbols >> $output_objdir/$soname.def;
3777966bf024Smrg      fi~
3778966bf024Smrg      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3779966bf024Smrg    else
3780966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3781966bf024Smrg    fi
3782966bf024Smrg  ;;
3783966bf024Smrg
3784966bf024Smrg  darwin* | rhapsody*)
3785966bf024Smrg  if test "$GXX" = yes; then
3786966bf024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3787966bf024Smrg    case "$host_os" in
3788966bf024Smrg    rhapsody* | darwin1.[[012]])
3789966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3790966bf024Smrg      ;;
3791966bf024Smrg    *) # Darwin 1.3 on
3792966bf024Smrg      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3793966bf024Smrg      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3794966bf024Smrg      else
3795966bf024Smrg        case ${MACOSX_DEPLOYMENT_TARGET} in
3796966bf024Smrg          10.[[012]])
3797966bf024Smrg            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3798966bf024Smrg            ;;
3799966bf024Smrg          10.*)
3800966bf024Smrg            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3801966bf024Smrg            ;;
3802966bf024Smrg        esac
3803966bf024Smrg      fi
3804966bf024Smrg      ;;
3805966bf024Smrg    esac
3806966bf024Smrg    lt_int_apple_cc_single_mod=no
3807966bf024Smrg    output_verbose_link_cmd='echo'
3808966bf024Smrg    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3809966bf024Smrg      lt_int_apple_cc_single_mod=yes
3810966bf024Smrg    fi
3811966bf024Smrg    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3812966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3813966bf024Smrg    else
3814966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
3815966bf024Smrg    fi
3816966bf024Smrg    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3817966bf024Smrg
3818966bf024Smrg    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3819966bf024Smrg    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3820966bf024Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3821966bf024Smrg    else
3822966bf024Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3823966bf024Smrg    fi
3824966bf024Smrg    _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}'
3825966bf024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3826966bf024Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3827966bf024Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3828966bf024Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3829966bf024Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3830966bf024Smrg  else
3831966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3832966bf024Smrg  fi
3833966bf024Smrg    ;;
3834966bf024Smrg
3835966bf024Smrg  dgux*)
3836966bf024Smrg    case $cc_basename in
3837966bf024Smrg      ec++)
3838966bf024Smrg	# FIXME: insert proper C++ library support
3839966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3840966bf024Smrg	;;
3841966bf024Smrg      ghcx)
3842966bf024Smrg	# Green Hills C++ Compiler
3843966bf024Smrg	# FIXME: insert proper C++ library support
3844966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3845966bf024Smrg	;;
3846966bf024Smrg      *)
3847966bf024Smrg	# FIXME: insert proper C++ library support
3848966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3849966bf024Smrg	;;
3850966bf024Smrg    esac
3851966bf024Smrg    ;;
3852966bf024Smrg  freebsd[12]*)
3853966bf024Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
3854966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3855966bf024Smrg    ;;
3856966bf024Smrg  freebsd-elf*)
3857966bf024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3858966bf024Smrg    ;;
3859966bf024Smrg  freebsd* | kfreebsd*-gnu)
3860966bf024Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3861966bf024Smrg    # conventions
3862966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3863966bf024Smrg    ;;
3864966bf024Smrg  gnu*)
3865966bf024Smrg    ;;
3866966bf024Smrg  hpux9*)
3867966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3868966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3869966bf024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3870966bf024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3871966bf024Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3872966bf024Smrg				# but as the default
3873966bf024Smrg				# location of the library.
3874966bf024Smrg
3875966bf024Smrg    case $cc_basename in
3876966bf024Smrg    CC)
3877966bf024Smrg      # FIXME: insert proper C++ library support
3878966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3879966bf024Smrg      ;;
3880966bf024Smrg    aCC)
3881966bf024Smrg      _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'
3882966bf024Smrg      # Commands to make compiler produce verbose output that lists
3883966bf024Smrg      # what "hidden" libraries, object files and flags are used when
3884966bf024Smrg      # linking a shared library.
3885966bf024Smrg      #
3886966bf024Smrg      # There doesn't appear to be a way to prevent this compiler from
3887966bf024Smrg      # explicitly linking system object files so we need to strip them
3888966bf024Smrg      # from the output so that they don't get included in the library
3889966bf024Smrg      # dependencies.
3890966bf024Smrg      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'
3891966bf024Smrg      ;;
3892966bf024Smrg    *)
3893966bf024Smrg      if test "$GXX" = yes; then
3894966bf024Smrg        _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'
3895966bf024Smrg      else
3896966bf024Smrg        # FIXME: insert proper C++ library support
3897966bf024Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3898966bf024Smrg      fi
3899966bf024Smrg      ;;
3900966bf024Smrg    esac
3901966bf024Smrg    ;;
3902966bf024Smrg  hpux10*|hpux11*)
3903966bf024Smrg    if test $with_gnu_ld = no; then
3904966bf024Smrg      case "$host_cpu" in
3905966bf024Smrg      hppa*64*)
3906966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3907966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3908966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3909966bf024Smrg        ;;
3910966bf024Smrg      ia64*)
3911966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3912966bf024Smrg        ;;
3913966bf024Smrg      *)
3914966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3915966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3916966bf024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3917966bf024Smrg        ;;
3918966bf024Smrg      esac
3919966bf024Smrg    fi
3920966bf024Smrg    case "$host_cpu" in
3921966bf024Smrg    hppa*64*)
3922966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3923966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3924966bf024Smrg      ;;
3925966bf024Smrg    ia64*)
3926966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3927966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3928966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3929966bf024Smrg					      # but as the default
3930966bf024Smrg					      # location of the library.
3931966bf024Smrg      ;;
3932966bf024Smrg    *)
3933966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3934966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3935966bf024Smrg					      # but as the default
3936966bf024Smrg					      # location of the library.
3937966bf024Smrg      ;;
3938966bf024Smrg    esac
3939966bf024Smrg
3940966bf024Smrg    case $cc_basename in
3941966bf024Smrg      CC)
3942966bf024Smrg	# FIXME: insert proper C++ library support
3943966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3944966bf024Smrg	;;
3945966bf024Smrg      aCC)
3946966bf024Smrg	case "$host_cpu" in
3947966bf024Smrg	hppa*64*|ia64*)
3948966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3949966bf024Smrg	  ;;
3950966bf024Smrg	*)
3951966bf024Smrg	  _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'
3952966bf024Smrg	  ;;
3953966bf024Smrg	esac
3954966bf024Smrg	# Commands to make compiler produce verbose output that lists
3955966bf024Smrg	# what "hidden" libraries, object files and flags are used when
3956966bf024Smrg	# linking a shared library.
3957966bf024Smrg	#
3958966bf024Smrg	# There doesn't appear to be a way to prevent this compiler from
3959966bf024Smrg	# explicitly linking system object files so we need to strip them
3960966bf024Smrg	# from the output so that they don't get included in the library
3961966bf024Smrg	# dependencies.
3962966bf024Smrg	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'
3963966bf024Smrg	;;
3964966bf024Smrg      *)
3965966bf024Smrg	if test "$GXX" = yes; then
3966966bf024Smrg	  if test $with_gnu_ld = no; then
3967966bf024Smrg	    case "$host_cpu" in
3968966bf024Smrg	    ia64*|hppa*64*)
3969966bf024Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3970966bf024Smrg	      ;;
3971966bf024Smrg	    *)
3972966bf024Smrg	      _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'
3973966bf024Smrg	      ;;
3974966bf024Smrg	    esac
3975966bf024Smrg	  fi
3976966bf024Smrg	else
3977966bf024Smrg	  # FIXME: insert proper C++ library support
3978966bf024Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3979966bf024Smrg	fi
3980966bf024Smrg	;;
3981966bf024Smrg    esac
3982966bf024Smrg    ;;
3983966bf024Smrg  irix5* | irix6*)
3984966bf024Smrg    case $cc_basename in
3985966bf024Smrg      CC)
3986966bf024Smrg	# SGI C++
3987966bf024Smrg	_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 ${objdir}/so_locations -o $lib'
3988966bf024Smrg
3989966bf024Smrg	# Archives containing C++ object files must be created using
3990966bf024Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3991966bf024Smrg	# necessary to make sure instantiated templates are included
3992966bf024Smrg	# in the archive.
3993966bf024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3994966bf024Smrg	;;
3995966bf024Smrg      *)
3996966bf024Smrg	if test "$GXX" = yes; then
3997966bf024Smrg	  if test "$with_gnu_ld" = no; then
3998966bf024Smrg	    _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}${objdir}/so_locations -o $lib'
3999966bf024Smrg	  else
4000966bf024Smrg	    _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'
4001966bf024Smrg	  fi
4002966bf024Smrg	fi
4003966bf024Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4004966bf024Smrg	;;
4005966bf024Smrg    esac
4006966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4007966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4008966bf024Smrg    ;;
4009966bf024Smrg  linux*)
4010966bf024Smrg    case $cc_basename in
4011966bf024Smrg      KCC)
4012966bf024Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4013966bf024Smrg
4014966bf024Smrg	# KCC will only create a shared library if the output file
4015966bf024Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4016966bf024Smrg	# to its proper name (with version) after linking.
4017966bf024Smrg	_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'
4018966bf024Smrg	_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'
4019966bf024Smrg	# Commands to make compiler produce verbose output that lists
4020966bf024Smrg	# what "hidden" libraries, object files and flags are used when
4021966bf024Smrg	# linking a shared library.
4022966bf024Smrg	#
4023966bf024Smrg	# There doesn't appear to be a way to prevent this compiler from
4024966bf024Smrg	# explicitly linking system object files so we need to strip them
4025966bf024Smrg	# from the output so that they don't get included in the library
4026966bf024Smrg	# dependencies.
4027966bf024Smrg	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'
4028966bf024Smrg
4029966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4030966bf024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4031966bf024Smrg
4032966bf024Smrg	# Archives containing C++ object files must be created using
4033966bf024Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4034966bf024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4035966bf024Smrg	;;
4036966bf024Smrg      icpc)
4037966bf024Smrg	# Intel C++
4038966bf024Smrg	with_gnu_ld=yes
4039966bf024Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4040966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4041966bf024Smrg	_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'
4042966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4043966bf024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4044966bf024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4045966bf024Smrg	;;
4046966bf024Smrg      cxx)
4047966bf024Smrg	# Compaq C++
4048966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4049966bf024Smrg	_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'
4050966bf024Smrg
4051966bf024Smrg	runpath_var=LD_RUN_PATH
4052966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4053966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4054966bf024Smrg
4055966bf024Smrg	# Commands to make compiler produce verbose output that lists
4056966bf024Smrg	# what "hidden" libraries, object files and flags are used when
4057966bf024Smrg	# linking a shared library.
4058966bf024Smrg	#
4059966bf024Smrg	# There doesn't appear to be a way to prevent this compiler from
4060966bf024Smrg	# explicitly linking system object files so we need to strip them
4061966bf024Smrg	# from the output so that they don't get included in the library
4062966bf024Smrg	# dependencies.
4063966bf024Smrg	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'
4064966bf024Smrg	;;
4065966bf024Smrg    esac
4066966bf024Smrg    ;;
4067966bf024Smrg  lynxos*)
4068966bf024Smrg    # FIXME: insert proper C++ library support
4069966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4070966bf024Smrg    ;;
4071966bf024Smrg  m88k*)
4072966bf024Smrg    # FIXME: insert proper C++ library support
4073966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4074966bf024Smrg    ;;
4075966bf024Smrg  mvs*)
4076966bf024Smrg    case $cc_basename in
4077966bf024Smrg      cxx)
4078966bf024Smrg	# FIXME: insert proper C++ library support
4079966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4080966bf024Smrg	;;
4081966bf024Smrg      *)
4082966bf024Smrg	# FIXME: insert proper C++ library support
4083966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4084966bf024Smrg	;;
4085966bf024Smrg    esac
4086966bf024Smrg    ;;
4087966bf024Smrg  netbsd*)
4088966bf024Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4089966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4090966bf024Smrg      wlarc=
4091966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4092966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4093966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4094966bf024Smrg    fi
4095966bf024Smrg    # Workaround some broken pre-1.5 toolchains
4096966bf024Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4097966bf024Smrg    ;;
4098966bf024Smrg  osf3*)
4099966bf024Smrg    case $cc_basename in
4100966bf024Smrg      KCC)
4101966bf024Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4102966bf024Smrg
4103966bf024Smrg	# KCC will only create a shared library if the output file
4104966bf024Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4105966bf024Smrg	# to its proper name (with version) after linking.
4106966bf024Smrg	_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'
4107966bf024Smrg
4108966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4109966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4110966bf024Smrg
4111966bf024Smrg	# Archives containing C++ object files must be created using
4112966bf024Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4113966bf024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4114966bf024Smrg
4115966bf024Smrg	;;
4116966bf024Smrg      RCC)
4117966bf024Smrg	# Rational C++ 2.4.1
4118966bf024Smrg	# FIXME: insert proper C++ library support
4119966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4120966bf024Smrg	;;
4121966bf024Smrg      cxx)
4122966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4123966bf024Smrg	_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 ${objdir}/so_locations -o $lib'
4124966bf024Smrg
4125966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4126966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4127966bf024Smrg
4128966bf024Smrg	# Commands to make compiler produce verbose output that lists
4129966bf024Smrg	# what "hidden" libraries, object files and flags are used when
4130966bf024Smrg	# linking a shared library.
4131966bf024Smrg	#
4132966bf024Smrg	# There doesn't appear to be a way to prevent this compiler from
4133966bf024Smrg	# explicitly linking system object files so we need to strip them
4134966bf024Smrg	# from the output so that they don't get included in the library
4135966bf024Smrg	# dependencies.
4136966bf024Smrg	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'
4137966bf024Smrg	;;
4138966bf024Smrg      *)
4139966bf024Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4140966bf024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4141966bf024Smrg	  _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}${objdir}/so_locations -o $lib'
4142966bf024Smrg
4143966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4144966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4145966bf024Smrg
4146966bf024Smrg	  # Commands to make compiler produce verbose output that lists
4147966bf024Smrg	  # what "hidden" libraries, object files and flags are used when
4148966bf024Smrg	  # linking a shared library.
4149966bf024Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4150966bf024Smrg
4151966bf024Smrg	else
4152966bf024Smrg	  # FIXME: insert proper C++ library support
4153966bf024Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4154966bf024Smrg	fi
4155966bf024Smrg	;;
4156966bf024Smrg    esac
4157966bf024Smrg    ;;
4158966bf024Smrg  osf4* | osf5*)
4159966bf024Smrg    case $cc_basename in
4160966bf024Smrg      KCC)
4161966bf024Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4162966bf024Smrg
4163966bf024Smrg	# KCC will only create a shared library if the output file
4164966bf024Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4165966bf024Smrg	# to its proper name (with version) after linking.
4166966bf024Smrg	_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'
4167966bf024Smrg
4168966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4169966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4170966bf024Smrg
4171966bf024Smrg	# Archives containing C++ object files must be created using
4172966bf024Smrg	# the KAI C++ compiler.
4173966bf024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4174966bf024Smrg	;;
4175966bf024Smrg      RCC)
4176966bf024Smrg	# Rational C++ 2.4.1
4177966bf024Smrg	# FIXME: insert proper C++ library support
4178966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4179966bf024Smrg	;;
4180966bf024Smrg      cxx)
4181966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4182966bf024Smrg	_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 ${objdir}/so_locations -o $lib'
4183966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4184966bf024Smrg	  echo "-hidden">> $lib.exp~
4185966bf024Smrg	  $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 $objdir/so_locations -o $lib~
4186966bf024Smrg	  $rm $lib.exp'
4187966bf024Smrg
4188966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4189966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4190966bf024Smrg
4191966bf024Smrg	# Commands to make compiler produce verbose output that lists
4192966bf024Smrg	# what "hidden" libraries, object files and flags are used when
4193966bf024Smrg	# linking a shared library.
4194966bf024Smrg	#
4195966bf024Smrg	# There doesn't appear to be a way to prevent this compiler from
4196966bf024Smrg	# explicitly linking system object files so we need to strip them
4197966bf024Smrg	# from the output so that they don't get included in the library
4198966bf024Smrg	# dependencies.
4199966bf024Smrg	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'
4200966bf024Smrg	;;
4201966bf024Smrg      *)
4202966bf024Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4203966bf024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4204966bf024Smrg	 _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}${objdir}/so_locations -o $lib'
4205966bf024Smrg
4206966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4207966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4208966bf024Smrg
4209966bf024Smrg	  # Commands to make compiler produce verbose output that lists
4210966bf024Smrg	  # what "hidden" libraries, object files and flags are used when
4211966bf024Smrg	  # linking a shared library.
4212966bf024Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4213966bf024Smrg
4214966bf024Smrg	else
4215966bf024Smrg	  # FIXME: insert proper C++ library support
4216966bf024Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4217966bf024Smrg	fi
4218966bf024Smrg	;;
4219966bf024Smrg    esac
4220966bf024Smrg    ;;
4221966bf024Smrg  psos*)
4222966bf024Smrg    # FIXME: insert proper C++ library support
4223966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4224966bf024Smrg    ;;
4225966bf024Smrg  sco*)
4226966bf024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4227966bf024Smrg    case $cc_basename in
4228966bf024Smrg      CC)
4229966bf024Smrg	# FIXME: insert proper C++ library support
4230966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4231966bf024Smrg	;;
4232966bf024Smrg      *)
4233966bf024Smrg	# FIXME: insert proper C++ library support
4234966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4235966bf024Smrg	;;
4236966bf024Smrg    esac
4237966bf024Smrg    ;;
4238966bf024Smrg  sunos4*)
4239966bf024Smrg    case $cc_basename in
4240966bf024Smrg      CC)
4241966bf024Smrg	# Sun C++ 4.x
4242966bf024Smrg	# FIXME: insert proper C++ library support
4243966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4244966bf024Smrg	;;
4245966bf024Smrg      lcc)
4246966bf024Smrg	# Lucid
4247966bf024Smrg	# FIXME: insert proper C++ library support
4248966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4249966bf024Smrg	;;
4250966bf024Smrg      *)
4251966bf024Smrg	# FIXME: insert proper C++ library support
4252966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4253966bf024Smrg	;;
4254966bf024Smrg    esac
4255966bf024Smrg    ;;
4256966bf024Smrg  solaris*)
4257966bf024Smrg    case $cc_basename in
4258966bf024Smrg      CC)
4259966bf024Smrg	# Sun C++ 4.2, 5.x and Centerline C++
4260966bf024Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4261966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4262966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4263966bf024Smrg	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4264966bf024Smrg
4265966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4266966bf024Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4267966bf024Smrg	case $host_os in
4268966bf024Smrg	  solaris2.[0-5] | solaris2.[0-5].*) ;;
4269966bf024Smrg	  *)
4270966bf024Smrg	    # The C++ compiler is used as linker so we must use $wl
4271966bf024Smrg	    # flag to pass the commands to the underlying system
4272966bf024Smrg	    # linker.
4273966bf024Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
4274966bf024Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4275966bf024Smrg	    ;;
4276966bf024Smrg	esac
4277966bf024Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4278966bf024Smrg
4279966bf024Smrg	# Commands to make compiler produce verbose output that lists
4280966bf024Smrg	# what "hidden" libraries, object files and flags are used when
4281966bf024Smrg	# linking a shared library.
4282966bf024Smrg	#
4283966bf024Smrg	# There doesn't appear to be a way to prevent this compiler from
4284966bf024Smrg	# explicitly linking system object files so we need to strip them
4285966bf024Smrg	# from the output so that they don't get included in the library
4286966bf024Smrg	# dependencies.
4287966bf024Smrg	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4288966bf024Smrg
4289966bf024Smrg	# Archives containing C++ object files must be created using
4290966bf024Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4291966bf024Smrg	# necessary to make sure instantiated templates are included
4292966bf024Smrg	# in the archive.
4293966bf024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4294966bf024Smrg	;;
4295966bf024Smrg      gcx)
4296966bf024Smrg	# Green Hills C++ Compiler
4297966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4298966bf024Smrg
4299966bf024Smrg	# The C++ compiler must be used to create the archive.
4300966bf024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4301966bf024Smrg	;;
4302966bf024Smrg      *)
4303966bf024Smrg	# GNU C++ compiler with Solaris linker
4304966bf024Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4305966bf024Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4306966bf024Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4307966bf024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4308966bf024Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4309966bf024Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4310966bf024Smrg
4311966bf024Smrg	    # Commands to make compiler produce verbose output that lists
4312966bf024Smrg	    # what "hidden" libraries, object files and flags are used when
4313966bf024Smrg	    # linking a shared library.
4314966bf024Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4315966bf024Smrg	  else
4316966bf024Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4317966bf024Smrg	    # platform.
4318966bf024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4319966bf024Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4320966bf024Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4321966bf024Smrg
4322966bf024Smrg	    # Commands to make compiler produce verbose output that lists
4323966bf024Smrg	    # what "hidden" libraries, object files and flags are used when
4324966bf024Smrg	    # linking a shared library.
4325966bf024Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4326966bf024Smrg	  fi
4327966bf024Smrg
4328966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4329966bf024Smrg	fi
4330966bf024Smrg	;;
4331966bf024Smrg    esac
4332966bf024Smrg    ;;
4333966bf024Smrg  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4334966bf024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4335966bf024Smrg    ;;
4336966bf024Smrg  tandem*)
4337966bf024Smrg    case $cc_basename in
4338966bf024Smrg      NCC)
4339966bf024Smrg	# NonStop-UX NCC 3.20
4340966bf024Smrg	# FIXME: insert proper C++ library support
4341966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4342966bf024Smrg	;;
4343966bf024Smrg      *)
4344966bf024Smrg	# FIXME: insert proper C++ library support
4345966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4346966bf024Smrg	;;
4347966bf024Smrg    esac
4348966bf024Smrg    ;;
4349966bf024Smrg  vxworks*)
4350966bf024Smrg    # FIXME: insert proper C++ library support
4351966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4352966bf024Smrg    ;;
4353966bf024Smrg  *)
4354966bf024Smrg    # FIXME: insert proper C++ library support
4355966bf024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4356966bf024Smrg    ;;
4357966bf024Smrgesac
4358966bf024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4359966bf024Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4360966bf024Smrg
4361966bf024Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
4362966bf024Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
4363966bf024Smrg
4364966bf024SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
4365966bf024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4366966bf024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
4367966bf024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4368966bf024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4369966bf024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4370966bf024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4371966bf024SmrgAC_LIBTOOL_SYS_LIB_STRIP
4372966bf024SmrgAC_LIBTOOL_DLOPEN_SELF($1)
4373966bf024Smrg
4374966bf024SmrgAC_LIBTOOL_CONFIG($1)
4375966bf024Smrg
4376966bf024SmrgAC_LANG_POP
4377966bf024SmrgCC=$lt_save_CC
4378966bf024SmrgLDCXX=$LD
4379966bf024SmrgLD=$lt_save_LD
4380966bf024SmrgGCC=$lt_save_GCC
4381966bf024Smrgwith_gnu_ldcxx=$with_gnu_ld
4382966bf024Smrgwith_gnu_ld=$lt_save_with_gnu_ld
4383966bf024Smrglt_cv_path_LDCXX=$lt_cv_path_LD
4384966bf024Smrglt_cv_path_LD=$lt_save_path_LD
4385966bf024Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4386966bf024Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4387966bf024Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
4388966bf024Smrg
4389966bf024Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4390966bf024Smrg# ------------------------
4391966bf024Smrg# Figure out "hidden" library dependencies from verbose
4392966bf024Smrg# compiler output when linking a shared library.
4393966bf024Smrg# Parse the compiler output and extract the necessary
4394966bf024Smrg# objects, libraries and library flags.
4395966bf024SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4396966bf024Smrgdnl we can't use the lt_simple_compile_test_code here,
4397966bf024Smrgdnl because it contains code intended for an executable,
4398966bf024Smrgdnl not a library.  It's possible we should let each
4399966bf024Smrgdnl tag define a new lt_????_link_test_code variable,
4400966bf024Smrgdnl but it's only used here...
4401966bf024Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4402966bf024Smrgint a;
4403966bf024Smrgvoid foo (void) { a = 0; }
4404966bf024SmrgEOF
4405966bf024Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4406966bf024Smrgclass Foo
4407966bf024Smrg{
4408966bf024Smrgpublic:
4409966bf024Smrg  Foo (void) { a = 0; }
4410966bf024Smrgprivate:
4411966bf024Smrg  int a;
4412966bf024Smrg};
4413966bf024SmrgEOF
4414966bf024Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4415966bf024Smrg      subroutine foo
4416966bf024Smrg      implicit none
4417966bf024Smrg      integer*4 a
4418966bf024Smrg      a=0
4419966bf024Smrg      return
4420966bf024Smrg      end
4421966bf024SmrgEOF
4422966bf024Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4423966bf024Smrgpublic class foo {
4424966bf024Smrg  private int a;
4425966bf024Smrg  public void bar (void) {
4426966bf024Smrg    a = 0;
4427966bf024Smrg  }
4428966bf024Smrg};
4429966bf024SmrgEOF
4430966bf024Smrg])
4431966bf024Smrgdnl Parse the compiler output and extract the necessary
4432966bf024Smrgdnl objects, libraries and library flags.
4433966bf024Smrgif AC_TRY_EVAL(ac_compile); then
4434966bf024Smrg  # Parse the compiler output and extract the necessary
4435966bf024Smrg  # objects, libraries and library flags.
4436966bf024Smrg
4437966bf024Smrg  # Sentinel used to keep track of whether or not we are before
4438966bf024Smrg  # the conftest object file.
4439966bf024Smrg  pre_test_object_deps_done=no
4440966bf024Smrg
4441966bf024Smrg  # The `*' in the case matches for architectures that use `case' in
4442966bf024Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
4443966bf024Smrg  # eval without this substitution.
4444966bf024Smrg  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4445966bf024Smrg
4446966bf024Smrg  for p in `eval $output_verbose_link_cmd`; do
4447966bf024Smrg    case $p in
4448966bf024Smrg
4449966bf024Smrg    -L* | -R* | -l*)
4450966bf024Smrg       # Some compilers place space between "-{L,R}" and the path.
4451966bf024Smrg       # Remove the space.
4452966bf024Smrg       if test $p = "-L" \
4453966bf024Smrg	  || test $p = "-R"; then
4454966bf024Smrg	 prev=$p
4455966bf024Smrg	 continue
4456966bf024Smrg       else
4457966bf024Smrg	 prev=
4458966bf024Smrg       fi
4459966bf024Smrg
4460966bf024Smrg       if test "$pre_test_object_deps_done" = no; then
4461966bf024Smrg	 case $p in
4462966bf024Smrg	 -L* | -R*)
4463966bf024Smrg	   # Internal compiler library paths should come after those
4464966bf024Smrg	   # provided the user.  The postdeps already come after the
4465966bf024Smrg	   # user supplied libs so there is no need to process them.
4466966bf024Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4467966bf024Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4468966bf024Smrg	   else
4469966bf024Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4470966bf024Smrg	   fi
4471966bf024Smrg	   ;;
4472966bf024Smrg	 # The "-l" case would never come before the object being
4473966bf024Smrg	 # linked, so don't bother handling this case.
4474966bf024Smrg	 esac
4475966bf024Smrg       else
4476966bf024Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4477966bf024Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4478966bf024Smrg	 else
4479966bf024Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4480966bf024Smrg	 fi
4481966bf024Smrg       fi
4482966bf024Smrg       ;;
4483966bf024Smrg
4484966bf024Smrg    *.$objext)
4485966bf024Smrg       # This assumes that the test object file only shows up
4486966bf024Smrg       # once in the compiler output.
4487966bf024Smrg       if test "$p" = "conftest.$objext"; then
4488966bf024Smrg	 pre_test_object_deps_done=yes
4489966bf024Smrg	 continue
4490966bf024Smrg       fi
4491966bf024Smrg
4492966bf024Smrg       if test "$pre_test_object_deps_done" = no; then
4493966bf024Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4494966bf024Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
4495966bf024Smrg	 else
4496966bf024Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4497966bf024Smrg	 fi
4498966bf024Smrg       else
4499966bf024Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4500966bf024Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4501966bf024Smrg	 else
4502966bf024Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4503966bf024Smrg	 fi
4504966bf024Smrg       fi
4505966bf024Smrg       ;;
4506966bf024Smrg
4507966bf024Smrg    *) ;; # Ignore the rest.
4508966bf024Smrg
4509966bf024Smrg    esac
4510966bf024Smrg  done
4511966bf024Smrg
4512966bf024Smrg  # Clean up.
4513966bf024Smrg  rm -f a.out a.exe
4514966bf024Smrgelse
4515966bf024Smrg  echo "libtool.m4: error: problem compiling $1 test program"
4516966bf024Smrgfi
4517966bf024Smrg
4518966bf024Smrg$rm -f confest.$objext
4519966bf024Smrg
4520966bf024Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
4521966bf024Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4522966bf024Smrgesac
4523966bf024Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
4524966bf024Smrg
4525966bf024Smrg# AC_LIBTOOL_LANG_F77_CONFIG
4526966bf024Smrg# ------------------------
4527966bf024Smrg# Ensure that the configuration vars for the C compiler are
4528966bf024Smrg# suitably defined.  Those variables are subsequently used by
4529966bf024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4530966bf024SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4531966bf024SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4532966bf024Smrg[AC_REQUIRE([AC_PROG_F77])
4533966bf024SmrgAC_LANG_PUSH(Fortran 77)
4534966bf024Smrg
4535966bf024Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4536966bf024Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4537966bf024Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4538966bf024Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4539966bf024Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4540966bf024Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4541966bf024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4542966bf024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4543966bf024Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4544966bf024Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4545966bf024Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4546966bf024Smrg_LT_AC_TAGVAR(module_cmds, $1)=
4547966bf024Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4548966bf024Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4549966bf024Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4550966bf024Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4551966bf024Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4552966bf024Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4553966bf024Smrg
4554966bf024Smrg# Source file extension for f77 test sources.
4555966bf024Smrgac_ext=f
4556966bf024Smrg
4557966bf024Smrg# Object file extension for compiled f77 test sources.
4558966bf024Smrgobjext=o
4559966bf024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
4560966bf024Smrg
4561966bf024Smrg# Code to be used in simple compile tests
4562966bf024Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4563966bf024Smrg
4564966bf024Smrg# Code to be used in simple link tests
4565966bf024Smrglt_simple_link_test_code="      program t\n      end\n"
4566966bf024Smrg
4567966bf024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4568966bf024Smrg_LT_AC_SYS_COMPILER
4569966bf024Smrg
4570966bf024Smrg# Allow CC to be a program name with arguments.
4571966bf024Smrglt_save_CC="$CC"
4572966bf024SmrgCC=${F77-"f77"}
4573966bf024Smrgcompiler=$CC
4574966bf024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
4575966bf024Smrgcc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4576966bf024Smrg
4577966bf024SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
4578966bf024SmrgAC_MSG_RESULT([$can_build_shared])
4579966bf024Smrg
4580966bf024SmrgAC_MSG_CHECKING([whether to build shared libraries])
4581966bf024Smrgtest "$can_build_shared" = "no" && enable_shared=no
4582966bf024Smrg
4583966bf024Smrg# On AIX, shared libraries and static libraries use the same namespace, and
4584966bf024Smrg# are all built from PIC.
4585966bf024Smrgcase "$host_os" in
4586966bf024Smrgaix3*)
4587966bf024Smrg  test "$enable_shared" = yes && enable_static=no
4588966bf024Smrg  if test -n "$RANLIB"; then
4589966bf024Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4590966bf024Smrg    postinstall_cmds='$RANLIB $lib'
4591966bf024Smrg  fi
4592966bf024Smrg  ;;
4593966bf024Smrgaix4* | aix5*)
4594966bf024Smrg  test "$enable_shared" = yes && enable_static=no
4595966bf024Smrg  ;;
4596966bf024Smrgesac
4597966bf024SmrgAC_MSG_RESULT([$enable_shared])
4598966bf024Smrg
4599966bf024SmrgAC_MSG_CHECKING([whether to build static libraries])
4600966bf024Smrg# Make sure either enable_shared or enable_static is yes.
4601966bf024Smrgtest "$enable_shared" = yes || enable_static=yes
4602966bf024SmrgAC_MSG_RESULT([$enable_static])
4603966bf024Smrg
4604966bf024Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4605966bf024Smrg
4606966bf024Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
4607966bf024Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
4608966bf024Smrg
4609966bf024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4610966bf024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
4611966bf024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4612966bf024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4613966bf024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4614966bf024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4615966bf024SmrgAC_LIBTOOL_SYS_LIB_STRIP
4616966bf024Smrg
4617966bf024Smrg
4618966bf024SmrgAC_LIBTOOL_CONFIG($1)
4619966bf024Smrg
4620966bf024SmrgAC_LANG_POP
4621966bf024SmrgCC="$lt_save_CC"
4622966bf024Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
4623966bf024Smrg
4624966bf024Smrg
4625966bf024Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
4626966bf024Smrg# --------------------------
4627966bf024Smrg# Ensure that the configuration vars for the C compiler are
4628966bf024Smrg# suitably defined.  Those variables are subsequently used by
4629966bf024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4630966bf024SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4631966bf024SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4632966bf024Smrg[AC_LANG_SAVE
4633966bf024Smrg
4634966bf024Smrg# Source file extension for Java test sources.
4635966bf024Smrgac_ext=java
4636966bf024Smrg
4637966bf024Smrg# Object file extension for compiled Java test sources.
4638966bf024Smrgobjext=o
4639966bf024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
4640966bf024Smrg
4641966bf024Smrg# Code to be used in simple compile tests
4642966bf024Smrglt_simple_compile_test_code="class foo {}\n"
4643966bf024Smrg
4644966bf024Smrg# Code to be used in simple link tests
4645966bf024Smrglt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4646966bf024Smrg
4647966bf024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4648966bf024Smrg_LT_AC_SYS_COMPILER
4649966bf024Smrg
4650966bf024Smrg# Allow CC to be a program name with arguments.
4651966bf024Smrglt_save_CC="$CC"
4652966bf024SmrgCC=${GCJ-"gcj"}
4653966bf024Smrgcompiler=$CC
4654966bf024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
4655966bf024Smrg
4656966bf024Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
4657966bf024Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4658966bf024Smrg
4659966bf024SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4660966bf024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4661966bf024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
4662966bf024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4663966bf024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4664966bf024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4665966bf024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4666966bf024SmrgAC_LIBTOOL_SYS_LIB_STRIP
4667966bf024SmrgAC_LIBTOOL_DLOPEN_SELF($1)
4668966bf024Smrg
4669966bf024SmrgAC_LIBTOOL_CONFIG($1)
4670966bf024Smrg
4671966bf024SmrgAC_LANG_RESTORE
4672966bf024SmrgCC="$lt_save_CC"
4673966bf024Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
4674966bf024Smrg
4675966bf024Smrg
4676966bf024Smrg# AC_LIBTOOL_LANG_RC_CONFIG
4677966bf024Smrg# --------------------------
4678966bf024Smrg# Ensure that the configuration vars for the Windows resource compiler are
4679966bf024Smrg# suitably defined.  Those variables are subsequently used by
4680966bf024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4681966bf024SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4682966bf024SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4683966bf024Smrg[AC_LANG_SAVE
4684966bf024Smrg
4685966bf024Smrg# Source file extension for RC test sources.
4686966bf024Smrgac_ext=rc
4687966bf024Smrg
4688966bf024Smrg# Object file extension for compiled RC test sources.
4689966bf024Smrgobjext=o
4690966bf024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
4691966bf024Smrg
4692966bf024Smrg# Code to be used in simple compile tests
4693966bf024Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4694966bf024Smrg
4695966bf024Smrg# Code to be used in simple link tests
4696966bf024Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
4697966bf024Smrg
4698966bf024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4699966bf024Smrg_LT_AC_SYS_COMPILER
4700966bf024Smrg
4701966bf024Smrg# Allow CC to be a program name with arguments.
4702966bf024Smrglt_save_CC="$CC"
4703966bf024SmrgCC=${RC-"windres"}
4704966bf024Smrgcompiler=$CC
4705966bf024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
4706966bf024Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4707966bf024Smrg
4708966bf024SmrgAC_LIBTOOL_CONFIG($1)
4709966bf024Smrg
4710966bf024SmrgAC_LANG_RESTORE
4711966bf024SmrgCC="$lt_save_CC"
4712966bf024Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
4713966bf024Smrg
4714966bf024Smrg
4715966bf024Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
4716966bf024Smrg# ----------------------------
4717966bf024Smrg# If TAGNAME is not passed, then create an initial libtool script
4718966bf024Smrg# with a default configuration from the untagged config vars.  Otherwise
4719966bf024Smrg# add code to config.status for appending the configuration named by
4720966bf024Smrg# TAGNAME from the matching tagged config vars.
4721966bf024SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
4722966bf024Smrg[# The else clause should only fire when bootstrapping the
4723966bf024Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
4724966bf024Smrg# with your package, and you will get complaints that there are
4725966bf024Smrg# no rules to generate ltmain.sh.
4726966bf024Smrgif test -f "$ltmain"; then
4727966bf024Smrg  # See if we are running on zsh, and set the options which allow our commands through
4728966bf024Smrg  # without removal of \ escapes.
4729966bf024Smrg  if test -n "${ZSH_VERSION+set}" ; then
4730966bf024Smrg    setopt NO_GLOB_SUBST
4731966bf024Smrg  fi
4732966bf024Smrg  # Now quote all the things that may contain metacharacters while being
4733966bf024Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4734966bf024Smrg  # variables and quote the copies for generation of the libtool script.
4735966bf024Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4736966bf024Smrg    SED SHELL STRIP \
4737966bf024Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4738966bf024Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4739966bf024Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
4740966bf024Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4741966bf024Smrg    lt_cv_sys_global_symbol_to_c_name_address \
4742966bf024Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4743966bf024Smrg    old_postinstall_cmds old_postuninstall_cmds \
4744966bf024Smrg    _LT_AC_TAGVAR(compiler, $1) \
4745966bf024Smrg    _LT_AC_TAGVAR(CC, $1) \
4746966bf024Smrg    _LT_AC_TAGVAR(LD, $1) \
4747966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4748966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4749966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4750966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4751966bf024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4752966bf024Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4753966bf024Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4754966bf024Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4755966bf024Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4756966bf024Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4757966bf024Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
4758966bf024Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
4759966bf024Smrg    _LT_AC_TAGVAR(predeps, $1) \
4760966bf024Smrg    _LT_AC_TAGVAR(postdeps, $1) \
4761966bf024Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4762966bf024Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
4763966bf024Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4764966bf024Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4765966bf024Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4766966bf024Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4767966bf024Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4768966bf024Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4769966bf024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4770966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4771966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4772966bf024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4773966bf024Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4774966bf024Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
4775966bf024Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4776966bf024Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4777966bf024Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4778966bf024Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
4779966bf024Smrg
4780966bf024Smrg    case $var in
4781966bf024Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4782966bf024Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4783966bf024Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
4784966bf024Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4785966bf024Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
4786966bf024Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4787966bf024Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4788966bf024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4789966bf024Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4790966bf024Smrg    postinstall_cmds | postuninstall_cmds | \
4791966bf024Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
4792966bf024Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4793966bf024Smrg      # Double-quote double-evaled strings.
4794966bf024Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4795966bf024Smrg      ;;
4796966bf024Smrg    *)
4797966bf024Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4798966bf024Smrg      ;;
4799966bf024Smrg    esac
4800966bf024Smrg  done
4801966bf024Smrg
4802966bf024Smrg  case $lt_echo in
4803966bf024Smrg  *'\[$]0 --fallback-echo"')
4804966bf024Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4805966bf024Smrg    ;;
4806966bf024Smrg  esac
4807966bf024Smrg
4808966bf024Smrgifelse([$1], [],
4809966bf024Smrg  [cfgfile="${ofile}T"
4810966bf024Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4811966bf024Smrg  $rm -f "$cfgfile"
4812966bf024Smrg  AC_MSG_NOTICE([creating $ofile])],
4813966bf024Smrg  [cfgfile="$ofile"])
4814966bf024Smrg
4815966bf024Smrg  cat <<__EOF__ >> "$cfgfile"
4816966bf024Smrgifelse([$1], [],
4817966bf024Smrg[#! $SHELL
4818966bf024Smrg
4819966bf024Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4820966bf024Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4821966bf024Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4822966bf024Smrg#
4823966bf024Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4824966bf024Smrg# Free Software Foundation, Inc.
4825966bf024Smrg#
4826966bf024Smrg# This file is part of GNU Libtool:
4827966bf024Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4828966bf024Smrg#
4829966bf024Smrg# This program is free software; you can redistribute it and/or modify
4830966bf024Smrg# it under the terms of the GNU General Public License as published by
4831966bf024Smrg# the Free Software Foundation; either version 2 of the License, or
4832966bf024Smrg# (at your option) any later version.
4833966bf024Smrg#
4834966bf024Smrg# This program is distributed in the hope that it will be useful, but
4835966bf024Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
4836966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4837966bf024Smrg# General Public License for more details.
4838966bf024Smrg#
4839966bf024Smrg# You should have received a copy of the GNU General Public License
4840966bf024Smrg# along with this program; if not, write to the Free Software
4841966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4842966bf024Smrg#
4843966bf024Smrg# As a special exception to the GNU General Public License, if you
4844966bf024Smrg# distribute this file as part of a program that contains a
4845966bf024Smrg# configuration script generated by Autoconf, you may include it under
4846966bf024Smrg# the same distribution terms that you use for the rest of that program.
4847966bf024Smrg
4848966bf024Smrg# A sed program that does not truncate output.
4849966bf024SmrgSED=$lt_SED
4850966bf024Smrg
4851966bf024Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4852966bf024SmrgXsed="$SED -e s/^X//"
4853966bf024Smrg
4854966bf024Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4855966bf024Smrg# if CDPATH is set.
4856966bf024Smrgif test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4857966bf024Smrg
4858966bf024Smrg# The names of the tagged configurations supported by this script.
4859966bf024Smrgavailable_tags=
4860966bf024Smrg
4861966bf024Smrg# ### BEGIN LIBTOOL CONFIG],
4862966bf024Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4863966bf024Smrg
4864966bf024Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4865966bf024Smrg
4866966bf024Smrg# Shell to use when invoking shell scripts.
4867966bf024SmrgSHELL=$lt_SHELL
4868966bf024Smrg
4869966bf024Smrg# Whether or not to build shared libraries.
4870966bf024Smrgbuild_libtool_libs=$enable_shared
4871966bf024Smrg
4872966bf024Smrg# Whether or not to build static libraries.
4873966bf024Smrgbuild_old_libs=$enable_static
4874966bf024Smrg
4875966bf024Smrg# Whether or not to add -lc for building shared libraries.
4876966bf024Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4877966bf024Smrg
4878966bf024Smrg# Whether or not to disallow shared libs when runtime libs are static
4879966bf024Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4880966bf024Smrg
4881966bf024Smrg# Whether or not to optimize for fast installation.
4882966bf024Smrgfast_install=$enable_fast_install
4883966bf024Smrg
4884966bf024Smrg# The host system.
4885966bf024Smrghost_alias=$host_alias
4886966bf024Smrghost=$host
4887966bf024Smrg
4888966bf024Smrg# An echo program that does not interpret backslashes.
4889966bf024Smrgecho=$lt_echo
4890966bf024Smrg
4891966bf024Smrg# The archiver.
4892966bf024SmrgAR=$lt_AR
4893966bf024SmrgAR_FLAGS=$lt_AR_FLAGS
4894966bf024Smrg
4895966bf024Smrg# A C compiler.
4896966bf024SmrgLTCC=$lt_LTCC
4897966bf024Smrg
4898966bf024Smrg# A language-specific compiler.
4899966bf024SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4900966bf024Smrg
4901966bf024Smrg# Is the compiler the GNU C compiler?
4902966bf024Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4903966bf024Smrg
4904966bf024Smrg# An ERE matcher.
4905966bf024SmrgEGREP=$lt_EGREP
4906966bf024Smrg
4907966bf024Smrg# The linker used to build libraries.
4908966bf024SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4909966bf024Smrg
4910966bf024Smrg# Whether we need hard or soft links.
4911966bf024SmrgLN_S=$lt_LN_S
4912966bf024Smrg
4913966bf024Smrg# A BSD-compatible nm program.
4914966bf024SmrgNM=$lt_NM
4915966bf024Smrg
4916966bf024Smrg# A symbol stripping program
4917966bf024SmrgSTRIP=$lt_STRIP
4918966bf024Smrg
4919966bf024Smrg# Used to examine libraries when file_magic_cmd begins "file"
4920966bf024SmrgMAGIC_CMD=$MAGIC_CMD
4921966bf024Smrg
4922966bf024Smrg# Used on cygwin: DLL creation program.
4923966bf024SmrgDLLTOOL="$DLLTOOL"
4924966bf024Smrg
4925966bf024Smrg# Used on cygwin: object dumper.
4926966bf024SmrgOBJDUMP="$OBJDUMP"
4927966bf024Smrg
4928966bf024Smrg# Used on cygwin: assembler.
4929966bf024SmrgAS="$AS"
4930966bf024Smrg
4931966bf024Smrg# The name of the directory that contains temporary libtool files.
4932966bf024Smrgobjdir=$objdir
4933966bf024Smrg
4934966bf024Smrg# How to create reloadable object files.
4935966bf024Smrgreload_flag=$lt_reload_flag
4936966bf024Smrgreload_cmds=$lt_reload_cmds
4937966bf024Smrg
4938966bf024Smrg# How to pass a linker flag through the compiler.
4939966bf024Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4940966bf024Smrg
4941966bf024Smrg# Object file suffix (normally "o").
4942966bf024Smrgobjext="$ac_objext"
4943966bf024Smrg
4944966bf024Smrg# Old archive suffix (normally "a").
4945966bf024Smrglibext="$libext"
4946966bf024Smrg
4947966bf024Smrg# Shared library suffix (normally ".so").
4948966bf024Smrgshrext_cmds='$shrext_cmds'
4949966bf024Smrg
4950966bf024Smrg# Executable file suffix (normally "").
4951966bf024Smrgexeext="$exeext"
4952966bf024Smrg
4953966bf024Smrg# Additional compiler flags for building library objects.
4954966bf024Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4955966bf024Smrgpic_mode=$pic_mode
4956966bf024Smrg
4957966bf024Smrg# What is the maximum length of a command?
4958966bf024Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
4959966bf024Smrg
4960966bf024Smrg# Does compiler simultaneously support -c and -o options?
4961966bf024Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4962966bf024Smrg
4963966bf024Smrg# Must we lock files when doing compilation ?
4964966bf024Smrgneed_locks=$lt_need_locks
4965966bf024Smrg
4966966bf024Smrg# Do we need the lib prefix for modules?
4967966bf024Smrgneed_lib_prefix=$need_lib_prefix
4968966bf024Smrg
4969966bf024Smrg# Do we need a version for libraries?
4970966bf024Smrgneed_version=$need_version
4971966bf024Smrg
4972966bf024Smrg# Whether dlopen is supported.
4973966bf024Smrgdlopen_support=$enable_dlopen
4974966bf024Smrg
4975966bf024Smrg# Whether dlopen of programs is supported.
4976966bf024Smrgdlopen_self=$enable_dlopen_self
4977966bf024Smrg
4978966bf024Smrg# Whether dlopen of statically linked programs is supported.
4979966bf024Smrgdlopen_self_static=$enable_dlopen_self_static
4980966bf024Smrg
4981966bf024Smrg# Compiler flag to prevent dynamic linking.
4982966bf024Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4983966bf024Smrg
4984966bf024Smrg# Compiler flag to turn off builtin functions.
4985966bf024Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4986966bf024Smrg
4987966bf024Smrg# Compiler flag to allow reflexive dlopens.
4988966bf024Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4989966bf024Smrg
4990966bf024Smrg# Compiler flag to generate shared objects directly from archives.
4991966bf024Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4992966bf024Smrg
4993966bf024Smrg# Compiler flag to generate thread-safe objects.
4994966bf024Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4995966bf024Smrg
4996966bf024Smrg# Library versioning type.
4997966bf024Smrgversion_type=$version_type
4998966bf024Smrg
4999966bf024Smrg# Format of library name prefix.
5000966bf024Smrglibname_spec=$lt_libname_spec
5001966bf024Smrg
5002966bf024Smrg# List of archive names.  First name is the real one, the rest are links.
5003966bf024Smrg# The last name is the one that the linker finds with -lNAME.
5004966bf024Smrglibrary_names_spec=$lt_library_names_spec
5005966bf024Smrg
5006966bf024Smrg# The coded name of the library, if different from the real name.
5007966bf024Smrgsoname_spec=$lt_soname_spec
5008966bf024Smrg
5009966bf024Smrg# Commands used to build and install an old-style archive.
5010966bf024SmrgRANLIB=$lt_RANLIB
5011966bf024Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5012966bf024Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
5013966bf024Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
5014966bf024Smrg
5015966bf024Smrg# Create an old-style archive from a shared archive.
5016966bf024Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5017966bf024Smrg
5018966bf024Smrg# Create a temporary old-style archive to link instead of a shared archive.
5019966bf024Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5020966bf024Smrg
5021966bf024Smrg# Commands used to build and install a shared archive.
5022966bf024Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5023966bf024Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5024966bf024Smrgpostinstall_cmds=$lt_postinstall_cmds
5025966bf024Smrgpostuninstall_cmds=$lt_postuninstall_cmds
5026966bf024Smrg
5027966bf024Smrg# Commands used to build a loadable module (assumed same as above if empty)
5028966bf024Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5029966bf024Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5030966bf024Smrg
5031966bf024Smrg# Commands to strip libraries.
5032966bf024Smrgold_striplib=$lt_old_striplib
5033966bf024Smrgstriplib=$lt_striplib
5034966bf024Smrg
5035966bf024Smrg# Dependencies to place before the objects being linked to create a
5036966bf024Smrg# shared library.
5037966bf024Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5038966bf024Smrg
5039966bf024Smrg# Dependencies to place after the objects being linked to create a
5040966bf024Smrg# shared library.
5041966bf024Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5042966bf024Smrg
5043966bf024Smrg# Dependencies to place before the objects being linked to create a
5044966bf024Smrg# shared library.
5045966bf024Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5046966bf024Smrg
5047966bf024Smrg# Dependencies to place after the objects being linked to create a
5048966bf024Smrg# shared library.
5049966bf024Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5050966bf024Smrg
5051966bf024Smrg# The library search path used internally by the compiler when linking
5052966bf024Smrg# a shared library.
5053966bf024Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5054966bf024Smrg
5055966bf024Smrg# Method to check whether dependent libraries are shared objects.
5056966bf024Smrgdeplibs_check_method=$lt_deplibs_check_method
5057966bf024Smrg
5058966bf024Smrg# Command to use when deplibs_check_method == file_magic.
5059966bf024Smrgfile_magic_cmd=$lt_file_magic_cmd
5060966bf024Smrg
5061966bf024Smrg# Flag that allows shared libraries with undefined symbols to be built.
5062966bf024Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5063966bf024Smrg
5064966bf024Smrg# Flag that forces no undefined symbols.
5065966bf024Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5066966bf024Smrg
5067966bf024Smrg# Commands used to finish a libtool library installation in a directory.
5068966bf024Smrgfinish_cmds=$lt_finish_cmds
5069966bf024Smrg
5070966bf024Smrg# Same as above, but a single script fragment to be evaled but not shown.
5071966bf024Smrgfinish_eval=$lt_finish_eval
5072966bf024Smrg
5073966bf024Smrg# Take the output of nm and produce a listing of raw symbols and C names.
5074966bf024Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5075966bf024Smrg
5076966bf024Smrg# Transform the output of nm in a proper C declaration
5077966bf024Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5078966bf024Smrg
5079966bf024Smrg# Transform the output of nm in a C name address pair
5080966bf024Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5081966bf024Smrg
5082966bf024Smrg# This is the shared library runtime path variable.
5083966bf024Smrgrunpath_var=$runpath_var
5084966bf024Smrg
5085966bf024Smrg# This is the shared library path variable.
5086966bf024Smrgshlibpath_var=$shlibpath_var
5087966bf024Smrg
5088966bf024Smrg# Is shlibpath searched before the hard-coded library search path?
5089966bf024Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
5090966bf024Smrg
5091966bf024Smrg# How to hardcode a shared library path into an executable.
5092966bf024Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5093966bf024Smrg
5094966bf024Smrg# Whether we should hardcode library paths into libraries.
5095966bf024Smrghardcode_into_libs=$hardcode_into_libs
5096966bf024Smrg
5097966bf024Smrg# Flag to hardcode \$libdir into a binary during linking.
5098966bf024Smrg# This must work even if \$libdir does not exist.
5099966bf024Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5100966bf024Smrg
5101966bf024Smrg# If ld is used when linking, flag to hardcode \$libdir into
5102966bf024Smrg# a binary during linking. This must work even if \$libdir does
5103966bf024Smrg# not exist.
5104966bf024Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5105966bf024Smrg
5106966bf024Smrg# Whether we need a single -rpath flag with a separated argument.
5107966bf024Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5108966bf024Smrg
5109966bf024Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5110966bf024Smrg# resulting binary.
5111966bf024Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5112966bf024Smrg
5113966bf024Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5114966bf024Smrg# resulting binary.
5115966bf024Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5116966bf024Smrg
5117966bf024Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5118966bf024Smrg# the resulting binary.
5119966bf024Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5120966bf024Smrg
5121966bf024Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
5122966bf024Smrg# and all subsequent libraries and executables linked against it.
5123966bf024Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5124966bf024Smrg
5125966bf024Smrg# Variables whose values should be saved in libtool wrapper scripts and
5126966bf024Smrg# restored at relink time.
5127966bf024Smrgvariables_saved_for_relink="$variables_saved_for_relink"
5128966bf024Smrg
5129966bf024Smrg# Whether libtool must link a program against all its dependency libraries.
5130966bf024Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5131966bf024Smrg
5132966bf024Smrg# Compile-time system search path for libraries
5133966bf024Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5134966bf024Smrg
5135966bf024Smrg# Run-time system search path for libraries
5136966bf024Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5137966bf024Smrg
5138966bf024Smrg# Fix the shell variable \$srcfile for the compiler.
5139966bf024Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5140966bf024Smrg
5141966bf024Smrg# Set to yes if exported symbols are required.
5142966bf024Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5143966bf024Smrg
5144966bf024Smrg# The commands to list exported symbols.
5145966bf024Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5146966bf024Smrg
5147966bf024Smrg# The commands to extract the exported symbol list from a shared archive.
5148966bf024Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
5149966bf024Smrg
5150966bf024Smrg# Symbols that should not be listed in the preloaded symbols.
5151966bf024Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5152966bf024Smrg
5153966bf024Smrg# Symbols that must always be exported.
5154966bf024Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5155966bf024Smrg
5156966bf024Smrgifelse([$1],[],
5157966bf024Smrg[# ### END LIBTOOL CONFIG],
5158966bf024Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
5159966bf024Smrg
5160966bf024Smrg__EOF__
5161966bf024Smrg
5162966bf024Smrgifelse([$1],[], [
5163966bf024Smrg  case $host_os in
5164966bf024Smrg  aix3*)
5165966bf024Smrg    cat <<\EOF >> "$cfgfile"
5166966bf024Smrg
5167966bf024Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
5168966bf024Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
5169966bf024Smrg# vanish in a puff of smoke.
5170966bf024Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
5171966bf024Smrg  COLLECT_NAMES=
5172966bf024Smrg  export COLLECT_NAMES
5173966bf024Smrgfi
5174966bf024SmrgEOF
5175966bf024Smrg    ;;
5176966bf024Smrg  esac
5177966bf024Smrg
5178966bf024Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
5179966bf024Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5180966bf024Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
5181966bf024Smrg  # is reportedly fixed, but why not run on old versions too?
5182966bf024Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5183966bf024Smrg
5184966bf024Smrg  mv -f "$cfgfile" "$ofile" || \
5185966bf024Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5186966bf024Smrg  chmod +x "$ofile"
5187966bf024Smrg])
5188966bf024Smrgelse
5189966bf024Smrg  # If there is no Makefile yet, we rely on a make rule to execute
5190966bf024Smrg  # `config.status --recheck' to rerun these tests and create the
5191966bf024Smrg  # libtool script then.
5192966bf024Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5193966bf024Smrg  if test -f "$ltmain_in"; then
5194966bf024Smrg    test -f Makefile && make "$ltmain"
5195966bf024Smrg  fi
5196966bf024Smrgfi
5197966bf024Smrg])# AC_LIBTOOL_CONFIG
5198966bf024Smrg
5199966bf024Smrg
5200966bf024Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5201966bf024Smrg# -------------------------------------------
5202966bf024SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5203966bf024Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5204966bf024Smrg
5205966bf024Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5206966bf024Smrg
5207966bf024Smrgif test "$GCC" = yes; then
5208966bf024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5209966bf024Smrg
5210966bf024Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5211966bf024Smrg    lt_cv_prog_compiler_rtti_exceptions,
5212966bf024Smrg    [-fno-rtti -fno-exceptions], [],
5213966bf024Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5214966bf024Smrgfi
5215966bf024Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5216966bf024Smrg
5217966bf024Smrg
5218966bf024Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5219966bf024Smrg# ---------------------------------
5220966bf024SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5221966bf024Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
5222966bf024SmrgAC_REQUIRE([AC_PROG_NM])
5223966bf024SmrgAC_REQUIRE([AC_OBJEXT])
5224966bf024Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
5225966bf024SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
5226966bf024SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5227966bf024Smrg[
5228966bf024Smrg# These are sane defaults that work on at least a few old systems.
5229966bf024Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5230966bf024Smrg
5231966bf024Smrg# Character class describing NM global symbol codes.
5232966bf024Smrgsymcode='[[BCDEGRST]]'
5233966bf024Smrg
5234966bf024Smrg# Regexp to match symbols that can be accessed directly from C.
5235966bf024Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5236966bf024Smrg
5237966bf024Smrg# Transform the above into a raw symbol and a C symbol.
5238966bf024Smrgsymxfrm='\1 \2\3 \3'
5239966bf024Smrg
5240966bf024Smrg# Transform an extracted symbol line into a proper C declaration
5241966bf024Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5242966bf024Smrg
5243966bf024Smrg# Transform an extracted symbol line into symbol name and symbol address
5244966bf024Smrglt_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'"
5245966bf024Smrg
5246966bf024Smrg# Define system-specific variables.
5247966bf024Smrgcase $host_os in
5248966bf024Smrgaix*)
5249966bf024Smrg  symcode='[[BCDT]]'
5250966bf024Smrg  ;;
5251966bf024Smrgcygwin* | mingw* | pw32*)
5252966bf024Smrg  symcode='[[ABCDGISTW]]'
5253966bf024Smrg  ;;
5254966bf024Smrghpux*) # Its linker distinguishes data from code symbols
5255966bf024Smrg  if test "$host_cpu" = ia64; then
5256966bf024Smrg    symcode='[[ABCDEGRST]]'
5257966bf024Smrg  fi
5258966bf024Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5259966bf024Smrg  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'"
5260966bf024Smrg  ;;
5261966bf024Smrgirix* | nonstopux*)
5262966bf024Smrg  symcode='[[BCDEGRST]]'
5263966bf024Smrg  ;;
5264966bf024Smrgosf*)
5265966bf024Smrg  symcode='[[BCDEGQRST]]'
5266966bf024Smrg  ;;
5267966bf024Smrgsolaris* | sysv5*)
5268966bf024Smrg  symcode='[[BDRT]]'
5269966bf024Smrg  ;;
5270966bf024Smrgsysv4)
5271966bf024Smrg  symcode='[[DFNSTU]]'
5272966bf024Smrg  ;;
5273966bf024Smrgesac
5274966bf024Smrg
5275966bf024Smrg# Handle CRLF in mingw tool chain
5276966bf024Smrgopt_cr=
5277966bf024Smrgcase $build_os in
5278966bf024Smrgmingw*)
5279966bf024Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5280966bf024Smrg  ;;
5281966bf024Smrgesac
5282966bf024Smrg
5283966bf024Smrg# If we're using GNU nm, then use its standard symbol codes.
5284966bf024Smrgcase `$NM -V 2>&1` in
5285966bf024Smrg*GNU* | *'with BFD'*)
5286966bf024Smrg  symcode='[[ABCDGIRSTW]]' ;;
5287966bf024Smrgesac
5288966bf024Smrg
5289966bf024Smrg# Try without a prefix undercore, then with it.
5290966bf024Smrgfor ac_symprfx in "" "_"; do
5291966bf024Smrg
5292966bf024Smrg  # Write the raw and C identifiers.
5293966bf024Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5294966bf024Smrg
5295966bf024Smrg  # Check to see that the pipe works correctly.
5296966bf024Smrg  pipe_works=no
5297966bf024Smrg
5298966bf024Smrg  rm -f conftest*
5299966bf024Smrg  cat > conftest.$ac_ext <<EOF
5300966bf024Smrg#ifdef __cplusplus
5301966bf024Smrgextern "C" {
5302966bf024Smrg#endif
5303966bf024Smrgchar nm_test_var;
5304966bf024Smrgvoid nm_test_func(){}
5305966bf024Smrg#ifdef __cplusplus
5306966bf024Smrg}
5307966bf024Smrg#endif
5308966bf024Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
5309966bf024SmrgEOF
5310966bf024Smrg
5311966bf024Smrg  if AC_TRY_EVAL(ac_compile); then
5312966bf024Smrg    # Now try to grab the symbols.
5313966bf024Smrg    nlist=conftest.nm
5314966bf024Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5315966bf024Smrg      # Try sorting and uniquifying the output.
5316966bf024Smrg      if sort "$nlist" | uniq > "$nlist"T; then
5317966bf024Smrg	mv -f "$nlist"T "$nlist"
5318966bf024Smrg      else
5319966bf024Smrg	rm -f "$nlist"T
5320966bf024Smrg      fi
5321966bf024Smrg
5322966bf024Smrg      # Make sure that we snagged all the symbols we need.
5323966bf024Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5324966bf024Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
5325966bf024Smrg	  cat <<EOF > conftest.$ac_ext
5326966bf024Smrg#ifdef __cplusplus
5327966bf024Smrgextern "C" {
5328966bf024Smrg#endif
5329966bf024Smrg
5330966bf024SmrgEOF
5331966bf024Smrg	  # Now generate the symbol file.
5332966bf024Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5333966bf024Smrg
5334966bf024Smrg	  cat <<EOF >> conftest.$ac_ext
5335966bf024Smrg#if defined (__STDC__) && __STDC__
5336966bf024Smrg# define lt_ptr_t void *
5337966bf024Smrg#else
5338966bf024Smrg# define lt_ptr_t char *
5339966bf024Smrg# define const
5340966bf024Smrg#endif
5341966bf024Smrg
5342966bf024Smrg/* The mapping between symbol names and symbols. */
5343966bf024Smrgconst struct {
5344966bf024Smrg  const char *name;
5345966bf024Smrg  lt_ptr_t address;
5346966bf024Smrg}
5347966bf024Smrglt_preloaded_symbols[[]] =
5348966bf024Smrg{
5349966bf024SmrgEOF
5350966bf024Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5351966bf024Smrg	  cat <<\EOF >> conftest.$ac_ext
5352966bf024Smrg  {0, (lt_ptr_t) 0}
5353966bf024Smrg};
5354966bf024Smrg
5355966bf024Smrg#ifdef __cplusplus
5356966bf024Smrg}
5357966bf024Smrg#endif
5358966bf024SmrgEOF
5359966bf024Smrg	  # Now try linking the two files.
5360966bf024Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
5361966bf024Smrg	  lt_save_LIBS="$LIBS"
5362966bf024Smrg	  lt_save_CFLAGS="$CFLAGS"
5363966bf024Smrg	  LIBS="conftstm.$ac_objext"
5364966bf024Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5365966bf024Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5366966bf024Smrg	    pipe_works=yes
5367966bf024Smrg	  fi
5368966bf024Smrg	  LIBS="$lt_save_LIBS"
5369966bf024Smrg	  CFLAGS="$lt_save_CFLAGS"
5370966bf024Smrg	else
5371966bf024Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5372966bf024Smrg	fi
5373966bf024Smrg      else
5374966bf024Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5375966bf024Smrg      fi
5376966bf024Smrg    else
5377966bf024Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5378966bf024Smrg    fi
5379966bf024Smrg  else
5380966bf024Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5381966bf024Smrg    cat conftest.$ac_ext >&5
5382966bf024Smrg  fi
5383966bf024Smrg  rm -f conftest* conftst*
5384966bf024Smrg
5385966bf024Smrg  # Do not use the global_symbol_pipe unless it works.
5386966bf024Smrg  if test "$pipe_works" = yes; then
5387966bf024Smrg    break
5388966bf024Smrg  else
5389966bf024Smrg    lt_cv_sys_global_symbol_pipe=
5390966bf024Smrg  fi
5391966bf024Smrgdone
5392966bf024Smrg])
5393966bf024Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
5394966bf024Smrg  lt_cv_sys_global_symbol_to_cdecl=
5395966bf024Smrgfi
5396966bf024Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5397966bf024Smrg  AC_MSG_RESULT(failed)
5398966bf024Smrgelse
5399966bf024Smrg  AC_MSG_RESULT(ok)
5400966bf024Smrgfi
5401966bf024Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5402966bf024Smrg
5403966bf024Smrg
5404966bf024Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5405966bf024Smrg# ---------------------------------------
5406966bf024SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5407966bf024Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5408966bf024Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5409966bf024Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5410966bf024Smrg
5411966bf024SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
5412966bf024Smrg ifelse([$1],[CXX],[
5413966bf024Smrg  # C++ specific cases for pic, static, wl, etc.
5414966bf024Smrg  if test "$GXX" = yes; then
5415966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5416966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5417966bf024Smrg
5418966bf024Smrg    case $host_os in
5419966bf024Smrg    aix*)
5420966bf024Smrg      # All AIX code is PIC.
5421966bf024Smrg      if test "$host_cpu" = ia64; then
5422966bf024Smrg	# AIX 5 now supports IA64 processor
5423966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5424966bf024Smrg      fi
5425966bf024Smrg      ;;
5426966bf024Smrg    amigaos*)
5427966bf024Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
5428966bf024Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
5429966bf024Smrg      # like `-m68040'.
5430966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5431966bf024Smrg      ;;
5432966bf024Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5433966bf024Smrg      # PIC is the default for these OSes.
5434966bf024Smrg      ;;
5435966bf024Smrg    mingw* | os2* | pw32*)
5436966bf024Smrg      # This hack is so that the source file can tell whether it is being
5437966bf024Smrg      # built for inclusion in a dll (and should export symbols for example).
5438966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5439966bf024Smrg      ;;
5440966bf024Smrg    darwin* | rhapsody*)
5441966bf024Smrg      # PIC is the default on this platform
5442966bf024Smrg      # Common symbols not allowed in MH_DYLIB files
5443966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5444966bf024Smrg      ;;
5445966bf024Smrg    *djgpp*)
5446966bf024Smrg      # DJGPP does not support shared libraries at all
5447966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5448966bf024Smrg      ;;
5449966bf024Smrg    sysv4*MP*)
5450966bf024Smrg      if test -d /usr/nec; then
5451966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5452966bf024Smrg      fi
5453966bf024Smrg      ;;
5454966bf024Smrg    hpux*)
5455966bf024Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5456966bf024Smrg      # not for PA HP-UX.
5457966bf024Smrg      case "$host_cpu" in
5458966bf024Smrg      hppa*64*|ia64*)
5459966bf024Smrg	;;
5460966bf024Smrg      *)
5461966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5462966bf024Smrg	;;
5463966bf024Smrg      esac
5464966bf024Smrg      ;;
5465966bf024Smrg    *)
5466966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5467966bf024Smrg      ;;
5468966bf024Smrg    esac
5469966bf024Smrg  else
5470966bf024Smrg    case $host_os in
5471966bf024Smrg      aix4* | aix5*)
5472966bf024Smrg	# All AIX code is PIC.
5473966bf024Smrg	if test "$host_cpu" = ia64; then
5474966bf024Smrg	  # AIX 5 now supports IA64 processor
5475966bf024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5476966bf024Smrg	else
5477966bf024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5478966bf024Smrg	fi
5479966bf024Smrg	;;
5480966bf024Smrg      chorus*)
5481966bf024Smrg	case $cc_basename in
5482966bf024Smrg	cxch68)
5483966bf024Smrg	  # Green Hills C++ Compiler
5484966bf024Smrg	  # _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"
5485966bf024Smrg	  ;;
5486966bf024Smrg	esac
5487966bf024Smrg	;;
5488966bf024Smrg      dgux*)
5489966bf024Smrg	case $cc_basename in
5490966bf024Smrg	  ec++)
5491966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5492966bf024Smrg	    ;;
5493966bf024Smrg	  ghcx)
5494966bf024Smrg	    # Green Hills C++ Compiler
5495966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5496966bf024Smrg	    ;;
5497966bf024Smrg	  *)
5498966bf024Smrg	    ;;
5499966bf024Smrg	esac
5500966bf024Smrg	;;
5501966bf024Smrg      freebsd* | kfreebsd*-gnu)
5502966bf024Smrg	# FreeBSD uses GNU C++
5503966bf024Smrg	;;
5504966bf024Smrg      hpux9* | hpux10* | hpux11*)
5505966bf024Smrg	case $cc_basename in
5506966bf024Smrg	  CC)
5507966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5508966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5509966bf024Smrg	    if test "$host_cpu" != ia64; then
5510966bf024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5511966bf024Smrg	    fi
5512966bf024Smrg	    ;;
5513966bf024Smrg	  aCC)
5514966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5515966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5516966bf024Smrg	    case "$host_cpu" in
5517966bf024Smrg	    hppa*64*|ia64*)
5518966bf024Smrg	      # +Z the default
5519966bf024Smrg	      ;;
5520966bf024Smrg	    *)
5521966bf024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5522966bf024Smrg	      ;;
5523966bf024Smrg	    esac
5524966bf024Smrg	    ;;
5525966bf024Smrg	  *)
5526966bf024Smrg	    ;;
5527966bf024Smrg	esac
5528966bf024Smrg	;;
5529966bf024Smrg      irix5* | irix6* | nonstopux*)
5530966bf024Smrg	case $cc_basename in
5531966bf024Smrg	  CC)
5532966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5533966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5534966bf024Smrg	    # CC pic flag -KPIC is the default.
5535966bf024Smrg	    ;;
5536966bf024Smrg	  *)
5537966bf024Smrg	    ;;
5538966bf024Smrg	esac
5539966bf024Smrg	;;
5540966bf024Smrg      linux*)
5541966bf024Smrg	case $cc_basename in
5542966bf024Smrg	  KCC)
5543966bf024Smrg	    # KAI C++ Compiler
5544966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5545966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5546966bf024Smrg	    ;;
5547966bf024Smrg	  icpc)
5548966bf024Smrg	    # Intel C++
5549966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5550966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5551966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5552966bf024Smrg	    ;;
5553966bf024Smrg	  cxx)
5554966bf024Smrg	    # Compaq C++
5555966bf024Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5556966bf024Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5557966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5558966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5559966bf024Smrg	    ;;
5560966bf024Smrg	  *)
5561966bf024Smrg	    ;;
5562966bf024Smrg	esac
5563966bf024Smrg	;;
5564966bf024Smrg      lynxos*)
5565966bf024Smrg	;;
5566966bf024Smrg      m88k*)
5567966bf024Smrg	;;
5568966bf024Smrg      mvs*)
5569966bf024Smrg	case $cc_basename in
5570966bf024Smrg	  cxx)
5571966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5572966bf024Smrg	    ;;
5573966bf024Smrg	  *)
5574966bf024Smrg	    ;;
5575966bf024Smrg	esac
5576966bf024Smrg	;;
5577966bf024Smrg      netbsd*)
5578966bf024Smrg	;;
5579966bf024Smrg      osf3* | osf4* | osf5*)
5580966bf024Smrg	case $cc_basename in
5581966bf024Smrg	  KCC)
5582966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5583966bf024Smrg	    ;;
5584966bf024Smrg	  RCC)
5585966bf024Smrg	    # Rational C++ 2.4.1
5586966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5587966bf024Smrg	    ;;
5588966bf024Smrg	  cxx)
5589966bf024Smrg	    # Digital/Compaq C++
5590966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5591966bf024Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5592966bf024Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5593966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5594966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5595966bf024Smrg	    ;;
5596966bf024Smrg	  *)
5597966bf024Smrg	    ;;
5598966bf024Smrg	esac
5599966bf024Smrg	;;
5600966bf024Smrg      psos*)
5601966bf024Smrg	;;
5602966bf024Smrg      sco*)
5603966bf024Smrg	case $cc_basename in
5604966bf024Smrg	  CC)
5605966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5606966bf024Smrg	    ;;
5607966bf024Smrg	  *)
5608966bf024Smrg	    ;;
5609966bf024Smrg	esac
5610966bf024Smrg	;;
5611966bf024Smrg      solaris*)
5612966bf024Smrg	case $cc_basename in
5613966bf024Smrg	  CC)
5614966bf024Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
5615966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5616966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5617966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5618966bf024Smrg	    ;;
5619966bf024Smrg	  gcx)
5620966bf024Smrg	    # Green Hills C++ Compiler
5621966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5622966bf024Smrg	    ;;
5623966bf024Smrg	  *)
5624966bf024Smrg	    ;;
5625966bf024Smrg	esac
5626966bf024Smrg	;;
5627966bf024Smrg      sunos4*)
5628966bf024Smrg	case $cc_basename in
5629966bf024Smrg	  CC)
5630966bf024Smrg	    # Sun C++ 4.x
5631966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5632966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5633966bf024Smrg	    ;;
5634966bf024Smrg	  lcc)
5635966bf024Smrg	    # Lucid
5636966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5637966bf024Smrg	    ;;
5638966bf024Smrg	  *)
5639966bf024Smrg	    ;;
5640966bf024Smrg	esac
5641966bf024Smrg	;;
5642966bf024Smrg      tandem*)
5643966bf024Smrg	case $cc_basename in
5644966bf024Smrg	  NCC)
5645966bf024Smrg	    # NonStop-UX NCC 3.20
5646966bf024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5647966bf024Smrg	    ;;
5648966bf024Smrg	  *)
5649966bf024Smrg	    ;;
5650966bf024Smrg	esac
5651966bf024Smrg	;;
5652966bf024Smrg      unixware*)
5653966bf024Smrg	;;
5654966bf024Smrg      vxworks*)
5655966bf024Smrg	;;
5656966bf024Smrg      *)
5657966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5658966bf024Smrg	;;
5659966bf024Smrg    esac
5660966bf024Smrg  fi
5661966bf024Smrg],
5662966bf024Smrg[
5663966bf024Smrg  if test "$GCC" = yes; then
5664966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5665966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5666966bf024Smrg
5667966bf024Smrg    case $host_os in
5668966bf024Smrg      aix*)
5669966bf024Smrg      # All AIX code is PIC.
5670966bf024Smrg      if test "$host_cpu" = ia64; then
5671966bf024Smrg	# AIX 5 now supports IA64 processor
5672966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5673966bf024Smrg      fi
5674966bf024Smrg      ;;
5675966bf024Smrg
5676966bf024Smrg    amigaos*)
5677966bf024Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
5678966bf024Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
5679966bf024Smrg      # like `-m68040'.
5680966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5681966bf024Smrg      ;;
5682966bf024Smrg
5683966bf024Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5684966bf024Smrg      # PIC is the default for these OSes.
5685966bf024Smrg      ;;
5686966bf024Smrg
5687966bf024Smrg    mingw* | pw32* | os2*)
5688966bf024Smrg      # This hack is so that the source file can tell whether it is being
5689966bf024Smrg      # built for inclusion in a dll (and should export symbols for example).
5690966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5691966bf024Smrg      ;;
5692966bf024Smrg
5693966bf024Smrg    darwin* | rhapsody*)
5694966bf024Smrg      # PIC is the default on this platform
5695966bf024Smrg      # Common symbols not allowed in MH_DYLIB files
5696966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5697966bf024Smrg      ;;
5698966bf024Smrg
5699966bf024Smrg    msdosdjgpp*)
5700966bf024Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5701966bf024Smrg      # on systems that don't support them.
5702966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5703966bf024Smrg      enable_shared=no
5704966bf024Smrg      ;;
5705966bf024Smrg
5706966bf024Smrg    sysv4*MP*)
5707966bf024Smrg      if test -d /usr/nec; then
5708966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5709966bf024Smrg      fi
5710966bf024Smrg      ;;
5711966bf024Smrg
5712966bf024Smrg    hpux*)
5713966bf024Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5714966bf024Smrg      # not for PA HP-UX.
5715966bf024Smrg      case "$host_cpu" in
5716966bf024Smrg      hppa*64*|ia64*)
5717966bf024Smrg	# +Z the default
5718966bf024Smrg	;;
5719966bf024Smrg      *)
5720966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5721966bf024Smrg	;;
5722966bf024Smrg      esac
5723966bf024Smrg      ;;
5724966bf024Smrg
5725966bf024Smrg    *)
5726966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5727966bf024Smrg      ;;
5728966bf024Smrg    esac
5729966bf024Smrg  else
5730966bf024Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
5731966bf024Smrg    case $host_os in
5732966bf024Smrg    aix*)
5733966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5734966bf024Smrg      if test "$host_cpu" = ia64; then
5735966bf024Smrg	# AIX 5 now supports IA64 processor
5736966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5737966bf024Smrg      else
5738966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5739966bf024Smrg      fi
5740966bf024Smrg      ;;
5741966bf024Smrg
5742966bf024Smrg    mingw* | pw32* | os2*)
5743966bf024Smrg      # This hack is so that the source file can tell whether it is being
5744966bf024Smrg      # built for inclusion in a dll (and should export symbols for example).
5745966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5746966bf024Smrg      ;;
5747966bf024Smrg
5748966bf024Smrg    hpux9* | hpux10* | hpux11*)
5749966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5750966bf024Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5751966bf024Smrg      # not for PA HP-UX.
5752966bf024Smrg      case "$host_cpu" in
5753966bf024Smrg      hppa*64*|ia64*)
5754966bf024Smrg	# +Z the default
5755966bf024Smrg	;;
5756966bf024Smrg      *)
5757966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5758966bf024Smrg	;;
5759966bf024Smrg      esac
5760966bf024Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5761966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5762966bf024Smrg      ;;
5763966bf024Smrg
5764966bf024Smrg    irix5* | irix6* | nonstopux*)
5765966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5766966bf024Smrg      # PIC (with -KPIC) is the default.
5767966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5768966bf024Smrg      ;;
5769966bf024Smrg
5770966bf024Smrg    newsos6)
5771966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5772966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5773966bf024Smrg      ;;
5774966bf024Smrg
5775966bf024Smrg    linux*)
5776966bf024Smrg      case $CC in
5777966bf024Smrg      icc* | ecc*)
5778966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5779966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5780966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5781966bf024Smrg        ;;
5782966bf024Smrg      ccc*)
5783966bf024Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5784966bf024Smrg        # All Alpha code is PIC.
5785966bf024Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5786966bf024Smrg        ;;
5787966bf024Smrg      esac
5788966bf024Smrg      ;;
5789966bf024Smrg
5790966bf024Smrg    osf3* | osf4* | osf5*)
5791966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5792966bf024Smrg      # All OSF/1 code is PIC.
5793966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5794966bf024Smrg      ;;
5795966bf024Smrg
5796966bf024Smrg    sco3.2v5*)
5797966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5798966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5799966bf024Smrg      ;;
5800966bf024Smrg
5801966bf024Smrg    solaris*)
5802966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5803966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5804966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5805966bf024Smrg      ;;
5806966bf024Smrg
5807966bf024Smrg    sunos4*)
5808966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5809966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5810966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5811966bf024Smrg      ;;
5812966bf024Smrg
5813966bf024Smrg    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5814966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5815966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5816966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5817966bf024Smrg      ;;
5818966bf024Smrg
5819966bf024Smrg    sysv4*MP*)
5820966bf024Smrg      if test -d /usr/nec ;then
5821966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5822966bf024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5823966bf024Smrg      fi
5824966bf024Smrg      ;;
5825966bf024Smrg
5826966bf024Smrg    uts4*)
5827966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5828966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5829966bf024Smrg      ;;
5830966bf024Smrg
5831966bf024Smrg    *)
5832966bf024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5833966bf024Smrg      ;;
5834966bf024Smrg    esac
5835966bf024Smrg  fi
5836966bf024Smrg])
5837966bf024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5838966bf024Smrg
5839966bf024Smrg#
5840966bf024Smrg# Check to make sure the PIC flag actually works.
5841966bf024Smrg#
5842966bf024Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5843966bf024Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5844966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5845966bf024Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5846966bf024Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5847966bf024Smrg     "" | " "*) ;;
5848966bf024Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5849966bf024Smrg     esac],
5850966bf024Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5851966bf024Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5852966bf024Smrgfi
5853966bf024Smrgcase "$host_os" in
5854966bf024Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
5855966bf024Smrg  *djgpp*)
5856966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5857966bf024Smrg    ;;
5858966bf024Smrg  *)
5859966bf024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5860966bf024Smrg    ;;
5861966bf024Smrgesac
5862966bf024Smrg])
5863966bf024Smrg
5864966bf024Smrg
5865966bf024Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5866966bf024Smrg# ------------------------------------
5867966bf024Smrg# See if the linker supports building shared libraries.
5868966bf024SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5869966bf024Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5870966bf024Smrgifelse([$1],[CXX],[
5871966bf024Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5872966bf024Smrg  case $host_os in
5873966bf024Smrg  aix4* | aix5*)
5874966bf024Smrg    # If we're using GNU nm, then we don't want the "-C" option.
5875966bf024Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5876966bf024Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5877966bf024Smrg      _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'
5878966bf024Smrg    else
5879966bf024Smrg      _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'
5880966bf024Smrg    fi
5881966bf024Smrg    ;;
5882966bf024Smrg  pw32*)
5883966bf024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5884966bf024Smrg  ;;
5885966bf024Smrg  cygwin* | mingw*)
5886966bf024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5887966bf024Smrg  ;;
5888966bf024Smrg  *)
5889966bf024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5890966bf024Smrg  ;;
5891966bf024Smrg  esac
5892966bf024Smrg],[
5893966bf024Smrg  runpath_var=
5894966bf024Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5895966bf024Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5896966bf024Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
5897966bf024Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5898966bf024Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5899966bf024Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5900966bf024Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5901966bf024Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5902966bf024Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5903966bf024Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5904966bf024Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5905966bf024Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5906966bf024Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5907966bf024Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5908966bf024Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5909966bf024Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5910966bf024Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5911966bf024Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
5912966bf024Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5913966bf024Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5914966bf024Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5915966bf024Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
5916966bf024Smrg  # included in the symbol list
5917966bf024Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
5918966bf024Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5919966bf024Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5920966bf024Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5921966bf024Smrg  # as well as any symbol that contains `d'.
5922966bf024Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5923966bf024Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5924966bf024Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5925966bf024Smrg  # the symbol is explicitly referenced.  Since portable code cannot
5926966bf024Smrg  # rely on this symbol name, it's probably fine to never include it in
5927966bf024Smrg  # preloaded symbol tables.
5928966bf024Smrg  extract_expsyms_cmds=
5929966bf024Smrg
5930966bf024Smrg  case $host_os in
5931966bf024Smrg  cygwin* | mingw* | pw32*)
5932966bf024Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5933966bf024Smrg    # When not using gcc, we currently assume that we are using
5934966bf024Smrg    # Microsoft Visual C++.
5935966bf024Smrg    if test "$GCC" != yes; then
5936966bf024Smrg      with_gnu_ld=no
5937966bf024Smrg    fi
5938966bf024Smrg    ;;
5939966bf024Smrg  openbsd*)
5940966bf024Smrg    with_gnu_ld=no
5941966bf024Smrg    ;;
5942966bf024Smrg  esac
5943966bf024Smrg
5944966bf024Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5945966bf024Smrg  if test "$with_gnu_ld" = yes; then
5946966bf024Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5947966bf024Smrg    wlarc='${wl}'
5948966bf024Smrg
5949966bf024Smrg    # See if GNU ld supports shared libraries.
5950966bf024Smrg    case $host_os in
5951966bf024Smrg    aix3* | aix4* | aix5*)
5952966bf024Smrg      # On AIX/PPC, the GNU linker is very broken
5953966bf024Smrg      if test "$host_cpu" != ia64; then
5954966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5955966bf024Smrg	cat <<EOF 1>&2
5956966bf024Smrg
5957966bf024Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5958966bf024Smrg*** to be unable to reliably create shared libraries on AIX.
5959966bf024Smrg*** Therefore, libtool is disabling shared libraries support.  If you
5960966bf024Smrg*** really care for shared libraries, you may want to modify your PATH
5961966bf024Smrg*** so that a non-GNU linker is found, and then restart.
5962966bf024Smrg
5963966bf024SmrgEOF
5964966bf024Smrg      fi
5965966bf024Smrg      ;;
5966966bf024Smrg
5967966bf024Smrg    amigaos*)
5968966bf024Smrg      _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)'
5969966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5970966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5971966bf024Smrg
5972966bf024Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5973966bf024Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
5974966bf024Smrg      # to version 4, is to share data among multiple programs linked
5975966bf024Smrg      # with the same dynamic library.  Since this doesn't match the
5976966bf024Smrg      # behavior of shared libraries on other platforms, we can't use
5977966bf024Smrg      # them.
5978966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5979966bf024Smrg      ;;
5980966bf024Smrg
5981966bf024Smrg    beos*)
5982966bf024Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5983966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5984966bf024Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5985966bf024Smrg	# support --undefined.  This deserves some investigation.  FIXME
5986966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5987966bf024Smrg      else
5988966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5989966bf024Smrg      fi
5990966bf024Smrg      ;;
5991966bf024Smrg
5992966bf024Smrg    cygwin* | mingw* | pw32*)
5993966bf024Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5994966bf024Smrg      # as there is no search path for DLLs.
5995966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5996966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5997966bf024Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5998966bf024Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5999966bf024Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6000966bf024Smrg
6001966bf024Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6002966bf024Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6003966bf024Smrg	# If the export-symbols file already is a .def file (1st line
6004966bf024Smrg	# is EXPORTS), use it as is; otherwise, prepend...
6005966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6006966bf024Smrg	  cp $export_symbols $output_objdir/$soname.def;
6007966bf024Smrg	else
6008966bf024Smrg	  echo EXPORTS > $output_objdir/$soname.def;
6009966bf024Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
6010966bf024Smrg	fi~
6011966bf024Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
6012966bf024Smrg      else
6013966bf024Smrg	ld_shlibs=no
6014966bf024Smrg      fi
6015966bf024Smrg      ;;
6016966bf024Smrg
6017966bf024Smrg    netbsd*)
6018966bf024Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6019966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6020966bf024Smrg	wlarc=
6021966bf024Smrg      else
6022966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6023966bf024Smrg	_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'
6024966bf024Smrg      fi
6025966bf024Smrg      ;;
6026966bf024Smrg
6027966bf024Smrg    solaris* | sysv5*)
6028966bf024Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6029966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6030966bf024Smrg	cat <<EOF 1>&2
6031966bf024Smrg
6032966bf024Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6033966bf024Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
6034966bf024Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
6035966bf024Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
6036966bf024Smrg*** your PATH or compiler configuration so that the native linker is
6037966bf024Smrg*** used, and then restart.
6038966bf024Smrg
6039966bf024SmrgEOF
6040966bf024Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6041966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6042966bf024Smrg	_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'
6043966bf024Smrg      else
6044966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6045966bf024Smrg      fi
6046966bf024Smrg      ;;
6047966bf024Smrg
6048966bf024Smrg    sunos4*)
6049966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6050966bf024Smrg      wlarc=
6051966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6052966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6053966bf024Smrg      ;;
6054966bf024Smrg
6055966bf024Smrg  linux*)
6056966bf024Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6057966bf024Smrg        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6058966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6059966bf024Smrg      supports_anon_versioning=no
6060966bf024Smrg      case `$LD -v 2>/dev/null` in
6061966bf024Smrg        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6062966bf024Smrg        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6063966bf024Smrg        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6064966bf024Smrg        *\ 2.11.*) ;; # other 2.11 versions
6065966bf024Smrg        *) supports_anon_versioning=yes ;;
6066966bf024Smrg      esac
6067966bf024Smrg      if test $supports_anon_versioning = yes; then
6068966bf024Smrg        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6069966bf024Smrgcat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6070966bf024Smrg$echo "local: *; };" >> $output_objdir/$libname.ver~
6071966bf024Smrg        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6072966bf024Smrg      else
6073966bf024Smrg        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6074966bf024Smrg      fi
6075966bf024Smrg    else
6076966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6077966bf024Smrg    fi
6078966bf024Smrg    ;;
6079966bf024Smrg
6080966bf024Smrg    *)
6081966bf024Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6082966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6083966bf024Smrg	_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'
6084966bf024Smrg      else
6085966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6086966bf024Smrg      fi
6087966bf024Smrg      ;;
6088966bf024Smrg    esac
6089966bf024Smrg
6090966bf024Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6091966bf024Smrg      runpath_var=LD_RUN_PATH
6092966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6093966bf024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6094966bf024Smrg      # ancient GNU ld didn't support --whole-archive et. al.
6095966bf024Smrg      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6096966bf024Smrg 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6097966bf024Smrg      else
6098966bf024Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6099966bf024Smrg      fi
6100966bf024Smrg    fi
6101966bf024Smrg  else
6102966bf024Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
6103966bf024Smrg    case $host_os in
6104966bf024Smrg    aix3*)
6105966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6106966bf024Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6107966bf024Smrg      _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'
6108966bf024Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
6109966bf024Smrg      # are no directories specified by -L.
6110966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6111966bf024Smrg      if test "$GCC" = yes && test -z "$link_static_flag"; then
6112966bf024Smrg	# Neither direct hardcoding nor static linking is supported with a
6113966bf024Smrg	# broken collect2.
6114966bf024Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6115966bf024Smrg      fi
6116966bf024Smrg      ;;
6117966bf024Smrg
6118966bf024Smrg    aix4* | aix5*)
6119966bf024Smrg      if test "$host_cpu" = ia64; then
6120966bf024Smrg	# On IA64, the linker does run time linking by default, so we don't
6121966bf024Smrg	# have to do anything special.
6122966bf024Smrg	aix_use_runtimelinking=no
6123966bf024Smrg	exp_sym_flag='-Bexport'
6124966bf024Smrg	no_entry_flag=""
6125966bf024Smrg      else
6126966bf024Smrg	# If we're using GNU nm, then we don't want the "-C" option.
6127966bf024Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6128966bf024Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6129966bf024Smrg	  _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'
6130966bf024Smrg	else
6131966bf024Smrg	  _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'
6132966bf024Smrg	fi
6133966bf024Smrg	aix_use_runtimelinking=no
6134966bf024Smrg
6135966bf024Smrg	# Test if we are trying to use run time linking or normal
6136966bf024Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6137966bf024Smrg	# need to do runtime linking.
6138966bf024Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6139966bf024Smrg	  for ld_flag in $LDFLAGS; do
6140966bf024Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6141966bf024Smrg  	    aix_use_runtimelinking=yes
6142966bf024Smrg  	    break
6143966bf024Smrg  	  fi
6144966bf024Smrg	  done
6145966bf024Smrg	esac
6146966bf024Smrg
6147966bf024Smrg	exp_sym_flag='-bexport'
6148966bf024Smrg	no_entry_flag='-bnoentry'
6149966bf024Smrg      fi
6150966bf024Smrg
6151966bf024Smrg      # When large executables or shared objects are built, AIX ld can
6152966bf024Smrg      # have problems creating the table of contents.  If linking a library
6153966bf024Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
6154966bf024Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6155966bf024Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6156966bf024Smrg
6157966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
6158966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6159966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6160966bf024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6161966bf024Smrg
6162966bf024Smrg      if test "$GCC" = yes; then
6163966bf024Smrg	case $host_os in aix4.[012]|aix4.[012].*)
6164966bf024Smrg	# We only want to do this on AIX 4.2 and lower, the check
6165966bf024Smrg	# below for broken collect2 doesn't work under 4.3+
6166966bf024Smrg	  collect2name=`${CC} -print-prog-name=collect2`
6167966bf024Smrg	  if test -f "$collect2name" && \
6168966bf024Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
6169966bf024Smrg	  then
6170966bf024Smrg  	  # We have reworked collect2
6171966bf024Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6172966bf024Smrg	  else
6173966bf024Smrg  	  # We have old collect2
6174966bf024Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6175966bf024Smrg  	  # It fails to find uninstalled libraries when the uninstalled
6176966bf024Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
6177966bf024Smrg  	  # to unsupported forces relinking
6178966bf024Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6179966bf024Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6180966bf024Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6181966bf024Smrg	  fi
6182966bf024Smrg	esac
6183966bf024Smrg	shared_flag='-shared'
6184966bf024Smrg      else
6185966bf024Smrg	# not using gcc
6186966bf024Smrg	if test "$host_cpu" = ia64; then
6187966bf024Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6188966bf024Smrg  	# chokes on -Wl,-G. The following line is correct:
6189966bf024Smrg	  shared_flag='-G'
6190966bf024Smrg	else
6191966bf024Smrg  	if test "$aix_use_runtimelinking" = yes; then
6192966bf024Smrg	    shared_flag='${wl}-G'
6193966bf024Smrg	  else
6194966bf024Smrg	    shared_flag='${wl}-bM:SRE'
6195966bf024Smrg  	fi
6196966bf024Smrg	fi
6197966bf024Smrg      fi
6198966bf024Smrg
6199966bf024Smrg      # It seems that -bexpall does not export symbols beginning with
6200966bf024Smrg      # underscore (_), so it is better to generate a list of symbols to export.
6201966bf024Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6202966bf024Smrg      if test "$aix_use_runtimelinking" = yes; then
6203966bf024Smrg	# Warning - without using the other runtime loading flags (-brtl),
6204966bf024Smrg	# -berok will link without error, but may produce a broken library.
6205966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6206966bf024Smrg       # Determine the default libpath from the value encoded in an empty executable.
6207966bf024Smrg       _LT_AC_SYS_LIBPATH_AIX
6208966bf024Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6209966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6210966bf024Smrg       else
6211966bf024Smrg	if test "$host_cpu" = ia64; then
6212966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6213966bf024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6214966bf024Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6215966bf024Smrg	else
6216966bf024Smrg	 # Determine the default libpath from the value encoded in an empty executable.
6217966bf024Smrg	 _LT_AC_SYS_LIBPATH_AIX
6218966bf024Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6219966bf024Smrg	  # Warning - without using the other run time loading flags,
6220966bf024Smrg	  # -berok will link without error, but may produce a broken library.
6221966bf024Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6222966bf024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6223966bf024Smrg	  # -bexpall does not export symbols beginning with underscore (_)
6224966bf024Smrg	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6225966bf024Smrg	  # Exported symbols can be pulled into shared objects from archives
6226966bf024Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6227966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6228966bf024Smrg	  # This is similar to how AIX traditionally builds it's shared libraries.
6229966bf024Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6230966bf024Smrg	fi
6231966bf024Smrg      fi
6232966bf024Smrg      ;;
6233966bf024Smrg
6234966bf024Smrg    amigaos*)
6235966bf024Smrg      _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)'
6236966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6237966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6238966bf024Smrg      # see comment about different semantics on the GNU ld section
6239966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6240966bf024Smrg      ;;
6241966bf024Smrg
6242966bf024Smrg    bsdi4*)
6243966bf024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6244966bf024Smrg      ;;
6245966bf024Smrg
6246966bf024Smrg    cygwin* | mingw* | pw32*)
6247966bf024Smrg      # When not using gcc, we currently assume that we are using
6248966bf024Smrg      # Microsoft Visual C++.
6249966bf024Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
6250966bf024Smrg      # no search path for DLLs.
6251966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6252966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6253966bf024Smrg      # Tell ltmain to make .lib files, not .a files.
6254966bf024Smrg      libext=lib
6255966bf024Smrg      # Tell ltmain to make .dll files, not .so files.
6256966bf024Smrg      shrext_cmds=".dll"
6257966bf024Smrg      # FIXME: Setting linknames here is a bad hack.
6258966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6259966bf024Smrg      # The linker will automatically build a .lib file if we build a DLL.
6260966bf024Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6261966bf024Smrg      # FIXME: Should let the user specify the lib program.
6262966bf024Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6263966bf024Smrg      fix_srcfile_path='`cygpath -w "$srcfile"`'
6264966bf024Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6265966bf024Smrg      ;;
6266966bf024Smrg
6267966bf024Smrg    darwin* | rhapsody*)
6268966bf024Smrg    if test "$GXX" = yes ; then
6269966bf024Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6270966bf024Smrg      case "$host_os" in
6271966bf024Smrg      rhapsody* | darwin1.[[012]])
6272966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6273966bf024Smrg	;;
6274966bf024Smrg      *) # Darwin 1.3 on
6275966bf024Smrg      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6276966bf024Smrg      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6277966bf024Smrg      else
6278966bf024Smrg        case ${MACOSX_DEPLOYMENT_TARGET} in
6279966bf024Smrg          10.[[012]])
6280966bf024Smrg            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6281966bf024Smrg            ;;
6282966bf024Smrg          10.*)
6283966bf024Smrg            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6284966bf024Smrg            ;;
6285966bf024Smrg        esac
6286966bf024Smrg      fi
6287966bf024Smrg	;;
6288966bf024Smrg      esac
6289966bf024Smrg    	lt_int_apple_cc_single_mod=no
6290966bf024Smrg    	output_verbose_link_cmd='echo'
6291966bf024Smrg    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6292966bf024Smrg    	  lt_int_apple_cc_single_mod=yes
6293966bf024Smrg    	fi
6294966bf024Smrg    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6295966bf024Smrg    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6296966bf024Smrg    	else
6297966bf024Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6298966bf024Smrg      fi
6299966bf024Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6300966bf024Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6301966bf024Smrg        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6302966bf024Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6303966bf024Smrg        else
6304966bf024Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6305966bf024Smrg        fi
6306966bf024Smrg          _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}'
6307966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6308966bf024Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6309966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6310966bf024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6311966bf024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6312966bf024Smrg    else
6313966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6314966bf024Smrg    fi
6315966bf024Smrg      ;;
6316966bf024Smrg
6317966bf024Smrg    dgux*)
6318966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6319966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6320966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6321966bf024Smrg      ;;
6322966bf024Smrg
6323966bf024Smrg    freebsd1*)
6324966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6325966bf024Smrg      ;;
6326966bf024Smrg
6327966bf024Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6328966bf024Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
6329966bf024Smrg    # does not break anything, and helps significantly (at the cost of a little
6330966bf024Smrg    # extra space).
6331966bf024Smrg    freebsd2.2*)
6332966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6333966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6334966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6335966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6336966bf024Smrg      ;;
6337966bf024Smrg
6338966bf024Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6339966bf024Smrg    freebsd2*)
6340966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6341966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6342966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6343966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6344966bf024Smrg      ;;
6345966bf024Smrg
6346966bf024Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6347966bf024Smrg    freebsd* | kfreebsd*-gnu)
6348966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6349966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6350966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6351966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6352966bf024Smrg      ;;
6353966bf024Smrg
6354966bf024Smrg    hpux9*)
6355966bf024Smrg      if test "$GCC" = yes; then
6356966bf024Smrg	_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'
6357966bf024Smrg      else
6358966bf024Smrg	_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'
6359966bf024Smrg      fi
6360966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6361966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6362966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6363966bf024Smrg
6364966bf024Smrg      # hardcode_minus_L: Not really in the search PATH,
6365966bf024Smrg      # but as the default location of the library.
6366966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6367966bf024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6368966bf024Smrg      ;;
6369966bf024Smrg
6370966bf024Smrg    hpux10* | hpux11*)
6371966bf024Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6372966bf024Smrg	case "$host_cpu" in
6373966bf024Smrg	hppa*64*|ia64*)
6374966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6375966bf024Smrg	  ;;
6376966bf024Smrg	*)
6377966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6378966bf024Smrg	  ;;
6379966bf024Smrg	esac
6380966bf024Smrg      else
6381966bf024Smrg	case "$host_cpu" in
6382966bf024Smrg	hppa*64*|ia64*)
6383966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6384966bf024Smrg	  ;;
6385966bf024Smrg	*)
6386966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6387966bf024Smrg	  ;;
6388966bf024Smrg	esac
6389966bf024Smrg      fi
6390966bf024Smrg      if test "$with_gnu_ld" = no; then
6391966bf024Smrg	case "$host_cpu" in
6392966bf024Smrg	hppa*64*)
6393966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6394966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6395966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6396966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6397966bf024Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6398966bf024Smrg	  ;;
6399966bf024Smrg	ia64*)
6400966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6401966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6402966bf024Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6403966bf024Smrg
6404966bf024Smrg	  # hardcode_minus_L: Not really in the search PATH,
6405966bf024Smrg	  # but as the default location of the library.
6406966bf024Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6407966bf024Smrg	  ;;
6408966bf024Smrg	*)
6409966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6410966bf024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6411966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6412966bf024Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6413966bf024Smrg
6414966bf024Smrg	  # hardcode_minus_L: Not really in the search PATH,
6415966bf024Smrg	  # but as the default location of the library.
6416966bf024Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6417966bf024Smrg	  ;;
6418966bf024Smrg	esac
6419966bf024Smrg      fi
6420966bf024Smrg      ;;
6421966bf024Smrg
6422966bf024Smrg    irix5* | irix6* | nonstopux*)
6423966bf024Smrg      if test "$GCC" = yes; then
6424966bf024Smrg	_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'
6425966bf024Smrg      else
6426966bf024Smrg	_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'
6427966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6428966bf024Smrg      fi
6429966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6430966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6431966bf024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6432966bf024Smrg      ;;
6433966bf024Smrg
6434966bf024Smrg    netbsd*)
6435966bf024Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6436966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6437966bf024Smrg      else
6438966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6439966bf024Smrg      fi
6440966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6441966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6442966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6443966bf024Smrg      ;;
6444966bf024Smrg
6445966bf024Smrg    newsos6)
6446966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6447966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6448966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6449966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6450966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6451966bf024Smrg      ;;
6452966bf024Smrg
6453966bf024Smrg    openbsd*)
6454966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6455966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6456966bf024Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6457966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6458966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6459966bf024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6460966bf024Smrg      else
6461966bf024Smrg       case $host_os in
6462966bf024Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6463966bf024Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6464966bf024Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6465966bf024Smrg	   ;;
6466966bf024Smrg	 *)
6467966bf024Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6468966bf024Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6469966bf024Smrg	   ;;
6470966bf024Smrg       esac
6471966bf024Smrg      fi
6472966bf024Smrg      ;;
6473966bf024Smrg
6474966bf024Smrg    os2*)
6475966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6476966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6477966bf024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6478966bf024Smrg      _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'
6479966bf024Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6480966bf024Smrg      ;;
6481966bf024Smrg
6482966bf024Smrg    osf3*)
6483966bf024Smrg      if test "$GCC" = yes; then
6484966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6485966bf024Smrg	_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'
6486966bf024Smrg      else
6487966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6488966bf024Smrg	_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'
6489966bf024Smrg      fi
6490966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6491966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6492966bf024Smrg      ;;
6493966bf024Smrg
6494966bf024Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6495966bf024Smrg      if test "$GCC" = yes; then
6496966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6497966bf024Smrg	_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'
6498966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6499966bf024Smrg      else
6500966bf024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6501966bf024Smrg	_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'
6502966bf024Smrg	_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~
6503966bf024Smrg	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6504966bf024Smrg
6505966bf024Smrg	# Both c and cxx compiler support -rpath directly
6506966bf024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6507966bf024Smrg      fi
6508966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6509966bf024Smrg      ;;
6510966bf024Smrg
6511966bf024Smrg    sco3.2v5*)
6512966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6513966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6514966bf024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6515966bf024Smrg      runpath_var=LD_RUN_PATH
6516966bf024Smrg      hardcode_runpath_var=yes
6517966bf024Smrg      ;;
6518966bf024Smrg
6519966bf024Smrg    solaris*)
6520966bf024Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6521966bf024Smrg      if test "$GCC" = yes; then
6522966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6523966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6524966bf024Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6525966bf024Smrg      else
6526966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6527966bf024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6528966bf024Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6529966bf024Smrg      fi
6530966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6531966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6532966bf024Smrg      case $host_os in
6533966bf024Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6534966bf024Smrg      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6535966bf024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6536966bf024Smrg      esac
6537966bf024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6538966bf024Smrg      ;;
6539966bf024Smrg
6540966bf024Smrg    sunos4*)
6541966bf024Smrg      if test "x$host_vendor" = xsequent; then
6542966bf024Smrg	# Use $CC to link under sequent, because it throws in some extra .o
6543966bf024Smrg	# files that make .init and .fini sections work.
6544966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6545966bf024Smrg      else
6546966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6547966bf024Smrg      fi
6548966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6549966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6550966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6551966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6552966bf024Smrg      ;;
6553966bf024Smrg
6554966bf024Smrg    sysv4)
6555966bf024Smrg      case $host_vendor in
6556966bf024Smrg	sni)
6557966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6558966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6559966bf024Smrg	;;
6560966bf024Smrg	siemens)
6561966bf024Smrg	  ## LD is ld it makes a PLAMLIB
6562966bf024Smrg	  ## CC just makes a GrossModule.
6563966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6564966bf024Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6565966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6566966bf024Smrg        ;;
6567966bf024Smrg	motorola)
6568966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6569966bf024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6570966bf024Smrg	;;
6571966bf024Smrg      esac
6572966bf024Smrg      runpath_var='LD_RUN_PATH'
6573966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6574966bf024Smrg      ;;
6575966bf024Smrg
6576966bf024Smrg    sysv4.3*)
6577966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6578966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6579966bf024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6580966bf024Smrg      ;;
6581966bf024Smrg
6582966bf024Smrg    sysv4*MP*)
6583966bf024Smrg      if test -d /usr/nec; then
6584966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6585966bf024Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6586966bf024Smrg	runpath_var=LD_RUN_PATH
6587966bf024Smrg	hardcode_runpath_var=yes
6588966bf024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6589966bf024Smrg      fi
6590966bf024Smrg      ;;
6591966bf024Smrg
6592966bf024Smrg    sysv4.2uw2*)
6593966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6594966bf024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6595966bf024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6596966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6597966bf024Smrg      hardcode_runpath_var=yes
6598966bf024Smrg      runpath_var=LD_RUN_PATH
6599966bf024Smrg      ;;
6600966bf024Smrg
6601966bf024Smrg   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
6602966bf024Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6603966bf024Smrg      if test "$GCC" = yes; then
6604966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6605966bf024Smrg      else
6606966bf024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6607966bf024Smrg      fi
6608966bf024Smrg      runpath_var='LD_RUN_PATH'
6609966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6610966bf024Smrg      ;;
6611966bf024Smrg
6612966bf024Smrg    sysv5*)
6613966bf024Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6614966bf024Smrg      # $CC -shared without GNU ld will not create a library from C++
6615966bf024Smrg      # object files and a static libstdc++, better avoid it by now
6616966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6617966bf024Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6618966bf024Smrg  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6619966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6620966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6621966bf024Smrg      runpath_var='LD_RUN_PATH'
6622966bf024Smrg      ;;
6623966bf024Smrg
6624966bf024Smrg    uts4*)
6625966bf024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6626966bf024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6627966bf024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6628966bf024Smrg      ;;
6629966bf024Smrg
6630966bf024Smrg    *)
6631966bf024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6632966bf024Smrg      ;;
6633966bf024Smrg    esac
6634966bf024Smrg  fi
6635966bf024Smrg])
6636966bf024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6637966bf024Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6638966bf024Smrg
6639966bf024Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6640966bf024Smrgif test "$GCC" = yes; then
6641966bf024Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6642966bf024Smrgfi
6643966bf024Smrg
6644966bf024Smrg#
6645966bf024Smrg# Do we need to explicitly link libc?
6646966bf024Smrg#
6647966bf024Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6648966bf024Smrgx|xyes)
6649966bf024Smrg  # Assume -lc should be added
6650966bf024Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6651966bf024Smrg
6652966bf024Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6653966bf024Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6654966bf024Smrg    *'~'*)
6655966bf024Smrg      # FIXME: we may have to deal with multi-command sequences.
6656966bf024Smrg      ;;
6657966bf024Smrg    '$CC '*)
6658966bf024Smrg      # Test whether the compiler implicitly links with -lc since on some
6659966bf024Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6660966bf024Smrg      # to ld, don't add -lc before -lgcc.
6661966bf024Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6662966bf024Smrg      $rm conftest*
6663966bf024Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6664966bf024Smrg
6665966bf024Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6666966bf024Smrg        soname=conftest
6667966bf024Smrg        lib=conftest
6668966bf024Smrg        libobjs=conftest.$ac_objext
6669966bf024Smrg        deplibs=
6670966bf024Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6671966bf024Smrg        compiler_flags=-v
6672966bf024Smrg        linker_flags=-v
6673966bf024Smrg        verstring=
6674966bf024Smrg        output_objdir=.
6675966bf024Smrg        libname=conftest
6676966bf024Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6677966bf024Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6678966bf024Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6679966bf024Smrg        then
6680966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6681966bf024Smrg        else
6682966bf024Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6683966bf024Smrg        fi
6684966bf024Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6685966bf024Smrg      else
6686966bf024Smrg        cat conftest.err 1>&5
6687966bf024Smrg      fi
6688966bf024Smrg      $rm conftest*
6689966bf024Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6690966bf024Smrg      ;;
6691966bf024Smrg    esac
6692966bf024Smrg  fi
6693966bf024Smrg  ;;
6694966bf024Smrgesac
6695966bf024Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
6696966bf024Smrg
6697966bf024Smrg
6698966bf024Smrg# _LT_AC_FILE_LTDLL_C
6699966bf024Smrg# -------------------
6700966bf024Smrg# Be careful that the start marker always follows a newline.
6701966bf024SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6702966bf024Smrg# /* ltdll.c starts here */
6703966bf024Smrg# #define WIN32_LEAN_AND_MEAN
6704966bf024Smrg# #include <windows.h>
6705966bf024Smrg# #undef WIN32_LEAN_AND_MEAN
6706966bf024Smrg# #include <stdio.h>
6707966bf024Smrg#
6708966bf024Smrg# #ifndef __CYGWIN__
6709966bf024Smrg# #  ifdef __CYGWIN32__
6710966bf024Smrg# #    define __CYGWIN__ __CYGWIN32__
6711966bf024Smrg# #  endif
6712966bf024Smrg# #endif
6713966bf024Smrg#
6714966bf024Smrg# #ifdef __cplusplus
6715966bf024Smrg# extern "C" {
6716966bf024Smrg# #endif
6717966bf024Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6718966bf024Smrg# #ifdef __cplusplus
6719966bf024Smrg# }
6720966bf024Smrg# #endif
6721966bf024Smrg#
6722966bf024Smrg# #ifdef __CYGWIN__
6723966bf024Smrg# #include <cygwin/cygwin_dll.h>
6724966bf024Smrg# DECLARE_CYGWIN_DLL( DllMain );
6725966bf024Smrg# #endif
6726966bf024Smrg# HINSTANCE __hDllInstance_base;
6727966bf024Smrg#
6728966bf024Smrg# BOOL APIENTRY
6729966bf024Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6730966bf024Smrg# {
6731966bf024Smrg#   __hDllInstance_base = hInst;
6732966bf024Smrg#   return TRUE;
6733966bf024Smrg# }
6734966bf024Smrg# /* ltdll.c ends here */
6735966bf024Smrg])# _LT_AC_FILE_LTDLL_C
6736966bf024Smrg
6737966bf024Smrg
6738966bf024Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6739966bf024Smrg# ---------------------------------
6740966bf024SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6741966bf024Smrg
6742966bf024Smrg
6743966bf024Smrg# old names
6744966bf024SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6745966bf024SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6746966bf024SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6747966bf024SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6748966bf024SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6749966bf024SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6750966bf024SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6751966bf024Smrg
6752966bf024Smrg# This is just to silence aclocal about the macro not being used
6753966bf024Smrgifelse([AC_DISABLE_FAST_INSTALL])
6754966bf024Smrg
6755966bf024SmrgAC_DEFUN([LT_AC_PROG_GCJ],
6756966bf024Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
6757966bf024Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6758966bf024Smrg  AC_SUBST(GCJFLAGS)
6759966bf024Smrg])
6760966bf024Smrg
6761966bf024SmrgAC_DEFUN([LT_AC_PROG_RC],
6762966bf024Smrg[AC_CHECK_TOOL(RC, windres, no)
6763966bf024Smrg])
6764966bf024Smrg
6765966bf024Smrg# NOTE: This macro has been submitted for inclusion into   #
6766966bf024Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6767966bf024Smrg#  a released version of Autoconf we should remove this    #
6768966bf024Smrg#  macro and use it instead.                               #
6769966bf024Smrg# LT_AC_PROG_SED
6770966bf024Smrg# --------------
6771966bf024Smrg# Check for a fully-functional sed program, that truncates
6772966bf024Smrg# as few characters as possible.  Prefer GNU sed if found.
6773966bf024SmrgAC_DEFUN([LT_AC_PROG_SED],
6774966bf024Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
6775966bf024SmrgAC_CACHE_VAL(lt_cv_path_SED,
6776966bf024Smrg[# Loop through the user's path and test for sed and gsed.
6777966bf024Smrg# Then use that list of sed's as ones to test for truncation.
6778966bf024Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6779966bf024Smrgfor as_dir in $PATH
6780966bf024Smrgdo
6781966bf024Smrg  IFS=$as_save_IFS
6782966bf024Smrg  test -z "$as_dir" && as_dir=.
6783966bf024Smrg  for lt_ac_prog in sed gsed; do
6784966bf024Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
6785966bf024Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6786966bf024Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6787966bf024Smrg      fi
6788966bf024Smrg    done
6789966bf024Smrg  done
6790966bf024Smrgdone
6791966bf024Smrglt_ac_max=0
6792966bf024Smrglt_ac_count=0
6793966bf024Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6794966bf024Smrg# along with /bin/sed that truncates output.
6795966bf024Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6796966bf024Smrg  test ! -f $lt_ac_sed && break
6797966bf024Smrg  cat /dev/null > conftest.in
6798966bf024Smrg  lt_ac_count=0
6799966bf024Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6800966bf024Smrg  # Check for GNU sed and select it if it is found.
6801966bf024Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6802966bf024Smrg    lt_cv_path_SED=$lt_ac_sed
6803966bf024Smrg    break
6804966bf024Smrg  fi
6805966bf024Smrg  while true; do
6806966bf024Smrg    cat conftest.in conftest.in >conftest.tmp
6807966bf024Smrg    mv conftest.tmp conftest.in
6808966bf024Smrg    cp conftest.in conftest.nl
6809966bf024Smrg    echo >>conftest.nl
6810966bf024Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6811966bf024Smrg    cmp -s conftest.out conftest.nl || break
6812966bf024Smrg    # 10000 chars as input seems more than enough
6813966bf024Smrg    test $lt_ac_count -gt 10 && break
6814966bf024Smrg    lt_ac_count=`expr $lt_ac_count + 1`
6815966bf024Smrg    if test $lt_ac_count -gt $lt_ac_max; then
6816966bf024Smrg      lt_ac_max=$lt_ac_count
6817966bf024Smrg      lt_cv_path_SED=$lt_ac_sed
6818966bf024Smrg    fi
6819966bf024Smrg  done
6820966bf024Smrgdone
6821966bf024SmrgSED=$lt_cv_path_SED
6822966bf024Smrg])
6823966bf024SmrgAC_MSG_RESULT([$SED])
6824966bf024Smrg])
6825966bf024Smrg
6826966bf024Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6827966bf024Smrg# 
6828966bf024Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6829966bf024Smrg#
6830966bf024Smrg# This program is free software; you can redistribute it and/or modify
6831966bf024Smrg# it under the terms of the GNU General Public License as published by
6832966bf024Smrg# the Free Software Foundation; either version 2 of the License, or
6833966bf024Smrg# (at your option) any later version.
6834966bf024Smrg#
6835966bf024Smrg# This program is distributed in the hope that it will be useful, but
6836966bf024Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
6837966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6838966bf024Smrg# General Public License for more details.
6839966bf024Smrg#
6840966bf024Smrg# You should have received a copy of the GNU General Public License
6841966bf024Smrg# along with this program; if not, write to the Free Software
6842966bf024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6843966bf024Smrg#
6844966bf024Smrg# As a special exception to the GNU General Public License, if you
6845966bf024Smrg# distribute this file as part of a program that contains a
6846966bf024Smrg# configuration script generated by Autoconf, you may include it under
6847966bf024Smrg# the same distribution terms that you use for the rest of that program.
6848966bf024Smrg
6849966bf024Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6850966bf024Smrg# ----------------------------------
6851966bf024SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
6852966bf024Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6853966bf024Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6854966bf024SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6855966bf024Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6856966bf024Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6857966bf024Smrgfi
6858966bf024Smrgif test -n "$PKG_CONFIG"; then
6859966bf024Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
6860966bf024Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6861966bf024Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6862966bf024Smrg		AC_MSG_RESULT([yes])
6863966bf024Smrg	else
6864966bf024Smrg		AC_MSG_RESULT([no])
6865966bf024Smrg		PKG_CONFIG=""
6866966bf024Smrg	fi
6867966bf024Smrg		
6868966bf024Smrgfi[]dnl
6869966bf024Smrg])# PKG_PROG_PKG_CONFIG
6870966bf024Smrg
6871966bf024Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6872966bf024Smrg#
6873966bf024Smrg# Check to see whether a particular set of modules exists.  Similar
6874966bf024Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6875966bf024Smrg#
6876966bf024Smrg#
6877966bf024Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6878966bf024Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
6879966bf024Smrg# PKG_CHECK_EXISTS manually
6880966bf024Smrg# --------------------------------------------------------------
6881966bf024SmrgAC_DEFUN([PKG_CHECK_EXISTS],
6882966bf024Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6883966bf024Smrgif test -n "$PKG_CONFIG" && \
6884966bf024Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6885966bf024Smrg  m4_ifval([$2], [$2], [:])
6886966bf024Smrgm4_ifvaln([$3], [else
6887966bf024Smrg  $3])dnl
6888966bf024Smrgfi])
6889966bf024Smrg
6890966bf024Smrg
6891966bf024Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6892966bf024Smrg# ---------------------------------------------
6893966bf024Smrgm4_define([_PKG_CONFIG],
6894966bf024Smrg[if test -n "$PKG_CONFIG"; then
6895966bf024Smrg    if test -n "$$1"; then
6896966bf024Smrg        pkg_cv_[]$1="$$1"
6897966bf024Smrg    else
6898966bf024Smrg        PKG_CHECK_EXISTS([$3],
6899966bf024Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6900966bf024Smrg			 [pkg_failed=yes])
6901966bf024Smrg    fi
6902966bf024Smrgelse
6903966bf024Smrg	pkg_failed=untried
6904966bf024Smrgfi[]dnl
6905966bf024Smrg])# _PKG_CONFIG
6906966bf024Smrg
6907966bf024Smrg# _PKG_SHORT_ERRORS_SUPPORTED
6908966bf024Smrg# -----------------------------
6909966bf024SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6910966bf024Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6911966bf024Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6912966bf024Smrg        _pkg_short_errors_supported=yes
6913966bf024Smrgelse
6914966bf024Smrg        _pkg_short_errors_supported=no
6915966bf024Smrgfi[]dnl
6916966bf024Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
6917966bf024Smrg
6918966bf024Smrg
6919966bf024Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6920966bf024Smrg# [ACTION-IF-NOT-FOUND])
6921966bf024Smrg#
6922966bf024Smrg#
6923966bf024Smrg# Note that if there is a possibility the first call to
6924966bf024Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
6925966bf024Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6926966bf024Smrg#
6927966bf024Smrg#
6928966bf024Smrg# --------------------------------------------------------------
6929966bf024SmrgAC_DEFUN([PKG_CHECK_MODULES],
6930966bf024Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6931966bf024SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6932966bf024SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6933966bf024Smrg
6934966bf024Smrgpkg_failed=no
6935966bf024SmrgAC_MSG_CHECKING([for $1])
6936966bf024Smrg
6937966bf024Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6938966bf024Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6939966bf024Smrg
6940966bf024Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6941966bf024Smrgand $1[]_LIBS to avoid the need to call pkg-config.
6942966bf024SmrgSee the pkg-config man page for more details.])
6943966bf024Smrg
6944966bf024Smrgif test $pkg_failed = yes; then
6945966bf024Smrg        _PKG_SHORT_ERRORS_SUPPORTED
6946966bf024Smrg        if test $_pkg_short_errors_supported = yes; then
6947966bf024Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6948966bf024Smrg        else 
6949966bf024Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6950966bf024Smrg        fi
6951966bf024Smrg	# Put the nasty error message in config.log where it belongs
6952966bf024Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6953966bf024Smrg
6954966bf024Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
6955966bf024Smrg[Package requirements ($2) were not met:
6956966bf024Smrg
6957966bf024Smrg$$1_PKG_ERRORS
6958966bf024Smrg
6959966bf024SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
6960966bf024Smrginstalled software in a non-standard prefix.
6961966bf024Smrg
6962966bf024Smrg_PKG_TEXT
6963966bf024Smrg])],
6964966bf024Smrg		[$4])
6965966bf024Smrgelif test $pkg_failed = untried; then
6966966bf024Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
6967966bf024Smrg[The pkg-config script could not be found or is too old.  Make sure it
6968966bf024Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
6969966bf024Smrgpath to pkg-config.
6970966bf024Smrg
6971966bf024Smrg_PKG_TEXT
6972966bf024Smrg
6973966bf024SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6974966bf024Smrg		[$4])
6975966bf024Smrgelse
6976966bf024Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6977966bf024Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6978966bf024Smrg        AC_MSG_RESULT([yes])
6979966bf024Smrg	ifelse([$3], , :, [$3])
6980966bf024Smrgfi[]dnl
6981966bf024Smrg])# PKG_CHECK_MODULES
6982966bf024Smrg
6983966bf024Smrgdnl Copyright 2005 Red Hat, Inc
6984966bf024Smrgdnl
6985966bf024Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
6986966bf024Smrgdnl documentation for any purpose is hereby granted without fee, provided that
6987966bf024Smrgdnl the above copyright notice appear in all copies and that both that
6988966bf024Smrgdnl copyright notice and this permission notice appear in supporting
6989966bf024Smrgdnl documentation.
6990966bf024Smrgdnl
6991966bf024Smrgdnl The above copyright notice and this permission notice shall be included
6992966bf024Smrgdnl in all copies or substantial portions of the Software.
6993966bf024Smrgdnl
6994966bf024Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6995966bf024Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6996966bf024Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6997966bf024Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6998966bf024Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6999966bf024Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7000966bf024Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
7001966bf024Smrgdnl
7002966bf024Smrgdnl Except as contained in this notice, the name of the copyright holders shall
7003966bf024Smrgdnl not be used in advertising or otherwise to promote the sale, use or
7004966bf024Smrgdnl other dealings in this Software without prior written authorization
7005966bf024Smrgdnl from the copyright holders.
7006966bf024Smrgdnl
7007966bf024Smrg
7008966bf024Smrg# XORG_RELEASE_VERSION
7009966bf024Smrg# --------------------
7010966bf024Smrg# Adds --with/without-release-string and changes the PACKAGE and
7011966bf024Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
7012966bf024Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
7013966bf024Smrg 
7014966bf024SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
7015966bf024Smrg	AC_ARG_WITH(release-version,
7016966bf024Smrg			AC_HELP_STRING([--with-release-version=STRING],
7017966bf024Smrg				[Use release version string in package name]),
7018966bf024Smrg			[RELEASE_VERSION="$withval"],
7019966bf024Smrg			[RELEASE_VERSION=""])
7020966bf024Smrg	if test "x$RELEASE_VERSION" != "x"; then
7021966bf024Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
7022966bf024Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
7023966bf024Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
7024966bf024Smrg	fi
7025966bf024Smrg])
7026966bf024Smrg
7027