~ubuntu-branches/ubuntu/hoary/flac/hoary

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-04-16 15:14:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040416151431-eyloggqxpwbwpogz
Tags: 1.1.0-11
Ensure that libFLAC is linked with -lm on all architectures, and
regardless of whether nasm is present

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# aclocal.m4 generated automatically by aclocal 1.5
 
1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
2
2
 
3
 
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
 
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
4
# Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
# Do all the work for Automake.  This macro actually does too much --
15
 
# some checks are only needed if your package does certain things.
16
 
# But this isn't really a big deal.
17
 
 
18
 
# serial 5
 
14
# Do all the work for Automake.                            -*- Autoconf -*-
 
15
 
 
16
# This macro actually does too much some checks are only needed if
 
17
# your package does certain things.  But this isn't really a big deal.
 
18
 
 
19
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
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 8
19
38
 
20
39
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
21
40
# written in clear, in which case automake, when reading aclocal.m4,
24
43
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
25
44
 
26
45
 
27
 
# We require 2.13 because we rely on SHELL being computed by configure.
28
 
AC_PREREQ([2.13])
29
 
 
30
 
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
31
 
# -----------------------------------------------------------
32
 
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
33
 
# The purpose of this macro is to provide the user with a means to
34
 
# check macros which are provided without letting her know how the
35
 
# information is coded.
36
 
# If this macro is not defined by Autoconf, define it here.
37
 
ifdef([AC_PROVIDE_IFELSE],
38
 
      [],
39
 
      [define([AC_PROVIDE_IFELSE],
40
 
              [ifdef([AC_PROVIDE_$1],
41
 
                     [$2], [$3])])])
42
 
 
43
 
 
44
 
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
45
 
# ----------------------------------------------
 
46
AC_PREREQ([2.52])
 
47
 
 
48
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 
49
# the ones we care about.
 
50
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
51
 
 
52
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
53
# AM_INIT_AUTOMAKE([OPTIONS])
 
54
# -----------------------------------------------
 
55
# The call with PACKAGE and VERSION arguments is the old style
 
56
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
57
# and VERSION should now be passed to AC_INIT and removed from
 
58
# the call to AM_INIT_AUTOMAKE.
 
59
# We support both call styles for the transition.  After
 
60
# the next Automake release, Autoconf can make the AC_INIT
 
61
# arguments mandatory, and then we can depend on a new Autoconf
 
