source: trunk/third/gtkhtml3/aclocal.m4 @ 20126

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