~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-03 22:44:28 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051003224428-ft31gkmz12qpzohj
Tags: 1:2.12.1-0ubuntu1
* New upstream release:
  - Thanks to Ray Strode, Havoc Pennington, and Elijah Newren for
    improvements in this release.
  - Truncate ridiculously long titles to avoid crashing or letting the
    pager crash (Ray, Havoc, Elijah) [#315070] (Ubuntu: #15995)
  - Get the tabbing window outline to work with gtk+ 2.8.4 again
    (Elijah) [#317528] (Ubuntu: #16589)
  - Translations: Mahay Alam Khan (bn), Francisco Javier F. Serrador (es), 
    Ivar Smolin (et), I\uffffaki Larra\uffffaga Murgoitio (eu), Luca 
    Ferretti (it), Christian Rose (sv), Clytie Siddall (vi), Funda 
    Wang (zh_CN)
* debian/control.in:
  - Bumped Standards-Version.
* debian/patches/003_bordersdrawingfix.patch:
  - dropped, fixed upstream.

Show diffs side-by-side

added added

removed removed

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