62
# release and drop the old call support.
46
63
AC_DEFUN([AM_INIT_AUTOMAKE],
47
 
[AC_REQUIRE([AC_PROG_INSTALL])dnl
 
64
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
65
 AC_REQUIRE([AC_PROG_INSTALL])dnl
48
66
# test to see if srcdir already configured
49
 
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
 
67
if test "`cd $srcdir && pwd`" != "`pwd`" &&
50
68
   test -f $srcdir/config.status; then
51
 
  AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
 
69
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
52
70
fi
53
71
 
54
72
# Define the identity of the package.
55
 
PACKAGE=$1
56
 
AC_SUBST(PACKAGE)dnl
57
 
VERSION=$2
58
 
AC_SUBST(VERSION)dnl
59
 
ifelse([$3],,
 
73
dnl Distinguish between old-style and new-style calls.
 
74
m4_ifval([$2],
 
75
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
76
 AC_SUBST([PACKAGE], [$1])dnl
 
77
 AC_SUBST([VERSION], [$2])],
 
78
[_AM_SET_OPTIONS([$1])dnl
 
79
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
 
80
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
 
81
 
 
82
_AM_IF_OPTION([no-define],,
60
83
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
61
 
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
62
 
 
63
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
64
 
# the ones we care about.
65
 
ifdef([m4_pattern_allow],
66
 
      [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
67
 
 
68
 
# Autoconf 2.50 always computes EXEEXT.  However we need to be
69
 
# compatible with 2.13, for now.  So we always define EXEEXT, but we
70
 
# don't compute it.
71
 
AC_SUBST(EXEEXT)
72
 
# Similar for OBJEXT -- only we only use OBJEXT if the user actually
73
 
# requests that it be used.  This is a bit dumb.
74
 
: ${OBJEXT=o}
75
 
AC_SUBST(OBJEXT)
 
84
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
76
85
 
77
86
# Some tools Automake needs.
78
87
AC_REQUIRE([AM_SANITY_CHECK])dnl
79
88
AC_REQUIRE([AC_ARG_PROGRAM])dnl
80
 
AM_MISSING_PROG(ACLOCAL, aclocal)
 
89
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
81
90
AM_MISSING_PROG(AUTOCONF, autoconf)
82
 
AM_MISSING_PROG(AUTOMAKE, automake)
 
91
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
83
92
AM_MISSING_PROG(AUTOHEADER, autoheader)
84
93
AM_MISSING_PROG(MAKEINFO, makeinfo)
85
94
AM_MISSING_PROG(AMTAR, tar)
89
98
# some platforms.
90
99
AC_REQUIRE([AC_PROG_AWK])dnl
91
100
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
92
 
AC_REQUIRE([AM_DEP_TRACK])dnl
93
 
AC_REQUIRE([AM_SET_DEPDIR])dnl
94
 
AC_PROVIDE_IFELSE([AC_PROG_][CC],
 
101
 
 
102
_AM_IF_OPTION([no-dependencies],,
 
103
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
95
104
                  [_AM_DEPENDENCIES(CC)],
96
105
                  [define([AC_PROG_][CC],
97
106
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
100
109
                  [define([AC_PROG_][CXX],
101
110
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
102
111
])
 
112
])
 
113
 
 
114
# Copyright 2002  Free Software Foundation, Inc.
 
115
 
 
116
# This program is free software; you can redistribute it and/or modify
 
117
# it under the terms of the GNU General Public License as published by
 
118
# the Free Software Foundation; either version 2, or (at your option)
 
119
# any later version.
 
120
 
 
121
# This program is distributed in the hope that it will be useful,
 
122
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
123
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
124
# GNU General Public License for more details.
 
125
 
 
126
# You should have received a copy of the GNU General Public License
 
127
# along with this program; if not, write to the Free Software
 
128
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
129
 
 
130
# AM_AUTOMAKE_VERSION(VERSION)
 
131
# ----------------------------
 
132
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
133
# generated from the m4 files accompanying Automake X.Y.
 
134
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
 
135
 
 
136
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
137
# -------------------------------
 
138
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
139
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
140
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
141
         [AM_AUTOMAKE_VERSION([1.6.3])])
 
142
 
 
143
# Helper functions for option handling.                    -*- Autoconf -*-
 
144
 
 
145
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
146
 
 
147
# This program is free software; you can redistribute it and/or modify
 
148
# it under the terms of the GNU General Public License as published by
 
149
# the Free Software Foundation; either version 2, or (at your option)
 
150
# any later version.
 
151
 
 
152
# This program is distributed in the hope that it will be useful,
 
153
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
154
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
155
# GNU General Public License for more details.
 
156
 
 
157
# You should have received a copy of the GNU General Public License
 
158
# along with this program; if not, write to the Free Software
 
159
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
160
# 02111-1307, USA.
 
161
 
 
162
# serial 2
 
163
 
 
164
# _AM_MANGLE_OPTION(NAME)
 
165
# -----------------------
 
166
AC_DEFUN([_AM_MANGLE_OPTION],
 
167
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
168
 
 
169
# _AM_SET_OPTION(NAME)
 
170
# ------------------------------
 
171
# Set option NAME.  Presently that only means defining a flag for this option.
 
172
AC_DEFUN([_AM_SET_OPTION],
 
173
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
174
 
 
175
# _AM_SET_OPTIONS(OPTIONS)
 
176
# ----------------------------------
 
177
# OPTIONS is a space-separated list of Automake options.
 
178
AC_DEFUN([_AM_SET_OPTIONS],
 
179
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
180
 
 
181
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
182
# -------------------------------------------
 
183
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
184
AC_DEFUN([_AM_IF_OPTION],
 
185
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
103
186
 
104
187
#
105
188
# Check to make sure that the build environment is sane.
106
189
#
107
190
 
 
191
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
192
 
 
193
# This program is free software; you can redistribute it and/or modify
 
194
# it under the terms of the GNU General Public License as published by
 
195
# the Free Software Foundation; either version 2, or (at your option)
 
196
# any later version.
 
197
 
 
198
# This program is distributed in the hope that it will be useful,
 
199
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
200
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
201
# GNU General Public License for more details.
 
202
 
 
203
# You should have received a copy of the GNU General Public License
 
204
# along with this program; if not, write to the Free Software
 
205
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
206
# 02111-1307, USA.
 
207
 
108
208
# serial 3
109
209
 
110
210
# AM_SANITY_CHECK
148
248
fi
149
249
AC_MSG_RESULT(yes)])
150
250
 
151
 
 
152
 
# serial 2
 
251
#  -*- Autoconf -*-
 
252
 
 
253
 
 
254
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
255
 
 
256
# This program is free software; you can redistribute it and/or modify
 
257
# it under the terms of the GNU General Public License as published by
 
258
# the Free Software Foundation; either version 2, or (at your option)
 
259
# any later version.
 
260
 
 
261
# This program is distributed in the hope that it will be useful,
 
262
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
263
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
264
# GNU General Public License for more details.
 
265
 
 
266
# You should have received a copy of the GNU General Public License
 
267
# along with this program; if not, write to the Free Software
 
268
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
269
# 02111-1307, USA.
 
270
 
 
271
# serial 3
153
272
 
154
273
# AM_MISSING_PROG(NAME, PROGRAM)
155
274
# ------------------------------
171
290
  am_missing_run="$MISSING --run "
172
291
else
173
292
  am_missing_run=
174
 
  am_backtick='`'
175
 
  AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
 
293
  AC_MSG_WARN([`missing' script is too old or missing])
176
294
fi
177
295
])
178
296
 
179
297
# AM_AUX_DIR_EXPAND
180
298
 
 
299
# Copyright 2001 Free Software Foundation, Inc.
 
300
 
 
301
# This program is free software; you can redistribute it and/or modify
 
302
# it under the terms of the GNU General Public License as published by
 
303
# the Free Software Foundation; either version 2, or (at your option)
 
304
# any later version.
 
305
 
 
306
# This program is distributed in the hope that it will be useful,
 
307
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
308
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
309
# GNU General Public License for more details.
 
310
 
 
311
# You should have received a copy of the GNU General Public License
 
312
# along with this program; if not, write to the Free Software
 
313
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
314
# 02111-1307, USA.
 
315
 
181
316
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
182
317
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
183
318
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
216
351
# absolute PATH.  The drawback is that using absolute paths prevent a
217
352
# configured tree to be moved without reconfiguration.
218
353
 
 
354
# Rely on autoconf to set up CDPATH properly.
 
355
AC_PREREQ([2.50])
 
356
 
219
357
AC_DEFUN([AM_AUX_DIR_EXPAND], [
220
358
# expand $ac_aux_dir to an absolute path
221
 
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
 
359
am_aux_dir=`cd $ac_aux_dir && pwd`
222
360
])
223
361
 
224
362
# AM_PROG_INSTALL_SH
225
363
# ------------------
226
364
# Define $install_sh.
 
365
 
 
366
# Copyright 2001 Free Software Foundation, Inc.
 
367
 
 
368
# This program is free software; you can redistribute it and/or modify
 
369
# it under the terms of the GNU General Public License as published by
 
370
# the Free Software Foundation; either version 2, or (at your option)
 
371
# any later version.
 
372
 
 
373
# This program is distributed in the hope that it will be useful,
 
374
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
375
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
376
# GNU General Public License for more details.
 
377
 
 
378
# You should have received a copy of the GNU General Public License
 
379
# along with this program; if not, write to the Free Software
 
380
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
381
# 02111-1307, USA.
 
382
 
227
383
AC_DEFUN([AM_PROG_INSTALL_SH],
228
384
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
229
385
install_sh=${install_sh-"$am_aux_dir/install-sh"}
230
386
AC_SUBST(install_sh)])
231
387
 
 
388
# AM_PROG_INSTALL_STRIP
 
389
 
 
390
# Copyright 2001 Free Software Foundation, Inc.
 
391
 
 
392
# This program is free software; you can redistribute it and/or modify
 
393
# it under the terms of the GNU General Public License as published by
 
394
# the Free Software Foundation; either version 2, or (at your option)
 
395
# any later version.
 
396
 
 
397
# This program is distributed in the hope that it will be useful,
 
398
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
399
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
400
# GNU General Public License for more details.
 
401
 
 
402
# You should have received a copy of the GNU General Public License
 
403
# along with this program; if not, write to the Free Software
 
404
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
405
# 02111-1307, USA.
 
406
 
232
407
# One issue with vendor `install' (even GNU) is that you can't
233
408
# specify the program used to strip binaries.  This is especially
234
409
# annoying in cross-compiling environments, where the build's strip
238
413
# STRIPPROG with the value of the STRIP variable (set by the user).
239
414
AC_DEFUN([AM_PROG_INSTALL_STRIP],
240
415
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
416
# Installed binaries are usually stripped using `strip' when the user
 
417
# run `make install-strip'.  However `strip' might not be the right
 
418
# tool to use in cross-compilation environments, therefore Automake
 
419
# will honor the `STRIP' environment variable to overrule this program.
 
420
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
421
if test "$cross_compiling" != no; then
 
422
  AC_CHECK_TOOL([STRIP], [strip], :)
 
423
fi
241
424
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
242
425
AC_SUBST([INSTALL_STRIP_PROGRAM])])
243
426
 
244
427
# serial 4                                              -*- Autoconf -*-
245
428
 
 
429
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
430
 
 
431
# This program is free software; you can redistribute it and/or modify
 
432
# it under the terms of the GNU General Public License as published by
 
433
# the Free Software Foundation; either version 2, or (at your option)
 
434
# any later version.
 
435
 
 
436
# This program is distributed in the hope that it will be useful,
 
437
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
438
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
439
# GNU General Public License for more details.
 
440
 
 
441
# You should have received a copy of the GNU General Public License
 
442
# along with this program; if not, write to the Free Software
 
443
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
444
# 02111-1307, USA.
246
445
 
247
446
 
248
447
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
254
453
 
255
454
 
256
455
# _AM_DEPENDENCIES(NAME)
257
 
# ---------------------
 
456
# ----------------------
258
457
# See how the compiler implements dependency checking.
259
 
# NAME is "CC", "CXX" or "OBJC".
 
458
# NAME is "CC", "CXX", "GCJ", or "OBJC".
260
459
# We try a few techniques and use that to set a single cache variable.
261
460
#
262
461
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
271
470
 
272
471
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
273
472
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
274
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
 
473
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
275
474
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
276
475
                   [depcc="$$1"   am_compiler_list=])
277
476
 
333
532
  am_cv_$1_dependencies_compiler_type=none
334
533
fi
335
534
])
336
 
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
337
 
AC_SUBST([$1DEPMODE])
 
535
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
338
536
])
339
537
 
340
538
 
352
550
  DEPDIR=_deps
353
551
fi
354
552
rmdir .deps 2>/dev/null
355
 
AC_SUBST(DEPDIR)
 
553
AC_SUBST([DEPDIR])
356
554
])
357
555
 
358
556
 
367
565
  AMDEPBACKSLASH='\'
368
566
fi
369
567
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
370
 
pushdef([subst], defn([AC_SUBST]))
371
 
subst(AMDEPBACKSLASH)
372
 
popdef([subst])
 
568
AC_SUBST([AMDEPBACKSLASH])
373
569
])
374
570
 
375
 
# Generate code to set up dependency tracking.
376
 
# This macro should only be invoked once -- use via AC_REQUIRE.
377
 
# Usage:
378
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
379
 
 
380
 
#
381
 
# This code is only required when automatic dependency tracking
382
 
# is enabled.  FIXME.  This creates each `.P' file that we will
383
 
# need in order to bootstrap the dependency handling code.
384
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
385
 
AC_OUTPUT_COMMANDS([
386
 
test x"$AMDEP_TRUE" != x"" ||
387
 
for mf in $CONFIG_FILES; do
388
 
  case "$mf" in
389
 
  Makefile) dirpart=.;;
390
 
  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
391
 
  *) continue;;
392
 
  esac
393
 
  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
 
571
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
572
 
 
573
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
574
 
 
575
# This program is free software; you can redistribute it and/or modify
 
576
# it under the terms of the GNU General Public License as published by
 
577
# the Free Software Foundation; either version 2, or (at your option)
 
578
# any later version.
 
579
 
 
580
# This program is distributed in the hope that it will be useful,
 
581
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
582
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
583
# GNU General Public License for more details.
 
584
 
 
585
# You should have received a copy of the GNU General Public License
 
586
# along with this program; if not, write to the Free Software
 
587
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
588
# 02111-1307, USA.
 
589
 
 
590
#serial 2
 
591
 
 
592
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
593
# ------------------------------
 
594
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
595
[for mf in $CONFIG_FILES; do
 
596
  # Strip MF so we end up with the name of the file.
 
597
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
598
  # Check whether this is an Automake generated Makefile or not.
 
599
  # We used to match only the files named `Makefile.in', but
 
600
  # some people rename them; so instead we look at the file content.
 
601
  # Grep'ing the first line is not enough: some people post-process
 
602
  # each Makefile.in and add a new line on top of each file to say so.
 
603
  # So let's grep whole file.
 
604
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
605
    dirpart=`AS_DIRNAME("$mf")`
 
606
  else
 
607
    continue
 
608
  fi
 
609
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
394
610
  # Extract the definition of DEP_FILES from the Makefile without
395
611
  # running `make'.
396
612
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
414
630
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
415
631
    # Make sure the directory exists.
416
632
    test -f "$dirpart/$file" && continue
417
 
    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
418
 
    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
 
633
    fdir=`AS_DIRNAME(["$file"])`
 
634
    AS_MKDIR_P([$dirpart/$fdir])
419
635
    # echo "creating $dirpart/$file"
420
636
    echo '# dummy' > "$dirpart/$file"
421
637
  done
422
638
done
423
 
], [AMDEP_TRUE="$AMDEP_TRUE"
424
 
ac_aux_dir="$ac_aux_dir"])])
 
639
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
640
 
 
641
 
 
642
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
643
# -----------------------------
 
644
# This macro should only be invoked once -- use via AC_REQUIRE.
 
645
#
 
646
# This code is only required when automatic dependency tracking
 
647
# is enabled.  FIXME.  This creates each `.P' file that we will
 
648
# need in order to bootstrap the dependency handling code.
 
649
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
650
[AC_CONFIG_COMMANDS([depfiles],
 
651
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
652
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
653
])
 
654
 
 
655
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
 
656
 
 
657
# This program is free software; you can redistribute it and/or modify
 
658
# it under the terms of the GNU General Public License as published by
 
659
# the Free Software Foundation; either version 2, or (at your option)
 
660
# any later version.
 
661
 
 
662
# This program is distributed in the hope that it will be useful,
 
663
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
664
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
665
# GNU General Public License for more details.
 
666
 
 
667
# You should have received a copy of the GNU General Public License
 
668
# along with this program; if not, write to the Free Software
 
669
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
670
# 02111-1307, USA.
 
671
 
 
672
# serial 2
425
673
 
426
674
# AM_MAKE_INCLUDE()
427
675
# -----------------
434
682
END
435
683
# If we don't find an include directive, just comment out the code.
436
684
AC_MSG_CHECKING([for style of include used by $am_make])
437
 
am__include='#'
 
685
am__include="#"
438
686
am__quote=
439
687
_am_result=none
440
688
# First try GNU make style include.
454
702
   echo '.include "confinc"' > confmf
