source: OGRE/trunk/ogrenew/ReferenceApplication/aclocal.m4 @ 692

Revision 692, 150.5 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1# generated automatically by aclocal 1.7.5 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# Do all the work for Automake.                            -*- Autoconf -*-
15
16# This macro actually does too much some checks are only needed if
17# your package does certain things.  But this isn't really a big deal.
18
19# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20# Free Software Foundation, Inc.
21
22# This program is free software; you can redistribute it and/or modify
23# it under the terms of the GNU General Public License as published by
24# the Free Software Foundation; either version 2, or (at your option)
25# any later version.
26
27# This program is distributed in the hope that it will be useful,
28# but WITHOUT ANY WARRANTY; without even the implied warranty of
29# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30# GNU General Public License for more details.
31
32# You should have received a copy of the GNU General Public License
33# along with this program; if not, write to the Free Software
34# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35# 02111-1307, USA.
36
37# serial 10
38
39AC_PREREQ([2.54])
40
41# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42# the ones we care about.
43m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44
45# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46# AM_INIT_AUTOMAKE([OPTIONS])
47# -----------------------------------------------
48# The call with PACKAGE and VERSION arguments is the old style
49# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50# and VERSION should now be passed to AC_INIT and removed from
51# the call to AM_INIT_AUTOMAKE.
52# We support both call styles for the transition.  After
53# the next Automake release, Autoconf can make the AC_INIT
54# arguments mandatory, and then we can depend on a new Autoconf
55# release and drop the old call support.
56AC_DEFUN([AM_INIT_AUTOMAKE],
57[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58 AC_REQUIRE([AC_PROG_INSTALL])dnl
59# test to see if srcdir already configured
60if test "`cd $srcdir && pwd`" != "`pwd`" &&
61   test -f $srcdir/config.status; then
62  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63fi
64
65# test whether we have cygpath
66if test -z "$CYGPATH_W"; then
67  if (cygpath --version) >/dev/null 2>/dev/null; then
68    CYGPATH_W='cygpath -w'
69  else
70    CYGPATH_W=echo
71  fi
72fi
73AC_SUBST([CYGPATH_W])
74
75# Define the identity of the package.
76dnl Distinguish between old-style and new-style calls.
77m4_ifval([$2],
78[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79 AC_SUBST([PACKAGE], [$1])dnl
80 AC_SUBST([VERSION], [$2])],
81[_AM_SET_OPTIONS([$1])dnl
82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84
85_AM_IF_OPTION([no-define],,
86[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88
89# Some tools Automake needs.
90AC_REQUIRE([AM_SANITY_CHECK])dnl
91AC_REQUIRE([AC_ARG_PROGRAM])dnl
92AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93AM_MISSING_PROG(AUTOCONF, autoconf)
94AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95AM_MISSING_PROG(AUTOHEADER, autoheader)
96AM_MISSING_PROG(MAKEINFO, makeinfo)
97AM_MISSING_PROG(AMTAR, tar)
98AM_PROG_INSTALL_SH
99AM_PROG_INSTALL_STRIP
100# We need awk for the "check" target.  The system "awk" is bad on
101# some platforms.
102AC_REQUIRE([AC_PROG_AWK])dnl
103AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104AC_REQUIRE([AM_SET_LEADING_DOT])dnl
105
106_AM_IF_OPTION([no-dependencies],,
107[AC_PROVIDE_IFELSE([AC_PROG_CC],
108                  [_AM_DEPENDENCIES(CC)],
109                  [define([AC_PROG_CC],
110                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111AC_PROVIDE_IFELSE([AC_PROG_CXX],
112                  [_AM_DEPENDENCIES(CXX)],
113                  [define([AC_PROG_CXX],
114                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115])
116])
117
118
119# When config.status generates a header, we must update the stamp-h file.
120# This file resides in the same directory as the config header
121# that is generated.  The stamp files are numbered to have different names.
122
123# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124# loop where config.status creates the headers, so we can generate
125# our stamp files there.
126AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127[# Compute $1's index in $config_headers.
128_am_stamp_count=1
129for _am_header in $config_headers :; do
130  case $_am_header in
131    $1 | $1:* )
132      break ;;
133    * )
134      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135  esac
136done
137echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138
139# Copyright 2002  Free Software Foundation, Inc.
140
141# This program is free software; you can redistribute it and/or modify
142# it under the terms of the GNU General Public License as published by
143# the Free Software Foundation; either version 2, or (at your option)
144# any later version.
145
146# This program is distributed in the hope that it will be useful,
147# but WITHOUT ANY WARRANTY; without even the implied warranty of
148# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149# GNU General Public License for more details.
150
151# You should have received a copy of the GNU General Public License
152# along with this program; if not, write to the Free Software
153# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154
155# AM_AUTOMAKE_VERSION(VERSION)
156# ----------------------------
157# Automake X.Y traces this macro to ensure aclocal.m4 has been
158# generated from the m4 files accompanying Automake X.Y.
159AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160
161# AM_SET_CURRENT_AUTOMAKE_VERSION
162# -------------------------------
163# Call AM_AUTOMAKE_VERSION so it can be traced.
164# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166         [AM_AUTOMAKE_VERSION([1.7.5])])
167
168# Helper functions for option handling.                    -*- Autoconf -*-
169
170# Copyright 2001, 2002  Free Software Foundation, Inc.
171
172# This program is free software; you can redistribute it and/or modify
173# it under the terms of the GNU General Public License as published by
174# the Free Software Foundation; either version 2, or (at your option)
175# any later version.
176
177# This program is distributed in the hope that it will be useful,
178# but WITHOUT ANY WARRANTY; without even the implied warranty of
179# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180# GNU General Public License for more details.
181
182# You should have received a copy of the GNU General Public License
183# along with this program; if not, write to the Free Software
184# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185# 02111-1307, USA.
186
187# serial 2
188
189# _AM_MANGLE_OPTION(NAME)
190# -----------------------
191AC_DEFUN([_AM_MANGLE_OPTION],
192[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193
194# _AM_SET_OPTION(NAME)
195# ------------------------------
196# Set option NAME.  Presently that only means defining a flag for this option.
197AC_DEFUN([_AM_SET_OPTION],
198[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199
200# _AM_SET_OPTIONS(OPTIONS)
201# ----------------------------------
202# OPTIONS is a space-separated list of Automake options.
203AC_DEFUN([_AM_SET_OPTIONS],
204[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205
206# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207# -------------------------------------------
208# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209AC_DEFUN([_AM_IF_OPTION],
210[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211
212#
213# Check to make sure that the build environment is sane.
214#
215
216# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217
218# This program is free software; you can redistribute it and/or modify
219# it under the terms of the GNU General Public License as published by
220# the Free Software Foundation; either version 2, or (at your option)
221# any later version.
222
223# This program is distributed in the hope that it will be useful,
224# but WITHOUT ANY WARRANTY; without even the implied warranty of
225# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226# GNU General Public License for more details.
227
228# You should have received a copy of the GNU General Public License
229# along with this program; if not, write to the Free Software
230# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231# 02111-1307, USA.
232
233# serial 3
234
235# AM_SANITY_CHECK
236# ---------------
237AC_DEFUN([AM_SANITY_CHECK],
238[AC_MSG_CHECKING([whether build environment is sane])
239# Just in case
240sleep 1
241echo timestamp > conftest.file
242# Do `set' in a subshell so we don't clobber the current shell's
243# arguments.  Must try -L first in case configure is actually a
244# symlink; some systems play weird games with the mod time of symlinks
245# (eg FreeBSD returns the mod time of the symlink's containing
246# directory).
247if (
248   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249   if test "$[*]" = "X"; then
250      # -L didn't work.
251      set X `ls -t $srcdir/configure conftest.file`
252   fi
253   rm -f conftest.file
254   if test "$[*]" != "X $srcdir/configure conftest.file" \
255      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256
257      # If neither matched, then we have a broken ls.  This can happen
258      # if, for instance, CONFIG_SHELL is bash and it inherits a
259      # broken ls alias from the environment.  This has actually
260      # happened.  Such a system could not be considered "sane".
261      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262alias in your environment])
263   fi
264
265   test "$[2]" = conftest.file
266   )
267then
268   # Ok.
269   :
270else
271   AC_MSG_ERROR([newly created file is older than distributed files!
272Check your system clock])
273fi
274AC_MSG_RESULT(yes)])
275
276#  -*- Autoconf -*-
277
278
279# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280
281# This program is free software; you can redistribute it and/or modify
282# it under the terms of the GNU General Public License as published by
283# the Free Software Foundation; either version 2, or (at your option)
284# any later version.
285
286# This program is distributed in the hope that it will be useful,
287# but WITHOUT ANY WARRANTY; without even the implied warranty of
288# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289# GNU General Public License for more details.
290
291# You should have received a copy of the GNU General Public License
292# along with this program; if not, write to the Free Software
293# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294# 02111-1307, USA.
295
296# serial 3
297
298# AM_MISSING_PROG(NAME, PROGRAM)
299# ------------------------------
300AC_DEFUN([AM_MISSING_PROG],
301[AC_REQUIRE([AM_MISSING_HAS_RUN])
302$1=${$1-"${am_missing_run}$2"}
303AC_SUBST($1)])
304
305
306# AM_MISSING_HAS_RUN
307# ------------------
308# Define MISSING if not defined so far and test if it supports --run.
309# If it does, set am_missing_run to use it, otherwise, to nothing.
310AC_DEFUN([AM_MISSING_HAS_RUN],
311[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313# Use eval to expand $SHELL
314if eval "$MISSING --run true"; then
315  am_missing_run="$MISSING --run "
316else
317  am_missing_run=
318  AC_MSG_WARN([`missing' script is too old or missing])
319fi
320])
321
322# AM_AUX_DIR_EXPAND
323
324# Copyright 2001 Free Software Foundation, Inc.
325
326# This program is free software; you can redistribute it and/or modify
327# it under the terms of the GNU General Public License as published by
328# the Free Software Foundation; either version 2, or (at your option)
329# any later version.
330
331# This program is distributed in the hope that it will be useful,
332# but WITHOUT ANY WARRANTY; without even the implied warranty of
333# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334# GNU General Public License for more details.
335
336# You should have received a copy of the GNU General Public License
337# along with this program; if not, write to the Free Software
338# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339# 02111-1307, USA.
340
341# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344#
345# Of course, Automake must honor this variable whenever it calls a
346# tool from the auxiliary directory.  The problem is that $srcdir (and
347# therefore $ac_aux_dir as well) can be either absolute or relative,
348# depending on how configure is run.  This is pretty annoying, since
349# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350# source directory, any form will work fine, but in subdirectories a
351# relative path needs to be adjusted first.
352#
353# $ac_aux_dir/missing
354#    fails when called from a subdirectory if $ac_aux_dir is relative
355# $top_srcdir/$ac_aux_dir/missing
356#    fails if $ac_aux_dir is absolute,
357#    fails when called from a subdirectory in a VPATH build with
358#          a relative $ac_aux_dir
359#
360# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361# are both prefixed by $srcdir.  In an in-source build this is usually
362# harmless because $srcdir is `.', but things will broke when you
363# start a VPATH build or use an absolute $srcdir.
364#
365# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368# and then we would define $MISSING as
369#   MISSING="\${SHELL} $am_aux_dir/missing"
370# This will work as long as MISSING is not called from configure, because
371# unfortunately $(top_srcdir) has no meaning in configure.
372# However there are other variables, like CC, which are often used in
373# configure, and could therefore not use this "fixed" $ac_aux_dir.
374#
375# Another solution, used here, is to always expand $ac_aux_dir to an
376# absolute PATH.  The drawback is that using absolute paths prevent a
377# configured tree to be moved without reconfiguration.
378
379# Rely on autoconf to set up CDPATH properly.
380AC_PREREQ([2.50])
381
382AC_DEFUN([AM_AUX_DIR_EXPAND], [
383# expand $ac_aux_dir to an absolute path
384am_aux_dir=`cd $ac_aux_dir && pwd`
385])
386
387# AM_PROG_INSTALL_SH
388# ------------------
389# Define $install_sh.
390
391# Copyright 2001 Free Software Foundation, Inc.
392
393# This program is free software; you can redistribute it and/or modify
394# it under the terms of the GNU General Public License as published by
395# the Free Software Foundation; either version 2, or (at your option)
396# any later version.
397
398# This program is distributed in the hope that it will be useful,
399# but WITHOUT ANY WARRANTY; without even the implied warranty of
400# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401# GNU General Public License for more details.
402
403# You should have received a copy of the GNU General Public License
404# along with this program; if not, write to the Free Software
405# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406# 02111-1307, USA.
407
408AC_DEFUN([AM_PROG_INSTALL_SH],
409[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410install_sh=${install_sh-"$am_aux_dir/install-sh"}
411AC_SUBST(install_sh)])
412
413# AM_PROG_INSTALL_STRIP
414
415# Copyright 2001 Free Software Foundation, Inc.
416
417# This program is free software; you can redistribute it and/or modify
418# it under the terms of the GNU General Public License as published by
419# the Free Software Foundation; either version 2, or (at your option)
420# any later version.
421
422# This program is distributed in the hope that it will be useful,
423# but WITHOUT ANY WARRANTY; without even the implied warranty of
424# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425# GNU General Public License for more details.
426
427# You should have received a copy of the GNU General Public License
428# along with this program; if not, write to the Free Software
429# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430# 02111-1307, USA.
431
432# One issue with vendor `install' (even GNU) is that you can't
433# specify the program used to strip binaries.  This is especially
434# annoying in cross-compiling environments, where the build's strip
435# is unlikely to handle the host's binaries.
436# Fortunately install-sh will honor a STRIPPROG variable, so we
437# always use install-sh in `make install-strip', and initialize
438# STRIPPROG with the value of the STRIP variable (set by the user).
439AC_DEFUN([AM_PROG_INSTALL_STRIP],
440[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441# Installed binaries are usually stripped using `strip' when the user
442# run `make install-strip'.  However `strip' might not be the right
443# tool to use in cross-compilation environments, therefore Automake
444# will honor the `STRIP' environment variable to overrule this program.
445dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446if test "$cross_compiling" != no; then
447  AC_CHECK_TOOL([STRIP], [strip], :)
448fi
449INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450AC_SUBST([INSTALL_STRIP_PROGRAM])])
451
452#                                                          -*- Autoconf -*-
453# Copyright (C) 2003  Free Software Foundation, Inc.
454
455# This program is free software; you can redistribute it and/or modify
456# it under the terms of the GNU General Public License as published by
457# the Free Software Foundation; either version 2, or (at your option)
458# any later version.
459
460# This program is distributed in the hope that it will be useful,
461# but WITHOUT ANY WARRANTY; without even the implied warranty of
462# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463# GNU General Public License for more details.
464
465# You should have received a copy of the GNU General Public License
466# along with this program; if not, write to the Free Software
467# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468# 02111-1307, USA.
469
470# serial 1
471
472# Check whether the underlying file-system supports filenames
473# with a leading dot.  For instance MS-DOS doesn't.
474AC_DEFUN([AM_SET_LEADING_DOT],
475[rm -rf .tst 2>/dev/null
476mkdir .tst 2>/dev/null
477if test -d .tst; then
478  am__leading_dot=.
479else
480  am__leading_dot=_
481fi
482rmdir .tst 2>/dev/null
483AC_SUBST([am__leading_dot])])
484
485# serial 5                                              -*- Autoconf -*-
486
487# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488
489# This program is free software; you can redistribute it and/or modify
490# it under the terms of the GNU General Public License as published by
491# the Free Software Foundation; either version 2, or (at your option)
492# any later version.
493
494# This program is distributed in the hope that it will be useful,
495# but WITHOUT ANY WARRANTY; without even the implied warranty of
496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497# GNU General Public License for more details.
498
499# You should have received a copy of the GNU General Public License
500# along with this program; if not, write to the Free Software
501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502# 02111-1307, USA.
503
504
505# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506# written in clear, in which case automake, when reading aclocal.m4,
507# will think it sees a *use*, and therefore will trigger all it's
508# C support machinery.  Also note that it means that autoscan, seeing
509# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510
511
512
513# _AM_DEPENDENCIES(NAME)
514# ----------------------
515# See how the compiler implements dependency checking.
516# NAME is "CC", "CXX", "GCJ", or "OBJC".
517# We try a few techniques and use that to set a single cache variable.
518#
519# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521# dependency, and given that the user is not expected to run this macro,
522# just rely on AC_PROG_CC.
523AC_DEFUN([_AM_DEPENDENCIES],
524[AC_REQUIRE([AM_SET_DEPDIR])dnl
525AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527AC_REQUIRE([AM_DEP_TRACK])dnl
528
529ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533                   [depcc="$$1"   am_compiler_list=])
534
535AC_CACHE_CHECK([dependency style of $depcc],
536               [am_cv_$1_dependencies_compiler_type],
537[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538  # We make a subdir and do the tests there.  Otherwise we can end up
539  # making bogus files that we don't know about and never remove.  For
540  # instance it was reported that on HP-UX the gcc test will end up
541  # making a dummy file named `D' -- because `-MD' means `put the output
542  # in D'.
543  mkdir conftest.dir
544  # Copy depcomp to subdir because otherwise we won't find it if we're
545  # using a relative directory.
546  cp "$am_depcomp" conftest.dir
547  cd conftest.dir
548
549  am_cv_$1_dependencies_compiler_type=none
550  if test "$am_compiler_list" = ""; then
551     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
552  fi
553  for depmode in $am_compiler_list; do
554    # We need to recreate these files for each test, as the compiler may
555    # overwrite some of them when testing with obscure command lines.
556    # This happens at least with the AIX C compiler.
557    echo '#include "conftest.h"' > conftest.c
558    echo 'int i;' > conftest.h
559    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
560
561    case $depmode in
562    nosideeffect)
563      # after this tag, mechanisms are not by side-effect, so they'll
564      # only be used when explicitly requested
565      if test "x$enable_dependency_tracking" = xyes; then
566        continue
567      else
568        break
569      fi
570      ;;
571    none) break ;;
572    esac
573    # We check with `-c' and `-o' for the sake of the "dashmstdout"
574    # mode.  It turns out that the SunPro C++ compiler does not properly
575    # handle `-M -o', and we need to detect this.
576    if depmode=$depmode \
577       source=conftest.c object=conftest.o \
578       depfile=conftest.Po tmpdepfile=conftest.TPo \
579       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
580         >/dev/null 2>conftest.err &&
581       grep conftest.h conftest.Po > /dev/null 2>&1 &&
582       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
583      # icc doesn't choke on unknown options, it will just issue warnings
584      # (even with -Werror).  So we grep stderr for any message
585      # that says an option was ignored.
586      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
587        am_cv_$1_dependencies_compiler_type=$depmode
588        break
589      fi
590    fi
591  done
592
593  cd ..
594  rm -rf conftest.dir
595else
596  am_cv_$1_dependencies_compiler_type=none
597fi
598])
599AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
600AM_CONDITIONAL([am__fastdep$1], [
601  test "x$enable_dependency_tracking" != xno \
602  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
603])
604
605
606# AM_SET_DEPDIR
607# -------------
608# Choose a directory name for dependency files.
609# This macro is AC_REQUIREd in _AM_DEPENDENCIES
610AC_DEFUN([AM_SET_DEPDIR],
611[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
612AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
613])
614
615
616# AM_DEP_TRACK
617# ------------
618AC_DEFUN([AM_DEP_TRACK],
619[AC_ARG_ENABLE(dependency-tracking,
620[  --disable-dependency-tracking Speeds up one-time builds
621  --enable-dependency-tracking  Do not reject slow dependency extractors])
622if test "x$enable_dependency_tracking" != xno; then
623  am_depcomp="$ac_aux_dir/depcomp"
624  AMDEPBACKSLASH='\'
625fi
626AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
627AC_SUBST([AMDEPBACKSLASH])
628])
629
630# Generate code to set up dependency tracking.   -*- Autoconf -*-
631
632# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
633
634# This program is free software; you can redistribute it and/or modify
635# it under the terms of the GNU General Public License as published by
636# the Free Software Foundation; either version 2, or (at your option)
637# any later version.
638
639# This program is distributed in the hope that it will be useful,
640# but WITHOUT ANY WARRANTY; without even the implied warranty of
641# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
642# GNU General Public License for more details.
643
644# You should have received a copy of the GNU General Public License
645# along with this program; if not, write to the Free Software
646# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
647# 02111-1307, USA.
648
649#serial 2
650
651# _AM_OUTPUT_DEPENDENCY_COMMANDS
652# ------------------------------
653AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
654[for mf in $CONFIG_FILES; do
655  # Strip MF so we end up with the name of the file.
656  mf=`echo "$mf" | sed -e 's/:.*$//'`
657  # Check whether this is an Automake generated Makefile or not.
658  # We used to match only the files named `Makefile.in', but
659  # some people rename them; so instead we look at the file content.
660  # Grep'ing the first line is not enough: some people post-process
661  # each Makefile.in and add a new line on top of each file to say so.
662  # So let's grep whole file.
663  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
664    dirpart=`AS_DIRNAME("$mf")`
665  else
666    continue
667  fi
668  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
669  # Extract the definition of DEP_FILES from the Makefile without
670  # running `make'.
671  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
672  test -z "$DEPDIR" && continue
673  # When using ansi2knr, U may be empty or an underscore; expand it
674  U=`sed -n -e '/^U = / s///p' < "$mf"`
675  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
676  # We invoke sed twice because it is the simplest approach to
677  # changing $(DEPDIR) to its actual value in the expansion.
678  for file in `sed -n -e '
679    /^DEP_FILES = .*\\\\$/ {
680      s/^DEP_FILES = //
681      :loop
682        s/\\\\$//
683        p
684        n
685        /\\\\$/ b loop
686      p
687    }
688    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
689       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
690    # Make sure the directory exists.
691    test -f "$dirpart/$file" && continue
692    fdir=`AS_DIRNAME(["$file"])`
693    AS_MKDIR_P([$dirpart/$fdir])
694    # echo "creating $dirpart/$file"
695    echo '# dummy' > "$dirpart/$file"
696  done
697done
698])# _AM_OUTPUT_DEPENDENCY_COMMANDS
699
700
701# AM_OUTPUT_DEPENDENCY_COMMANDS
702# -----------------------------
703# This macro should only be invoked once -- use via AC_REQUIRE.
704#
705# This code is only required when automatic dependency tracking
706# is enabled.  FIXME.  This creates each `.P' file that we will
707# need in order to bootstrap the dependency handling code.
708AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
709[AC_CONFIG_COMMANDS([depfiles],
710     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
711     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
712])
713
714# Check to see how 'make' treats includes.      -*- Autoconf -*-
715
716# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
717
718# This program is free software; you can redistribute it and/or modify
719# it under the terms of the GNU General Public License as published by
720# the Free Software Foundation; either version 2, or (at your option)
721# any later version.
722
723# This program is distributed in the hope that it will be useful,
724# but WITHOUT ANY WARRANTY; without even the implied warranty of
725# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
726# GNU General Public License for more details.
727
728# You should have received a copy of the GNU General Public License
729# along with this program; if not, write to the Free Software
730# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
731# 02111-1307, USA.
732
733# serial 2
734
735# AM_MAKE_INCLUDE()
736# -----------------
737# Check to see how make treats includes.
738AC_DEFUN([AM_MAKE_INCLUDE],
739[am_make=${MAKE-make}
740cat > confinc << 'END'
741am__doit:
742        @echo done
743.PHONY: am__doit
744END
745# If we don't find an include directive, just comment out the code.
746AC_MSG_CHECKING([for style of include used by $am_make])
747am__include="#"
748am__quote=
749_am_result=none
750# First try GNU make style include.
751echo "include confinc" > confmf
752# We grep out `Entering directory' and `Leaving directory'
753# messages which can occur if `w' ends up in MAKEFLAGS.
754# In particular we don't look at `^make:' because GNU make might
755# be invoked under some other name (usually "gmake"), in which
756# case it prints its new name instead of `make'.
757if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
758   am__include=include
759   am__quote=
760   _am_result=GNU
761fi
762# Now try BSD make style include.
763if test "$am__include" = "#"; then
764   echo '.include "confinc"' > confmf
765   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
766      am__include=.include
767      am__quote="\""
768      _am_result=BSD
769   fi
770fi
771AC_SUBST([am__include])
772AC_SUBST([am__quote])
773AC_MSG_RESULT([$_am_result])
774rm -f confinc confmf
775])
776
777# AM_CONDITIONAL                                              -*- Autoconf -*-
778
779# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
780
781# This program is free software; you can redistribute it and/or modify
782# it under the terms of the GNU General Public License as published by
783# the Free Software Foundation; either version 2, or (at your option)
784# any later version.
785
786# This program is distributed in the hope that it will be useful,
787# but WITHOUT ANY WARRANTY; without even the implied warranty of
788# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
789# GNU General Public License for more details.
790
791# You should have received a copy of the GNU General Public License
792# along with this program; if not, write to the Free Software
793# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
794# 02111-1307, USA.
795
796# serial 5
797
798AC_PREREQ(2.52)
799
800# AM_CONDITIONAL(NAME, SHELL-CONDITION)
801# -------------------------------------
802# Define a conditional.
803AC_DEFUN([AM_CONDITIONAL],
804[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
805        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
806AC_SUBST([$1_TRUE])
807AC_SUBST([$1_FALSE])
808if $2; then
809  $1_TRUE=
810  $1_FALSE='#'
811else
812  $1_TRUE='#'
813  $1_FALSE=
814fi
815AC_CONFIG_COMMANDS_PRE(
816[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
817  AC_MSG_ERROR([conditional "$1" was never defined.
818Usually this means the macro was only invoked conditionally.])
819fi])])
820
821# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
822
823# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
824
825# This program is free software; you can redistribute it and/or modify
826# it under the terms of the GNU General Public License as published by
827# the Free Software Foundation; either version 2, or (at your option)
828# any later version.
829
830# This program is distributed in the hope that it will be useful,
831# but WITHOUT ANY WARRANTY; without even the implied warranty of
832# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
833# GNU General Public License for more details.
834
835# You should have received a copy of the GNU General Public License
836# along with this program; if not, write to the Free Software
837# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
838# 02111-1307, USA.
839
840AC_PREREQ([2.52])
841
842# serial 6
843
844# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
845AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
846
847# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
848
849# serial 46 AC_PROG_LIBTOOL
850
851AC_DEFUN([AC_PROG_LIBTOOL],
852[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
853
854# This can be used to rebuild libtool when needed
855LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
856
857# Always use our own libtool.
858LIBTOOL='$(SHELL) $(top_builddir)/libtool'
859AC_SUBST(LIBTOOL)dnl
860
861# Prevent multiple expansion
862define([AC_PROG_LIBTOOL], [])
863])
864
865AC_DEFUN([AC_LIBTOOL_SETUP],
866[AC_PREREQ(2.13)dnl
867AC_REQUIRE([AC_ENABLE_SHARED])dnl
868AC_REQUIRE([AC_ENABLE_STATIC])dnl
869AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
870AC_REQUIRE([AC_CANONICAL_HOST])dnl
871AC_REQUIRE([AC_CANONICAL_BUILD])dnl
872AC_REQUIRE([AC_PROG_CC])dnl
873AC_REQUIRE([AC_PROG_LD])dnl
874AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
875AC_REQUIRE([AC_PROG_NM])dnl
876AC_REQUIRE([LT_AC_PROG_SED])dnl
877
878AC_REQUIRE([AC_PROG_LN_S])dnl
879AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
880AC_REQUIRE([AC_OBJEXT])dnl
881AC_REQUIRE([AC_EXEEXT])dnl
882dnl
883
884_LT_AC_PROG_ECHO_BACKSLASH
885# Only perform the check for file, if the check method requires it
886case $deplibs_check_method in
887file_magic*)
888  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
889    AC_PATH_MAGIC
890  fi
891  ;;
892esac
893
894AC_CHECK_TOOL(RANLIB, ranlib, :)
895AC_CHECK_TOOL(STRIP, strip, :)
896
897ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
898ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
899enable_win32_dll=yes, enable_win32_dll=no)
900
901AC_ARG_ENABLE(libtool-lock,
902  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
903test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
904
905# Some flags need to be propagated to the compiler or linker for good
906# libtool support.
907case $host in
908*-*-irix6*)
909  # Find out which ABI we are using.
910  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
911  if AC_TRY_EVAL(ac_compile); then
912    case `/usr/bin/file conftest.$ac_objext` in
913    *32-bit*)
914      LD="${LD-ld} -32"
915      ;;
916    *N32*)
917      LD="${LD-ld} -n32"
918      ;;
919    *64-bit*)
920      LD="${LD-ld} -64"
921      ;;
922    esac
923  fi
924  rm -rf conftest*
925  ;;
926
927*-*-linux*)
928  # Test if the compiler is 64bit
929  echo 'int i;' > conftest.$ac_ext
930  lt_cv_cc_64bit_output=no
931  if AC_TRY_EVAL(ac_compile); then
932    case `/usr/bin/file conftest.$ac_objext` in
933    *"ELF 64"*)
934      lt_cv_cc_64bit_output=yes
935      ;;
936    esac
937  fi
938  rm -rf conftest*
939  ;;
940 
941*-*-sco3.2v5*)
942  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
943  SAVE_CFLAGS="$CFLAGS"
944  CFLAGS="$CFLAGS -belf"
945  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
946    [AC_LANG_SAVE
947     AC_LANG_C
948     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
949     AC_LANG_RESTORE])
950  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
951    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
952    CFLAGS="$SAVE_CFLAGS"
953  fi
954  ;;
955
956ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
957[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
958  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
959  AC_CHECK_TOOL(AS, as, false)
960  AC_CHECK_TOOL(OBJDUMP, objdump, false)
961
962  # recent cygwin and mingw systems supply a stub DllMain which the user
963  # can override, but on older systems we have to supply one
964  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
965    [AC_TRY_LINK([],
966      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
967      DllMain (0, 0, 0);],
968      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
969
970  case $host/$CC in
971  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
972    # old mingw systems require "-dll" to link a DLL, while more recent ones
973    # require "-mdll"
974    SAVE_CFLAGS="$CFLAGS"
975    CFLAGS="$CFLAGS -mdll"
976    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
977      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
978    CFLAGS="$SAVE_CFLAGS" ;;
979  *-*-cygwin* | *-*-pw32*)
980    # cygwin systems need to pass --dll to the linker, and not link
981    # crt.o which will require a WinMain@16 definition.
982    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
983  esac
984  ;;
985  ])
986esac
987
988_LT_AC_LTCONFIG_HACK
989
990])
991
992# AC_LIBTOOL_HEADER_ASSERT
993# ------------------------
994AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
995[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
996    [lt_cv_func_assert_works],
997    [case $host in
998    *-*-solaris*)
999      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1000        case `$CC --version 2>/dev/null` in
1001        [[12]].*) lt_cv_func_assert_works=no ;;
1002        *)        lt_cv_func_assert_works=yes ;;
1003        esac
1004      fi
1005      ;;
1006    esac])
1007
1008if test "x$lt_cv_func_assert_works" = xyes; then
1009  AC_CHECK_HEADERS(assert.h)
1010fi
1011])# AC_LIBTOOL_HEADER_ASSERT
1012
1013# _LT_AC_CHECK_DLFCN
1014# --------------------
1015AC_DEFUN([_LT_AC_CHECK_DLFCN],
1016[AC_CHECK_HEADERS(dlfcn.h)
1017])# _LT_AC_CHECK_DLFCN
1018
1019# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1020# ---------------------------------
1021AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1022[AC_REQUIRE([AC_CANONICAL_HOST])
1023AC_REQUIRE([AC_PROG_NM])
1024AC_REQUIRE([AC_OBJEXT])
1025# Check for command to grab the raw symbol name followed by C symbol from nm.
1026AC_MSG_CHECKING([command to parse $NM output])
1027AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1028
1029# These are sane defaults that work on at least a few old systems.
1030# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1031
1032# Character class describing NM global symbol codes.
1033symcode='[[BCDEGRST]]'
1034
1035# Regexp to match symbols that can be accessed directly from C.
1036sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1037
1038# Transform the above into a raw symbol and a C symbol.
1039symxfrm='\1 \2\3 \3'
1040
1041# Transform an extracted symbol line into a proper C declaration
1042lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1043
1044# Transform an extracted symbol line into symbol name and symbol address
1045lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1046
1047# Define system-specific variables.
1048case $host_os in
1049aix*)
1050  symcode='[[BCDT]]'
1051  ;;
1052cygwin* | mingw* | pw32*)
1053  symcode='[[ABCDGISTW]]'
1054  ;;
1055hpux*) # Its linker distinguishes data from code symbols
1056  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1057  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1058  ;;
1059irix* | nonstopux*)
1060  symcode='[[BCDEGRST]]'
1061  ;;
1062osf*)
1063  symcode='[[BCDEGQRST]]'
1064  ;;
1065solaris* | sysv5*)
1066  symcode='[[BDT]]'
1067  ;;
1068sysv4)
1069  symcode='[[DFNSTU]]'
1070  ;;
1071esac
1072
1073# Handle CRLF in mingw tool chain
1074opt_cr=
1075case $host_os in
1076mingw*)
1077  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1078  ;;
1079esac
1080
1081# If we're using GNU nm, then use its standard symbol codes.
1082if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1083  symcode='[[ABCDGISTW]]'
1084fi
1085
1086# Try without a prefix undercore, then with it.
1087for ac_symprfx in "" "_"; do
1088
1089  # Write the raw and C identifiers.
1090lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1091
1092  # Check to see that the pipe works correctly.
1093  pipe_works=no
1094  rm -f conftest*
1095  cat > conftest.$ac_ext <<EOF
1096#ifdef __cplusplus
1097extern "C" {
1098#endif
1099char nm_test_var;
1100void nm_test_func(){}
1101#ifdef __cplusplus
1102}
1103#endif
1104int main(){nm_test_var='a';nm_test_func();return(0);}
1105EOF
1106
1107  if AC_TRY_EVAL(ac_compile); then
1108    # Now try to grab the symbols.
1109    nlist=conftest.nm
1110    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1111      # Try sorting and uniquifying the output.
1112      if sort "$nlist" | uniq > "$nlist"T; then
1113        mv -f "$nlist"T "$nlist"
1114      else
1115        rm -f "$nlist"T
1116      fi
1117
1118      # Make sure that we snagged all the symbols we need.
1119      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1120        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1121          cat <<EOF > conftest.$ac_ext
1122#ifdef __cplusplus
1123extern "C" {
1124#endif
1125
1126EOF
1127          # Now generate the symbol file.
1128          eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1129
1130          cat <<EOF >> conftest.$ac_ext
1131#if defined (__STDC__) && __STDC__
1132# define lt_ptr void *
1133#else
1134# define lt_ptr char *
1135# define const
1136#endif
1137
1138/* The mapping between symbol names and symbols. */
1139const struct {
1140  const char *name;
1141  lt_ptr address;
1142}
1143lt_preloaded_symbols[[]] =
1144{
1145EOF
1146          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1147          cat <<\EOF >> conftest.$ac_ext
1148  {0, (lt_ptr) 0}
1149};
1150
1151#ifdef __cplusplus
1152}
1153#endif
1154EOF
1155          # Now try linking the two files.
1156          mv conftest.$ac_objext conftstm.$ac_objext
1157          save_LIBS="$LIBS"
1158          save_CFLAGS="$CFLAGS"
1159          LIBS="conftstm.$ac_objext"
1160          CFLAGS="$CFLAGS$no_builtin_flag"
1161          if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1162            pipe_works=yes
1163          fi
1164          LIBS="$save_LIBS"
1165          CFLAGS="$save_CFLAGS"
1166        else
1167          echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1168        fi
1169      else
1170        echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1171      fi
1172    else
1173      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1174    fi
1175  else
1176    echo "$progname: failed program was:" >&AC_FD_CC
1177    cat conftest.$ac_ext >&5
1178  fi
1179  rm -f conftest* conftst*
1180
1181  # Do not use the global_symbol_pipe unless it works.
1182  if test "$pipe_works" = yes; then
1183    break
1184  else
1185    lt_cv_sys_global_symbol_pipe=
1186  fi
1187done
1188])
1189global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1190if test -z "$lt_cv_sys_global_symbol_pipe"; then
1191  global_symbol_to_cdecl=
1192  global_symbol_to_c_name_address=
1193else
1194  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1195  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1196fi
1197if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1198then
1199  AC_MSG_RESULT(failed)
1200else
1201  AC_MSG_RESULT(ok)
1202fi
1203]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1204
1205# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1206# ---------------------------------
1207AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1208[# Find the correct PATH separator.  Usually this is `:', but
1209# DJGPP uses `;' like DOS.
1210if test "X${PATH_SEPARATOR+set}" != Xset; then
1211  UNAME=${UNAME-`uname 2>/dev/null`}
1212  case X$UNAME in
1213    *-DOS) lt_cv_sys_path_separator=';' ;;
1214    *)     lt_cv_sys_path_separator=':' ;;
1215  esac
1216  PATH_SEPARATOR=$lt_cv_sys_path_separator
1217fi
1218])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1219
1220# _LT_AC_PROG_ECHO_BACKSLASH
1221# --------------------------
1222# Add some code to the start of the generated configure script which
1223# will find an echo command which doesn't interpret backslashes.
1224AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1225[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1226                              [AC_DIVERT_PUSH(NOTICE)])
1227_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1228
1229# Check that we are running under the correct shell.
1230SHELL=${CONFIG_SHELL-/bin/sh}
1231
1232case X$ECHO in
1233X*--fallback-echo)
1234  # Remove one level of quotation (which was required for Make).
1235  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1236  ;;
1237esac
1238
1239echo=${ECHO-echo}
1240if test "X[$]1" = X--no-reexec; then
1241  # Discard the --no-reexec flag, and continue.
1242  shift
1243elif test "X[$]1" = X--fallback-echo; then
1244  # Avoid inline document here, it may be left over
1245  :
1246elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1247  # Yippee, $echo works!
1248  :
1249else
1250  # Restart under the correct shell.
1251  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1252fi
1253
1254if test "X[$]1" = X--fallback-echo; then
1255  # used as fallback echo
1256  shift
1257  cat <<EOF
1258$*
1259EOF
1260  exit 0
1261fi
1262
1263# The HP-UX ksh and POSIX shell print the target directory to stdout
1264# if CDPATH is set.
1265if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1266
1267if test -z "$ECHO"; then
1268if test "X${echo_test_string+set}" != Xset; then
1269# find a string as large as possible, as long as the shell can cope with it
1270  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1271    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1272    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1273       echo_test_string="`eval $cmd`" &&
1274       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1275    then
1276      break
1277    fi
1278  done
1279fi
1280
1281if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1282   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1283   test "X$echo_testing_string" = "X$echo_test_string"; then
1284  :
1285else
1286  # The Solaris, AIX, and Digital Unix default echo programs unquote
1287  # backslashes.  This makes it impossible to quote backslashes using
1288  #   echo "$something" | sed 's/\\/\\\\/g'
1289  #
1290  # So, first we look for a working echo in the user's PATH.
1291
1292  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1293  for dir in $PATH /usr/ucb; do
1294    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1295       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1296       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1297       test "X$echo_testing_string" = "X$echo_test_string"; then
1298      echo="$dir/echo"
1299      break
1300    fi
1301  done
1302  IFS="$save_ifs"
1303
1304  if test "X$echo" = Xecho; then
1305    # We didn't find a better echo, so look for alternatives.
1306    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1307       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1308       test "X$echo_testing_string" = "X$echo_test_string"; then
1309      # This shell has a builtin print -r that does the trick.
1310      echo='print -r'
1311    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1312         test "X$CONFIG_SHELL" != X/bin/ksh; then
1313      # If we have ksh, try running configure again with it.
1314      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1315      export ORIGINAL_CONFIG_SHELL
1316      CONFIG_SHELL=/bin/ksh
1317      export CONFIG_SHELL
1318      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1319    else
1320      # Try using printf.
1321      echo='printf %s\n'
1322      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1323         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1324         test "X$echo_testing_string" = "X$echo_test_string"; then
1325        # Cool, printf works
1326        :
1327      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1328           test "X$echo_testing_string" = 'X\t' &&
1329           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1330           test "X$echo_testing_string" = "X$echo_test_string"; then
1331        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1332        export CONFIG_SHELL
1333        SHELL="$CONFIG_SHELL"
1334        export SHELL
1335        echo="$CONFIG_SHELL [$]0 --fallback-echo"
1336      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1337           test "X$echo_testing_string" = 'X\t' &&
1338           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1339           test "X$echo_testing_string" = "X$echo_test_string"; then
1340        echo="$CONFIG_SHELL [$]0 --fallback-echo"
1341      else
1342        # maybe with a smaller string...
1343        prev=:
1344
1345        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1346          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1347          then
1348            break
1349          fi
1350          prev="$cmd"
1351        done
1352
1353        if test "$prev" != 'sed 50q "[$]0"'; then
1354          echo_test_string=`eval $prev`
1355          export echo_test_string
1356          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1357        else
1358          # Oops.  We lost completely, so just stick with echo.
1359          echo=echo
1360        fi
1361      fi
1362    fi
1363  fi
1364fi
1365fi
1366
1367# Copy echo and quote the copy suitably for passing to libtool from
1368# the Makefile, instead of quoting the original, which is used later.
1369ECHO=$echo
1370if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1371   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1372fi
1373
1374AC_SUBST(ECHO)
1375AC_DIVERT_POP
1376])# _LT_AC_PROG_ECHO_BACKSLASH
1377
1378# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1379#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1380# ------------------------------------------------------------------
1381AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1382[if test "$cross_compiling" = yes; then :
1383  [$4]
1384else
1385  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1386  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1387  lt_status=$lt_dlunknown
1388  cat > conftest.$ac_ext <<EOF
1389[#line __oline__ "configure"
1390#include "confdefs.h"
1391
1392#if HAVE_DLFCN_H
1393#include <dlfcn.h>
1394#endif
1395
1396#include <stdio.h>
1397
1398#ifdef RTLD_GLOBAL
1399#  define LT_DLGLOBAL           RTLD_GLOBAL
1400#else
1401#  ifdef DL_GLOBAL
1402#    define LT_DLGLOBAL         DL_GLOBAL
1403#  else
1404#    define LT_DLGLOBAL         0
1405#  endif
1406#endif
1407
1408/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1409   find out it does not work in some platform. */
1410#ifndef LT_DLLAZY_OR_NOW
1411#  ifdef RTLD_LAZY
1412#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1413#  else
1414#    ifdef DL_LAZY
1415#      define LT_DLLAZY_OR_NOW          DL_LAZY
1416#    else
1417#      ifdef RTLD_NOW
1418#        define LT_DLLAZY_OR_NOW        RTLD_NOW
1419#      else
1420#        ifdef DL_NOW
1421#          define LT_DLLAZY_OR_NOW      DL_NOW
1422#        else
1423#          define LT_DLLAZY_OR_NOW      0
1424#        endif
1425#      endif
1426#    endif
1427#  endif
1428#endif
1429
1430#ifdef __cplusplus
1431extern "C" void exit (int);
1432#endif
1433
1434void fnord() { int i=42;}
1435int main ()
1436{
1437  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1438  int status = $lt_dlunknown;
1439
1440  if (self)
1441    {
1442      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1443      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1444      /* dlclose (self); */
1445    }
1446
1447    exit (status);
1448}]
1449EOF
1450  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1451    (./conftest; exit; ) 2>/dev/null
1452    lt_status=$?
1453    case x$lt_status in
1454      x$lt_dlno_uscore) $1 ;;
1455      x$lt_dlneed_uscore) $2 ;;
1456      x$lt_unknown|x*) $3 ;;
1457    esac
1458  else :
1459    # compilation failed
1460    $3
1461  fi
1462fi
1463rm -fr conftest*
1464])# _LT_AC_TRY_DLOPEN_SELF
1465
1466# AC_LIBTOOL_DLOPEN_SELF
1467# -------------------
1468AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1469[if test "x$enable_dlopen" != xyes; then
1470  enable_dlopen=unknown
1471  enable_dlopen_self=unknown
1472  enable_dlopen_self_static=unknown
1473else
1474  lt_cv_dlopen=no
1475  lt_cv_dlopen_libs=
1476
1477  case $host_os in
1478  beos*)
1479    lt_cv_dlopen="load_add_on"
1480    lt_cv_dlopen_libs=
1481    lt_cv_dlopen_self=yes
1482    ;;
1483
1484  cygwin* | mingw* | pw32*)
1485    lt_cv_dlopen="LoadLibrary"
1486    lt_cv_dlopen_libs=
1487   ;;
1488
1489  *)
1490    AC_CHECK_FUNC([shl_load],
1491          [lt_cv_dlopen="shl_load"],
1492      [AC_CHECK_LIB([dld], [shl_load],
1493            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1494        [AC_CHECK_FUNC([dlopen],
1495              [lt_cv_dlopen="dlopen"],
1496          [AC_CHECK_LIB([dl], [dlopen],
1497                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1498            [AC_CHECK_LIB([svld], [dlopen],
1499                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1500              [AC_CHECK_LIB([dld], [dld_link],
1501                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1502              ])
1503            ])
1504          ])
1505        ])
1506      ])
1507    ;;
1508  esac
1509
1510  if test "x$lt_cv_dlopen" != xno; then
1511    enable_dlopen=yes
1512  else
1513    enable_dlopen=no
1514  fi
1515
1516  case $lt_cv_dlopen in
1517  dlopen)
1518    save_CPPFLAGS="$CPPFLAGS"
1519    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1520    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1521
1522    save_LDFLAGS="$LDFLAGS"
1523    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1524
1525    save_LIBS="$LIBS"
1526    LIBS="$lt_cv_dlopen_libs $LIBS"
1527
1528    AC_CACHE_CHECK([whether a program can dlopen itself],
1529          lt_cv_dlopen_self, [dnl
1530          _LT_AC_TRY_DLOPEN_SELF(
1531            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1532            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1533    ])
1534
1535    if test "x$lt_cv_dlopen_self" = xyes; then
1536      LDFLAGS="$LDFLAGS $link_static_flag"
1537      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1538          lt_cv_dlopen_self_static, [dnl
1539          _LT_AC_TRY_DLOPEN_SELF(
1540            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1541            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1542      ])
1543    fi
1544
1545    CPPFLAGS="$save_CPPFLAGS"
1546    LDFLAGS="$save_LDFLAGS"
1547    LIBS="$save_LIBS"
1548    ;;
1549  esac
1550
1551  case $lt_cv_dlopen_self in
1552  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1553  *) enable_dlopen_self=unknown ;;
1554  esac
1555
1556  case $lt_cv_dlopen_self_static in
1557  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1558  *) enable_dlopen_self_static=unknown ;;
1559  esac
1560fi
1561])# AC_LIBTOOL_DLOPEN_SELF
1562
1563AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1564[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1565# Sed substitution that helps us do robust quoting.  It backslashifies
1566# metacharacters that are still active within double-quoted strings.
1567Xsed='sed -e s/^X//'
1568sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1569
1570# Same as above, but do not quote variable references.
1571double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1572
1573# Sed substitution to delay expansion of an escaped shell variable in a
1574# double_quote_subst'ed string.
1575delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1576
1577# Constants:
1578rm="rm -f"
1579
1580# Global variables:
1581default_ofile=libtool
1582can_build_shared=yes
1583
1584# All known linkers require a `.a' archive for static linking (except M$VC,
1585# which needs '.lib').
1586libext=a
1587ltmain="$ac_aux_dir/ltmain.sh"
1588ofile="$default_ofile"
1589with_gnu_ld="$lt_cv_prog_gnu_ld"
1590need_locks="$enable_libtool_lock"
1591
1592old_CC="$CC"
1593old_CFLAGS="$CFLAGS"
1594
1595# Set sane defaults for various variables
1596test -z "$AR" && AR=ar
1597test -z "$AR_FLAGS" && AR_FLAGS=cru
1598test -z "$AS" && AS=as
1599test -z "$CC" && CC=cc
1600test -z "$DLLTOOL" && DLLTOOL=dlltool
1601test -z "$LD" && LD=ld
1602test -z "$LN_S" && LN_S="ln -s"
1603test -z "$MAGIC_CMD" && MAGIC_CMD=file
1604test -z "$NM" && NM=nm
1605test -z "$OBJDUMP" && OBJDUMP=objdump
1606test -z "$RANLIB" && RANLIB=:
1607test -z "$STRIP" && STRIP=:
1608test -z "$ac_objext" && ac_objext=o
1609
1610if test x"$host" != x"$build"; then
1611  ac_tool_prefix=${host_alias}-
1612else
1613  ac_tool_prefix=
1614fi
1615
1616# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1617case $host_os in
1618linux-gnu*) ;;
1619linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1620esac
1621
1622case $host_os in
1623aix3*)
1624  # AIX sometimes has problems with the GCC collect2 program.  For some
1625  # reason, if we set the COLLECT_NAMES environment variable, the problems
1626  # vanish in a puff of smoke.
1627  if test "X${COLLECT_NAMES+set}" != Xset; then
1628    COLLECT_NAMES=
1629    export COLLECT_NAMES
1630  fi
1631  ;;
1632esac
1633
1634# Determine commands to create old-style static archives.
1635old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1636old_postinstall_cmds='chmod 644 $oldlib'
1637old_postuninstall_cmds=
1638
1639if test -n "$RANLIB"; then
1640  case $host_os in
1641  openbsd*)
1642    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1643    ;;
1644  *)
1645    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1646    ;;
1647  esac
1648  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1649fi
1650
1651# Allow CC to be a program name with arguments.
1652set dummy $CC
1653compiler="[$]2"
1654
1655AC_MSG_CHECKING([for objdir])
1656rm -f .libs 2>/dev/null
1657mkdir .libs 2>/dev/null
1658if test -d .libs; then
1659  objdir=.libs
1660else
1661  # MS-DOS does not allow filenames that begin with a dot.
1662  objdir=_libs
1663fi
1664rmdir .libs 2>/dev/null
1665AC_MSG_RESULT($objdir)
1666
1667
1668AC_ARG_WITH(pic,
1669[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1670pic_mode="$withval", pic_mode=default)
1671test -z "$pic_mode" && pic_mode=default
1672
1673# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1674# in isolation, and that seeing it set (from the cache) indicates that
1675# the associated values are set (in the cache) correctly too.
1676AC_MSG_CHECKING([for $compiler option to produce PIC])
1677AC_CACHE_VAL(lt_cv_prog_cc_pic,
1678[ lt_cv_prog_cc_pic=
1679  lt_cv_prog_cc_shlib=
1680  lt_cv_prog_cc_wl=
1681  lt_cv_prog_cc_static=
1682  lt_cv_prog_cc_no_builtin=
1683  lt_cv_prog_cc_can_build_shared=$can_build_shared
1684
1685  if test "$GCC" = yes; then
1686    lt_cv_prog_cc_wl='-Wl,'
1687    lt_cv_prog_cc_static='-static'
1688
1689    case $host_os in
1690    aix*)
1691      # Below there is a dirty hack to force normal static linking with -ldl
1692      # The problem is because libdl dynamically linked with both libc and
1693      # libC (AIX C++ library), which obviously doesn't included in libraries
1694      # list by gcc. This cause undefined symbols with -static flags.
1695      # This hack allows C programs to be linked with "-static -ldl", but
1696      # not sure about C++ programs.
1697      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1698      ;;
1699    amigaos*)
1700      # FIXME: we need at least 68020 code to build shared libraries, but
1701      # adding the `-m68020' flag to GCC prevents building anything better,
1702      # like `-m68040'.
1703      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1704      ;;
1705    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1706      # PIC is the default for these OSes.
1707      ;;
1708    darwin* | rhapsody*)
1709      # PIC is the default on this platform
1710      # Common symbols not allowed in MH_DYLIB files
1711      lt_cv_prog_cc_pic='-fno-common'
1712      ;;
1713    cygwin* | mingw* | pw32* | os2*)
1714      # This hack is so that the source file can tell whether it is being
1715      # built for inclusion in a dll (and should export symbols for example).
1716      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1717      ;;
1718    sysv4*MP*)
1719      if test -d /usr/nec; then
1720         lt_cv_prog_cc_pic=-Kconform_pic
1721      fi
1722      ;;
1723    *)
1724      lt_cv_prog_cc_pic='-fPIC'
1725      ;;
1726    esac
1727  else
1728    # PORTME Check for PIC flags for the system compiler.
1729    case $host_os in
1730    aix3* | aix4* | aix5*)
1731      lt_cv_prog_cc_wl='-Wl,'
1732      # All AIX code is PIC.
1733      if test "$host_cpu" = ia64; then
1734        # AIX 5 now supports IA64 processor
1735        lt_cv_prog_cc_static='-Bstatic'
1736      else
1737        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1738      fi
1739      ;;
1740
1741    hpux9* | hpux10* | hpux11*)
1742      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1743      lt_cv_prog_cc_wl='-Wl,'
1744      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1745      lt_cv_prog_cc_pic='+Z'
1746      ;;
1747
1748    irix5* | irix6* | nonstopux*)
1749      lt_cv_prog_cc_wl='-Wl,'
1750      lt_cv_prog_cc_static='-non_shared'
1751      # PIC (with -KPIC) is the default.
1752      ;;
1753
1754    cygwin* | mingw* | pw32* | os2*)
1755      # This hack is so that the source file can tell whether it is being
1756      # built for inclusion in a dll (and should export symbols for example).
1757      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1758      ;;
1759
1760    newsos6)
1761      lt_cv_prog_cc_pic='-KPIC'
1762      lt_cv_prog_cc_static='-Bstatic'
1763      ;;
1764
1765    osf3* | osf4* | osf5*)
1766      # All OSF/1 code is PIC.
1767      lt_cv_prog_cc_wl='-Wl,'
1768      lt_cv_prog_cc_static='-non_shared'
1769      ;;
1770
1771    sco3.2v5*)
1772      lt_cv_prog_cc_pic='-Kpic'
1773      lt_cv_prog_cc_static='-dn'
1774      lt_cv_prog_cc_shlib='-belf'
1775      ;;
1776
1777    solaris*)
1778      lt_cv_prog_cc_pic='-KPIC'
1779      lt_cv_prog_cc_static='-Bstatic'
1780      lt_cv_prog_cc_wl='-Wl,'
1781      ;;
1782
1783    sunos4*)
1784      lt_cv_prog_cc_pic='-PIC'
1785      lt_cv_prog_cc_static='-Bstatic'
1786      lt_cv_prog_cc_wl='-Qoption ld '
1787      ;;
1788
1789    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1790      lt_cv_prog_cc_pic='-KPIC'
1791      lt_cv_prog_cc_static='-Bstatic'
1792      lt_cv_prog_cc_wl='-Wl,'
1793      ;;
1794
1795    uts4*)
1796      lt_cv_prog_cc_pic='-pic'
1797      lt_cv_prog_cc_static='-Bstatic'
1798      ;;
1799
1800    sysv4*MP*)
1801      if test -d /usr/nec ;then
1802        lt_cv_prog_cc_pic='-Kconform_pic'
1803        lt_cv_prog_cc_static='-Bstatic'
1804      fi
1805      ;;
1806
1807    *)
1808      lt_cv_prog_cc_can_build_shared=no
1809      ;;
1810    esac
1811  fi
1812])
1813if test -z "$lt_cv_prog_cc_pic"; then
1814  AC_MSG_RESULT([none])
1815else
1816  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1817
1818  # Check to make sure the pic_flag actually works.
1819  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1820  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1821    save_CFLAGS="$CFLAGS"
1822    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1823    AC_TRY_COMPILE([], [], [dnl
1824      case $host_os in
1825      hpux9* | hpux10* | hpux11*)
1826        # On HP-UX, both CC and GCC only warn that PIC is supported... then
1827        # they create non-PIC objects.  So, if there were any warnings, we
1828        # assume that PIC is not supported.
1829        if test -s conftest.err; then
1830          lt_cv_prog_cc_pic_works=no
1831        else
1832          lt_cv_prog_cc_pic_works=yes
1833        fi
1834        ;;
1835      *)
1836        lt_cv_prog_cc_pic_works=yes
1837        ;;
1838      esac
1839    ], [dnl
1840      lt_cv_prog_cc_pic_works=no
1841    ])
1842    CFLAGS="$save_CFLAGS"
1843  ])
1844
1845  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1846    lt_cv_prog_cc_pic=
1847    lt_cv_prog_cc_can_build_shared=no
1848  else
1849    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1850  fi
1851
1852  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1853fi
1854
1855# Check for any special shared library compilation flags.
1856if test -n "$lt_cv_prog_cc_shlib"; then
1857  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1858  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1859  else
1860   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1861    lt_cv_prog_cc_can_build_shared=no
1862  fi
1863fi
1864
1865AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1866AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1867  lt_cv_prog_cc_static_works=no
1868  save_LDFLAGS="$LDFLAGS"
1869  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1870  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1871  LDFLAGS="$save_LDFLAGS"
1872])
1873
1874# Belt *and* braces to stop my trousers falling down:
1875test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1876AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1877
1878pic_flag="$lt_cv_prog_cc_pic"
1879special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1880wl="$lt_cv_prog_cc_wl"
1881link_static_flag="$lt_cv_prog_cc_static"
1882no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1883can_build_shared="$lt_cv_prog_cc_can_build_shared"
1884
1885
1886# Check to see if options -o and -c are simultaneously supported by compiler
1887AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1888AC_CACHE_VAL([lt_cv_compiler_c_o], [
1889$rm -r conftest 2>/dev/null
1890mkdir conftest
1891cd conftest
1892echo "int some_variable = 0;" > conftest.$ac_ext
1893mkdir out
1894# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1895# that will create temporary files in the current directory regardless of
1896# the output directory.  Thus, making CWD read-only will cause this test
1897# to fail, enabling locking or at least warning the user not to do parallel
1898# builds.
1899chmod -w .
1900save_CFLAGS="$CFLAGS"
1901CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1902compiler_c_o=no
1903if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1904  # The compiler can only warn and ignore the option if not recognized
1905  # So say no if there are warnings
1906  if test -s out/conftest.err; then
1907    lt_cv_compiler_c_o=no
1908  else
1909    lt_cv_compiler_c_o=yes
1910  fi
1911else
1912  # Append any errors to the config.log.
1913  cat out/conftest.err 1>&AC_FD_CC
1914  lt_cv_compiler_c_o=no
1915fi
1916CFLAGS="$save_CFLAGS"
1917chmod u+w .
1918$rm conftest* out/*
1919rmdir out
1920cd ..
1921rmdir conftest
1922$rm -r conftest 2>/dev/null
1923])
1924compiler_c_o=$lt_cv_compiler_c_o
1925AC_MSG_RESULT([$compiler_c_o])
1926
1927if test x"$compiler_c_o" = x"yes"; then
1928  # Check to see if we can write to a .lo
1929  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1930  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1931  lt_cv_compiler_o_lo=no
1932  save_CFLAGS="$CFLAGS"
1933  CFLAGS="$CFLAGS -c -o conftest.lo"
1934  save_objext="$ac_objext"
1935  ac_objext=lo
1936  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1937    # The compiler can only warn and ignore the option if not recognized
1938    # So say no if there are warnings
1939    if test -s conftest.err; then
1940      lt_cv_compiler_o_lo=no
1941    else
1942      lt_cv_compiler_o_lo=yes
1943    fi
1944  ])
1945  ac_objext="$save_objext"
1946  CFLAGS="$save_CFLAGS"
1947  ])
1948  compiler_o_lo=$lt_cv_compiler_o_lo
1949  AC_MSG_RESULT([$compiler_o_lo])
1950else
1951  compiler_o_lo=no
1952fi
1953
1954# Check to see if we can do hard links to lock some files if needed
1955hard_links="nottested"
1956if test "$compiler_c_o" = no && test "$need_locks" != no; then
1957  # do not overwrite the value of need_locks provided by the user
1958  AC_MSG_CHECKING([if we can lock with hard links])
1959  hard_links=yes
1960  $rm conftest*
1961  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1962  touch conftest.a
1963  ln conftest.a conftest.b 2>&5 || hard_links=no
1964  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1965  AC_MSG_RESULT([$hard_links])
1966  if test "$hard_links" = no; then
1967    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1968    need_locks=warn
1969  fi
1970else
1971  need_locks=no
1972fi
1973
1974if test "$GCC" = yes; then
1975  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1976  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1977  echo "int some_variable = 0;" > conftest.$ac_ext
1978  save_CFLAGS="$CFLAGS"
1979  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1980  compiler_rtti_exceptions=no
1981  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1982    # The compiler can only warn and ignore the option if not recognized
1983    # So say no if there are warnings
1984    if test -s conftest.err; then
1985      compiler_rtti_exceptions=no
1986    else
1987      compiler_rtti_exceptions=yes
1988    fi
1989  ])
1990  CFLAGS="$save_CFLAGS"
1991  AC_MSG_RESULT([$compiler_rtti_exceptions])
1992
1993  if test "$compiler_rtti_exceptions" = "yes"; then
1994    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1995  else
1996    no_builtin_flag=' -fno-builtin'
1997  fi
1998fi
1999
2000# See if the linker supports building shared libraries.
2001AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2002
2003allow_undefined_flag=
2004no_undefined_flag=
2005need_lib_prefix=unknown
2006need_version=unknown
2007# when you set need_version to no, make sure it does not cause -set_version
2008# flags to be left without arguments
2009archive_cmds=
2010archive_expsym_cmds=
2011old_archive_from_new_cmds=
2012old_archive_from_expsyms_cmds=
2013export_dynamic_flag_spec=
2014whole_archive_flag_spec=
2015thread_safe_flag_spec=
2016hardcode_into_libs=no
2017hardcode_libdir_flag_spec=
2018hardcode_libdir_separator=
2019hardcode_direct=no
2020hardcode_minus_L=no
2021hardcode_shlibpath_var=unsupported
2022runpath_var=
2023link_all_deplibs=unknown
2024always_export_symbols=no
2025export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2026# include_expsyms should be a list of space-separated symbols to be *always*
2027# included in the symbol list
2028include_expsyms=
2029# exclude_expsyms can be an egrep regular expression of symbols to exclude
2030# it will be wrapped by ` (' and `)$', so one must not match beginning or
2031# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2032# as well as any symbol that contains `d'.
2033exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2034# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2035# platforms (ab)use it in PIC code, but their linkers get confused if
2036# the symbol is explicitly referenced.  Since portable code cannot
2037# rely on this symbol name, it's probably fine to never include it in
2038# preloaded symbol tables.
2039extract_expsyms_cmds=
2040
2041case $host_os in
2042cygwin* | mingw* | pw32*)
2043  # FIXME: the MSVC++ port hasn't been tested in a loooong time
2044  # When not using gcc, we currently assume that we are using
2045  # Microsoft Visual C++.
2046  if test "$GCC" != yes; then
2047    with_gnu_ld=no
2048  fi
2049  ;;
2050openbsd*)
2051  with_gnu_ld=no
2052  ;;
2053esac
2054
2055ld_shlibs=yes
2056if test "$with_gnu_ld" = yes; then
2057  # If archive_cmds runs LD, not CC, wlarc should be empty
2058  wlarc='${wl}'
2059
2060  # See if GNU ld supports shared libraries.
2061  case $host_os in
2062  aix3* | aix4* | aix5*)
2063    # On AIX, the GNU linker is very broken
2064    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2065    ld_shlibs=no
2066    cat <<EOF 1>&2
2067
2068*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2069*** to be unable to reliably create shared libraries on AIX.
2070*** Therefore, libtool is disabling shared libraries support.  If you
2071*** really care for shared libraries, you may want to modify your PATH
2072*** so that a non-GNU linker is found, and then restart.
2073
2074EOF
2075    ;;
2076
2077  amigaos*)
2078    archive_cmds='$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)'
2079    hardcode_libdir_flag_spec='-L$libdir'
2080    hardcode_minus_L=yes
2081
2082    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2083    # that the semantics of dynamic libraries on AmigaOS, at least up
2084    # to version 4, is to share data among multiple programs linked
2085    # with the same dynamic library.  Since this doesn't match the
2086    # behavior of shared libraries on other platforms, we can use
2087    # them.
2088    ld_shlibs=no
2089    ;;
2090
2091  beos*)
2092    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2093      allow_undefined_flag=unsupported
2094      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2095      # support --undefined.  This deserves some investigation.  FIXME
2096      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2097    else
2098      ld_shlibs=no
2099    fi
2100    ;;
2101
2102  cygwin* | mingw* | pw32*)
2103    # hardcode_libdir_flag_spec is actually meaningless, as there is
2104    # no search path for DLLs.
2105    hardcode_libdir_flag_spec='-L$libdir'
2106    allow_undefined_flag=unsupported
2107    always_export_symbols=yes
2108
2109    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2110      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2111      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2112      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2113      else $CC -o impgen impgen.c ; fi)~
2114      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2115
2116    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2117
2118    # cygwin and mingw dlls have different entry points and sets of symbols
2119    # to exclude.
2120    # FIXME: what about values for MSVC?
2121    dll_entry=__cygwin_dll_entry@12
2122    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2123    case $host_os in
2124    mingw*)
2125      # mingw values
2126      dll_entry=_DllMainCRTStartup@12
2127      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2128      ;;
2129    esac
2130
2131    # mingw and cygwin differ, and it's simplest to just exclude the union
2132    # of the two symbol sets.
2133    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2134
2135    # recent cygwin and mingw systems supply a stub DllMain which the user
2136    # can override, but on older systems we have to supply one (in ltdll.c)
2137    if test "x$lt_cv_need_dllmain" = "xyes"; then
2138      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2139      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2140        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2141    else
2142      ltdll_obj=
2143      ltdll_cmds=
2144    fi
2145
2146    # Extract the symbol export list from an `--export-all' def file,
2147    # then regenerate the def file from the symbol export list, so that
2148    # the compiled dll only exports the symbol export list.
2149    # Be careful not to strip the DATA tag left be newer dlltools.
2150    export_symbols_cmds="$ltdll_cmds"'
2151      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2152      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2153
2154    # If the export-symbols file already is a .def file (1st line
2155    # is EXPORTS), use it as is.
2156    # If DATA tags from a recent dlltool are present, honour them!
2157    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2158        cp $export_symbols $output_objdir/$soname-def;
2159      else
2160        echo EXPORTS > $output_objdir/$soname-def;
2161        _lt_hint=1;
2162        cat $export_symbols | while read symbol; do
2163         set dummy \$symbol;
2164         case \[$]# in
2165           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2166           4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2167           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2168         esac;
2169         _lt_hint=`expr 1 + \$_lt_hint`;
2170        done;
2171      fi~
2172      '"$ltdll_cmds"'
2173      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2174      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2175      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2176      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2177      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2178    ;;
2179
2180  netbsd*)
2181    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2182      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2183      wlarc=
2184    else
2185      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2186      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2187    fi
2188    ;;
2189
2190  solaris* | sysv5*)
2191    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2192      ld_shlibs=no
2193      cat <<EOF 1>&2
2194
2195*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2196*** create shared libraries on Solaris systems.  Therefore, libtool
2197*** is disabling shared libraries support.  We urge you to upgrade GNU
2198*** binutils to release 2.9.1 or newer.  Another option is to modify
2199*** your PATH or compiler configuration so that the native linker is
2200*** used, and then restart.
2201
2202EOF
2203    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2204      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2205      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2206    else
2207      ld_shlibs=no
2208    fi
2209    ;;
2210
2211  sunos4*)
2212    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2213    wlarc=
2214    hardcode_direct=yes
2215    hardcode_shlibpath_var=no
2216    ;;
2217
2218  *)
2219    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2220      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2221      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2222    else
2223      ld_shlibs=no
2224    fi
2225    ;;
2226  esac
2227
2228  if test "$ld_shlibs" = yes; then
2229    runpath_var=LD_RUN_PATH
2230    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2231    export_dynamic_flag_spec='${wl}--export-dynamic'
2232    case $host_os in
2233    cygwin* | mingw* | pw32*)
2234      # dlltool doesn't understand --whole-archive et. al.
2235      whole_archive_flag_spec=
2236      ;;
2237    *)
2238      # ancient GNU ld didn't support --whole-archive et. al.
2239      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2240        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2241      else
2242        whole_archive_flag_spec=
2243      fi
2244      ;;
2245    esac
2246  fi
2247else
2248  # PORTME fill in a description of your system's linker (not GNU ld)
2249  case $host_os in
2250  aix3*)
2251    allow_undefined_flag=unsupported
2252    always_export_symbols=yes
2253    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2254    # Note: this linker hardcodes the directories in LIBPATH if there
2255    # are no directories specified by -L.
2256    hardcode_minus_L=yes
2257    if test "$GCC" = yes && test -z "$link_static_flag"; then
2258      # Neither direct hardcoding nor static linking is supported with a
2259      # broken collect2.
2260      hardcode_direct=unsupported
2261    fi
2262    ;;
2263
2264  aix4* | aix5*)
2265    if test "$host_cpu" = ia64; then
2266      # On IA64, the linker does run time linking by default, so we don't
2267      # have to do anything special.
2268      aix_use_runtimelinking=no
2269      exp_sym_flag='-Bexport'
2270      no_entry_flag=""
2271    else
2272      aix_use_runtimelinking=no
2273
2274      # Test if we are trying to use run time linking or normal
2275      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2276      # need to do runtime linking.
2277      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2278        for ld_flag in $LDFLAGS; do
2279          case $ld_flag in
2280          *-brtl*)
2281            aix_use_runtimelinking=yes
2282            break
2283          ;;
2284          esac
2285        done
2286      esac
2287
2288      exp_sym_flag='-bexport'
2289      no_entry_flag='-bnoentry'
2290    fi
2291
2292    # When large executables or shared objects are built, AIX ld can
2293    # have problems creating the table of contents.  If linking a library
2294    # or program results in "error TOC overflow" add -mminimal-toc to
2295    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2296    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2297
2298    hardcode_direct=yes
2299    archive_cmds=''
2300    hardcode_libdir_separator=':'
2301    if test "$GCC" = yes; then
2302      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2303        collect2name=`${CC} -print-prog-name=collect2`
2304        if test -f "$collect2name" && \
2305          strings "$collect2name" | grep resolve_lib_name >/dev/null
2306        then
2307          # We have reworked collect2
2308          hardcode_direct=yes
2309        else
2310          # We have old collect2
2311          hardcode_direct=unsupported
2312          # It fails to find uninstalled libraries when the uninstalled
2313          # path is not listed in the libpath.  Setting hardcode_minus_L
2314          # to unsupported forces relinking
2315          hardcode_minus_L=yes
2316          hardcode_libdir_flag_spec='-L$libdir'
2317          hardcode_libdir_separator=
2318        fi
2319      esac
2320
2321      shared_flag='-shared'
2322    else
2323      # not using gcc
2324      if test "$host_cpu" = ia64; then
2325        shared_flag='${wl}-G'
2326      else
2327        if test "$aix_use_runtimelinking" = yes; then
2328          shared_flag='${wl}-G'
2329        else
2330          shared_flag='${wl}-bM:SRE'
2331        fi
2332      fi
2333    fi
2334
2335    # It seems that -bexpall can do strange things, so it is better to
2336    # generate a list of symbols to export.
2337    always_export_symbols=yes
2338    if test "$aix_use_runtimelinking" = yes; then
2339      # Warning - without using the other runtime loading flags (-brtl),
2340      # -berok will link without error, but may produce a broken library.
2341      allow_undefined_flag='-berok'
2342      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2343      archive_expsym_cmds="\$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"
2344    else
2345      if test "$host_cpu" = ia64; then
2346        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2347        allow_undefined_flag="-z nodefs"
2348        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2349      else
2350        hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2351        # Warning - without using the other run time loading flags,
2352        # -berok will link without error, but may produce a broken library.
2353        allow_undefined_flag='${wl}-berok'
2354        # This is a bit strange, but is similar to how AIX traditionally builds
2355        # it's shared libraries.
2356        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2357      fi
2358    fi
2359    ;;
2360
2361  amigaos*)
2362    archive_cmds='$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)'
2363    hardcode_libdir_flag_spec='-L$libdir'
2364    hardcode_minus_L=yes
2365    # see comment about different semantics on the GNU ld section
2366    ld_shlibs=no
2367    ;;
2368
2369  cygwin* | mingw* | pw32*)
2370    # When not using gcc, we currently assume that we are using
2371    # Microsoft Visual C++.
2372    # hardcode_libdir_flag_spec is actually meaningless, as there is
2373    # no search path for DLLs.
2374    hardcode_libdir_flag_spec=' '
2375    allow_undefined_flag=unsupported
2376    # Tell ltmain to make .lib files, not .a files.
2377    libext=lib
2378    # FIXME: Setting linknames here is a bad hack.
2379    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2380    # The linker will automatically build a .lib file if we build a DLL.
2381    old_archive_from_new_cmds='true'
2382    # FIXME: Should let the user specify the lib program.
2383    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2384    fix_srcfile_path='`cygpath -w "$srcfile"`'
2385    ;;
2386
2387  darwin* | rhapsody*)
2388    case "$host_os" in
2389    rhapsody* | darwin1.[[012]])
2390      allow_undefined_flag='-undefined suppress'
2391      ;;
2392    *) # Darwin 1.3 on
2393      allow_undefined_flag='-flat_namespace -undefined suppress'
2394      ;;
2395    esac
2396    # FIXME: Relying on posixy $() will cause problems for
2397    #        cross-compilation, but unfortunately the echo tests do not
2398    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
2399    #        `"' quotes if we put them in here... so don't!
2400    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2401    # We need to add '_' to the symbols in $export_symbols first
2402    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2403    hardcode_direct=yes
2404    hardcode_shlibpath_var=no
2405    whole_archive_flag_spec='-all_load $convenience'
2406    ;;
2407
2408  freebsd1*)
2409    ld_shlibs=no
2410    ;;
2411
2412  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2413  # support.  Future versions do this automatically, but an explicit c++rt0.o
2414  # does not break anything, and helps significantly (at the cost of a little
2415  # extra space).
2416  freebsd2.2*)
2417    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2418    hardcode_libdir_flag_spec='-R$libdir'
2419    hardcode_direct=yes
2420    hardcode_shlibpath_var=no
2421    ;;
2422
2423  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2424  freebsd2*)
2425    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2426    hardcode_direct=yes
2427    hardcode_minus_L=yes
2428    hardcode_shlibpath_var=no
2429    ;;
2430
2431  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2432  freebsd*)
2433    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2434    hardcode_libdir_flag_spec='-R$libdir'
2435    hardcode_direct=yes
2436    hardcode_shlibpath_var=no
2437    ;;
2438
2439  hpux9* | hpux10* | hpux11*)
2440    case $host_os in
2441    hpux9*) archive_cmds='$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' ;;
2442    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2443    esac
2444    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2445    hardcode_libdir_separator=:
2446    hardcode_direct=yes
2447    hardcode_minus_L=yes # Not in the search PATH, but as the default
2448                         # location of the library.
2449    export_dynamic_flag_spec='${wl}-E'
2450    ;;
2451
2452  irix5* | irix6* | nonstopux*)
2453    if test "$GCC" = yes; then
2454      archive_cmds='$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'
2455      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2456    else
2457      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2458      hardcode_libdir_flag_spec='-rpath $libdir'
2459    fi
2460    hardcode_libdir_separator=:
2461    link_all_deplibs=yes
2462    ;;
2463
2464  netbsd*)
2465    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2466      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
2467    else
2468      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
2469    fi
2470    hardcode_libdir_flag_spec='-R$libdir'
2471    hardcode_direct=yes
2472    hardcode_shlibpath_var=no
2473    ;;
2474
2475  newsos6)
2476    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2477    hardcode_direct=yes
2478    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2479    hardcode_libdir_separator=:
2480    hardcode_shlibpath_var=no
2481    ;;
2482
2483  openbsd*)
2484    hardcode_direct=yes
2485    hardcode_shlibpath_var=no
2486    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2487      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2488      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2489      export_dynamic_flag_spec='${wl}-E'
2490    else
2491      case "$host_os" in
2492      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2493        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2494        hardcode_libdir_flag_spec='-R$libdir'
2495        ;;
2496      *)
2497        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2498        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2499        ;;
2500      esac
2501    fi
2502    ;;
2503
2504  os2*)
2505    hardcode_libdir_flag_spec='-L$libdir'
2506    hardcode_minus_L=yes
2507    allow_undefined_flag=unsupported
2508    archive_cmds='$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'
2509    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2510    ;;
2511
2512  osf3*)
2513    if test "$GCC" = yes; then
2514      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2515      archive_cmds='$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'
2516    else
2517      allow_undefined_flag=' -expect_unresolved \*'
2518      archive_cmds='$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'
2519    fi
2520    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2521    hardcode_libdir_separator=:
2522    ;;
2523
2524  osf4* | osf5*)        # as osf3* with the addition of -msym flag
2525    if test "$GCC" = yes; then
2526      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2527      archive_cmds='$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'
2528      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2529    else
2530      allow_undefined_flag=' -expect_unresolved \*'
2531      archive_cmds='$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'
2532      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2533      $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'
2534
2535      #Both c and cxx compiler support -rpath directly
2536      hardcode_libdir_flag_spec='-rpath $libdir'
2537    fi
2538    hardcode_libdir_separator=:
2539    ;;
2540
2541  sco3.2v5*)
2542    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2543    hardcode_shlibpath_var=no
2544    runpath_var=LD_RUN_PATH
2545    hardcode_runpath_var=yes
2546    export_dynamic_flag_spec='${wl}-Bexport'
2547    ;;
2548
2549  solaris*)
2550    # gcc --version < 3.0 without binutils cannot create self contained
2551    # shared libraries reliably, requiring libgcc.a to resolve some of
2552    # the object symbols generated in some cases.  Libraries that use
2553    # assert need libgcc.a to resolve __eprintf, for example.  Linking
2554    # a copy of libgcc.a into every shared library to guarantee resolving
2555    # such symbols causes other problems:  According to Tim Van Holder
2556    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2557    # (to the application) exception stack for one thing.
2558    no_undefined_flag=' -z defs'
2559    if test "$GCC" = yes; then
2560      case `$CC --version 2>/dev/null` in
2561      [[12]].*)
2562        cat <<EOF 1>&2
2563
2564*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2565*** create self contained shared libraries on Solaris systems, without
2566*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
2567*** -no-undefined support, which will at least allow you to build shared
2568*** libraries.  However, you may find that when you link such libraries
2569*** into an application without using GCC, you have to manually add
2570*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
2571*** upgrade to a newer version of GCC.  Another option is to rebuild your
2572*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2573
2574EOF
2575        no_undefined_flag=
2576        ;;
2577      esac
2578    fi
2579    # $CC -shared without GNU ld will not create a library from C++
2580    # object files and a static libstdc++, better avoid it by now
2581    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2582    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2583                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2584    hardcode_libdir_flag_spec='-R$libdir'
2585    hardcode_shlibpath_var=no
2586    case $host_os in
2587    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2588    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2589      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2590    esac
2591    link_all_deplibs=yes
2592    ;;
2593
2594  sunos4*)
2595    if test "x$host_vendor" = xsequent; then
2596      # Use $CC to link under sequent, because it throws in some extra .o
2597      # files that make .init and .fini sections work.
2598      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2599    else
2600      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2601    fi
2602    hardcode_libdir_flag_spec='-L$libdir'
2603    hardcode_direct=yes
2604    hardcode_minus_L=yes
2605    hardcode_shlibpath_var=no
2606    ;;
2607
2608  sysv4)
2609    case $host_vendor in
2610      sni)
2611        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2612        hardcode_direct=yes # is this really true???
2613        ;;
2614      siemens)
2615        ## LD is ld it makes a PLAMLIB
2616        ## CC just makes a GrossModule.
2617        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2618        reload_cmds='$CC -r -o $output$reload_objs'
2619        hardcode_direct=no
2620        ;;
2621      motorola)
2622        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2623        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2624        ;;
2625    esac
2626    runpath_var='LD_RUN_PATH'
2627    hardcode_shlibpath_var=no
2628    ;;
2629
2630  sysv4.3*)
2631    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2632    hardcode_shlibpath_var=no
2633    export_dynamic_flag_spec='-Bexport'
2634    ;;
2635
2636  sysv5*)
2637    no_undefined_flag=' -z text'
2638    # $CC -shared without GNU ld will not create a library from C++
2639    # object files and a static libstdc++, better avoid it by now
2640    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2641    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2642                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2643    hardcode_libdir_flag_spec=
2644    hardcode_shlibpath_var=no
2645    runpath_var='LD_RUN_PATH'
2646    ;;
2647
2648  uts4*)
2649    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2650    hardcode_libdir_flag_spec='-L$libdir'
2651    hardcode_shlibpath_var=no
2652    ;;
2653
2654  dgux*)
2655    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2656    hardcode_libdir_flag_spec='-L$libdir'
2657    hardcode_shlibpath_var=no
2658    ;;
2659
2660  sysv4*MP*)
2661    if test -d /usr/nec; then
2662      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2663      hardcode_shlibpath_var=no
2664      runpath_var=LD_RUN_PATH
2665      hardcode_runpath_var=yes
2666      ld_shlibs=yes
2667    fi
2668    ;;
2669
2670  sysv4.2uw2*)
2671    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2672    hardcode_direct=yes
2673    hardcode_minus_L=no
2674    hardcode_shlibpath_var=no
2675    hardcode_runpath_var=yes
2676    runpath_var=LD_RUN_PATH
2677    ;;
2678
2679  sysv5uw7* | unixware7*)
2680    no_undefined_flag='${wl}-z ${wl}text'
2681    if test "$GCC" = yes; then
2682      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2683    else
2684      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2685    fi
2686    runpath_var='LD_RUN_PATH'
2687    hardcode_shlibpath_var=no
2688    ;;
2689
2690  *)
2691    ld_shlibs=no
2692    ;;
2693  esac
2694fi
2695AC_MSG_RESULT([$ld_shlibs])
2696test "$ld_shlibs" = no && can_build_shared=no
2697
2698# Check hardcoding attributes.
2699AC_MSG_CHECKING([how to hardcode library paths into programs])
2700hardcode_action=
2701if test -n "$hardcode_libdir_flag_spec" || \
2702   test -n "$runpath_var"; then
2703
2704  # We can hardcode non-existant directories.
2705  if test "$hardcode_direct" != no &&
2706     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2707     # have to relink, otherwise we might link with an installed library
2708     # when we should be linking with a yet-to-be-installed one
2709     ## test "$hardcode_shlibpath_var" != no &&
2710     test "$hardcode_minus_L" != no; then
2711    # Linking always hardcodes the temporary library directory.
2712    hardcode_action=relink
2713  else
2714    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2715    hardcode_action=immediate
2716  fi
2717else
2718  # We cannot hardcode anything, or else we can only hardcode existing
2719  # directories.
2720  hardcode_action=unsupported
2721fi
2722AC_MSG_RESULT([$hardcode_action])
2723
2724striplib=
2725old_striplib=
2726AC_MSG_CHECKING([whether stripping libraries is possible])
2727if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2728  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2729  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2730  AC_MSG_RESULT([yes])
2731else
2732  AC_MSG_RESULT([no])
2733fi
2734
2735reload_cmds='$LD$reload_flag -o $output$reload_objs'
2736test -z "$deplibs_check_method" && deplibs_check_method=unknown
2737
2738# PORTME Fill in your ld.so characteristics
2739AC_MSG_CHECKING([dynamic linker characteristics])
2740library_names_spec=
2741libname_spec='lib$name'
2742soname_spec=
2743postinstall_cmds=
2744postuninstall_cmds=
2745finish_cmds=
2746finish_eval=
2747shlibpath_var=
2748shlibpath_overrides_runpath=unknown
2749version_type=none
2750dynamic_linker="$host_os ld.so"
2751sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
2752sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
2753
2754case $host_os in
2755aix3*)
2756  version_type=linux
2757  library_names_spec='${libname}${release}.so$versuffix $libname.a'
2758  shlibpath_var=LIBPATH
2759
2760  # AIX has no versioning support, so we append a major version to the name.
2761  soname_spec='${libname}${release}.so$major'
2762  ;;
2763
2764aix4* | aix5*)
2765  version_type=linux
2766  need_lib_prefix=no
2767  need_version=no
2768  hardcode_into_libs=yes
2769  if test "$host_cpu" = ia64; then
2770    # AIX 5 supports IA64
2771    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2772    shlibpath_var=LD_LIBRARY_PATH
2773  else
2774    # With GCC up to 2.95.x, collect2 would create an import file
2775    # for dependence libraries.  The import file would start with
2776    # the line `#! .'.  This would cause the generated library to
2777    # depend on `.', always an invalid library.  This was fixed in
2778    # development snapshots of GCC prior to 3.0.
2779    case $host_os in
2780      aix4 | aix4.[[01]] | aix4.[[01]].*)
2781        if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2782             echo ' yes '
2783             echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2784          :
2785        else
2786          can_build_shared=no
2787        fi
2788        ;;
2789    esac
2790    # AIX (on Power*) has no versioning support, so currently we can
2791    # not hardcode correct soname into executable. Probably we can
2792    # add versioning support to collect2, so additional links can
2793    # be useful in future.
2794    if test "$aix_use_runtimelinking" = yes; then
2795      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2796      # instead of lib<name>.a to let people know that these are not
2797      # typical AIX shared libraries.
2798      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2799    else
2800      # We preserve .a as extension for shared libraries through AIX4.2
2801      # and later when we are not doing run time linking.
2802      library_names_spec='${libname}${release}.a $libname.a'
2803      soname_spec='${libname}${release}.so$major'
2804    fi
2805    shlibpath_var=LIBPATH
2806  fi
2807  hardcode_into_libs=yes
2808  ;;
2809
2810amigaos*)
2811  library_names_spec='$libname.ixlibrary $libname.a'
2812  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2813  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'
2814  ;;
2815
2816beos*)
2817  library_names_spec='${libname}.so'
2818  dynamic_linker="$host_os ld.so"
2819  shlibpath_var=LIBRARY_PATH
2820  ;;
2821
2822bsdi4*)
2823  version_type=linux
2824  need_version=no
2825  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2826  soname_spec='${libname}${release}.so$major'
2827  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2828  shlibpath_var=LD_LIBRARY_PATH
2829  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2830  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2831  export_dynamic_flag_spec=-rdynamic
2832  # the default ld.so.conf also contains /usr/contrib/lib and
2833  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2834  # libtool to hard-code these into programs
2835  ;;
2836
2837cygwin* | mingw* | pw32*)
2838  version_type=windows
2839  need_version=no
2840  need_lib_prefix=no
2841  case $GCC,$host_os in
2842  yes,cygwin*)
2843    library_names_spec='$libname.dll.a'
2844    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2845    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2846      dldir=$destdir/`dirname \$dlpath`~
2847      test -d \$dldir || mkdir -p \$dldir~
2848      $install_prog .libs/$dlname \$dldir/$dlname'
2849    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2850      dlpath=$dir/\$dldll~
2851       $rm \$dlpath'
2852    ;;
2853  yes,mingw*)
2854    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2855    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2856    ;;
2857  yes,pw32*)
2858    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2859    ;;
2860  *)
2861    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2862    ;;
2863  esac
2864  dynamic_linker='Win32 ld.exe'
2865  # FIXME: first we should search . and the directory the executable is in
2866  shlibpath_var=PATH
2867  ;;
2868
2869darwin* | rhapsody*)
2870  dynamic_linker="$host_os dyld"
2871  version_type=darwin
2872  need_lib_prefix=no
2873  need_version=no
2874  # FIXME: Relying on posixy $() will cause problems for
2875  #        cross-compilation, but unfortunately the echo tests do not
2876  #        yet detect zsh echo's removal of \ escapes.
2877  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2878  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2879  shlibpath_overrides_runpath=yes
2880  shlibpath_var=DYLD_LIBRARY_PATH
2881  ;;
2882
2883freebsd1*)
2884  dynamic_linker=no
2885  ;;
2886
2887freebsd*)
2888  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2889  version_type=freebsd-$objformat
2890  case $version_type in
2891    freebsd-elf*)
2892      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2893      need_version=no
2894      need_lib_prefix=no
2895      ;;
2896    freebsd-*)
2897      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2898      need_version=yes
2899      ;;
2900  esac
2901  shlibpath_var=LD_LIBRARY_PATH
2902  case $host_os in
2903  freebsd2*)
2904    shlibpath_overrides_runpath=yes
2905    ;;
2906  *)
2907    shlibpath_overrides_runpath=no
2908    hardcode_into_libs=yes
2909    ;;
2910  esac
2911  ;;
2912
2913gnu*)
2914  version_type=linux
2915  need_lib_prefix=no
2916  need_version=no
2917  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2918  soname_spec='${libname}${release}.so$major'
2919  shlibpath_var=LD_LIBRARY_PATH
2920  hardcode_into_libs=yes
2921  ;;
2922
2923hpux9* | hpux10* | hpux11*)
2924  # Give a soname corresponding to the major version so that dld.sl refuses to
2925  # link against other versions.
2926  dynamic_linker="$host_os dld.sl"
2927  version_type=sunos
2928  need_lib_prefix=no
2929  need_version=no
2930  shlibpath_var=SHLIB_PATH
2931  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2932  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2933  soname_spec='${libname}${release}.sl$major'
2934  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2935  postinstall_cmds='chmod 555 $lib'
2936  ;;
2937
2938irix5* | irix6* | nonstopux*)
2939  case $host_os in
2940    nonstopux*) version_type=nonstopux ;;
2941    *)          version_type=irix ;;
2942  esac
2943  need_lib_prefix=no
2944  need_version=no
2945  soname_spec='${libname}${release}.so$major'
2946  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2947  case $host_os in
2948  irix5* | nonstopux*)
2949    libsuff= shlibsuff=
2950    ;;
2951  *)
2952    case $LD in # libtool.m4 will add one of these switches to LD
2953    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2954    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2955    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2956    *) libsuff= shlibsuff= libmagic=never-match;;
2957    esac
2958    ;;
2959  esac
2960  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2961  shlibpath_overrides_runpath=no
2962  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2963  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2964  ;;
2965
2966# No shared lib support for Linux oldld, aout, or coff.
2967linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2968  dynamic_linker=no
2969  ;;
2970
2971# This must be Linux ELF.
2972linux-gnu*)
2973  version_type=linux
2974  need_lib_prefix=no
2975  need_version=no
2976  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2977  soname_spec='${libname}${release}.so$major'
2978  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2979  shlibpath_var=LD_LIBRARY_PATH
2980  shlibpath_overrides_runpath=no
2981  # This implies no fast_install, which is unacceptable.
2982  # Some rework will be needed to allow for fast_install
2983  # before this can be enabled.
2984  hardcode_into_libs=yes
2985
2986  case $host_cpu:$lt_cv_cc_64bit_output in
2987  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
2988    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
2989    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
2990    ;;
2991  esac
2992
2993  # We used to test for /lib/ld.so.1 and disable shared libraries on
2994  # powerpc, because MkLinux only supported shared libraries with the
2995  # GNU dynamic linker.  Since this was broken with cross compilers,
2996  # most powerpc-linux boxes support dynamic linking these days and
2997  # people can always --disable-shared, the test was removed, and we
2998  # assume the GNU/Linux dynamic linker is in use.
2999  dynamic_linker='GNU/Linux ld.so'
3000
3001  # Find out which ABI we are using (multilib Linux x86_64 hack).
3002  libsuff=
3003  case "$host_cpu" in
3004  x86_64*)
3005    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3006    if AC_TRY_EVAL(ac_compile); then
3007      case `/usr/bin/file conftest.$ac_objext` in
3008      *64-bit*)
3009        libsuff=64
3010        ;;
3011      esac
3012    fi
3013    rm -rf conftest*
3014    ;;
3015  *)
3016    ;;
3017  esac
3018  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
3019  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
3020  ;;
3021
3022netbsd*)
3023  version_type=sunos
3024  need_lib_prefix=no
3025  need_version=no
3026  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3027    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3028    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3029    dynamic_linker='NetBSD (a.out) ld.so'
3030  else
3031    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3032    soname_spec='${libname}${release}.so$major'
3033    dynamic_linker='NetBSD ld.elf_so'
3034  fi
3035  shlibpath_var=LD_LIBRARY_PATH
3036  shlibpath_overrides_runpath=yes
3037  hardcode_into_libs=yes
3038  ;;
3039
3040newsos6)
3041  version_type=linux
3042  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3043  shlibpath_var=LD_LIBRARY_PATH
3044  shlibpath_overrides_runpath=yes
3045  ;;
3046
3047openbsd*)
3048  version_type=sunos
3049  need_lib_prefix=no
3050  need_version=no
3051  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3052    case "$host_os" in
3053    openbsd2.[[89]] | openbsd2.[[89]].*)
3054      shlibpath_overrides_runpath=no
3055      ;;
3056    *)
3057      shlibpath_overrides_runpath=yes
3058      ;;
3059    esac
3060  else
3061    shlibpath_overrides_runpath=yes
3062  fi
3063  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3064  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3065  shlibpath_var=LD_LIBRARY_PATH
3066  ;;
3067
3068os2*)
3069  libname_spec='$name'
3070  need_lib_prefix=no
3071  library_names_spec='$libname.dll $libname.a'
3072  dynamic_linker='OS/2 ld.exe'
3073  shlibpath_var=LIBPATH
3074  ;;
3075
3076osf3* | osf4* | osf5*)
3077  version_type=osf
3078  need_version=no
3079  soname_spec='${libname}${release}.so$major'
3080  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3081  shlibpath_var=LD_LIBRARY_PATH
3082  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3083  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3084  hardcode_into_libs=yes
3085  ;;
3086
3087sco3.2v5*)
3088  version_type=osf
3089  soname_spec='${libname}${release}.so$major'
3090  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3091  shlibpath_var=LD_LIBRARY_PATH
3092  ;;
3093
3094solaris*)
3095  version_type=linux
3096  need_lib_prefix=no
3097  need_version=no
3098  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3099  soname_spec='${libname}${release}.so$major'
3100  shlibpath_var=LD_LIBRARY_PATH
3101  shlibpath_overrides_runpath=yes
3102  hardcode_into_libs=yes
3103  # ldd complains unless libraries are executable
3104  postinstall_cmds='chmod +x $lib'
3105  ;;
3106
3107sunos4*)
3108  version_type=sunos
3109  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3110  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3111  shlibpath_var=LD_LIBRARY_PATH
3112  shlibpath_overrides_runpath=yes
3113  if test "$with_gnu_ld" = yes; then
3114    need_lib_prefix=no
3115  fi
3116  need_version=yes
3117  ;;
3118
3119sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3120  version_type=linux
3121  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3122  soname_spec='${libname}${release}.so$major'
3123  shlibpath_var=LD_LIBRARY_PATH
3124  case $host_vendor in
3125    sni)
3126      shlibpath_overrides_runpath=no
3127      need_lib_prefix=no
3128      export_dynamic_flag_spec='${wl}-Blargedynsym'
3129      runpath_var=LD_RUN_PATH
3130      ;;
3131    siemens)
3132      need_lib_prefix=no
3133      ;;
3134    motorola)
3135      need_lib_prefix=no
3136      need_version=no
3137      shlibpath_overrides_runpath=no
3138      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3139      ;;
3140  esac
3141  ;;
3142
3143uts4*)
3144  version_type=linux
3145  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3146  soname_spec='${libname}${release}.so$major'
3147  shlibpath_var=LD_LIBRARY_PATH
3148  ;;
3149
3150dgux*)
3151  version_type=linux
3152  need_lib_prefix=no
3153  need_version=no
3154  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3155  soname_spec='${libname}${release}.so$major'
3156  shlibpath_var=LD_LIBRARY_PATH
3157  ;;
3158
3159sysv4*MP*)
3160  if test -d /usr/nec ;then
3161    version_type=linux
3162    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3163    soname_spec='$libname.so.$major'
3164    shlibpath_var=LD_LIBRARY_PATH
3165  fi
3166  ;;
3167
3168*)
3169  dynamic_linker=no
3170  ;;
3171esac
3172AC_MSG_RESULT([$dynamic_linker])
3173test "$dynamic_linker" = no && can_build_shared=no
3174
3175# Report the final consequences.
3176AC_MSG_CHECKING([if libtool supports shared libraries])
3177AC_MSG_RESULT([$can_build_shared])
3178
3179AC_MSG_CHECKING([whether to build shared libraries])
3180test "$can_build_shared" = "no" && enable_shared=no
3181
3182# On AIX, shared libraries and static libraries use the same namespace, and
3183# are all built from PIC.
3184case "$host_os" in
3185aix3*)
3186  test "$enable_shared" = yes && enable_static=no
3187  if test -n "$RANLIB"; then
3188    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3189    postinstall_cmds='$RANLIB $lib'
3190  fi
3191  ;;
3192
3193aix4*)
3194  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3195    test "$enable_shared" = yes && enable_static=no
3196  fi
3197  ;;
3198esac
3199AC_MSG_RESULT([$enable_shared])
3200
3201AC_MSG_CHECKING([whether to build static libraries])
3202# Make sure either enable_shared or enable_static is yes.
3203test "$enable_shared" = yes || enable_static=yes
3204AC_MSG_RESULT([$enable_static])
3205
3206if test "$hardcode_action" = relink; then
3207  # Fast installation is not supported
3208  enable_fast_install=no
3209elif test "$shlibpath_overrides_runpath" = yes ||
3210     test "$enable_shared" = no; then
3211  # Fast installation is not necessary
3212  enable_fast_install=needless
3213fi
3214
3215variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3216if test "$GCC" = yes; then
3217  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3218fi
3219
3220AC_LIBTOOL_DLOPEN_SELF
3221
3222if test "$enable_shared" = yes && test "$GCC" = yes; then
3223  case $archive_cmds in
3224  *'~'*)
3225    # FIXME: we may have to deal with multi-command sequences.
3226    ;;
3227  '$CC '*)
3228    # Test whether the compiler implicitly links with -lc since on some
3229    # systems, -lgcc has to come before -lc. If gcc already passes -lc
3230    # to ld, don't add -lc before -lgcc.
3231    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3232    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3233    [$rm conftest*
3234    echo 'static int dummy;' > conftest.$ac_ext
3235
3236    if AC_TRY_EVAL(ac_compile); then
3237      soname=conftest
3238      lib=conftest
3239      libobjs=conftest.$ac_objext
3240      deplibs=
3241      wl=$lt_cv_prog_cc_wl
3242      compiler_flags=-v
3243      linker_flags=-v
3244      verstring=
3245      output_objdir=.
3246      libname=conftest
3247      save_allow_undefined_flag=$allow_undefined_flag
3248      allow_undefined_flag=
3249      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3250      then
3251        lt_cv_archive_cmds_need_lc=no
3252      else
3253        lt_cv_archive_cmds_need_lc=yes
3254      fi
3255      allow_undefined_flag=$save_allow_undefined_flag
3256    else
3257      cat conftest.err 1>&5
3258    fi])
3259    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3260    ;;
3261  esac
3262fi
3263need_lc=${lt_cv_archive_cmds_need_lc-yes}
3264
3265# The second clause should only fire when bootstrapping the
3266# libtool distribution, otherwise you forgot to ship ltmain.sh
3267# with your package, and you will get complaints that there are
3268# no rules to generate ltmain.sh.
3269if test -f "$ltmain"; then
3270  :
3271else
3272  # If there is no Makefile yet, we rely on a make rule to execute
3273  # `config.status --recheck' to rerun these tests and create the
3274  # libtool script then.
3275  test -f Makefile && make "$ltmain"
3276fi
3277
3278if test -f "$ltmain"; then
3279  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3280  $rm -f "${ofile}T"
3281
3282  echo creating $ofile
3283
3284  # Now quote all the things that may contain metacharacters while being
3285  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3286  # variables and quote the copies for generation of the libtool script.
3287  for var in echo old_CC old_CFLAGS SED \
3288    AR AR_FLAGS CC LD LN_S NM SHELL \
3289    reload_flag reload_cmds wl \
3290    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3291    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3292    library_names_spec soname_spec \
3293    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3294    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3295    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3296    old_striplib striplib file_magic_cmd export_symbols_cmds \
3297    deplibs_check_method allow_undefined_flag no_undefined_flag \
3298    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3299    global_symbol_to_c_name_address \
3300    hardcode_libdir_flag_spec hardcode_libdir_separator  \
3301    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3302    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3303
3304    case $var in
3305    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3306    old_postinstall_cmds | old_postuninstall_cmds | \
3307    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3308    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3309    postinstall_cmds | postuninstall_cmds | \
3310    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3311      # Double-quote double-evaled strings.
3312      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3313      ;;
3314    *)
3315      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3316      ;;
3317    esac
3318  done
3319
3320  cat <<__EOF__ > "${ofile}T"
3321#! $SHELL
3322
3323# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3324# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3325# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3326#
3327# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3328# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3329#
3330# This program is free software; you can redistribute it and/or modify
3331# it under the terms of the GNU General Public License as published by
3332# the Free Software Foundation; either version 2 of the License, or
3333# (at your option) any later version.
3334#
3335# This program is distributed in the hope that it will be useful, but
3336# WITHOUT ANY WARRANTY; without even the implied warranty of
3337# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3338# General Public License for more details.
3339#
3340# You should have received a copy of the GNU General Public License
3341# along with this program; if not, write to the Free Software
3342# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3343#
3344# As a special exception to the GNU General Public License, if you
3345# distribute this file as part of a program that contains a
3346# configuration script generated by Autoconf, you may include it under
3347# the same distribution terms that you use for the rest of that program.
3348
3349# A sed that does not truncate output.
3350SED=$lt_SED
3351
3352# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3353Xsed="${SED} -e s/^X//"
3354
3355# The HP-UX ksh and POSIX shell print the target directory to stdout
3356# if CDPATH is set.
3357if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3358
3359# ### BEGIN LIBTOOL CONFIG
3360
3361# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3362
3363# Shell to use when invoking shell scripts.
3364SHELL=$lt_SHELL
3365
3366# Whether or not to build shared libraries.
3367build_libtool_libs=$enable_shared
3368
3369# Whether or not to build static libraries.
3370build_old_libs=$enable_static
3371
3372# Whether or not to add -lc for building shared libraries.
3373build_libtool_need_lc=$need_lc
3374
3375# Whether or not to optimize for fast installation.
3376fast_install=$enable_fast_install
3377
3378# The host system.
3379host_alias=$host_alias
3380host=$host
3381
3382# An echo program that does not interpret backslashes.
3383echo=$lt_echo
3384
3385# The archiver.
3386AR=$lt_AR
3387AR_FLAGS=$lt_AR_FLAGS
3388
3389# The default C compiler.
3390CC=$lt_CC
3391
3392# Is the compiler the GNU C compiler?
3393with_gcc=$GCC
3394
3395# The linker used to build libraries.
3396LD=$lt_LD
3397
3398# Whether we need hard or soft links.
3399LN_S=$lt_LN_S
3400
3401# A BSD-compatible nm program.
3402NM=$lt_NM
3403
3404# A symbol stripping program
3405STRIP=$STRIP
3406
3407# Used to examine libraries when file_magic_cmd begins "file"
3408MAGIC_CMD=$MAGIC_CMD
3409
3410# Used on cygwin: DLL creation program.
3411DLLTOOL="$DLLTOOL"
3412
3413# Used on cygwin: object dumper.
3414OBJDUMP="$OBJDUMP"
3415
3416# Used on cygwin: assembler.
3417AS="$AS"
3418
3419# The name of the directory that contains temporary libtool files.
3420objdir=$objdir
3421
3422# How to create reloadable object files.
3423reload_flag=$lt_reload_flag
3424reload_cmds=$lt_reload_cmds
3425
3426# How to pass a linker flag through the compiler.
3427wl=$lt_wl
3428
3429# Object file suffix (normally "o").
3430objext="$ac_objext"
3431
3432# Old archive suffix (normally "a").
3433libext="$libext"
3434
3435# Executable file suffix (normally "").
3436exeext="$exeext"
3437
3438# Additional compiler flags for building library objects.
3439pic_flag=$lt_pic_flag
3440pic_mode=$pic_mode
3441
3442# Does compiler simultaneously support -c and -o options?
3443compiler_c_o=$lt_compiler_c_o
3444
3445# Can we write directly to a .lo ?
3446compiler_o_lo=$lt_compiler_o_lo
3447
3448# Must we lock files when doing compilation ?
3449need_locks=$lt_need_locks
3450
3451# Do we need the lib prefix for modules?
3452need_lib_prefix=$need_lib_prefix
3453
3454# Do we need a version for libraries?
3455need_version=$need_version
3456
3457# Whether dlopen is supported.
3458dlopen_support=$enable_dlopen
3459
3460# Whether dlopen of programs is supported.
3461dlopen_self=$enable_dlopen_self
3462
3463# Whether dlopen of statically linked programs is supported.
3464dlopen_self_static=$enable_dlopen_self_static
3465
3466# Compiler flag to prevent dynamic linking.
3467link_static_flag=$lt_link_static_flag
3468
3469# Compiler flag to turn off builtin functions.
3470no_builtin_flag=$lt_no_builtin_flag
3471
3472# Compiler flag to allow reflexive dlopens.
3473export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3474
3475# Compiler flag to generate shared objects directly from archives.
3476whole_archive_flag_spec=$lt_whole_archive_flag_spec
3477
3478# Compiler flag to generate thread-safe objects.
3479thread_safe_flag_spec=$lt_thread_safe_flag_spec
3480
3481# Library versioning type.
3482version_type=$version_type
3483
3484# Format of library name prefix.
3485libname_spec=$lt_libname_spec
3486
3487# List of archive names.  First name is the real one, the rest are links.
3488# The last name is the one that the linker finds with -lNAME.
3489library_names_spec=$lt_library_names_spec
3490
3491# The coded name of the library, if different from the real name.
3492soname_spec=$lt_soname_spec
3493
3494# Commands used to build and install an old-style archive.
3495RANLIB=$lt_RANLIB
3496old_archive_cmds=$lt_old_archive_cmds
3497old_postinstall_cmds=$lt_old_postinstall_cmds
3498old_postuninstall_cmds=$lt_old_postuninstall_cmds
3499
3500# Create an old-style archive from a shared archive.
3501old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3502
3503# Create a temporary old-style archive to link instead of a shared archive.
3504old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3505
3506# Commands used to build and install a shared archive.
3507archive_cmds=$lt_archive_cmds
3508archive_expsym_cmds=$lt_archive_expsym_cmds
3509postinstall_cmds=$lt_postinstall_cmds
3510postuninstall_cmds=$lt_postuninstall_cmds
3511
3512# Commands to strip libraries.
3513old_striplib=$lt_old_striplib
3514striplib=$lt_striplib
3515
3516# Method to check whether dependent libraries are shared objects.
3517deplibs_check_method=$lt_deplibs_check_method
3518
3519# Command to use when deplibs_check_method == file_magic.
3520file_magic_cmd=$lt_file_magic_cmd
3521
3522# Flag that allows shared libraries with undefined symbols to be built.
3523allow_undefined_flag=$lt_allow_undefined_flag
3524
3525# Flag that forces no undefined symbols.
3526no_undefined_flag=$lt_no_undefined_flag
3527
3528# Commands used to finish a libtool library installation in a directory.
3529finish_cmds=$lt_finish_cmds
3530
3531# Same as above, but a single script fragment to be evaled but not shown.
3532finish_eval=$lt_finish_eval
3533
3534# Take the output of nm and produce a listing of raw symbols and C names.
3535global_symbol_pipe=$lt_global_symbol_pipe
3536
3537# Transform the output of nm in a proper C declaration
3538global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3539
3540# Transform the output of nm in a C name address pair
3541global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3542
3543# This is the shared library runtime path variable.
3544runpath_var=$runpath_var
3545
3546# This is the shared library path variable.
3547shlibpath_var=$shlibpath_var
3548
3549# Is shlibpath searched before the hard-coded library search path?
3550shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3551
3552# How to hardcode a shared library path into an executable.
3553hardcode_action=$hardcode_action
3554
3555# Whether we should hardcode library paths into libraries.
3556hardcode_into_libs=$hardcode_into_libs
3557
3558# Flag to hardcode \$libdir into a binary during linking.
3559# This must work even if \$libdir does not exist.
3560hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3561
3562# Whether we need a single -rpath flag with a separated argument.
3563hardcode_libdir_separator=$lt_hardcode_libdir_separator
3564
3565# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3566# resulting binary.
3567hardcode_direct=$hardcode_direct
3568
3569# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3570# resulting binary.
3571hardcode_minus_L=$hardcode_minus_L
3572
3573# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3574# the resulting binary.
3575hardcode_shlibpath_var=$hardcode_shlibpath_var
3576
3577# Variables whose values should be saved in libtool wrapper scripts and
3578# restored at relink time.
3579variables_saved_for_relink="$variables_saved_for_relink"
3580
3581# Whether libtool must link a program against all its dependency libraries.
3582link_all_deplibs=$link_all_deplibs
3583
3584# Compile-time system search path for libraries
3585sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3586
3587# Run-time system search path for libraries
3588sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3589
3590# Fix the shell variable \$srcfile for the compiler.
3591fix_srcfile_path="$fix_srcfile_path"
3592
3593# Set to yes if exported symbols are required.
3594always_export_symbols=$always_export_symbols
3595
3596# The commands to list exported symbols.
3597export_symbols_cmds=$lt_export_symbols_cmds
3598
3599# The commands to extract the exported symbol list from a shared archive.
3600extract_expsyms_cmds=$lt_extract_expsyms_cmds
3601
3602# Symbols that should not be listed in the preloaded symbols.
3603exclude_expsyms=$lt_exclude_expsyms
3604
3605# Symbols that must always be exported.
3606include_expsyms=$lt_include_expsyms
3607
3608# ### END LIBTOOL CONFIG
3609
3610__EOF__
3611
3612  case $host_os in
3613  aix3*)
3614    cat <<\EOF >> "${ofile}T"
3615
3616# AIX sometimes has problems with the GCC collect2 program.  For some
3617# reason, if we set the COLLECT_NAMES environment variable, the problems
3618# vanish in a puff of smoke.
3619if test "X${COLLECT_NAMES+set}" != Xset; then
3620  COLLECT_NAMES=
3621  export COLLECT_NAMES
3622fi
3623EOF
3624    ;;
3625  esac
3626
3627  case $host_os in
3628  cygwin* | mingw* | pw32* | os2*)
3629    cat <<'EOF' >> "${ofile}T"
3630      # This is a source program that is used to create dlls on Windows
3631      # Don't remove nor modify the starting and closing comments
3632# /* ltdll.c starts here */
3633# #define WIN32_LEAN_AND_MEAN
3634# #include <windows.h>
3635# #undef WIN32_LEAN_AND_MEAN
3636# #include <stdio.h>
3637#
3638# #ifndef __CYGWIN__
3639# #  ifdef __CYGWIN32__
3640# #    define __CYGWIN__ __CYGWIN32__
3641# #  endif
3642# #endif
3643#
3644# #ifdef __cplusplus
3645# extern "C" {
3646# #endif
3647# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3648# #ifdef __cplusplus
3649# }
3650# #endif
3651#
3652# #ifdef __CYGWIN__
3653# #include <cygwin/cygwin_dll.h>
3654# DECLARE_CYGWIN_DLL( DllMain );
3655# #endif
3656# HINSTANCE __hDllInstance_base;
3657#
3658# BOOL APIENTRY
3659# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3660# {
3661#   __hDllInstance_base = hInst;
3662#   return TRUE;
3663# }
3664# /* ltdll.c ends here */
3665        # This is a source program that is used to create import libraries
3666        # on Windows for dlls which lack them. Don't remove nor modify the
3667        # starting and closing comments
3668# /* impgen.c starts here */
3669# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3670#
3671#  This file is part of GNU libtool.
3672#
3673#  This program is free software; you can redistribute it and/or modify
3674#  it under the terms of the GNU General Public License as published by
3675#  the Free Software Foundation; either version 2 of the License, or
3676#  (at your option) any later version.
3677#
3678#  This program is distributed in the hope that it will be useful,
3679#  but WITHOUT ANY WARRANTY; without even the implied warranty of
3680#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3681#  GNU General Public License for more details.
3682#
3683#  You should have received a copy of the GNU General Public License
3684#  along with this program; if not, write to the Free Software
3685#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3686#  */
3687#
3688# #include <stdio.h>            /* for printf() */
3689# #include <unistd.h>           /* for open(), lseek(), read() */
3690# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3691# #include <string.h>           /* for strdup() */
3692#
3693# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3694# #ifndef O_BINARY
3695# #define O_BINARY 0
3696# #endif
3697#
3698# static unsigned int
3699# pe_get16 (fd, offset)
3700#      int fd;
3701#      int offset;
3702# {
3703#   unsigned char b[2];
3704#   lseek (fd, offset, SEEK_SET);
3705#   read (fd, b, 2);
3706#   return b[0] + (b[1]<<8);
3707# }
3708#
3709# static unsigned int
3710# pe_get32 (fd, offset)
3711#     int fd;
3712#     int offset;
3713# {
3714#   unsigned char b[4];
3715#   lseek (fd, offset, SEEK_SET);
3716#   read (fd, b, 4);
3717#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3718# }
3719#
3720# static unsigned int
3721# pe_as32 (ptr)
3722#      void *ptr;
3723# {
3724#   unsigned char *b = ptr;
3725#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3726# }
3727#
3728# int
3729# main (argc, argv)
3730#     int argc;
3731#     char *argv[];
3732# {
3733#     int dll;
3734#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3735#     unsigned long export_rva, export_size, nsections, secptr, expptr;
3736#     unsigned long name_rvas, nexp;
3737#     unsigned char *expdata, *erva;
3738#     char *filename, *dll_name;
3739#
3740#     filename = argv[1];
3741#
3742#     dll = open(filename, O_RDONLY|O_BINARY);
3743#     if (dll < 1)
3744#       return 1;
3745#
3746#     dll_name = filename;
3747#
3748#     for (i=0; filename[i]; i++)
3749#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3750#           dll_name = filename + i +1;
3751#
3752#     pe_header_offset = pe_get32 (dll, 0x3c);
3753#     opthdr_ofs = pe_header_offset + 4 + 20;
3754#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3755#
3756#     if (num_entries < 1) /* no exports */
3757#       return 1;
3758#
3759#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3760#     export_size = pe_get32 (dll, opthdr_ofs + 100);
3761#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3762#     secptr = (pe_header_offset + 4 + 20 +
3763#             pe_get16 (dll, pe_header_offset + 4 + 16));
3764#
3765#     expptr = 0;
3766#     for (i = 0; i < nsections; i++)
3767#     {
3768#       char sname[8];
3769#       unsigned long secptr1 = secptr + 40 * i;
3770#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3771#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3772#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3773#       lseek(dll, secptr1, SEEK_SET);
3774#       read(dll, sname, 8);
3775#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3776#       {
3777#           expptr = fptr + (export_rva - vaddr);
3778#           if (export_rva + export_size > vaddr + vsize)
3779#               export_size = vsize - (export_rva - vaddr);
3780#           break;
3781#       }
3782#     }
3783#
3784#     expdata = (unsigned char*)malloc(export_size);
3785#     lseek (dll, expptr, SEEK_SET);
3786#     read (dll, expdata, export_size);
3787#     erva = expdata - export_rva;
3788#
3789#     nexp = pe_as32 (expdata+24);
3790#     name_rvas = pe_as32 (expdata+32);
3791#
3792#     printf ("EXPORTS\n");
3793#     for (i = 0; i<nexp; i++)
3794#     {
3795#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3796#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3797#     }
3798#
3799#     return 0;
3800# }
3801# /* impgen.c ends here */
3802
3803EOF
3804    ;;
3805  esac
3806
3807  # We use sed instead of cat because bash on DJGPP gets confused if
3808  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3809  # text mode, it properly converts lines to CR/LF.  This bash problem
3810  # is reportedly fixed, but why not run on old versions too?
3811  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3812
3813  mv -f "${ofile}T" "$ofile" || \
3814    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3815  chmod +x "$ofile"
3816fi
3817
3818])# _LT_AC_LTCONFIG_HACK
3819
3820# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3821AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3822
3823# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3824AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3825
3826# AC_ENABLE_SHARED - implement the --enable-shared flag
3827# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3828#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3829#   `yes'.
3830AC_DEFUN([AC_ENABLE_SHARED],
3831[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3832AC_ARG_ENABLE(shared,
3833changequote(<<, >>)dnl
3834<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3835changequote([, ])dnl
3836[p=${PACKAGE-default}
3837case $enableval in
3838yes) enable_shared=yes ;;
3839no) enable_shared=no ;;
3840*)
3841  enable_shared=no
3842  # Look at the argument we got.  We use all the common list separators.
3843  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3844  for pkg in $enableval; do
3845    if test "X$pkg" = "X$p"; then
3846      enable_shared=yes
3847    fi
3848  done
3849  IFS="$ac_save_ifs"
3850  ;;
3851esac],
3852enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3853])
3854
3855# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3856AC_DEFUN([AC_DISABLE_SHARED],
3857[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3858AC_ENABLE_SHARED(no)])
3859
3860# AC_ENABLE_STATIC - implement the --enable-static flag
3861# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3862#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3863#   `yes'.
3864AC_DEFUN([AC_ENABLE_STATIC],
3865[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3866AC_ARG_ENABLE(static,
3867changequote(<<, >>)dnl
3868<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3869changequote([, ])dnl
3870[p=${PACKAGE-default}
3871case $enableval in
3872yes) enable_static=yes ;;
3873no) enable_static=no ;;
3874*)
3875  enable_static=no
3876  # Look at the argument we got.  We use all the common list separators.
3877  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3878  for pkg in $enableval; do
3879    if test "X$pkg" = "X$p"; then
3880      enable_static=yes
3881    fi
3882  done
3883  IFS="$ac_save_ifs"
3884  ;;
3885esac],
3886enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3887])
3888
3889# AC_DISABLE_STATIC - set the default static flag to --disable-static
3890AC_DEFUN([AC_DISABLE_STATIC],
3891[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3892AC_ENABLE_STATIC(no)])
3893
3894
3895# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3896# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3897#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3898#   `yes'.
3899AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3900[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3901AC_ARG_ENABLE(fast-install,
3902changequote(<<, >>)dnl
3903<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3904changequote([, ])dnl
3905[p=${PACKAGE-default}
3906case $enableval in
3907yes) enable_fast_install=yes ;;
3908no) enable_fast_install=no ;;
3909*)
3910  enable_fast_install=no
3911  # Look at the argument we got.  We use all the common list separators.
3912  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3913  for pkg in $enableval; do
3914    if test "X$pkg" = "X$p"; then
3915      enable_fast_install=yes
3916    fi
3917  done
3918  IFS="$ac_save_ifs"
3919  ;;
3920esac],
3921enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3922])
3923
3924# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3925AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3926[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3927AC_ENABLE_FAST_INSTALL(no)])
3928
3929# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3930# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3931#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3932#   `both'.
3933AC_DEFUN([AC_LIBTOOL_PICMODE],
3934[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3935pic_mode=ifelse($#,1,$1,default)])
3936
3937
3938# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3939AC_DEFUN([AC_PATH_TOOL_PREFIX],
3940[AC_MSG_CHECKING([for $1])
3941AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3942[case $MAGIC_CMD in
3943  /*)
3944  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3945  ;;
3946  ?:/*)
3947  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3948  ;;
3949  *)
3950  ac_save_MAGIC_CMD="$MAGIC_CMD"
3951  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3952dnl $ac_dummy forces splitting on constant user-supplied paths.
3953dnl POSIX.2 word splitting is done only on the output of word expansions,
3954dnl not every word.  This closes a longstanding sh security hole.
3955  ac_dummy="ifelse([$2], , $PATH, [$2])"
3956  for ac_dir in $ac_dummy; do
3957    test -z "$ac_dir" && ac_dir=.
3958    if test -f $ac_dir/$1; then
3959      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3960      if test -n "$file_magic_test_file"; then
3961        case $deplibs_check_method in
3962        "file_magic "*)
3963          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3964          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3965          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3966            egrep "$file_magic_regex" > /dev/null; then
3967            :
3968          else
3969            cat <<EOF 1>&2
3970
3971*** Warning: the command libtool uses to detect shared libraries,
3972*** $file_magic_cmd, produces output that libtool cannot recognize.
3973*** The result is that libtool may fail to recognize shared libraries
3974*** as such.  This will affect the creation of libtool libraries that
3975*** depend on shared libraries, but programs linked with such libtool
3976*** libraries will work regardless of this problem.  Nevertheless, you
3977*** may want to report the problem to your system manager and/or to
3978*** bug-libtool@gnu.org
3979
3980EOF
3981          fi ;;
3982        esac
3983      fi
3984      break
3985    fi
3986  done
3987  IFS="$ac_save_ifs"
3988  MAGIC_CMD="$ac_save_MAGIC_CMD"
3989  ;;
3990esac])
3991MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3992if test -n "$MAGIC_CMD"; then
3993  AC_MSG_RESULT($MAGIC_CMD)
3994else
3995  AC_MSG_RESULT(no)
3996fi
3997])
3998
3999
4000# AC_PATH_MAGIC - find a file program which can recognise a shared library
4001AC_DEFUN([AC_PATH_MAGIC],
4002[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4003AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4004if test -z "$lt_cv_path_MAGIC_CMD"; then
4005  if test -n "$ac_tool_prefix"; then
4006    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4007  else
4008    MAGIC_CMD=:
4009  fi
4010fi
4011])
4012
4013
4014# AC_PROG_LD - find the path to the GNU or non-GNU linker
4015AC_DEFUN([AC_PROG_LD],
4016[AC_ARG_WITH(gnu-ld,
4017[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
4018test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4019AC_REQUIRE([AC_PROG_CC])dnl
4020AC_REQUIRE([AC_CANONICAL_HOST])dnl
4021AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4022AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4023ac_prog=ld
4024if test "$GCC" = yes; then
4025  # Check if gcc -print-prog-name=ld gives a path.
4026  AC_MSG_CHECKING([for ld used by GCC])
4027  case $host in
4028  *-*-mingw*)
4029    # gcc leaves a trailing carriage return which upsets mingw
4030    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4031  *)
4032    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4033  esac
4034  case $ac_prog in
4035    # Accept absolute paths.
4036    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4037      re_direlt='/[[^/]][[^/]]*/\.\./'
4038      # Canonicalize the path of ld
4039      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4040      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4041        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4042      done
4043      test -z "$LD" && LD="$ac_prog"
4044      ;;
4045  "")
4046    # If it fails, then pretend we aren't using GCC.
4047    ac_prog=ld
4048    ;;
4049  *)
4050    # If it is relative, then search for the first ld in PATH.
4051    with_gnu_ld=unknown
4052    ;;
4053  esac
4054elif test "$with_gnu_ld" = yes; then
4055  AC_MSG_CHECKING([for GNU ld])
4056else
4057  AC_MSG_CHECKING([for non-GNU ld])
4058fi
4059AC_CACHE_VAL(lt_cv_path_LD,
4060[if test -z "$LD"; then
4061  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4062  for ac_dir in $PATH; do
4063    test -z "$ac_dir" && ac_dir=.
4064    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4065      lt_cv_path_LD="$ac_dir/$ac_prog"
4066      # Check to see if the program is GNU ld.  I'd rather use --version,
4067      # but apparently some GNU ld's only accept -v.
4068      # Break only if it was the GNU/non-GNU ld that we prefer.
4069      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4070        test "$with_gnu_ld" != no && break
4071      else
4072        test "$with_gnu_ld" != yes && break
4073      fi
4074    fi
4075  done
4076  IFS="$ac_save_ifs"
4077else
4078  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4079fi])
4080LD="$lt_cv_path_LD"
4081if test -n "$LD"; then
4082  AC_MSG_RESULT($LD)
4083else
4084  AC_MSG_RESULT(no)
4085fi
4086test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4087AC_PROG_LD_GNU
4088])
4089
4090# AC_PROG_LD_GNU -
4091AC_DEFUN([AC_PROG_LD_GNU],
4092[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4093[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4094if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4095  lt_cv_prog_gnu_ld=yes
4096else
4097  lt_cv_prog_gnu_ld=no
4098fi])
4099with_gnu_ld=$lt_cv_prog_gnu_ld
4100])
4101
4102# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4103#   -- PORTME Some linkers may need a different reload flag.
4104AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4105[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4106[lt_cv_ld_reload_flag='-r'])
4107reload_flag=$lt_cv_ld_reload_flag
4108test -n "$reload_flag" && reload_flag=" $reload_flag"
4109])
4110
4111# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4112#  -- PORTME fill in with the dynamic library characteristics
4113AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4114[AC_CACHE_CHECK([how to recognise dependent libraries],
4115lt_cv_deplibs_check_method,
4116[lt_cv_file_magic_cmd='$MAGIC_CMD'
4117lt_cv_file_magic_test_file=
4118lt_cv_deplibs_check_method='unknown'
4119# Need to set the preceding variable on all platforms that support
4120# interlibrary dependencies.
4121# 'none' -- dependencies not supported.
4122# `unknown' -- same as none, but documents that we really don't know.
4123# 'pass_all' -- all dependencies passed with no checks.
4124# 'test_compile' -- check by making test program.
4125# 'file_magic [[regex]]' -- check by looking for files in library path
4126# which responds to the $file_magic_cmd with a given egrep regex.
4127# If you have `file' or equivalent on your system and you're not sure
4128# whether `pass_all' will *always* work, you probably want this one.
4129
4130case $host_os in
4131aix4* | aix5*)
4132  lt_cv_deplibs_check_method=pass_all
4133  ;;
4134
4135beos*)
4136  lt_cv_deplibs_check_method=pass_all
4137  ;;
4138
4139bsdi4*)
4140  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4141  lt_cv_file_magic_cmd='/usr/bin/file -L'
4142  lt_cv_file_magic_test_file=/shlib/libc.so
4143  ;;
4144
4145cygwin* | mingw* | pw32*)
4146  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4147  lt_cv_file_magic_cmd='$OBJDUMP -f'
4148  ;;
4149
4150darwin* | rhapsody*)
4151  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4152  lt_cv_file_magic_cmd='/usr/bin/file -L'
4153  case "$host_os" in
4154  rhapsody* | darwin1.[[012]])
4155    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4156    ;;
4157  *) # Darwin 1.3 on
4158    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4159    ;;
4160  esac
4161  ;;
4162
4163freebsd*)
4164  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4165    case $host_cpu in
4166    i*86 )
4167      # Not sure whether the presence of OpenBSD here was a mistake.
4168      # Let's accept both of them until this is cleared up.
4169      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4170      lt_cv_file_magic_cmd=/usr/bin/file
4171      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4172      ;;
4173    esac
4174  else
4175    lt_cv_deplibs_check_method=pass_all
4176  fi
4177  ;;
4178
4179gnu*)
4180  lt_cv_deplibs_check_method=pass_all
4181  ;;
4182
4183hpux10.20*|hpux11*)
4184  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4185  lt_cv_file_magic_cmd=/usr/bin/file
4186  lt_cv_file_magic_test_file=/usr/lib/libc.sl
4187  ;;
4188
4189irix5* | irix6* | nonstopux*)
4190  case $host_os in
4191  irix5* | nonstopux*)
4192    # this will be overridden with pass_all, but let us keep it just in case
4193    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4194    ;;
4195  *)
4196    case $LD in
4197    *-32|*"-32 ") libmagic=32-bit;;
4198    *-n32|*"-n32 ") libmagic=N32;;
4199    *-64|*"-64 ") libmagic=64-bit;;
4200    *) libmagic=never-match;;
4201    esac
4202    # this will be overridden with pass_all, but let us keep it just in case
4203    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4204    ;;
4205  esac
4206  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4207  lt_cv_deplibs_check_method=pass_all
4208  ;;
4209
4210# This must be Linux ELF.
4211linux-gnu*)
4212  case $host_cpu in
4213  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
4214    lt_cv_deplibs_check_method=pass_all ;;
4215  *)
4216    # glibc up to 2.1.1 does not perform some relocations on ARM
4217    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4218  esac
4219  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4220  ;;
4221
4222netbsd*)
4223  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4224    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4225  else
4226    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4227  fi
4228  ;;
4229
4230newos6*)
4231  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4232  lt_cv_file_magic_cmd=/usr/bin/file
4233  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4234  ;;
4235
4236openbsd*)
4237  lt_cv_file_magic_cmd=/usr/bin/file
4238  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4239  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4240    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4241  else
4242    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4243  fi
4244  ;;
4245
4246osf3* | osf4* | osf5*)
4247  # this will be overridden with pass_all, but let us keep it just in case
4248  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4249  lt_cv_file_magic_test_file=/shlib/libc.so
4250  lt_cv_deplibs_check_method=pass_all
4251  ;;
4252
4253sco3.2v5*)
4254  lt_cv_deplibs_check_method=pass_all
4255  ;;
4256
4257solaris*)
4258  lt_cv_deplibs_check_method=pass_all
4259  lt_cv_file_magic_test_file=/lib/libc.so
4260  ;;
4261
4262sysv5uw[[78]]* | sysv4*uw2*)
4263  lt_cv_deplibs_check_method=pass_all
4264  ;;
4265
4266sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4267  case $host_vendor in
4268  motorola)
4269    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]]'
4270    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4271    ;;
4272  ncr)
4273    lt_cv_deplibs_check_method=pass_all
4274    ;;
4275  sequent)
4276    lt_cv_file_magic_cmd='/bin/file'
4277    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4278    ;;
4279  sni)
4280    lt_cv_file_magic_cmd='/bin/file'
4281    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4282    lt_cv_file_magic_test_file=/lib/libc.so
4283    ;;
4284  siemens)
4285    lt_cv_deplibs_check_method=pass_all
4286    ;;
4287  esac
4288  ;;
4289esac
4290])
4291file_magic_cmd=$lt_cv_file_magic_cmd
4292deplibs_check_method=$lt_cv_deplibs_check_method
4293])
4294
4295
4296# AC_PROG_NM - find the path to a BSD-compatible name lister
4297AC_DEFUN([AC_PROG_NM],
4298[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4299AC_MSG_CHECKING([for BSD-compatible nm])
4300AC_CACHE_VAL(lt_cv_path_NM,
4301[if test -n "$NM"; then
4302  # Let the user override the test.
4303  lt_cv_path_NM="$NM"
4304else
4305  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4306  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4307    test -z "$ac_dir" && ac_dir=.
4308    tmp_nm=$ac_dir/${ac_tool_prefix}nm
4309    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4310      # Check to see if the nm accepts a BSD-compat flag.
4311      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4312      #   nm: unknown option "B" ignored
4313      # Tru64's nm complains that /dev/null is an invalid object file
4314      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4315        lt_cv_path_NM="$tmp_nm -B"
4316        break
4317      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4318        lt_cv_path_NM="$tmp_nm -p"
4319        break
4320      else
4321        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4322        continue # so that we can try to find one that supports BSD flags
4323      fi
4324    fi
4325  done
4326  IFS="$ac_save_ifs"
4327  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4328fi])
4329NM="$lt_cv_path_NM"
4330AC_MSG_RESULT([$NM])
4331])
4332
4333# AC_CHECK_LIBM - check for math library
4334AC_DEFUN([AC_CHECK_LIBM],
4335[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4336LIBM=
4337case $host in
4338*-*-beos* | *-*-cygwin* | *-*-pw32*)
4339  # These system don't have libm
4340  ;;
4341*-ncr-sysv4.3*)
4342  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4343  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4344  ;;
4345*)
4346  AC_CHECK_LIB(m, main, LIBM="-lm")
4347  ;;
4348esac
4349])
4350
4351# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4352# the libltdl convenience library and LTDLINCL to the include flags for
4353# the libltdl header and adds --enable-ltdl-convenience to the
4354# configure arguments.  Note that LIBLTDL and LTDLINCL are not
4355# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4356# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4357# with '${top_builddir}/' and LTDLINCL will be prefixed with
4358# '${top_srcdir}/' (note the single quotes!).  If your package is not
4359# flat and you're not using automake, define top_builddir and
4360# top_srcdir appropriately in the Makefiles.
4361AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4362[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4363  case $enable_ltdl_convenience in
4364  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4365  "") enable_ltdl_convenience=yes
4366      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4367  esac
4368  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4369  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4370  # For backwards non-gettext consistent compatibility...
4371  INCLTDL="$LTDLINCL"
4372])
4373
4374# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4375# the libltdl installable library and LTDLINCL to the include flags for
4376# the libltdl header and adds --enable-ltdl-install to the configure
4377# arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4378# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4379# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4380# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4381# with '${top_srcdir}/' (note the single quotes!).  If your package is
4382# not flat and you're not using automake, define top_builddir and
4383# top_srcdir appropriately in the Makefiles.
4384# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4385AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4386[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4387  AC_CHECK_LIB(ltdl, main,
4388  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4389  [if test x"$enable_ltdl_install" = xno; then
4390     AC_MSG_WARN([libltdl not installed, but installation disabled])
4391   else
4392     enable_ltdl_install=yes
4393   fi
4394  ])
4395  if test x"$enable_ltdl_install" = x"yes"; then
4396    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4397    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4398    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4399  else
4400    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4401    LIBLTDL="-lltdl"
4402    LTDLINCL=
4403  fi
4404  # For backwards non-gettext consistent compatibility...
4405  INCLTDL="$LTDLINCL"
4406])
4407
4408# old names
4409AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4410AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
4411AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
4412AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4413AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4414AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
4415AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4416
4417# This is just to silence aclocal about the macro not being used
4418ifelse([AC_DISABLE_FAST_INSTALL])
4419
4420# NOTE: This macro has been submitted for inclusion into   #
4421#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
4422#  a released version of Autoconf we should remove this    #
4423#  macro and use it instead.                               #
4424# LT_AC_PROG_SED
4425# --------------
4426# Check for a fully-functional sed program, that truncates
4427# as few characters as possible.  Prefer GNU sed if found.
4428AC_DEFUN([LT_AC_PROG_SED],
4429[AC_MSG_CHECKING([for a sed that does not truncate output])
4430AC_CACHE_VAL(lt_cv_path_SED,
4431[# Loop through the user's path and test for sed and gsed.
4432# Then use that list of sed's as ones to test for truncation.
4433as_executable_p="test -f"
4434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4435for as_dir in $PATH
4436do
4437  IFS=$as_save_IFS
4438  test -z "$as_dir" && as_dir=.
4439  for ac_prog in sed gsed; do
4440    for ac_exec_ext in '' $ac_executable_extensions; do
4441      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4442        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4443      fi
4444    done
4445  done
4446done
4447
4448  # Create a temporary directory, and hook for its removal unless debugging.
4449$debug ||
4450{
4451  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4452  trap '{ (exit 1); exit 1; }' 1 2 13 15
4453}
4454
4455# Create a (secure) tmp directory for tmp files.
4456: ${TMPDIR=/tmp}
4457{
4458  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4459  test -n "$tmp" && test -d "$tmp"
4460}  ||
4461{
4462  tmp=$TMPDIR/sed$$-$RANDOM
4463  (umask 077 && mkdir $tmp)
4464} ||
4465{
4466   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4467   { (exit 1); exit 1; }
4468}
4469  _max=0
4470  _count=0
4471  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4472  # along with /bin/sed that truncates output.
4473  for _sed in $_sed_list /usr/xpg4/bin/sed; do
4474    test ! -f ${_sed} && break
4475    cat /dev/null > "$tmp/sed.in"
4476    _count=0
4477    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4478    # Check for GNU sed and select it if it is found.
4479    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4480      lt_cv_path_SED=${_sed}
4481      break
4482    fi
4483    while true; do
4484      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4485      mv "$tmp/sed.tmp" "$tmp/sed.in"
4486      cp "$tmp/sed.in" "$tmp/sed.nl"
4487      echo >>"$tmp/sed.nl"
4488      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4489      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4490      # 40000 chars as input seems more than enough
4491      test $_count -gt 10 && break
4492      _count=`expr $_count + 1`
4493      if test $_count -gt $_max; then
4494        _max=$_count
4495        lt_cv_path_SED=$_sed
4496      fi
4497    done
4498  done
4499  rm -rf "$tmp"
4500])
4501if test "X$SED" != "X"; then
4502  lt_cv_path_SED=$SED
4503else
4504  SED=$lt_cv_path_SED
4505fi
4506AC_MSG_RESULT([$SED])
4507])
4508
4509
4510dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4511dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
4512dnl also defines GSTUFF_PKG_ERRORS on error
4513AC_DEFUN(PKG_CHECK_MODULES, [
4514  succeeded=no
4515
4516  if test -z "$PKG_CONFIG"; then
4517    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
4518  fi
4519
4520  if test "$PKG_CONFIG" = "no" ; then
4521     echo "*** The pkg-config script could not be found. Make sure it is"
4522     echo "*** in your path, or set the PKG_CONFIG environment variable"
4523     echo "*** to the full path to pkg-config."
4524     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
4525  else
4526     PKG_CONFIG_MIN_VERSION=0.9.0
4527     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
4528        AC_MSG_CHECKING(for $2)
4529
4530        if $PKG_CONFIG --exists "$2" ; then
4531            AC_MSG_RESULT(yes)
4532            succeeded=yes
4533
4534            AC_MSG_CHECKING($1_CFLAGS)
4535            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
4536            AC_MSG_RESULT($$1_CFLAGS)
4537
4538            AC_MSG_CHECKING($1_LIBS)
4539            $1_LIBS=`$PKG_CONFIG --libs "$2"`
4540            AC_MSG_RESULT($$1_LIBS)
4541        else
4542            $1_CFLAGS=""
4543            $1_LIBS=""
4544            ## If we have a custom action on failure, don't print errors, but
4545            ## do set a variable so people can do so.
4546            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
4547            ifelse([$4], ,echo $$1_PKG_ERRORS,)
4548        fi
4549
4550        AC_SUBST($1_CFLAGS)
4551        AC_SUBST($1_LIBS)
4552     else
4553        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
4554        echo "*** See http://www.freedesktop.org/software/pkgconfig"
4555     fi
4556  fi
4557
4558  if test $succeeded = yes; then
4559     ifelse([$3], , :, [$3])
4560  else
4561     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
4562  fi
4563])
4564
4565
4566
Note: See TracBrowser for help on using the repository browser.