~ubuntu-branches/ubuntu/hardy/speex/hardy-security

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): A. Maitland Bottoms
  • Date: 2005-02-26 22:33:22 UTC
  • Revision ID: james.westby@ubuntu.com-20050226223322-vc6sdoshrqjxfh9c
Tags: upstream-1.1.6
ImportĀ upstreamĀ versionĀ 1.1.6

Show diffs side-by-side

added added

removed removed

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