455
703
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
456
704
      am__include=.include
457
 
      am__quote='"'
 
705
      am__quote="\""
458
706
      _am_result=BSD
459
707
   fi
460
708
fi
464
712
rm -f confinc confmf
465
713
])
466
714
 
467
 
# serial 3
 
715
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
716
 
 
717
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
718
 
 
719
# This program is free software; you can redistribute it and/or modify
 
720
# it under the terms of the GNU General Public License as published by
 
721
# the Free Software Foundation; either version 2, or (at your option)
 
722
# any later version.
 
723
 
 
724
# This program is distributed in the hope that it will be useful,
 
725
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
726
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
727
# GNU General Public License for more details.
 
728
 
 
729
# You should have received a copy of the GNU General Public License
 
730
# along with this program; if not, write to the Free Software
 
731
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
732
# 02111-1307, USA.
 
733
 
 
734
# serial 5
 
735
 
 
736
AC_PREREQ(2.52)
468
737
 
469
738
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
470
739
# -------------------------------------
471
740
# Define a conditional.
472
 
#
473
 
# FIXME: Once using 2.50, use this:
474
 
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
475
741
AC_DEFUN([AM_CONDITIONAL],
476
 
[ifelse([$1], [TRUE],
477
 
        [errprint(__file__:__line__: [$0: invalid condition: $1
478
 
])dnl
479
 
m4exit(1)])dnl
480
 
ifelse([$1], [FALSE],
481
 
       [errprint(__file__:__line__: [$0: invalid condition: $1
482
 
])dnl
483
 
m4exit(1)])dnl
 
742
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
743
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
484
744
AC_SUBST([$1_TRUE])
485
745
AC_SUBST([$1_FALSE])
486
746
if $2; then
489
749
else
490
750
  $1_TRUE='#'
491
751
  $1_FALSE=
492
 
fi])
 
752
fi
 
753
AC_CONFIG_COMMANDS_PRE(
 
754
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
755
  AC_MSG_ERROR([conditional \"$1\" was never defined.
 
756
Usually this means the macro was only invoked conditionally.])
 
757
fi])])
 
758
 
 
759
# Add --enable-maintainer-mode option to configure.
 
760
# From Jim Meyering
 
761
 
 
762
# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
 
763
 
 
764
# This program is free software; you can redistribute it and/or modify
 
765
# it under the terms of the GNU General Public License as published by
 
766
# the Free Software Foundation; either version 2, or (at your option)
 
767
# any later version.
 
768
 
 
769
# This program is distributed in the hope that it will be useful,
 
770
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
771
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
772
# GNU General Public License for more details.
 
773
 
 
774
# You should have received a copy of the GNU General Public License
 
775
# along with this program; if not, write to the Free Software
 
776
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
777
# 02111-1307, USA.
 
778
 
 
779
# serial 1
 
780
 
 
781
AC_DEFUN([AM_MAINTAINER_MODE],
 
782
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
783
  dnl maintainer-mode is disabled by default
 
784
  AC_ARG_ENABLE(maintainer-mode,
 
785
[  --enable-maintainer-mode enable make rules and dependencies not useful
 
786
                          (and sometimes confusing) to the casual installer],
 
787
      USE_MAINTAINER_MODE=$enableval,
 
788
      USE_MAINTAINER_MODE=no)
 
789
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
790
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
791
  MAINT=$MAINTAINER_MODE_TRUE
 
792
  AC_SUBST(MAINT)dnl
 
793
]
 
794
)
493
795
 
494
796
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
495
797
 
520
822
AC_REQUIRE([AC_PROG_LD])dnl
521
823
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
522
824
AC_REQUIRE([AC_PROG_NM])dnl
 
825
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
826
 
523
827
AC_REQUIRE([AC_PROG_LN_S])dnl
524
828
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
525
829
AC_REQUIRE([AC_OBJEXT])dnl
690
994
irix* | nonstopux*)
691
995
  symcode='[[BCDEGRST]]'
692
996
  ;;
 
997
osf*)
 
998
  symcode='[[BCDEGQRST]]'
 
999
  ;;
693
1000
solaris* | sysv5*)
694
1001
  symcode='[[BDT]]'
695
1002
  ;;
786
1093
          save_CFLAGS="$CFLAGS"
787
1094
          LIBS="conftstm.$ac_objext"
788
1095
          CFLAGS="$CFLAGS$no_builtin_flag"
789
 
          if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1096
          if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
790
1097
            pipe_works=yes
791
1098
          fi
792
1099
          LIBS="$save_LIBS"
1417
1724
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1418
1725
      lt_cv_prog_cc_pic='-KPIC'
1419
1726
      lt_cv_prog_cc_static='-Bstatic'
1420
 
      if test "x$host_vendor" = xsni; then
1421
 
        lt_cv_prog_cc_wl='-LD'
1422
 
      else
1423
 
        lt_cv_prog_cc_wl='-Wl,'
1424
 
      fi
 
1727
      lt_cv_prog_cc_wl='-Wl,'
1425
1728
      ;;
1426
1729
 
1427
1730
    uts4*)
1786
2089
    # If the export-symbols file already is a .def file (1st line
1787
2090
    # is EXPORTS), use it as is.
1788
2091
    # If DATA tags from a recent dlltool are present, honour them!
1789
 
    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
 
2092
    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1790
2093
        cp $export_symbols $output_objdir/$soname-def;
1791
2094
      else
1792
2095
        echo EXPORTS > $output_objdir/$soname-def;
1795
2098
         set dummy \$symbol;
1796
2099
         case \[$]# in
1797
2100
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
 
2101
           4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1798
2102
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1799
2103
         esac;
1800
2104
         _lt_hint=`expr 1 + \$_lt_hint`;
1907
2211
      # need to do runtime linking.
1908
2212
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1909
2213
        for ld_flag in $LDFLAGS; do
1910
 
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
2214
          case $ld_flag in
 
2215
          *-brtl*)
1911
2216
            aix_use_runtimelinking=yes
1912
2217
            break
1913
 
          fi
 
2218
          ;;
 
2219
          esac
1914
2220
        done
1915
2221
      esac
1916
2222
 
2026
2332
    #        cross-compilation, but unfortunately the echo tests do not
2027
2333
    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
2028
2334
    #        `"' quotes if we put them in here... so don't!
2029
 
    archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
 
2335
    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)'
2030
2336
    # We need to add '_' to the symbols in $export_symbols first
2031
2337
    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2032
2338
    hardcode_direct=yes
2081
2387
  irix5* | irix6* | nonstopux*)
2082
2388
    if test "$GCC" = yes; then
2083
2389
      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'
 
2390
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2084
2391
    else
2085
2392
      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'
 
2393
      hardcode_libdir_flag_spec='-rpath $libdir'
2086
2394
    fi
2087
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2088
2395
    hardcode_libdir_separator=:
2089
2396
    link_all_deplibs=yes
2090
2397
    ;;
2112
2419
    hardcode_direct=yes
2113
2420
    hardcode_shlibpath_var=no
2114
2421
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2115
 
      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
2422
      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2116
2423
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2117
2424
      export_dynamic_flag_spec='${wl}-E'
2118
2425
    else
2122
2429
        hardcode_libdir_flag_spec='-R$libdir'
2123
2430
        ;;
2124
2431
      *)
2125
 
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
2432
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2126
2433
        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2127
2434
        ;;
2128
2435
      esac
2234
2541
    ;;
2235
2542
 
2236
2543
  sysv4)
2237
 
    if test "x$host_vendor" = xsno; then
2238
 
      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2239
 
      hardcode_direct=yes # is this really true???
2240
 
    else
2241
 
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2242
 
      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2243
 
    fi
 
2544
    case $host_vendor in
 
2545
      sni)
 
2546
        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2547
        hardcode_direct=yes # is this really true???
 
2548
        ;;
 
2549
      siemens)
 
2550
        ## LD is ld it makes a PLAMLIB
 
2551
        ## CC just makes a GrossModule.
 
2552
        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
2553
        reload_cmds='$CC -r -o $output$reload_objs'
 
2554
        hardcode_direct=no
 
2555
        ;;
 
2556
      motorola)
 
2557
        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2558
        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
 
2559
        ;;
 
2560
    esac
2244
2561
    runpath_var='LD_RUN_PATH'
2245
2562
    hardcode_shlibpath_var=no
2246
2563
    ;;
2381
2698
 
2382
2699
aix4* | aix5*)
2383
2700
  version_type=linux
 
2701
  need_lib_prefix=no
 
2702
  need_version=no
 
2703
  hardcode_into_libs=yes
2384
2704
  if test "$host_cpu" = ia64; then
2385
2705
    # AIX 5 supports IA64
2386
2706
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2419
2739
    fi
2420
2740
    shlibpath_var=LIBPATH
2421
2741
  fi
 
2742
  hardcode_into_libs=yes
2422
2743
  ;;
2423
2744
 
2424
2745
amigaos*)
2466
2787
    ;;
2467
2788
  yes,mingw*)
2468
2789
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2469
 
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
 
2790
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2470
2791
    ;;
2471
2792
  yes,pw32*)
2472
2793
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2498
2819
  dynamic_linker=no
2499
2820
  ;;
2500
2821
 
 
2822
freebsd*-gnu*)
 
2823
  version_type=linux
 
2824
  need_lib_prefix=no
 
2825
  need_version=no
 
2826
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2827
  soname_spec='${libname}${release}.so$major'
 
2828
  shlibpath_var=LD_LIBRARY_PATH
 
2829
  shlibpath_overrides_runpath=no
 
2830
  hardcode_into_libs=yes
 
2831
  dynamic_linker='GNU/FreeBSD ld.so'
 
2832
  ;;
 
2833
 
2501
2834
freebsd*)
2502
2835
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2503
2836
  version_type=freebsd-$objformat
