~ubuntu-branches/ubuntu/quantal/libbonobo/quantal-201207170711

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-02-18 14:40:51 UTC
  • mto: (3.1.1 etch) (1.1.25 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050218144051-fo4h9qh2gim8x3wt
Tags: upstream-2.8.1
ImportĀ upstreamĀ versionĀ 2.8.1

Show diffs side-by-side

added added

removed removed

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