~ubuntu-branches/ubuntu/lucid/psqlodbc/lucid

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-05-13 10:47:36 UTC
  • Revision ID: james.westby@ubuntu.com-20040513104736-a530gmn0p3knep89
Tags: upstream-07.03.0200
ImportĀ upstreamĀ versionĀ 07.03.0200

Show diffs side-by-side

added added

removed removed

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