2663
2996
osf3* | osf4* | osf5*)
2664
2997
  version_type=osf
2665
2998
  need_version=no
2666
 
  soname_spec='${libname}${release}.so'
2667
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
2999
  need_lib_prefix=no
 
3000
  soname_spec='${libname}${release}.so$major'
 
3001
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2668
3002
  shlibpath_var=LD_LIBRARY_PATH
2669
3003
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2670
3004
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
3005
  hardcode_into_libs=yes
2671
3006
  ;;
2672
3007
 
2673
3008
sco3.2v5*)
2710
3045
  case $host_vendor in
2711
3046
    sni)
2712
3047
      shlibpath_overrides_runpath=no
 
3048
      need_lib_prefix=no
 
3049
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
3050
      runpath_var=LD_RUN_PATH
 
3051
      ;;
 
3052
    siemens)
 
3053
      need_lib_prefix=no
2713
3054
      ;;
2714
3055
    motorola)
2715
3056
      need_lib_prefix=no
2864
3205
  # Now quote all the things that may contain metacharacters while being
2865
3206
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
2866
3207
  # variables and quote the copies for generation of the libtool script.
2867
 
  for var in echo old_CC old_CFLAGS \
 
3208
  for var in echo old_CC old_CFLAGS SED \
2868
3209
    AR AR_FLAGS CC LD LN_S NM SHELL \
2869
3210
    reload_flag reload_cmds wl \
2870
3211
    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2926
3267
# configuration script generated by Autoconf, you may include it under
2927
3268
# the same distribution terms that you use for the rest of that program.
2928
3269
 
 
3270
# A sed that does not truncate output.
 
3271
SED=$lt_SED
 
3272
 
2929
3273
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2930
 
Xsed="sed -e s/^X//"
 
3274
Xsed="${SED} -e s/^X//"
2931
3275
 
2932
3276
# The HP-UX ksh and POSIX shell print the target directory to stdout
2933
3277
# if CDPATH is set.
3688
4032
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3689
4033
#  -- PORTME fill in with the dynamic library characteristics
3690
4034
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3691
 
[AC_CACHE_CHECK([how to recognise dependant libraries],
 
4035
[AC_CACHE_CHECK([how to recognise dependent libraries],
3692
4036
lt_cv_deplibs_check_method,
3693
4037
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3694
4038
lt_cv_file_magic_test_file=
3787
4131
# This must be Linux ELF.
3788
4132
linux-gnu*)
3789
4133
  case $host_cpu in
3790
 
  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 
4134
  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3791
4135
    lt_cv_deplibs_check_method=pass_all ;;
3792
4136
  *)
3793
4137
    # glibc up to 2.1.1 does not perform some relocations on ARM
3858
4202
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3859
4203
    lt_cv_file_magic_test_file=/lib/libc.so
3860
4204
    ;;
 
4205
  siemens)
 
4206
    lt_cv_deplibs_check_method=pass_all
 
4207
    ;;
3861
4208
  esac
3862
4209
  ;;
3863
4210
esac
3991
4338
# This is just to silence aclocal about the macro not being used
3992
4339
ifelse([AC_DISABLE_FAST_INSTALL])
3993
4340
 
 
4341
# NOTE: This macro has been submitted for inclusion into   #
 
4342
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
4343
#  a released version of Autoconf we should remove this    #
 
4344
#  macro and use it instead.                               #
 
4345
# LT_AC_PROG_SED
 
4346
# --------------
 
4347
# Check for a fully-functional sed program, that truncates
 
4348
# as few characters as possible.  Prefer GNU sed if found.
 
4349
AC_DEFUN([LT_AC_PROG_SED],
 
4350
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
4351
AC_CACHE_VAL(lt_cv_path_SED,
 
4352
[# Loop through the user's path and test for sed and gsed.
 
4353
# Then use that list of sed's as ones to test for truncation.
 
4354
as_executable_p="test -f"
 
4355
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
4356
for as_dir in $PATH
 
4357
do
 
4358
  IFS=$as_save_IFS
 
4359
  test -z "$as_dir" && as_dir=.
 
4360
  for ac_prog in sed gsed; do
 
4361
    for ac_exec_ext in '' $ac_executable_extensions; do
 
4362
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 
4363
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 
4364
      fi
 
4365
    done
 
4366
  done
 
4367
done
 
4368
 
 
4369
  # Create a temporary directory, and hook for its removal unless debugging.
 
4370
$debug ||
 
4371
{
 
4372
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
 
4373
  trap '{ (exit 1); exit 1; }' 1 2 13 15
 
4374
}
 
4375
 
 
4376
# Create a (secure) tmp directory for tmp files.
 
4377
: ${TMPDIR=/tmp}
 
4378
{
 
4379
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
 
4380
  test -n "$tmp" && test -d "$tmp"
 
4381
}  ||
 
4382
{
 
4383
  tmp=$TMPDIR/sed$$-$RANDOM
 
4384
  (umask 077 && mkdir $tmp)
 
4385
} ||
 
4386
{
 
4387
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
 
4388
   { (exit 1); exit 1; }
 
4389
}
 
4390
  _max=0
 
4391
  _count=0
 
4392
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
4393
  # along with /bin/sed that truncates output.
 
4394
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
 
4395
    test ! -f ${_sed} && break
 
4396
    cat /dev/null > "$tmp/sed.in"
 
4397
    _count=0
 
4398
    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
 
4399
    # Check for GNU sed and select it if it is found.
 
4400
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
 
4401
      lt_cv_path_SED=${_sed}
 
4402
      break
 
4403
    fi
 
4404
    while true; do
 
4405
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
 
4406
      mv "$tmp/sed.tmp" "$tmp/sed.in"
 
4407
      cp "$tmp/sed.in" "$tmp/sed.nl"
 
4408
      echo >>"$tmp/sed.nl"
 
4409
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
 
4410
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
 
4411
      # 40000 chars as input seems more than enough
 
4412
      test $_count -gt 10 && break
 
4413
      _count=`expr $_count + 1`
 
4414
      if test $_count -gt $_max; then
 
4415
        _max=$_count
 
4416
        lt_cv_path_SED=$_sed
 
4417
      fi
 
4418
    done
 
4419
  done
 
4420
  rm -rf "$tmp"
 
4421
])
 
4422
if test "X$SED" != "X"; then
 
4423
  lt_cv_path_SED=$SED
 
4424
else
 
4425
  SED=$lt_cv_path_SED
 
4426
fi
 
4427
AC_MSG_RESULT([$SED])
 
4428
])
 
4429
 
 
4430
# Configure paths for libogg
 
4431
# Jack Moffitt <jack@icecast.org> 10-21-2000
 
4432
# Shamelessly stolen from Owen Taylor and Manish Singh
 
4433
 
 
4434
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 
4435
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
 
4436
dnl
 
