1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
16
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
18
# This program is free software; you can redistribute it and/or modify
19
# it under the terms of the GNU General Public License as published by
20
# the Free Software Foundation; either version 2, or (at your option)
23
# This program is distributed in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
# GNU General Public License for more details.
28
# You should have received a copy of the GNU General Public License
29
# along with this program; if not, write to the Free Software
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
37
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
38
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
40
# Do all the work for Automake. -*- Autoconf -*-
42
# This macro actually does too much some checks are only needed if
43
# your package does certain things. But this isn't really a big deal.
45
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
46
# Free Software Foundation, Inc.
48
# This program is free software; you can redistribute it and/or modify
49
# it under the terms of the GNU General Public License as published by
50
# the Free Software Foundation; either version 2, or (at your option)
53
# This program is distributed in the hope that it will be useful,
54
# but WITHOUT ANY WARRANTY; without even the implied warranty of
55
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56
# GNU General Public License for more details.
58
# You should have received a copy of the GNU General Public License
59
# along with this program; if not, write to the Free Software
60
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
67
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
68
# the ones we care about.
69
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
71
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
72
# AM_INIT_AUTOMAKE([OPTIONS])
73
# -----------------------------------------------
74
# The call with PACKAGE and VERSION arguments is the old style
75
# call (pre autoconf-2.50), which is being phased out. PACKAGE
76
# and VERSION should now be passed to AC_INIT and removed from
77
# the call to AM_INIT_AUTOMAKE.
78
# We support both call styles for the transition. After
79
# the next Automake release, Autoconf can make the AC_INIT
80
# arguments mandatory, and then we can depend on a new Autoconf
81
# release and drop the old call support.
1
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
# lib-prefix.m4 serial 4 (gettext-0.14.2)
14
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
15
dnl This file is free software; the Free Software Foundation
16
dnl gives unlimited permission to copy and/or distribute it,
17
dnl with or without modifications, as long as this notice is preserved.
19
dnl From Bruno Haible.
21
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
22
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
23
dnl require excessive bracketing.
24
ifdef([AC_HELP_STRING],
25
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
26
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
28
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
29
dnl to access previously installed libraries. The basic assumption is that
30
dnl a user will want packages to use other packages he previously installed
31
dnl with the same --prefix option.
32
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
33
dnl libraries, but is otherwise very convenient.
34
AC_DEFUN([AC_LIB_PREFIX],
36
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
37
AC_REQUIRE([AC_PROG_CC])
38
AC_REQUIRE([AC_CANONICAL_HOST])
39
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
40
dnl By default, look in $includedir and $libdir.
42
AC_LIB_WITH_FINAL_PREFIX([
43
eval additional_includedir=\"$includedir\"
44
eval additional_libdir=\"$libdir\"
46
AC_LIB_ARG_WITH([lib-prefix],
47
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
48
--without-lib-prefix don't search for libraries in includedir and libdir],
50
if test "X$withval" = "Xno"; then
53
if test "X$withval" = "X"; then
54
AC_LIB_WITH_FINAL_PREFIX([
55
eval additional_includedir=\"$includedir\"
56
eval additional_libdir=\"$libdir\"
59
additional_includedir="$withval/include"
60
additional_libdir="$withval/lib"
64
if test $use_additional = yes; then
65
dnl Potentially add $additional_includedir to $CPPFLAGS.
67
dnl 1. if it's the standard /usr/include,
68
dnl 2. if it's already present in $CPPFLAGS,
69
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
70
dnl 4. if it doesn't exist as a directory.
71
if test "X$additional_includedir" != "X/usr/include"; then
73
for x in $CPPFLAGS; do
74
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
75
if test "X$x" = "X-I$additional_includedir"; then
80
if test -z "$haveit"; then
81
if test "X$additional_includedir" = "X/usr/local/include"; then
82
if test -n "$GCC"; then
84
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
88
if test -z "$haveit"; then
89
if test -d "$additional_includedir"; then
90
dnl Really add $additional_includedir to $CPPFLAGS.
91
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
96
dnl Potentially add $additional_libdir to $LDFLAGS.
98
dnl 1. if it's the standard /usr/lib,
99
dnl 2. if it's already present in $LDFLAGS,
100
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
101
dnl 4. if it doesn't exist as a directory.
102
if test "X$additional_libdir" != "X/usr/lib"; then
104
for x in $LDFLAGS; do
105
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
106
if test "X$x" = "X-L$additional_libdir"; then
111
if test -z "$haveit"; then
112
if test "X$additional_libdir" = "X/usr/local/lib"; then
113
if test -n "$GCC"; then
119
if test -z "$haveit"; then
120
if test -d "$additional_libdir"; then
121
dnl Really add $additional_libdir to $LDFLAGS.
122
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
130
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
131
dnl acl_final_exec_prefix, containing the values to which $prefix and
132
dnl $exec_prefix will expand at the end of the configure script.
133
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
135
dnl Unfortunately, prefix and exec_prefix get only finally determined
136
dnl at the end of configure.
137
if test "X$prefix" = "XNONE"; then
138
acl_final_prefix="$ac_default_prefix"
140
acl_final_prefix="$prefix"
142
if test "X$exec_prefix" = "XNONE"; then
143
acl_final_exec_prefix='${prefix}'
145
acl_final_exec_prefix="$exec_prefix"
147
acl_save_prefix="$prefix"
148
prefix="$acl_final_prefix"
149
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
150
prefix="$acl_save_prefix"
153
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
154
dnl variables prefix and exec_prefix bound to the values they will have
155
dnl at the end of the configure script.
156
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
158
acl_save_prefix="$prefix"
159
prefix="$acl_final_prefix"
160
acl_save_exec_prefix="$exec_prefix"
161
exec_prefix="$acl_final_exec_prefix"
163
exec_prefix="$acl_save_exec_prefix"
164
prefix="$acl_save_prefix"
167
# lib-link.m4 serial 6 (gettext-0.14.3)
168
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
169
dnl This file is free software; the Free Software Foundation
170
dnl gives unlimited permission to copy and/or distribute it,
171
dnl with or without modifications, as long as this notice is preserved.
173
dnl From Bruno Haible.
177
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
178
dnl the libraries corresponding to explicit and implicit dependencies.
179
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
180
dnl augments the CPPFLAGS variable.
181
AC_DEFUN([AC_LIB_LINKFLAGS],
183
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
184
AC_REQUIRE([AC_LIB_RPATH])
185
define([Name],[translit([$1],[./-], [___])])
186
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
187
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
188
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
189
AC_LIB_LINKFLAGS_BODY([$1], [$2])
190
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
191
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
192
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
194
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
195
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
196
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
197
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
199
AC_SUBST([LTLIB]NAME)
200
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
201
dnl results of this search when this library appears as a dependency.
207
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
208
dnl searches for libname and the libraries corresponding to explicit and
209
dnl implicit dependencies, together with the specified include files and
210
dnl the ability to compile and link the specified testcode. If found, it
211
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
212
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
213
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
214
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
215
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
217
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
218
AC_REQUIRE([AC_LIB_RPATH])
219
define([Name],[translit([$1],[./-], [___])])
220
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
221
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
223
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
225
AC_LIB_LINKFLAGS_BODY([$1], [$2])
227
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
228
dnl because if the user has installed lib[]Name and not disabled its use
229
dnl via --without-lib[]Name-prefix, he wants to use it.
230
ac_save_CPPFLAGS="$CPPFLAGS"
231
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
233
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
235
LIBS="$LIBS $LIB[]NAME"
236
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
239
if test "$ac_cv_lib[]Name" = yes; then
241
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
242
AC_MSG_CHECKING([how to link with lib[]$1])
243
AC_MSG_RESULT([$LIB[]NAME])
246
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
247
dnl $INC[]NAME either.
248
CPPFLAGS="$ac_save_CPPFLAGS"
252
AC_SUBST([HAVE_LIB]NAME)
254
AC_SUBST([LTLIB]NAME)
259
dnl Determine the platform dependent parameters needed to use rpath:
260
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
261
dnl hardcode_direct, hardcode_minus_L.
262
AC_DEFUN([AC_LIB_RPATH],
264
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
265
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
266
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
267
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
268
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
269
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
270
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
271
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
272
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
278
libext="$acl_cv_libext"
279
shlibext="$acl_cv_shlibext"
280
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
281
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
282
hardcode_direct="$acl_cv_hardcode_direct"
283
hardcode_minus_L="$acl_cv_hardcode_minus_L"
284
dnl Determine whether the user wants rpath handling at all.
286
[ --disable-rpath do not hardcode runtime library paths],
290
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
291
dnl the libraries corresponding to explicit and implicit dependencies.
292
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
293
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
295
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
296
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
297
dnl By default, look in $includedir and $libdir.
299
AC_LIB_WITH_FINAL_PREFIX([
300
eval additional_includedir=\"$includedir\"
301
eval additional_libdir=\"$libdir\"
303
AC_LIB_ARG_WITH([lib$1-prefix],
304
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
305
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
307
if test "X$withval" = "Xno"; then
310
if test "X$withval" = "X"; then
311
AC_LIB_WITH_FINAL_PREFIX([
312
eval additional_includedir=\"$includedir\"
313
eval additional_libdir=\"$libdir\"
316
additional_includedir="$withval/include"
317
additional_libdir="$withval/lib"
321
dnl Search the library and its dependencies in $additional_libdir and
322
dnl $LDFLAGS. Using breadth-first-seach.
328
names_already_handled=
329
names_next_round='$1 $2'
330
while test -n "$names_next_round"; do
331
names_this_round="$names_next_round"
333
for name in $names_this_round; do
335
for n in $names_already_handled; do
336
if test "$n" = "$name"; then
341
if test -z "$already_handled"; then
342
names_already_handled="$names_already_handled $name"
343
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
344
dnl or AC_LIB_HAVE_LINKFLAGS call.
345
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
346
eval value=\"\$HAVE_LIB$uppername\"
347
if test -n "$value"; then
348
if test "$value" = yes; then
349
eval value=\"\$LIB$uppername\"
350
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
351
eval value=\"\$LTLIB$uppername\"
352
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
354
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
355
dnl that this library doesn't exist. So just drop it.
359
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
360
dnl and the already constructed $LIBNAME/$LTLIBNAME.
365
if test $use_additional = yes; then
366
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
367
found_dir="$additional_libdir"
368
found_so="$additional_libdir/lib$name.$shlibext"
369
if test -f "$additional_libdir/lib$name.la"; then
370
found_la="$additional_libdir/lib$name.la"
373
if test -f "$additional_libdir/lib$name.$libext"; then
374
found_dir="$additional_libdir"
375
found_a="$additional_libdir/lib$name.$libext"
376
if test -f "$additional_libdir/lib$name.la"; then
377
found_la="$additional_libdir/lib$name.la"
382
if test "X$found_dir" = "X"; then
383
for x in $LDFLAGS $LTLIB[]NAME; do
384
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
387
dir=`echo "X$x" | sed -e 's/^X-L//'`
388
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
390
found_so="$dir/lib$name.$shlibext"
391
if test -f "$dir/lib$name.la"; then
392
found_la="$dir/lib$name.la"
395
if test -f "$dir/lib$name.$libext"; then
397
found_a="$dir/lib$name.$libext"
398
if test -f "$dir/lib$name.la"; then
399
found_la="$dir/lib$name.la"
405
if test "X$found_dir" != "X"; then
410
if test "X$found_dir" != "X"; then
411
dnl Found the library.
412
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
413
if test "X$found_so" != "X"; then
414
dnl Linking with a shared library. We attempt to hardcode its
415
dnl directory into the executable's runpath, unless it's the
416
dnl standard /usr/lib.
417
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
418
dnl No hardcoding is needed.
419
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
421
dnl Use an explicit option to hardcode DIR into the resulting
423
dnl Potentially add DIR to ltrpathdirs.
424
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
426
for x in $ltrpathdirs; do
427
if test "X$x" = "X$found_dir"; then
432
if test -z "$haveit"; then
433
ltrpathdirs="$ltrpathdirs $found_dir"
435
dnl The hardcoding into $LIBNAME is system dependent.
436
if test "$hardcode_direct" = yes; then
437
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
438
dnl resulting binary.
439
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
441
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
442
dnl Use an explicit option to hardcode DIR into the resulting
444
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
445
dnl Potentially add DIR to rpathdirs.
446
dnl The rpathdirs will be appended to $LIBNAME at the end.
448
for x in $rpathdirs; do
449
if test "X$x" = "X$found_dir"; then
454
if test -z "$haveit"; then
455
rpathdirs="$rpathdirs $found_dir"
458
dnl Rely on "-L$found_dir".
459
dnl But don't add it if it's already contained in the LDFLAGS
460
dnl or the already constructed $LIBNAME
462
for x in $LDFLAGS $LIB[]NAME; do
463
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
464
if test "X$x" = "X-L$found_dir"; then
469
if test -z "$haveit"; then
470
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
472
if test "$hardcode_minus_L" != no; then
473
dnl FIXME: Not sure whether we should use
474
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
476
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
478
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
479
dnl here, because this doesn't fit in flags passed to the
480
dnl compiler. So give up. No hardcoding. This affects only
481
dnl very old systems.
482
dnl FIXME: Not sure whether we should use
483
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
485
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
491
if test "X$found_a" != "X"; then
492
dnl Linking with a static library.
493
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
495
dnl We shouldn't come here, but anyway it's good to have a
497
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
500
dnl Assume the include files are nearby.
501
additional_includedir=
504
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
505
additional_includedir="$basedir/include"
508
if test "X$additional_includedir" != "X"; then
509
dnl Potentially add $additional_includedir to $INCNAME.
511
dnl 1. if it's the standard /usr/include,
512
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
513
dnl 3. if it's already present in $CPPFLAGS or the already
514
dnl constructed $INCNAME,
515
dnl 4. if it doesn't exist as a directory.
516
if test "X$additional_includedir" != "X/usr/include"; then
518
if test "X$additional_includedir" = "X/usr/local/include"; then
519
if test -n "$GCC"; then
521
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
525
if test -z "$haveit"; then
526
for x in $CPPFLAGS $INC[]NAME; do
527
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
528
if test "X$x" = "X-I$additional_includedir"; then
533
if test -z "$haveit"; then
534
if test -d "$additional_includedir"; then
535
dnl Really add $additional_includedir to $INCNAME.
536
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
542
dnl Look for dependencies.
543
if test -n "$found_la"; then
544
dnl Read the .la file. It defines the variables
545
dnl dlname, library_names, old_library, dependency_libs, current,
546
dnl age, revision, installed, dlopen, dlpreopen, libdir.
547
save_libdir="$libdir"
549
*/* | *\\*) . "$found_la" ;;
550
*) . "./$found_la" ;;
552
libdir="$save_libdir"
553
dnl We use only dependency_libs.
554
for dep in $dependency_libs; do
557
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
558
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
560
dnl 1. if it's the standard /usr/lib,
561
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
562
dnl 3. if it's already present in $LDFLAGS or the already
563
dnl constructed $LIBNAME,
564
dnl 4. if it doesn't exist as a directory.
565
if test "X$additional_libdir" != "X/usr/lib"; then
567
if test "X$additional_libdir" = "X/usr/local/lib"; then
568
if test -n "$GCC"; then
570
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
574
if test -z "$haveit"; then
576
for x in $LDFLAGS $LIB[]NAME; do
577
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
578
if test "X$x" = "X-L$additional_libdir"; then
583
if test -z "$haveit"; then
584
if test -d "$additional_libdir"; then
585
dnl Really add $additional_libdir to $LIBNAME.
586
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
590
for x in $LDFLAGS $LTLIB[]NAME; do
591
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
592
if test "X$x" = "X-L$additional_libdir"; then
597
if test -z "$haveit"; then
598
if test -d "$additional_libdir"; then
599
dnl Really add $additional_libdir to $LTLIBNAME.
600
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
607
dir=`echo "X$dep" | sed -e 's/^X-R//'`
608
if test "$enable_rpath" != no; then
609
dnl Potentially add DIR to rpathdirs.
610
dnl The rpathdirs will be appended to $LIBNAME at the end.
612
for x in $rpathdirs; do
613
if test "X$x" = "X$dir"; then
618
if test -z "$haveit"; then
619
rpathdirs="$rpathdirs $dir"
621
dnl Potentially add DIR to ltrpathdirs.
622
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
624
for x in $ltrpathdirs; do
625
if test "X$x" = "X$dir"; then
630
if test -z "$haveit"; then
631
ltrpathdirs="$ltrpathdirs $dir"
636
dnl Handle this in the next round.
637
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
640
dnl Handle this in the next round. Throw away the .la's
641
dnl directory; it is already contained in a preceding -L
643
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
646
dnl Most likely an immediate library name.
647
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
648
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
654
dnl Didn't find the library; assume it is in the system directories
655
dnl known to the linker and runtime loader. (All the system
656
dnl directories known to the linker should also be known to the
657
dnl runtime loader, otherwise the system is severely misconfigured.)
658
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
659
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
665
if test "X$rpathdirs" != "X"; then
666
if test -n "$hardcode_libdir_separator"; then
667
dnl Weird platform: only the last -rpath option counts, the user must
668
dnl pass all path elements in one option. We can arrange that for a
669
dnl single library, but not when more than one $LIBNAMEs are used.
671
for found_dir in $rpathdirs; do
672
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
674
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
675
acl_save_libdir="$libdir"
677
eval flag=\"$hardcode_libdir_flag_spec\"
678
libdir="$acl_save_libdir"
679
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
681
dnl The -rpath options are cumulative.
682
for found_dir in $rpathdirs; do
683
acl_save_libdir="$libdir"
685
eval flag=\"$hardcode_libdir_flag_spec\"
686
libdir="$acl_save_libdir"
687
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
691
if test "X$ltrpathdirs" != "X"; then
692
dnl When using libtool, the option that works for both libraries and
693
dnl executables is -R. The -R options are cumulative.
694
for found_dir in $ltrpathdirs; do
695
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
700
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
701
dnl unless already present in VAR.
702
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
703
dnl contains two or three consecutive elements that belong together.
704
AC_DEFUN([AC_LIB_APPENDTOVAR],
706
for element in [$2]; do
709
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
710
if test "X$x" = "X$element"; then
715
if test -z "$haveit"; then
716
[$1]="${[$1]}${[$1]:+ }$element"
721
# lib-ld.m4 serial 3 (gettext-0.13)
722
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
723
dnl This file is free software; the Free Software Foundation
724
dnl gives unlimited permission to copy and/or distribute it,
725
dnl with or without modifications, as long as this notice is preserved.
727
dnl Subroutines of libtool.m4,
728
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
731
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
732
AC_DEFUN([AC_LIB_PROG_LD_GNU],
733
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
734
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
735
case `$LD -v 2>&1 </dev/null` in
736
*GNU* | *'with BFD'*)
737
acl_cv_prog_gnu_ld=yes ;;
739
acl_cv_prog_gnu_ld=no ;;
741
with_gnu_ld=$acl_cv_prog_gnu_ld
744
dnl From libtool-1.4. Sets the variable LD.
745
AC_DEFUN([AC_LIB_PROG_LD],
747
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
748
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
749
AC_REQUIRE([AC_PROG_CC])dnl
750
AC_REQUIRE([AC_CANONICAL_HOST])dnl
751
# Prepare PATH_SEPARATOR.
752
# The user is always right.
753
if test "${PATH_SEPARATOR+set}" != set; then
754
echo "#! /bin/sh" >conf$$.sh
755
echo "exit 0" >>conf$$.sh
757
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
765
if test "$GCC" = yes; then
766
# Check if gcc -print-prog-name=ld gives a path.
767
AC_MSG_CHECKING([for ld used by GCC])
770
# gcc leaves a trailing carriage return which upsets mingw
771
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
773
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
776
# Accept absolute paths.
777
[[\\/]* | [A-Za-z]:[\\/]*)]
778
[re_direlt='/[^/][^/]*/\.\./']
779
# Canonicalize the path of ld
780
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
781
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
782
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
784
test -z "$LD" && LD="$ac_prog"
787
# If it fails, then pretend we aren't using GCC.
791
# If it is relative, then search for the first ld in PATH.
795
elif test "$with_gnu_ld" = yes; then
796
AC_MSG_CHECKING([for GNU ld])
798
AC_MSG_CHECKING([for non-GNU ld])
800
AC_CACHE_VAL(acl_cv_path_LD,
801
[if test -z "$LD"; then
802
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
803
for ac_dir in $PATH; do
804
test -z "$ac_dir" && ac_dir=.
805
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
806
acl_cv_path_LD="$ac_dir/$ac_prog"
807
# Check to see if the program is GNU ld. I'd rather use --version,
808
# but apparently some GNU ld's only accept -v.
809
# Break only if it was the GNU/non-GNU ld that we prefer.
810
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
811
*GNU* | *'with BFD'*)
812
test "$with_gnu_ld" != no && break ;;
814
test "$with_gnu_ld" != yes && break ;;
820
acl_cv_path_LD="$LD" # Let the user override the test with a path.
823
if test -n "$LD"; then
828
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
832
# Like AC_CONFIG_HEADER, but automatically create stamp file.
834
AC_DEFUN([AM_CONFIG_HEADER],
836
AC_CONFIG_HEADER([$1])
837
dnl When config.status generates a header, we must update the stamp-h file.
838
dnl This file resides in the same directory as the config header
839
dnl that is generated. We must strip everything past the first ":",
840
dnl and everything past the last "/".
841
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
842
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
843
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
845
for am_file in <<$1>>; do
846
case " <<$>>CONFIG_HEADERS " in
847
*" <<$>>am_file "*<<)>>
848
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
851
am_indx=`expr "<<$>>am_indx" + 1`
855
# Do all the work for Automake. This macro actually does too much --
856
# some checks are only needed if your package does certain things.
857
# But this isn't really a big deal.
862
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
82
864
AC_DEFUN([AM_INIT_AUTOMAKE],
83
865
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
84
AC_REQUIRE([AC_PROG_INSTALL])dnl
85
# test to see if srcdir already configured
86
if test "`cd $srcdir && pwd`" != "`pwd`" &&
87
test -f $srcdir/config.status; then
866
AC_REQUIRE([AC_PROG_INSTALL])
871
dnl test to see if srcdir already configured
872
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
88
873
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
91
# test whether we have cygpath
92
if test -z "$CYGPATH_W"; then
93
if (cygpath --version) >/dev/null 2>/dev/null; then
94
CYGPATH_W='cygpath -w'
101
# Define the identity of the package.
102
dnl Distinguish between old-style and new-style calls.
104
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
105
AC_SUBST([PACKAGE], [$1])dnl
106
AC_SUBST([VERSION], [$2])],
107
[_AM_SET_OPTIONS([$1])dnl
108
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
109
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
111
_AM_IF_OPTION([no-define],,
112
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
113
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
115
# Some tools Automake needs.
116
AC_REQUIRE([AM_SANITY_CHECK])dnl
117
AC_REQUIRE([AC_ARG_PROGRAM])dnl
118
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
119
AM_MISSING_PROG(AUTOCONF, autoconf)
120
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
121
AM_MISSING_PROG(AUTOHEADER, autoheader)
122
AM_MISSING_PROG(MAKEINFO, makeinfo)
123
AM_MISSING_PROG(AMTAR, tar)
125
AM_PROG_INSTALL_STRIP
126
# We need awk for the "check" target. The system "awk" is bad on
128
AC_REQUIRE([AC_PROG_AWK])dnl
129
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
130
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
132
_AM_IF_OPTION([no-dependencies],,
133
[AC_PROVIDE_IFELSE([AC_PROG_CC],
134
[_AM_DEPENDENCIES(CC)],
135
[define([AC_PROG_CC],
136
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
137
AC_PROVIDE_IFELSE([AC_PROG_CXX],
138
[_AM_DEPENDENCIES(CXX)],
139
[define([AC_PROG_CXX],
140
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
145
# When config.status generates a header, we must update the stamp-h file.
146
# This file resides in the same directory as the config header
147
# that is generated. The stamp files are numbered to have different names.
149
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
150
# loop where config.status creates the headers, so we can generate
151
# our stamp files there.
152
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
153
[# Compute $1's index in $config_headers.
155
for _am_header in $config_headers :; do
160
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
163
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
876
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
877
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
878
AC_REQUIRE([AM_SANITY_CHECK])
879
AC_REQUIRE([AC_ARG_PROGRAM])
880
dnl FIXME This is truly gross.
881
missing_dir=`cd $ac_aux_dir && pwd`
882
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
883
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
884
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
885
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
886
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
887
AC_REQUIRE([AC_PROG_MAKE_SET])])
165
889
# Copyright 2002 Free Software Foundation, Inc.
297
955
AC_MSG_ERROR([newly created file is older than distributed files!
298
956
Check your system clock])
300
959
AC_MSG_RESULT(yes)])
305
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
307
# This program is free software; you can redistribute it and/or modify
308
# it under the terms of the GNU General Public License as published by
309
# the Free Software Foundation; either version 2, or (at your option)
312
# This program is distributed in the hope that it will be useful,
313
# but WITHOUT ANY WARRANTY; without even the implied warranty of
314
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
315
# GNU General Public License for more details.
317
# You should have received a copy of the GNU General Public License
318
# along with this program; if not, write to the Free Software
319
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
324
# AM_MISSING_PROG(NAME, PROGRAM)
325
# ------------------------------
961
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
962
dnl The program must properly implement --version.
326
963
AC_DEFUN([AM_MISSING_PROG],
327
[AC_REQUIRE([AM_MISSING_HAS_RUN])
328
$1=${$1-"${am_missing_run}$2"}
964
[AC_MSG_CHECKING(for working $2)
965
# Run test in a subshell; some versions of sh will print an error if
966
# an executable is not found, even if stderr is redirected.
967
# Redirect stdin to placate older versions of autoconf. Sigh.
968
if ($2 --version) < /dev/null > /dev/null 2>&1; then
973
AC_MSG_RESULT(missing)
334
# Define MISSING if not defined so far and test if it supports --run.
335
# If it does, set am_missing_run to use it, otherwise, to nothing.
336
AC_DEFUN([AM_MISSING_HAS_RUN],
337
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
338
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
339
# Use eval to expand $SHELL
340
if eval "$MISSING --run true"; then
341
am_missing_run="$MISSING --run "
344
AC_MSG_WARN([`missing' script is too old or missing])
350
# Copyright 2001 Free Software Foundation, Inc.
352
# This program is free software; you can redistribute it and/or modify
353
# it under the terms of the GNU General Public License as published by
354
# the Free Software Foundation; either version 2, or (at your option)
357
# This program is distributed in the hope that it will be useful,
358
# but WITHOUT ANY WARRANTY; without even the implied warranty of
359
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
360
# GNU General Public License for more details.
362
# You should have received a copy of the GNU General Public License
363
# along with this program; if not, write to the Free Software
364
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
367
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
368
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
369
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
371
# Of course, Automake must honor this variable whenever it calls a
372
# tool from the auxiliary directory. The problem is that $srcdir (and
373
# therefore $ac_aux_dir as well) can be either absolute or relative,
374
# depending on how configure is run. This is pretty annoying, since
375
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
376
# source directory, any form will work fine, but in subdirectories a
377
# relative path needs to be adjusted first.
379
# $ac_aux_dir/missing
380
# fails when called from a subdirectory if $ac_aux_dir is relative
381
# $top_srcdir/$ac_aux_dir/missing
382
# fails if $ac_aux_dir is absolute,
383
# fails when called from a subdirectory in a VPATH build with
384
# a relative $ac_aux_dir
386
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
387
# are both prefixed by $srcdir. In an in-source build this is usually
388
# harmless because $srcdir is `.', but things will broke when you
389
# start a VPATH build or use an absolute $srcdir.
391
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
392
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
393
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
394
# and then we would define $MISSING as
395
# MISSING="\${SHELL} $am_aux_dir/missing"
396
# This will work as long as MISSING is not called from configure, because
397
# unfortunately $(top_srcdir) has no meaning in configure.
398
# However there are other variables, like CC, which are often used in
399
# configure, and could therefore not use this "fixed" $ac_aux_dir.
401
# Another solution, used here, is to always expand $ac_aux_dir to an
402
# absolute PATH. The drawback is that using absolute paths prevent a
403
# configured tree to be moved without reconfiguration.
405
# Rely on autoconf to set up CDPATH properly.
408
AC_DEFUN([AM_AUX_DIR_EXPAND], [
409
# expand $ac_aux_dir to an absolute path
410
am_aux_dir=`cd $ac_aux_dir && pwd`
415
# Define $install_sh.
417
# Copyright 2001 Free Software Foundation, Inc.
419
# This program is free software; you can redistribute it and/or modify
420
# it under the terms of the GNU General Public License as published by
421
# the Free Software Foundation; either version 2, or (at your option)
424
# This program is distributed in the hope that it will be useful,
425
# but WITHOUT ANY WARRANTY; without even the implied warranty of
426
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
427
# GNU General Public License for more details.
429
# You should have received a copy of the GNU General Public License
430
# along with this program; if not, write to the Free Software
431
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
434
AC_DEFUN([AM_PROG_INSTALL_SH],
435
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
436
install_sh=${install_sh-"$am_aux_dir/install-sh"}
437
AC_SUBST(install_sh)])
439
# AM_PROG_INSTALL_STRIP
441
# Copyright 2001 Free Software Foundation, Inc.
443
# This program is free software; you can redistribute it and/or modify
444
# it under the terms of the GNU General Public License as published by
445
# the Free Software Foundation; either version 2, or (at your option)
448
# This program is distributed in the hope that it will be useful,
449
# but WITHOUT ANY WARRANTY; without even the implied warranty of
450
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
451
# GNU General Public License for more details.
453
# You should have received a copy of the GNU General Public License
454
# along with this program; if not, write to the Free Software
455
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
458
# One issue with vendor `install' (even GNU) is that you can't
459
# specify the program used to strip binaries. This is especially
460
# annoying in cross-compiling environments, where the build's strip
461
# is unlikely to handle the host's binaries.
462
# Fortunately install-sh will honor a STRIPPROG variable, so we
463
# always use install-sh in `make install-strip', and initialize
464
# STRIPPROG with the value of the STRIP variable (set by the user).
465
AC_DEFUN([AM_PROG_INSTALL_STRIP],
466
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
467
# Installed binaries are usually stripped using `strip' when the user
468
# run `make install-strip'. However `strip' might not be the right
469
# tool to use in cross-compilation environments, therefore Automake
470
# will honor the `STRIP' environment variable to overrule this program.
471
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
472
if test "$cross_compiling" != no; then
473
AC_CHECK_TOOL([STRIP], [strip], :)
475
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
476
AC_SUBST([INSTALL_STRIP_PROGRAM])])
479
# Copyright (C) 2003 Free Software Foundation, Inc.
481
# This program is free software; you can redistribute it and/or modify
482
# it under the terms of the GNU General Public License as published by
483
# the Free Software Foundation; either version 2, or (at your option)
486
# This program is distributed in the hope that it will be useful,
487
# but WITHOUT ANY WARRANTY; without even the implied warranty of
488
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
489
# GNU General Public License for more details.
491
# You should have received a copy of the GNU General Public License
492
# along with this program; if not, write to the Free Software
493
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
498
# Check whether the underlying file-system supports filenames
499
# with a leading dot. For instance MS-DOS doesn't.
500
AC_DEFUN([AM_SET_LEADING_DOT],
501
[rm -rf .tst 2>/dev/null
502
mkdir .tst 2>/dev/null
503
if test -d .tst; then
508
rmdir .tst 2>/dev/null
509
AC_SUBST([am__leading_dot])])
511
# serial 5 -*- Autoconf -*-
513
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
515
# This program is free software; you can redistribute it and/or modify
516
# it under the terms of the GNU General Public License as published by
517
# the Free Software Foundation; either version 2, or (at your option)
520
# This program is distributed in the hope that it will be useful,
521
# but WITHOUT ANY WARRANTY; without even the implied warranty of
522
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
523
# GNU General Public License for more details.
525
# You should have received a copy of the GNU General Public License
526
# along with this program; if not, write to the Free Software
527
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
531
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
532
# written in clear, in which case automake, when reading aclocal.m4,
533
# will think it sees a *use*, and therefore will trigger all it's
534
# C support machinery. Also note that it means that autoscan, seeing
535
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
539
# _AM_DEPENDENCIES(NAME)
540
# ----------------------
541
# See how the compiler implements dependency checking.
542
# NAME is "CC", "CXX", "GCJ", or "OBJC".
543
# We try a few techniques and use that to set a single cache variable.
545
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
546
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
547
# dependency, and given that the user is not expected to run this macro,
548
# just rely on AC_PROG_CC.
549
AC_DEFUN([_AM_DEPENDENCIES],
550
[AC_REQUIRE([AM_SET_DEPDIR])dnl
551
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
552
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
553
AC_REQUIRE([AM_DEP_TRACK])dnl
555
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
556
[$1], CXX, [depcc="$CXX" am_compiler_list=],
557
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
558
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
559
[depcc="$$1" am_compiler_list=])
561
AC_CACHE_CHECK([dependency style of $depcc],
562
[am_cv_$1_dependencies_compiler_type],
563
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
564
# We make a subdir and do the tests there. Otherwise we can end up
565
# making bogus files that we don't know about and never remove. For
566
# instance it was reported that on HP-UX the gcc test will end up
567
# making a dummy file named `D' -- because `-MD' means `put the output
570
# Copy depcomp to subdir because otherwise we won't find it if we're
571
# using a relative directory.
572
cp "$am_depcomp" conftest.dir
574
# We will build objects and dependencies in a subdirectory because
575
# it helps to detect inapplicable dependency modes. For instance
576
# both Tru64's cc and ICC support -MD to output dependencies as a
577
# side effect of compilation, but ICC will put the dependencies in
578
# the current directory while Tru64 will put them in the object
582
am_cv_$1_dependencies_compiler_type=none
583
if test "$am_compiler_list" = ""; then
584
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
586
for depmode in $am_compiler_list; do
587
# Setup a source with many dependencies, because some compilers
588
# like to wrap large dependency lists on column 80 (with \), and
589
# we should not choose a depcomp mode which is confused by this.
591
# We need to recreate these files for each test, as the compiler may
592
# overwrite some of them when testing with obscure command lines.
593
# This happens at least with the AIX C compiler.
595
for i in 1 2 3 4 5 6; do
596
echo '#include "conftst'$i'.h"' >> sub/conftest.c
599
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
603
# after this tag, mechanisms are not by side-effect, so they'll
604
# only be used when explicitly requested
605
if test "x$enable_dependency_tracking" = xyes; then
613
# We check with `-c' and `-o' for the sake of the "dashmstdout"
614
# mode. It turns out that the SunPro C++ compiler does not properly
615
# handle `-M -o', and we need to detect this.
616
if depmode=$depmode \
617
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
618
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
619
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
620
>/dev/null 2>conftest.err &&
621
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
622
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
623
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
624
# icc doesn't choke on unknown options, it will just issue warnings
625
# (even with -Werror). So we grep stderr for any message
626
# that says an option was ignored.
627
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
628
am_cv_$1_dependencies_compiler_type=$depmode
637
am_cv_$1_dependencies_compiler_type=none
640
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
641
AM_CONDITIONAL([am__fastdep$1], [
642
test "x$enable_dependency_tracking" != xno \
643
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
649
# Choose a directory name for dependency files.
650
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
651
AC_DEFUN([AM_SET_DEPDIR],
652
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
653
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
659
AC_DEFUN([AM_DEP_TRACK],
660
[AC_ARG_ENABLE(dependency-tracking,
661
[ --disable-dependency-tracking Speeds up one-time builds
662
--enable-dependency-tracking Do not reject slow dependency extractors])
663
if test "x$enable_dependency_tracking" != xno; then
664
am_depcomp="$ac_aux_dir/depcomp"
667
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
668
AC_SUBST([AMDEPBACKSLASH])
671
# Generate code to set up dependency tracking. -*- Autoconf -*-
673
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
675
# This program is free software; you can redistribute it and/or modify
676
# it under the terms of the GNU General Public License as published by
677
# the Free Software Foundation; either version 2, or (at your option)
680
# This program is distributed in the hope that it will be useful,
681
# but WITHOUT ANY WARRANTY; without even the implied warranty of
682
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
683
# GNU General Public License for more details.
685
# You should have received a copy of the GNU General Public License
686
# along with this program; if not, write to the Free Software
687
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
692
# _AM_OUTPUT_DEPENDENCY_COMMANDS
693
# ------------------------------
694
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
695
[for mf in $CONFIG_FILES; do
696
# Strip MF so we end up with the name of the file.
697
mf=`echo "$mf" | sed -e 's/:.*$//'`
698
# Check whether this is an Automake generated Makefile or not.
699
# We used to match only the files named `Makefile.in', but
700
# some people rename them; so instead we look at the file content.
701
# Grep'ing the first line is not enough: some people post-process
702
# each Makefile.in and add a new line on top of each file to say so.
703
# So let's grep whole file.
704
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
705
dirpart=`AS_DIRNAME("$mf")`
709
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
710
# Extract the definition of DEP_FILES from the Makefile without
712
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
713
test -z "$DEPDIR" && continue
714
# When using ansi2knr, U may be empty or an underscore; expand it
715
U=`sed -n -e '/^U = / s///p' < "$mf"`
716
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
717
# We invoke sed twice because it is the simplest approach to
718
# changing $(DEPDIR) to its actual value in the expansion.
719
for file in `sed -n -e '
720
/^DEP_FILES = .*\\\\$/ {
729
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
730
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
731
# Make sure the directory exists.
732
test -f "$dirpart/$file" && continue
733
fdir=`AS_DIRNAME(["$file"])`
734
AS_MKDIR_P([$dirpart/$fdir])
735
# echo "creating $dirpart/$file"
736
echo '# dummy' > "$dirpart/$file"
739
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
742
# AM_OUTPUT_DEPENDENCY_COMMANDS
743
# -----------------------------
744
# This macro should only be invoked once -- use via AC_REQUIRE.
746
# This code is only required when automatic dependency tracking
747
# is enabled. FIXME. This creates each `.P' file that we will
748
# need in order to bootstrap the dependency handling code.
749
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
750
[AC_CONFIG_COMMANDS([depfiles],
751
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
752
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
755
# Check to see how 'make' treats includes. -*- Autoconf -*-
757
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
759
# This program is free software; you can redistribute it and/or modify
760
# it under the terms of the GNU General Public License as published by
761
# the Free Software Foundation; either version 2, or (at your option)
764
# This program is distributed in the hope that it will be useful,
765
# but WITHOUT ANY WARRANTY; without even the implied warranty of
766
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
767
# GNU General Public License for more details.
769
# You should have received a copy of the GNU General Public License
770
# along with this program; if not, write to the Free Software
771
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
778
# Check to see how make treats includes.
779
AC_DEFUN([AM_MAKE_INCLUDE],
780
[am_make=${MAKE-make}
781
cat > confinc << 'END'
786
# If we don't find an include directive, just comment out the code.
787
AC_MSG_CHECKING([for style of include used by $am_make])
791
# First try GNU make style include.
792
echo "include confinc" > confmf
793
# We grep out `Entering directory' and `Leaving directory'
794
# messages which can occur if `w' ends up in MAKEFLAGS.
795
# In particular we don't look at `^make:' because GNU make might
796
# be invoked under some other name (usually "gmake"), in which
797
# case it prints its new name instead of `make'.
798
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
803
# Now try BSD make style include.
804
if test "$am__include" = "#"; then
805
echo '.include "confinc"' > confmf
806
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
812
AC_SUBST([am__include])
813
AC_SUBST([am__quote])
814
AC_MSG_RESULT([$_am_result])
818
# AM_CONDITIONAL -*- Autoconf -*-
820
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
822
# This program is free software; you can redistribute it and/or modify
823
# it under the terms of the GNU General Public License as published by
824
# the Free Software Foundation; either version 2, or (at your option)
827
# This program is distributed in the hope that it will be useful,
828
# but WITHOUT ANY WARRANTY; without even the implied warranty of
829
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
830
# GNU General Public License for more details.
832
# You should have received a copy of the GNU General Public License
833
# along with this program; if not, write to the Free Software
834
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
841
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
842
# -------------------------------------
843
# Define a conditional.
844
AC_DEFUN([AM_CONDITIONAL],
845
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
846
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
856
AC_CONFIG_COMMANDS_PRE(
857
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
858
AC_MSG_ERROR([conditional "$1" was never defined.
859
Usually this means the macro was only invoked conditionally.])
862
977
# Add --enable-maintainer-mode option to configure.
863
978
# From Jim Meyering
865
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
867
# This program is free software; you can redistribute it and/or modify
868
# it under the terms of the GNU General Public License as published by
869
# the Free Software Foundation; either version 2, or (at your option)
872
# This program is distributed in the hope that it will be useful,
873
# but WITHOUT ANY WARRANTY; without even the implied warranty of
874
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
875
# GNU General Public License for more details.
877
# You should have received a copy of the GNU General Public License
878
# along with this program; if not, write to the Free Software
879
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
884
982
AC_DEFUN([AM_MAINTAINER_MODE],
885
983
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])