~ubuntu-branches/ubuntu/warty/dasher/warty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2003-06-05 11:10:04 UTC
  • Revision ID: james.westby@ubuntu.com-20030605111004-kqiutbrlvs7td9ic
Tags: upstream-3.2.10
ImportĀ upstreamĀ versionĀ 3.2.10

Show diffs side-by-side

added added

removed removed

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