4437
AC_DEFUN(XIPH_PATH_OGG,
 
4438
[dnl 
 
4439
dnl Get the cflags and libraries
 
4440
dnl
 
4441
AC_ARG_WITH(ogg,[  --with-ogg=PFX   Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
 
4442
AC_ARG_WITH(ogg-libraries,[  --with-ogg-libraries=DIR   Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
 
4443
AC_ARG_WITH(ogg-includes,[  --with-ogg-includes=DIR   Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
 
4444
AC_ARG_ENABLE(oggtest, [  --disable-oggtest       Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
 
4445
 
 
4446
  if test "x$ogg_libraries" != "x" ; then
 
4447
    OGG_LIBS="-L$ogg_libraries"
 
4448
  elif test "x$ogg_prefix" != "x" ; then
 
4449
    OGG_LIBS="-L$ogg_prefix/lib"
 
4450
  elif test "x$prefix" != "xNONE" ; then
 
4451
    OGG_LIBS="-L$prefix/lib"
 
4452
  fi
 
4453
 
 
4454
  OGG_LIBS="$OGG_LIBS -logg"
 
4455
 
 
4456
  if test "x$ogg_includes" != "x" ; then
 
4457
    OGG_CFLAGS="-I$ogg_includes"
 
4458
  elif test "x$ogg_prefix" != "x" ; then
 
4459
    OGG_CFLAGS="-I$ogg_prefix/include"
 
4460
  elif test "$prefix" != "xNONE"; then
 
4461
    OGG_CFLAGS="-I$prefix/include"
 
4462
  fi
 
4463
 
 
4464
  AC_MSG_CHECKING(for Ogg)
 
4465
  no_ogg=""
 
4466
 
 
4467
 
 
4468
  if test "x$enable_oggtest" = "xyes" ; then
 
4469
    ac_save_CFLAGS="$CFLAGS"
 
4470
    ac_save_LIBS="$LIBS"
 
4471
    CFLAGS="$CFLAGS $OGG_CFLAGS"
 
4472
    LIBS="$LIBS $OGG_LIBS"
 
4473
dnl
 
4474
dnl Now check if the installed Ogg is sufficiently new.
 
4475
dnl
 
4476
      rm -f conf.oggtest
 
4477
      AC_TRY_RUN([
 
4478
#include <stdio.h>
 
4479
#include <stdlib.h>
 
4480
#include <string.h>
 
4481
#include <ogg/ogg.h>
 
4482
 
 
4483
int main ()
 
4484
{
 
4485
  system("touch conf.oggtest");
 
4486
  return 0;
 
4487
}
 
4488
 
 
4489
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
4490
       CFLAGS="$ac_save_CFLAGS"
 
4491
       LIBS="$ac_save_LIBS"
 
4492
  fi
 
4493
 
 
4494
  if test "x$no_ogg" = "x" ; then
 
4495
     AC_MSG_RESULT(yes)
 
4496
     ifelse([$1], , :, [$1])     
 
4497
  else
 
4498
     AC_MSG_RESULT(no)
 
4499
     if test -f conf.oggtest ; then
 
4500
       :
 
4501
     else
 
4502
       echo "*** Could not run Ogg test program, checking why..."
 
4503
       CFLAGS="$CFLAGS $OGG_CFLAGS"
 
4504
       LIBS="$LIBS $OGG_LIBS"
 
4505
       AC_TRY_LINK([
 
4506
#include <stdio.h>
 
4507
#include <ogg/ogg.h>
 
4508
],     [ return 0; ],
 
4509
       [ echo "*** The test program compiled, but did not run. This usually means"
 
4510
       echo "*** that the run-time linker is not finding Ogg or finding the wrong"
 
4511
       echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
 
4512
       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
4513
       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
4514
       echo "*** is required on your system"
 
4515
       echo "***"
 
4516
       echo "*** If you have an old version installed, it is best to remove it, although"
 
4517
       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
 
4518
       [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
4519
       echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
 
4520
       echo "*** or that you have moved Ogg since it was installed." ])
 
4521
       CFLAGS="$ac_save_CFLAGS"
 
4522
       LIBS="$ac_save_LIBS"
 
4523
     fi
 
4524
     OGG_CFLAGS=""
 
4525
     OGG_LIBS=""
 
4526
     ifelse([$2], , :, [$2])
 
4527
  fi
 
4528
  AC_SUBST(OGG_CFLAGS)
 
4529
  AC_SUBST(OGG_LIBS)
 
4530
  rm -f conf.oggtest
 
4531
])
 
4532
 
3994
4533
# CFLAGS and library paths for XMMS
3995
4534
# written 15 December 1999 by Ben Gertzfield <che@debian.org>
3996
4535
 
4140
4679
AC_SUBST(XMMS_EFFECT_PLUGIN_DIR)
4141
4680
])
4142
4681
 
 
4682
# iconv.m4 serial AM4 (gettext-0.11.3)
 
4683
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
4684
dnl This file is free software, distributed under the terms of the GNU
 
4685
dnl General Public License.  As a special exception to the GNU General
 
4686
dnl Public License, this file may be distributed as part of a program
 
4687
dnl that contains a configuration script generated by Autoconf, under
 
4688
dnl the same distribution terms as the rest of that program.
 
4689
 
 
4690
dnl From Bruno Haible.
 
4691
 
 
4692
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 
4693
[
 
4694
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
4695
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
4696
  AC_REQUIRE([AC_LIB_RPATH])
 
4697
 
 
4698
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
4699
  dnl accordingly.
 
4700
  AC_LIB_LINKFLAGS_BODY([iconv])
 
4701
])
 
4702
 
 
4703
AC_DEFUN([AM_ICONV_LINK],
 
4704
[
 
4705
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
4706
  dnl those with the standalone portable GNU libiconv installed).
 
4707
 
 
4708
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
4709
  dnl accordingly.
 
4710
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
4711
 
 
4712
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
4713
  dnl because if the user has installed libiconv and not disabled its use
 
4714
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
4715
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
4716
  am_save_CPPFLAGS="$CPPFLAGS"
 
4717
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
4718
 
 
4719
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
4720
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
4721
    am_cv_lib_iconv=no
 
4722
    AC_TRY_LINK([#include <stdlib.h>
 
4723
#include <iconv.h>],
 
4724
      [iconv_t cd = iconv_open("","");
 
4725
       iconv(cd,NULL,NULL,NULL,NULL);
 
4726
       iconv_close(cd);],
 
4727
      am_cv_func_iconv=yes)
 
4728
    if test "$am_cv_func_iconv" != yes; then
 
4729
      am_save_LIBS="$LIBS"
 
4730
      LIBS="$LIBS $LIBICONV"
 
4731
      AC_TRY_LINK([#include <stdlib.h>
 
4732
#include <iconv.h>],
 
4733
        [iconv_t cd = iconv_open("","");
 
4734
         iconv(cd,NULL,NULL,NULL,NULL);
 
4735
         iconv_close(cd);],
 
4736
        am_cv_lib_iconv=yes
 
4737
        am_cv_func_iconv=yes)
 
4738
      LIBS="$am_save_LIBS"
 
4739
    fi
 
4740
  ])
 
4741
  if test "$am_cv_func_iconv" = yes; then
 
4742
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
4743
  fi
 
4744
  if test "$am_cv_lib_iconv" = yes; then
 
4745
    AC_MSG_CHECKING([how to link with libiconv])
 
4746
    AC_MSG_RESULT([$LIBICONV])
 
4747
  else
 
4748
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
4749
    dnl either.
 
4750
    CPPFLAGS="$am_save_CPPFLAGS"
 
4751
    LIBICONV=
 
4752
    LTLIBICONV=
 
4753
  fi
 
4754
  AC_SUBST(LIBICONV)
 
4755
  AC_SUBST(LTLIBICONV)
 
4756
])
 
4757
 
 
4758
AC_DEFUN([AM_ICONV],
 
4759
[
 
4760
  AM_ICONV_LINK
 
4761
  if test "$am_cv_func_iconv" = yes; then
 
4762
    AC_MSG_CHECKING([for iconv declaration])
 
4763
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
4764
      AC_TRY_COMPILE([
 
4765
#include <stdlib.h>
 
4766
#include <iconv.h>
 
4767
extern
 
4768
#ifdef __cplusplus
 
4769
"C"
 
4770
#endif
 
4771
#if defined(__STDC__) || defined(__cplusplus)
 
4772
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
4773
#else
 
4774
size_t iconv();
 
4775
#endif
 
4776
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
4777
      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);"])
 
4778
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
4779
    AC_MSG_RESULT([$]{ac_t:-
 
4780
         }[$]am_cv_proto_iconv)
 
4781
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
4782
      [Define as const if the declaration of iconv() needs const.])
 
4783
  fi
 
4784
])
 
4785
 
 
4786
# lib-prefix.m4 serial 1 (gettext-0.11)
 
4787
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
4788
dnl This file is free software, distributed under the terms of the GNU
 
4789
dnl General Public License.  As a special exception to the GNU General
 
4790
dnl Public License, this file may be distributed as part of a program
 
4791
dnl that contains a configuration script generated by Autoconf, under
 
4792
dnl the same distribution terms as the rest of that program.
 
4793
 
 
4794
dnl From Bruno Haible.
 
4795
 
 
4796
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
4797
dnl to access previously installed libraries. The basic assumption is that
 
4798
dnl a user will want packages to use other packages he previously installed
 
4799
dnl with the same --prefix option.
 
4800
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
4801
dnl libraries, but is otherwise very convenient.
 
4802
AC_DEFUN([AC_LIB_PREFIX],
 
4803
[
 
4804
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
4805
  AC_REQUIRE([AC_PROG_CC])
 
4806
  AC_REQUIRE([AC_CANONICAL_HOST])
 
4807
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
4808
  dnl By default, look in $includedir and $libdir.
 
4809
  use_additional=yes
 
4810
  AC_LIB_WITH_FINAL_PREFIX([
 
4811
    eval additional_includedir=\"$includedir\"
 
4812
    eval additional_libdir=\"$libdir\"
 
4813
  ])
 
4814
  AC_ARG_WITH([lib-prefix],
 
4815
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
4816
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
4817
[
 
4818
    if test "X$withval" = "Xno"; then
 
4819
      use_additional=no
 
4820
    else
 
4821
      if test "X$withval" = "X"; then
 
4822
        AC_LIB_WITH_FINAL_PREFIX([
 
4823
          eval additional_includedir=\"$includedir\"
 
4824
          eval additional_libdir=\"$libdir\"
 
4825
        ])
 
4826
      else
 
4827
        additional_includedir="$withval/include"
 
4828
        additional_libdir="$withval/lib"
 
4829
      fi
 
4830
    fi
 
4831
])
 
4832
  if test $use_additional = yes; then
 
4833
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
4834
    dnl But don't add it
 
4835
    dnl   1. if it's the standard /usr/include,
 
4836
    dnl   2. if it's already present in $CPPFLAGS,
 
4837
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
4838
    dnl   4. if it doesn't exist as a directory.
 
4839
    if test "X$additional_includedir" != "X/usr/include"; then
 
4840
      haveit=
 
4841
      for x in $CPPFLAGS; do
 
4842
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
4843
        if test "X$x" = "X-I$additional_includedir"; then
 
4844
          haveit=yes
 
4845
          break
 
4846
        fi
 
4847
      done
 
4848
      if test -z "$haveit"; then
 
4849
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
4850
          if test -n "$GCC"; then
 
4851
            case $host_os in
 
4852
              linux*) haveit=yes;;
 
4853
            esac
 
4854
          fi
 
4855
        fi
 
4856
        if test -z "$haveit"; then
 
4857
          if test -d "$additional_includedir"; then
 
4858
            dnl Really add $additional_includedir to $CPPFLAGS.
 
4859
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
4860
          fi
 
4861
        fi
 
4862
      fi
 
4863
    fi
 
4864
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
4865
    dnl But don't add it
 
4866
    dnl   1. if it's the standard /usr/lib,
 
4867
    dnl   2. if it's already present in $LDFLAGS,
 
4868
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
4869
    dnl   4. if it doesn't exist as a directory.
 
4870
    if test "X$additional_libdir" != "X/usr/lib"; then
 
4871
      haveit=
 
4872
      for x in $LDFLAGS; do
 
4873
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
4874
        if test "X$x" = "X-L$additional_libdir"; then
 
4875
          haveit=yes
 
4876
          break
 
4877
        fi
 
4878
      done
 
4879
      if test -z "$haveit"; then
 
4880
        if test "X$additional_libdir" = "X/usr/local/lib"; then
 
4881
          if test -n "$GCC"; then
 
4882
            case $host_os in
 
4883
              linux*) haveit=yes;;
 
4884
            esac
 
4885
          fi
 
4886
        fi
 
4887
        if test -z "$haveit"; then
 
4888
          if test -d "$additional_libdir"; then
 
4889
            dnl Really add $additional_libdir to $LDFLAGS.
 
4890
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
4891
          fi
 
4892
        fi
 
4893
      fi
 
4894
    fi
 
4895
  fi
 
4896
])
 
4897
 
 
4898
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
4899
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
4900
dnl $exec_prefix will expand at the end of the configure script.
 
4901
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
4902
[
 
4903
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
4904
  dnl at the end of configure.
 
4905
  if test "X$prefix" = "XNONE"; then
 
4906
    acl_final_prefix="$ac_default_prefix"
 
4907
  else
 
4908
    acl_final_prefix="$prefix"
 
4909
  fi
 
4910
  if test "X$exec_prefix" = "XNONE"; then
 
4911
    acl_final_exec_prefix='${prefix}'
 
4912
  else
 
4913
    acl_final_exec_prefix="$exec_prefix"
 
4914
  fi
 
4915
  acl_save_prefix="$prefix"
 
4916
  prefix="$acl_final_prefix"
 
4917
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
4918
  prefix="$acl_save_prefix"
 
4919
])
 
4920
 
 
4921
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
4922
dnl variables prefix and exec_prefix bound to the values they will have
 
4923
dnl at the end of the configure script.
 
4924
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
4925
[
 
4926
  acl_save_prefix="$prefix"
 
4927
  prefix="$acl_final_prefix"
 
4928
  acl_save_exec_prefix="$exec_prefix"
 
4929
  exec_prefix="$acl_final_exec_prefix"
 
4930
  $1
 
4931
  exec_prefix="$acl_save_exec_prefix"
 
4932
  prefix="$acl_save_prefix"
 
4933
])
 
4934
 
 
4935
# lib-link.m4 serial 3 (gettext-0.11.3)
 
4936
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
4937
dnl This file is free software, distributed under the terms of the GNU
 
4938
dnl General Public License.  As a special exception to the GNU General
 
4939
dnl Public License, this file may be distributed as part of a program
 
4940
dnl that contains a configuration script generated by Autoconf, under
 
4941
dnl the same distribution terms as the rest of that program.
 
4942
 
 
4943
dnl From Bruno Haible.
 
4944
 
 
4945
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
4946
dnl the libraries corresponding to explicit and implicit dependencies.
 
4947
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
4948
dnl augments the CPPFLAGS variable.
 
4949
AC_DEFUN([AC_LIB_LINKFLAGS],
 
4950
[
 
4951
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
4952
  AC_REQUIRE([AC_LIB_RPATH])
 
4953
  define([Name],[translit([$1],[./-], [___])])
 
4954
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
4955
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
4956
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
4957
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
4958
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
4959
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
4960
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
4961
  ])
 
4962
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
4963
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
4964
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
4965
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
4966
  AC_SUBST([LIB]NAME)
 
4967
  AC_SUBST([LTLIB]NAME)
 
4968
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
4969
  dnl results of this search when this library appears as a dependency.
 
4970
  HAVE_LIB[]NAME=yes
 
4971
  undefine([Name])
 
4972
  undefine([NAME])
 
4973
])
 
4974
 
 
4975
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
 
4976
dnl searches for libname and the libraries corresponding to explicit and
 
4977
dnl implicit dependencies, together with the specified include files and
 
4978
dnl the ability to compile and link the specified testcode. If found, it
 
4979
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 
4980
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
4981
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
4982
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
4983
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
4984
[
 
4985
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
4986
  AC_REQUIRE([AC_LIB_RPATH])
 
4987
  define([Name],[translit([$1],[./-], [___])])
 
4988
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
4989
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
4990
 
 
4991
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
4992
  dnl accordingly.
 
4993
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
4994
 
 
4995
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
4996
  dnl because if the user has installed lib[]Name and not disabled its use
 
4997
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
4998
  ac_save_CPPFLAGS="$CPPFLAGS"
 
4999
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
5000
 
 
5001
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
5002
    ac_save_LIBS="$LIBS"
 
5003
    LIBS="$LIBS $LIB[]NAME"
 
5004
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
 
5005
    LIBS="$ac_save_LIBS"
 
5006
  ])
 
5007
  if test "$ac_cv_lib[]Name" = yes; then
 
5008
    HAVE_LIB[]NAME=yes
 
5009
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
 
5010
    AC_MSG_CHECKING([how to link with lib[]$1])
 
5011
    AC_MSG_RESULT([$LIB[]NAME])
 
5012
  else
 
5013
    HAVE_LIB[]NAME=no
 
5014
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
5015
    dnl $INC[]NAME either.
 
5016
    CPPFLAGS="$ac_save_CPPFLAGS"
 
5017
    LIB[]NAME=
 
5018
    LTLIB[]NAME=
 
5019
  fi
 
5020
  AC_SUBST([HAVE_LIB]NAME)
 
5021
  AC_SUBST([LIB]NAME)
 
5022
  AC_SUBST([LTLIB]NAME)
 
5023
  undefine([Name])
 
5024
  undefine([NAME])
 
5025
])
 
5026
 
 
5027
dnl Determine the platform dependent parameters needed to use rpath:
 
5028
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 
5029
dnl hardcode_direct, hardcode_minus_L,
 
5030
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
 
5031
AC_DEFUN([AC_LIB_RPATH],
 
5032
[
 
5033
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
5034
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
5035
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
5036
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
5037
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
 
5038
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
5039
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
5040
    . ./conftest.sh
 
5041
    rm -f ./conftest.sh
 
5042
    acl_cv_rpath=done
 
5043
  ])
 
5044
  wl="$acl_cv_wl"
 
5045
  libext="$acl_cv_libext"
 
5046
  shlibext="$acl_cv_shlibext"
 
5047
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
5048
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
5049
  hardcode_direct="$acl_cv_hardcode_direct"
 
5050
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
5051
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
 
5052
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
 
5053
  dnl Determine whether the user wants rpath handling at all.
 
5054
  AC_ARG_ENABLE(rpath,
 
5055
    [  --disable-rpath         do not hardcode runtime library paths],
 
5056
    :, enable_rpath=yes)
 
5057
])
 
5058
 
 
5059
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
5060
dnl the libraries corresponding to explicit and implicit dependencies.
 
5061
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
5062
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
5063
[
 
5064
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
5065
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
5066
  dnl By default, look in $includedir and $libdir.
 
5067
  use_additional=yes
 
5068
  AC_LIB_WITH_FINAL_PREFIX([
 
5069
    eval additional_includedir=\"$includedir\"
 
5070
    eval additional_libdir=\"$libdir\"
 
5071
  ])
 
5072
  AC_ARG_WITH([lib$1-prefix],
 
5073
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
 
5074
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
 
5075
[
 
5076
    if test "X$withval" = "Xno"; then
 
5077
      use_additional=no
 
5078
    else
 
5079
      if test "X$withval" = "X"; then
 
5080
        AC_LIB_WITH_FINAL_PREFIX([
 
5081
          eval additional_includedir=\"$includedir\"
 
5082
          eval additional_libdir=\"$libdir\"
 
5083
        ])
 
5084
      else
 
5085
        additional_includedir="$withval/include"
 
5086
        additional_libdir="$withval/lib"
 
5087
      fi
 
5088
    fi
 
5089
])
 
5090
  dnl Search the library and its dependencies in $additional_libdir and
 
5091
  dnl $LDFLAGS. Using breadth-first-seach.
 
5092
  LIB[]NAME=
 
5093
  LTLIB[]NAME=
 
5094
  INC[]NAME=
 
5095
  rpathdirs=
 
5096
  ltrpathdirs=
 
5097
  names_already_handled=
 
5098
  names_next_round='$1 $2'
 
5099
  while test -n "$names_next_round"; do
 
5100
    names_this_round="$names_next_round"
 
5101
    names_next_round=
 
5102
    for name in $names_this_round; do
 
5103
      already_handled=
 
5104
      for n in $names_already_handled; do
 
5105
        if test "$n" = "$name"; then
 
5106
          already_handled=yes
 
5107
          break
 
5108
        fi
 
5109
      done
 
5110
      if test -z "$already_handled"; then
 
5111
        names_already_handled="$names_already_handled $name"
 
5112
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
5113
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
5114
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
5115
        eval value=\"\$HAVE_LIB$uppername\"
 
5116
        if test -n "$value"; then
 
5117
          if test "$value" = yes; then
 
5118
            eval value=\"\$LIB$uppername\"
 
5119
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
5120
            eval value=\"\$LTLIB$uppername\"
 
5121
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
5122
          else
 
5123
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
5124
            dnl that this library doesn't exist. So just drop it.
 
5125
            :
 
5126
          fi
 
5127
        else
 
5128
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
5129
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
5130
          found_dir=
 
5131
          found_la=
 
5132
          found_so=
 
5133
          found_a=
 
5134
          if test $use_additional = yes; then
 
5135
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
 
5136
              found_dir="$additional_libdir"
 
5137
              found_so="$additional_libdir/lib$name.$shlibext"
 
5138
              if test -f "$additional_libdir/lib$name.la"; then
 
5139
                found_la="$additional_libdir/lib$name.la"
 
5140
              fi
 
5141
            else
 
5142
              if test -f "$additional_libdir/lib$name.$libext"; then
 
5143
                found_dir="$additional_libdir"
 
5144
                found_a="$additional_libdir/lib$name.$libext"
 
5145
                if test -f "$additional_libdir/lib$name.la"; then
 
5146
                  found_la="$additional_libdir/lib$name.la"
 
5147
                fi
 
5148
              fi
 
5149
            fi
 
5150
          fi
 
5151
          if test "X$found_dir" = "X"; then
 
5152
            for x in $LDFLAGS $LTLIB[]NAME; do
 
5153
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
5154
              case "$x" in
 
5155
                -L*)
 
5156
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
5157
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
 
5158
                    found_dir="$dir"
 
5159
                    found_so="$dir/lib$name.$shlibext"
 
5160
                    if test -f "$dir/lib$name.la"; then
 
5161
                      found_la="$dir/lib$name.la"
 
5162
                    fi
 
5163
                  else
 
5164
                    if test -f "$dir/lib$name.$libext"; then
 
5165
                      found_dir="$dir"
 
5166
                      found_a="$dir/lib$name.$libext"
 
5167
                      if test -f "$dir/lib$name.la"; then
 
5168
                        found_la="$dir/lib$name.la"
 
5169
                      fi
 
5170
                    fi
 
5171
                  fi
 
5172
                  ;;
 
5173
              esac
 
5174
              if test "X$found_dir" != "X"; then
 
5175
                break
 
5176
              fi
 
5177
            done
 
5178
          fi
 
5179
          if test "X$found_dir" != "X"; then
 
5180
            dnl Found the library.
 
5181
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
5182
            if test "X$found_so" != "X"; then
 
5183
              dnl Linking with a shared library. We attempt to hardcode its
 
5184
              dnl directory into the executable's runpath, unless it's the
 
5185
              dnl standard /usr/lib.
 
5186
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
 
5187
                dnl No hardcoding is needed.
 
5188
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
5189
              else
 
5190
                dnl Use an explicit option to hardcode DIR into the resulting
 
5191
                dnl binary.
 
5192
                dnl Potentially add DIR to ltrpathdirs.
 
5193
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
5194
                haveit=
 
5195
                for x in $ltrpathdirs; do
 
5196
                  if test "X$x" = "X$found_dir"; then
 
5197
                    haveit=yes
 
5198
                    break
 
5199
                  fi
 
5200
                done
 
5201
                if test -z "$haveit"; then
 
5202
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
5203
                fi
 
5204
                dnl The hardcoding into $LIBNAME is system dependent.
 
5205
                if test "$hardcode_direct" = yes; then
 
5206
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
5207
                  dnl resulting binary.
 
5208
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
5209
                else
 
5210
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
5211
                    dnl Use an explicit option to hardcode DIR into the resulting
 
5212
                    dnl binary.
 
5213
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
5214
                    dnl Potentially add DIR to rpathdirs.
 
5215
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
5216
                    haveit=
 
5217
                    for x in $rpathdirs; do
 
5218
                      if test "X$x" = "X$found_dir"; then
 
5219
                        haveit=yes
 
5220
                        break
 
5221
                      fi
 
5222
                    done
 
5223
                    if test -z "$haveit"; then
 
5224
                      rpathdirs="$rpathdirs $found_dir"
 
5225
                    fi
 
5226
                  else
 
5227
                    dnl Rely on "-L$found_dir".
 
5228
                    dnl But don't add it if it's already contained in the LDFLAGS
 
5229
                    dnl or the already constructed $LIBNAME
 
5230
                    haveit=
 
5231
                    for x in $LDFLAGS $LIB[]NAME; do
 
5232
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
5233
                      if test "X$x" = "X-L$found_dir"; then
 
5234
                        haveit=yes
 
5235
                        break
 
5236
                      fi
 
5237
                    done
 
5238
                    if test -z "$haveit"; then
 
5239
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
5240
                    fi
 
5241
                    if test "$hardcode_minus_L" != no; then
 
5242
                      dnl FIXME: Not sure whether we should use
 
5243
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
5244
                      dnl here.
 
5245
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
5246
                    else
 
5247
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
5248
                      dnl here, because this doesn't fit in flags passed to the
 
5249
                      dnl compiler. So give up. No hardcoding. This affects only
 
5250
                      dnl very old systems.
 
5251
                      dnl FIXME: Not sure whether we should use
 
5252
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
5253
                      dnl here.
 
5254
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
5255
                    fi
 
5256
                  fi
 
5257
                fi
 
5258
              fi
 
5259
            else
 
5260
              if test "X$found_a" != "X"; then
 
5261
                dnl Linking with a static library.
 
5262
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
5263
              else
 
5264
                dnl We shouldn't come here, but anyway it's good to have a
 
5265
                dnl fallback.
 
5266
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
5267
              fi
 
5268
            fi
 
5269
            dnl Assume the include files are nearby.
 
5270
            additional_includedir=
 
5271
            case "$found_dir" in
 
5272
              */lib | */lib/)
 
5273
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
 
5274
                additional_includedir="$basedir/include"
 
5275
                ;;
 
5276
            esac
 
5277
            if test "X$additional_includedir" != "X"; then
 
5278
              dnl Potentially add $additional_includedir to $INCNAME.
 
5279
              dnl But don't add it
 
5280
              dnl   1. if it's the standard /usr/include,
 
5281
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
5282
              dnl   3. if it's already present in $CPPFLAGS or the already
 
5283
              dnl      constructed $INCNAME,
 
5284
              dnl   4. if it doesn't exist as a directory.
 
5285
              if test "X$additional_includedir" != "X/usr/include"; then
 
5286
                haveit=
 
5287
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
5288
                  if test -n "$GCC"; then
 
5289
                    case $host_os in
 
5290
                      linux*) haveit=yes;;
 
5291
                    esac
 
5292
                  fi
 
5293
                fi
 
5294
                if test -z "$haveit"; then
 
5295
                  for x in $CPPFLAGS $INC[]NAME; do
 
5296
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
5297
                    if test "X$x" = "X-I$additional_includedir"; then
 
5298
                      haveit=yes
 
5299
                      break
 
5300
                    fi
 
5301
                  done
 
5302
                  if test -z "$haveit"; then
 
5303
                    if test -d "$additional_includedir"; then
 
5304
                      dnl Really add $additional_includedir to $INCNAME.
 
5305
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
5306
                    fi
 
5307
                  fi
 
5308
                fi
 
5309
              fi
 
5310
            fi
 
5311
            dnl Look for dependencies.
 
5312
            if test -n "$found_la"; then
 
5313
              dnl Read the .la file. It defines the variables
 
5314
              dnl dlname, library_names, old_library, dependency_libs, current,
 
5315
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
5316
              save_libdir="$libdir"
 
5317
              case "$found_la" in
 
5318
                */* | *\\*) . "$found_la" ;;
 
5319
                *) . "./$found_la" ;;
 
5320
              esac
 
5321
              libdir="$save_libdir"
 
5322
              dnl We use only dependency_libs.
 
5323
              for dep in $dependency_libs; do
 
5324
                case "$dep" in
 
5325
                  -L*)
 
5326
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
5327
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
5328
                    dnl But don't add it
 
5329
                    dnl   1. if it's the standard /usr/lib,
 
5330
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
5331
                    dnl   3. if it's already present in $LDFLAGS or the already
 
5332
                    dnl      constructed $LIBNAME,
 
5333
                    dnl   4. if it doesn't exist as a directory.
 
5334
                    if test "X$additional_libdir" != "X/usr/lib"; then
 
5335
                      haveit=
 
5336
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
 
5337
                        if test -n "$GCC"; then
 
5338
                          case $host_os in
 
5339
                            linux*) haveit=yes;;
 
5340
                          esac
 
5341
                        fi
 
5342
                      fi
 
5343
                      if test -z "$haveit"; then
 
5344
                        haveit=
 
5345
                        for x in $LDFLAGS $LIB[]NAME; do
 
5346
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
5347
                          if test "X$x" = "X-L$additional_libdir"; then
 
5348
                            haveit=yes
 
5349
                            break
 
5350
                          fi
 
5351
                        done
 
5352
                        if test -z "$haveit"; then
 
5353
                          if test -d "$additional_libdir"; then
 
5354
                            dnl Really add $additional_libdir to $LIBNAME.
 
5355
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
5356
                          fi
 
5357
                        fi
 
5358
                        haveit=
 
5359
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
5360
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
5361
                          if test "X$x" = "X-L$additional_libdir"; then
 
5362
                            haveit=yes
 
5363
                            break
 
5364
                          fi
 
5365
                        done
 
5366
                        if test -z "$haveit"; then
 
5367
                          if test -d "$additional_libdir"; then
 
5368
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
5369
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
5370
                          fi
 
5371
                        fi
 
5372
                      fi
 
5373
                    fi
 
5374
                    ;;
 
5375
                  -R*)
 
5376
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
5377
                    if test "$enable_rpath" != no; then
 
5378
                      dnl Potentially add DIR to rpathdirs.
 
5379
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
5380
                      haveit=
 
5381
                      for x in $rpathdirs; do
 
5382
                        if test "X$x" = "X$dir"; then
 
5383
                          haveit=yes
 
5384
                          break
 
5385
                        fi
 
5386
                      done
 
5387
                      if test -z "$haveit"; then
 
5388
                        rpathdirs="$rpathdirs $dir"
 
5389
                      fi
 
5390
                      dnl Potentially add DIR to ltrpathdirs.
 
5391
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
5392
                      haveit=
 
5393
                      for x in $ltrpathdirs; do
 
5394
                        if test "X$x" = "X$dir"; then
 
5395
                          haveit=yes
 
5396
                          break
 
5397
                        fi
 
5398
                      done
 
5399
                      if test -z "$haveit"; then
 
5400
                        ltrpathdirs="$ltrpathdirs $dir"
 
5401
                      fi
 
5402
                    fi
 
5403
                    ;;
 
5404
                  -l*)
 
5405
                    dnl Handle this in the next round.
 
5406
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
5407
                    ;;
 
5408
                  *.la)
 
5409
                    dnl Handle this in the next round. Throw away the .la's
 
5410
                    dnl directory; it is already contained in a preceding -L
 
5411
                    dnl option.
 
5412
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
5413
                    ;;
 
5414
                  *)
 
5415
                    dnl Most likely an immediate library name.
 
5416
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
5417
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
5418
                    ;;
 
5419
                esac
 
5420
              done
 
5421
            fi
 
5422
          else
 
5423
            dnl Didn't find the library; assume it is in the system directories
 
5424
            dnl known to the linker and runtime loader. (All the system
 
5425
            dnl directories known to the linker should also be known to the
 
5426
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
5427
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
5428
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
5429
          fi
 
5430
        fi
 
5431
      fi
 
5432
    done
 
5433
  done
 
5434
  if test "X$rpathdirs" != "X"; then
 
5435
    if test -n "$hardcode_libdir_separator"; then
 
5436
      dnl Weird platform: only the last -rpath option counts, the user must
 
5437
      dnl pass all path elements in one option. We can arrange that for a
 
5438
      dnl single library, but not when more than one $LIBNAMEs are used.
 
5439
      alldirs=
 
5440
      for found_dir in $rpathdirs; do
 
5441
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
5442
      done
 
5443
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
5444
      acl_save_libdir="$libdir"
 
5445
      libdir="$alldirs"
 
5446
      eval flag=\"$hardcode_libdir_flag_spec\"
 
5447
      libdir="$acl_save_libdir"
 
5448
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
5449
    else
 
5450
      dnl The -rpath options are cumulative.
 
5451
      for found_dir in $rpathdirs; do
 
5452
        acl_save_libdir="$libdir"
 
5453
        libdir="$found_dir"
 
5454
        eval flag=\"$hardcode_libdir_flag_spec\"
 
5455
        libdir="$acl_save_libdir"
 
5456
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
5457
      done
 
5458
    fi
 
5459
  fi
 
5460
  if test "X$ltrpathdirs" != "X"; then
 
5461
    dnl When using libtool, the option that works for both libraries and
 
5462
    dnl executables is -R. The -R options are cumulative.
 
5463
    for found_dir in $ltrpathdirs; do
 
5464
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
5465
    done
 
5466
  fi
 
5467
])
 
5468
 
 
5469
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
5470
dnl unless already present in VAR.
 
5471
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
5472
dnl contains two or three consecutive elements that belong together.
 
5473
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
5474
[
 
5475
  for element in [$2]; do
 
5476
    haveit=
 
5477
    for x in $[$1]; do
 
5478
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
5479
      if test "X$x" = "X$element"; then
 
5480
        haveit=yes
 
5481
        break
 
5482
      fi
 
5483
    done
 
5484
    if test -z "$haveit"; then
 
5485
      [$1]="${[$1]}${[$1]:+ }$element"
 
5486
    fi
 
5487
  done
 
5488
])
 
5489
 
 
5490
# lib-ld.m4 serial 1 (gettext-0.11)
 
5491
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
 
5492
dnl This file is free software, distributed under the terms of the GNU
 
5493
dnl General Public License.  As a special exception to the GNU General
 
5494
dnl Public License, this file may be distributed as part of a program
 
5495
dnl that contains a configuration script generated by Autoconf, under
 
5496
dnl the same distribution terms as the rest of that program.
 
5497
 
 
5498
dnl Subroutines of libtool.m4,
 
5499
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
5500
dnl with libtool.m4.
 
5501
 
 
5502
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
5503
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
5504
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 
5505
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
5506
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 
5507
  acl_cv_prog_gnu_ld=yes
 
5508
else
 
5509
  acl_cv_prog_gnu_ld=no
 
5510
fi])
 
5511
with_gnu_ld=$acl_cv_prog_gnu_ld
 
5512
])
 
5513
 
 
5514
dnl From libtool-1.4. Sets the variable LD.
 
5515
AC_DEFUN([AC_LIB_PROG_LD],
 
5516
[AC_ARG_WITH(gnu-ld,
 
5517
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
5518
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
5519
AC_REQUIRE([AC_PROG_CC])dnl
 
5520
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5521
ac_prog=ld
 
5522
if test "$GCC" = yes; then
 
5523
  # Check if gcc -print-prog-name=ld gives a path.
 
5524
  AC_MSG_CHECKING([for ld used by GCC])
 
5525
  case $host in
 
5526
  *-*-mingw*)
 
5527
    # gcc leaves a trailing carriage return which upsets mingw
 
5528
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
5529
  *)
 
5530
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
5531
  esac
 
5532
  case $ac_prog in
 
5533
    # Accept absolute paths.
 
5534
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
5535
      [re_direlt='/[^/][^/]*/\.\./']
 
5536
      # Canonicalize the path of ld
 
5537
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
5538
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
5539
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
5540
      done
 
5541
      test -z "$LD" && LD="$ac_prog"
 
5542
      ;;
 
5543
  "")
 
5544
    # If it fails, then pretend we aren't using GCC.
 
5545
    ac_prog=ld
 
5546
    ;;
 
5547
  *)
 
5548
    # If it is relative, then search for the first ld in PATH.
 
5549
    with_gnu_ld=unknown
 
5550
    ;;
 
5551
  esac
 
5552
elif test "$with_gnu_ld" = yes; then
 
5553
  AC_MSG_CHECKING([for GNU ld])
 
5554
else
 
5555
  AC_MSG_CHECKING([for non-GNU ld])
 
5556
fi
 
5557
AC_CACHE_VAL(acl_cv_path_LD,
 
5558
[if test -z "$LD"; then
 
5559
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
5560
  for ac_dir in $PATH; do
 
5561
    test -z "$ac_dir" && ac_dir=.
 
5562
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
5563
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
5564
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
5565
      # but apparently some GNU ld's only accept -v.
 
5566
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
5567
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
5568
        test "$with_gnu_ld" != no && break
 
5569
      else
 
5570
        test "$with_gnu_ld" != yes && break
 
5571
      fi
 
5572
    fi
 
5573
  done
 
5574
  IFS="$ac_save_ifs"
 
5575
else
 
5576
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
5577
fi])
 
5578
LD="$acl_cv_path_LD"
 
5579
if test -n "$LD"; then
 
5580
  AC_MSG_RESULT($LD)
 
5581
else
 
5582
  AC_MSG_RESULT(no)
 
5583
fi
 
5584
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
5585
AC_LIB_PROG_LD_GNU
 
5586
])
 
5587
 
 
5588
# codeset.m4 serial AM1 (gettext-0.10.40)
 
5589
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
5590
dnl This file is free software, distributed under the terms of the GNU
 
5591
dnl General Public License.  As a special exception to the GNU General
 
5592
dnl Public License, this file may be distributed as part of a program
 
5593
dnl that contains a configuration script generated by Autoconf, under
 
5594
dnl the same distribution terms as the rest of that program.
 
5595
 
 
5596
dnl From Bruno Haible.
 
5597
 
 
5598
AC_DEFUN([AM_LANGINFO_CODESET],
 
5599
[
 
5600
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
 
5601
    [AC_TRY_LINK([#include <langinfo.h>],
 
5602
      [char* cs = nl_langinfo(CODESET);],
 
5603
      am_cv_langinfo_codeset=yes,
 
5604
      am_cv_langinfo_codeset=no)
 
5605
    ])
 
5606
  if test $am_cv_langinfo_codeset = yes; then
 
5607
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
 
5608
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 
5609
  fi
 
5610
])
 
5611
 
 
5612
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
5613
 
 
5614
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
5615
 
 
5616
# This program is free software; you can redistribute it and/or modify
 
5617
# it under the terms of the GNU General Public License as published by
 
5618
# the Free Software Foundation; either version 2, or (at your option)
 
5619
# any later version.
 
5620
 
 
5621
# This program is distributed in the hope that it will be useful,
 
5622
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
5623
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
5624
# GNU General Public License for more details.
 
5625
 
 
5626
# You should have received a copy of the GNU General Public License
 
5627
# along with this program; if not, write to the Free Software
 
5628
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
5629
# 02111-1307, USA.
 
5630
 
 
5631
AC_PREREQ([2.52])
 
5632
 
 
5633
# serial 6
 
5634
 
 
5635
# When config.status generates a header, we must update the stamp-h file.
 
5636
# This file resides in the same directory as the config header
 
5637
# that is generated.  We must strip everything past the first ":",
 
5638
# and everything past the last "/".
 
5639
 
 
5640
# _AM_DIRNAME(PATH)
 
5641
# -----------------
 
5642
# Like AS_DIRNAME, only do it during macro expansion
 
5643
AC_DEFUN([_AM_DIRNAME],
 
5644
       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
 
5645
              m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
 
5646
                    m4_if(regexp([$1], [^/.*]), -1,
 
5647
                          [.],
 
5648
                          patsubst([$1], [^\(/\).*], [\1])),
 
5649
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
 
5650
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
 
5651
])# _AM_DIRNAME
 
5652
 
 
5653
 
 
5654
# The stamp files are numbered to have different names.
 
5655
# We could number them on a directory basis, but that's additional
 
5656
# complications, let's have a unique counter.
 
5657
m4_define([_AM_STAMP_Count], [0])
 
5658
 
 
5659
 
 
5660
# _AM_STAMP(HEADER)
 
5661
# -----------------
 
5662
# The name of the stamp file for HEADER.
 
5663
AC_DEFUN([_AM_STAMP],
 
5664
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
 
5665
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
 
5666
                               [:.*])))/stamp-h[]_AM_STAMP_Count])
 
5667
 
 
5668
 
 
5669
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
 
5670
# ------------------------------------------------------------
 
5671
# We used to try to get a real timestamp in stamp-h.  But the fear is that
 
5672
# that will cause unnecessary cvs conflicts.
 
5673
AC_DEFUN([_AM_CONFIG_HEADER],
 
5674
[# Add the stamp file to the list of files AC keeps track of,
 
5675
# along with our hook.
 
5676
AC_CONFIG_HEADERS([$1],
 
5677
                  [# update the timestamp
 
5678
echo 'timestamp for $1' >"_AM_STAMP([$1])"
 
5679
$2],
 
5680
                  [$3])
 
5681
])# _AM_CONFIG_HEADER
 
5682
 
 
5683
 
 
5684
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
 
5685
# --------------------------------------------------------------
 
5686
AC_DEFUN([AM_CONFIG_HEADER],
 
5687
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
 
5688
])# AM_CONFIG_HEADER
 
5689