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 3 (gettext-0.13)
14
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
15
dnl This file is free software, distributed under the terms of the GNU
16
dnl General Public License. As a special exception to the GNU General
17
dnl Public License, this file may be distributed as part of a program
18
dnl that contains a configuration script generated by Autoconf, under
19
dnl the same distribution terms as the rest of that program.
21
dnl From Bruno Haible.
23
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
24
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
25
dnl require excessive bracketing.
26
ifdef([AC_HELP_STRING],
27
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
28
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
30
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
31
dnl to access previously installed libraries. The basic assumption is that
32
dnl a user will want packages to use other packages he previously installed
33
dnl with the same --prefix option.
34
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
35
dnl libraries, but is otherwise very convenient.
36
AC_DEFUN([AC_LIB_PREFIX],
38
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
39
AC_REQUIRE([AC_PROG_CC])
40
AC_REQUIRE([AC_CANONICAL_HOST])
41
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
42
dnl By default, look in $includedir and $libdir.
44
AC_LIB_WITH_FINAL_PREFIX([
45
eval additional_includedir=\"$includedir\"
46
eval additional_libdir=\"$libdir\"
48
AC_LIB_ARG_WITH([lib-prefix],
49
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
50
--without-lib-prefix don't search for libraries in includedir and libdir],
52
if test "X$withval" = "Xno"; then
55
if test "X$withval" = "X"; then
56
AC_LIB_WITH_FINAL_PREFIX([
57
eval additional_includedir=\"$includedir\"
58
eval additional_libdir=\"$libdir\"
61
additional_includedir="$withval/include"
62
additional_libdir="$withval/lib"
66
if test $use_additional = yes; then
67
dnl Potentially add $additional_includedir to $CPPFLAGS.
69
dnl 1. if it's the standard /usr/include,
70
dnl 2. if it's already present in $CPPFLAGS,
71
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
72
dnl 4. if it doesn't exist as a directory.
73
if test "X$additional_includedir" != "X/usr/include"; then
75
for x in $CPPFLAGS; do
76
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
77
if test "X$x" = "X-I$additional_includedir"; then
82
if test -z "$haveit"; then
83
if test "X$additional_includedir" = "X/usr/local/include"; then
84
if test -n "$GCC"; then
90
if test -z "$haveit"; then
91
if test -d "$additional_includedir"; then
92
dnl Really add $additional_includedir to $CPPFLAGS.
93
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
98
dnl Potentially add $additional_libdir to $LDFLAGS.
100
dnl 1. if it's the standard /usr/lib,
101
dnl 2. if it's already present in $LDFLAGS,
102
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
103
dnl 4. if it doesn't exist as a directory.
104
if test "X$additional_libdir" != "X/usr/lib"; then
106
for x in $LDFLAGS; do
107
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
108
if test "X$x" = "X-L$additional_libdir"; then
113
if test -z "$haveit"; then
114
if test "X$additional_libdir" = "X/usr/local/lib"; then
115
if test -n "$GCC"; then
121
if test -z "$haveit"; then
122
if test -d "$additional_libdir"; then
123
dnl Really add $additional_libdir to $LDFLAGS.
124
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
132
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
133
dnl acl_final_exec_prefix, containing the values to which $prefix and
134
dnl $exec_prefix will expand at the end of the configure script.
135
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
137
dnl Unfortunately, prefix and exec_prefix get only finally determined
138
dnl at the end of configure.
139
if test "X$prefix" = "XNONE"; then
140
acl_final_prefix="$ac_default_prefix"
142
acl_final_prefix="$prefix"
144
if test "X$exec_prefix" = "XNONE"; then
145
acl_final_exec_prefix='${prefix}'
147
acl_final_exec_prefix="$exec_prefix"
149
acl_save_prefix="$prefix"
150
prefix="$acl_final_prefix"
151
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
152
prefix="$acl_save_prefix"
155
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
156
dnl variables prefix and exec_prefix bound to the values they will have
157
dnl at the end of the configure script.
158
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
160
acl_save_prefix="$prefix"
161
prefix="$acl_final_prefix"
162
acl_save_exec_prefix="$exec_prefix"
163
exec_prefix="$acl_final_exec_prefix"
165
exec_prefix="$acl_save_exec_prefix"
166
prefix="$acl_save_prefix"
169
# lib-link.m4 serial 4 (gettext-0.12)
170
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
171
dnl This file is free software, distributed under the terms of the GNU
172
dnl General Public License. As a special exception to the GNU General
173
dnl Public License, this file may be distributed as part of a program
174
dnl that contains a configuration script generated by Autoconf, under
175
dnl the same distribution terms as the rest of that program.
177
dnl From Bruno Haible.
179
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
180
dnl the libraries corresponding to explicit and implicit dependencies.
181
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
182
dnl augments the CPPFLAGS variable.
183
AC_DEFUN([AC_LIB_LINKFLAGS],
185
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
186
AC_REQUIRE([AC_LIB_RPATH])
187
define([Name],[translit([$1],[./-], [___])])
188
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
189
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
190
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
191
AC_LIB_LINKFLAGS_BODY([$1], [$2])
192
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
193
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
194
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
196
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
197
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
198
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
199
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
201
AC_SUBST([LTLIB]NAME)
202
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
203
dnl results of this search when this library appears as a dependency.
209
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
210
dnl searches for libname and the libraries corresponding to explicit and
211
dnl implicit dependencies, together with the specified include files and
212
dnl the ability to compile and link the specified testcode. If found, it
213
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
214
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
215
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
216
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
217
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
219
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
220
AC_REQUIRE([AC_LIB_RPATH])
221
define([Name],[translit([$1],[./-], [___])])
222
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
223
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
225
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
227
AC_LIB_LINKFLAGS_BODY([$1], [$2])
229
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
230
dnl because if the user has installed lib[]Name and not disabled its use
231
dnl via --without-lib[]Name-prefix, he wants to use it.
232
ac_save_CPPFLAGS="$CPPFLAGS"
233
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
235
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
237
LIBS="$LIBS $LIB[]NAME"
238
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
241
if test "$ac_cv_lib[]Name" = yes; then
243
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
244
AC_MSG_CHECKING([how to link with lib[]$1])
245
AC_MSG_RESULT([$LIB[]NAME])
248
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
249
dnl $INC[]NAME either.
250
CPPFLAGS="$ac_save_CPPFLAGS"
254
AC_SUBST([HAVE_LIB]NAME)
256
AC_SUBST([LTLIB]NAME)
261
dnl Determine the platform dependent parameters needed to use rpath:
262
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
263
dnl hardcode_direct, hardcode_minus_L.
264
AC_DEFUN([AC_LIB_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
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
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, distributed under the terms of the GNU
724
dnl General Public License. As a special exception to the GNU General
725
dnl Public License, this file may be distributed as part of a program
726
dnl that contains a configuration script generated by Autoconf, under
727
dnl the same distribution terms as the rest of that program.
729
dnl Subroutines of libtool.m4,
730
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
733
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
734
AC_DEFUN([AC_LIB_PROG_LD_GNU],
735
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
736
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
737
case `$LD -v 2>&1 </dev/null` in
738
*GNU* | *'with BFD'*)
739
acl_cv_prog_gnu_ld=yes ;;
741
acl_cv_prog_gnu_ld=no ;;
743
with_gnu_ld=$acl_cv_prog_gnu_ld
746
dnl From libtool-1.4. Sets the variable LD.
747
AC_DEFUN([AC_LIB_PROG_LD],
749
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
750
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
751
AC_REQUIRE([AC_PROG_CC])dnl
752
AC_REQUIRE([AC_CANONICAL_HOST])dnl
753
# Prepare PATH_SEPARATOR.
754
# The user is always right.
755
if test "${PATH_SEPARATOR+set}" != set; then
756
echo "#! /bin/sh" >conf$$.sh
757
echo "exit 0" >>conf$$.sh
759
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
767
if test "$GCC" = yes; then
768
# Check if gcc -print-prog-name=ld gives a path.
769
AC_MSG_CHECKING([for ld used by GCC])
772
# gcc leaves a trailing carriage return which upsets mingw
773
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
775
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
778
# Accept absolute paths.
779
[[\\/]* | [A-Za-z]:[\\/]*)]
780
[re_direlt='/[^/][^/]*/\.\./']
781
# Canonicalize the path of ld
782
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
783
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
784
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
786
test -z "$LD" && LD="$ac_prog"
789
# If it fails, then pretend we aren't using GCC.
793
# If it is relative, then search for the first ld in PATH.
797
elif test "$with_gnu_ld" = yes; then
798
AC_MSG_CHECKING([for GNU ld])
800
AC_MSG_CHECKING([for non-GNU ld])
802
AC_CACHE_VAL(acl_cv_path_LD,
803
[if test -z "$LD"; then
804
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
805
for ac_dir in $PATH; do
806
test -z "$ac_dir" && ac_dir=.
807
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
808
acl_cv_path_LD="$ac_dir/$ac_prog"
809
# Check to see if the program is GNU ld. I'd rather use --version,
810
# but apparently some GNU ld's only accept -v.
811
# Break only if it was the GNU/non-GNU ld that we prefer.
812
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
813
*GNU* | *'with BFD'*)
814
test "$with_gnu_ld" != no && break ;;
816
test "$with_gnu_ld" != yes && break ;;
822
acl_cv_path_LD="$LD" # Let the user override the test with a path.
825
if test -n "$LD"; then
830
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
834
# Do all the work for Automake. This macro actually does too much --
835
# some checks are only needed if your package does certain things.
836
# But this isn't really a big deal.
841
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
843
AC_DEFUN([AM_INIT_AUTOMAKE],
844
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
845
AC_REQUIRE([AC_PROG_INSTALL])
850
dnl test to see if srcdir already configured
851
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
852
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
855
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
856
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
857
AC_REQUIRE([AM_SANITY_CHECK])
858
AC_REQUIRE([AC_ARG_PROGRAM])
859
dnl FIXME This is truly gross.
860
missing_dir=`cd $ac_aux_dir && pwd`
861
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
862
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
863
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
864
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
865
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
866
AC_REQUIRE([AC_PROG_MAKE_SET])])
868
# Copyright 2002 Free Software Foundation, Inc.
870
# This program is free software; you can redistribute it and/or modify
871
# it under the terms of the GNU General Public License as published by
872
# the Free Software Foundation; either version 2, or (at your option)
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005 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.
875
9
# This program is distributed in the hope that it will be useful,
876
# but WITHOUT ANY WARRANTY; without even the implied warranty of
877
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
878
# GNU General Public License for more details.
880
# You should have received a copy of the GNU General Public License
881
# along with this program; if not, write to the Free Software
882
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
884
# AM_AUTOMAKE_VERSION(VERSION)
885
# ----------------------------
886
# Automake X.Y traces this macro to ensure aclocal.m4 has been
887
# generated from the m4 files accompanying Automake X.Y.
888
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
890
# AM_SET_CURRENT_AUTOMAKE_VERSION
891
# -------------------------------
892
# Call AM_AUTOMAKE_VERSION so it can be traced.
893
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
894
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
895
[AM_AUTOMAKE_VERSION([1.4-p6])])
898
# Check to make sure that the build environment is sane.
901
AC_DEFUN([AM_SANITY_CHECK],
902
[AC_MSG_CHECKING([whether build environment is sane])
905
echo timestamp > conftestfile
906
# Do `set' in a subshell so we don't clobber the current shell's
907
# arguments. Must try -L first in case configure is actually a
908
# symlink; some systems play weird games with the mod time of symlinks
909
# (eg FreeBSD returns the mod time of the symlink's containing
912
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913
if test "[$]*" = "X"; then
915
set X `ls -t $srcdir/configure conftestfile`
917
if test "[$]*" != "X $srcdir/configure conftestfile" \
918
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
920
# If neither matched, then we have a broken ls. This can happen
921
# if, for instance, CONFIG_SHELL is bash and it inherits a
922
# broken ls alias from the environment. This has actually
923
# happened. Such a system could not be considered "sane".
924
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
925
alias in your environment])
928
test "[$]2" = conftestfile
934
AC_MSG_ERROR([newly created file is older than distributed files!
935
Check your system clock])
940
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
941
dnl The program must properly implement --version.
942
AC_DEFUN([AM_MISSING_PROG],
943
[AC_MSG_CHECKING(for working $2)
944
# Run test in a subshell; some versions of sh will print an error if
945
# an executable is not found, even if stderr is redirected.
946
# Redirect stdin to placate older versions of autoconf. Sigh.
947
if ($2 --version) < /dev/null > /dev/null 2>&1; then
952
AC_MSG_RESULT(missing)
956
# Like AC_CONFIG_HEADER, but automatically create stamp file.
958
AC_DEFUN([AM_CONFIG_HEADER],
960
AC_CONFIG_HEADER([$1])
961
dnl When config.status generates a header, we must update the stamp-h file.
962
dnl This file resides in the same directory as the config header
963
dnl that is generated. We must strip everything past the first ":",
964
dnl and everything past the last "/".
965
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
966
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
967
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
969
for am_file in <<$1>>; do
970
case " <<$>>CONFIG_HEADERS " in
971
*" <<$>>am_file "*<<)>>
972
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
975
am_indx=`expr "<<$>>am_indx" + 1`
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
979
14
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
981
16
# serial 47 AC_PROG_LIBTOOL
985
19
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
6890
6191
SED=$lt_cv_path_SED
6892
6192
AC_MSG_RESULT([$SED])
6896
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
6897
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
6898
dnl also defines GSTUFF_PKG_ERRORS on error
6899
AC_DEFUN(PKG_CHECK_MODULES, [
6902
if test -z "$PKG_CONFIG"; then
6903
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
6906
if test "$PKG_CONFIG" = "no" ; then
6907
echo "*** The pkg-config script could not be found. Make sure it is"
6908
echo "*** in your path, or set the PKG_CONFIG environment variable"
6909
echo "*** to the full path to pkg-config."
6910
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
6912
PKG_CONFIG_MIN_VERSION=0.9.0
6913
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6914
AC_MSG_CHECKING(for $2)
6916
if $PKG_CONFIG --exists "$2" ; then
6920
AC_MSG_CHECKING($1_CFLAGS)
6921
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
6922
AC_MSG_RESULT($$1_CFLAGS)
6924
AC_MSG_CHECKING($1_LIBS)
6925
$1_LIBS=`$PKG_CONFIG --libs "$2"`
6926
AC_MSG_RESULT($$1_LIBS)
6930
## If we have a custom action on failure, don't print errors, but
6931
## do set a variable so people can do so.
6932
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6933
ifelse([$4], ,echo $$1_PKG_ERRORS,)
6195
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
6197
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6199
# This program is free software; you can redistribute it and/or modify
6200
# it under the terms of the GNU General Public License as published by
6201
# the Free Software Foundation; either version 2 of the License, or
6202
# (at your option) any later version.
6204
# This program is distributed in the hope that it will be useful, but
6205
# WITHOUT ANY WARRANTY; without even the implied warranty of
6206
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6207
# General Public License for more details.
6209
# You should have received a copy of the GNU General Public License
6210
# along with this program; if not, write to the Free Software
6211
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6213
# As a special exception to the GNU General Public License, if you
6214
# distribute this file as part of a program that contains a
6215
# configuration script generated by Autoconf, you may include it under
6216
# the same distribution terms that you use for the rest of that program.
6218
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6219
# ----------------------------------
6220
AC_DEFUN([PKG_PROG_PKG_CONFIG],
6221
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6222
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6223
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6224
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6225
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6227
if test -n "$PKG_CONFIG"; then
6228
_pkg_min_version=m4_default([$1], [0.9.0])
6229
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6230
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6231
AC_MSG_RESULT([yes])
6238
])# PKG_PROG_PKG_CONFIG
6240
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6242
# Check to see whether a particular set of modules exists. Similar
6243
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6246
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6247
# this or PKG_CHECK_MODULES is called, or make sure to call
6248
# PKG_CHECK_EXISTS manually
6249
# --------------------------------------------------------------
6250
AC_DEFUN([PKG_CHECK_EXISTS],
6251
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6252
if test -n "$PKG_CONFIG" && \
6253
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6254
m4_ifval([$2], [$2], [:])
6255
m4_ifvaln([$3], [else
6260
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6261
# ---------------------------------------------
6262
m4_define([_PKG_CONFIG],
6263
[if test -n "$PKG_CONFIG"; then
6264
if test -n "$$1"; then
6267
PKG_CHECK_EXISTS([$3],
6268
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6276
# _PKG_SHORT_ERRORS_SUPPORTED
6277
# -----------------------------
6278
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6279
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6280
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6281
_pkg_short_errors_supported=yes
6283
_pkg_short_errors_supported=no
6285
])# _PKG_SHORT_ERRORS_SUPPORTED
6288
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6289
# [ACTION-IF-NOT-FOUND])
6292
# Note that if there is a possibility the first call to
6293
# PKG_CHECK_MODULES might not happen, you should be sure to include an
6294
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6297
# --------------------------------------------------------------
6298
AC_DEFUN([PKG_CHECK_MODULES],
6299
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6300
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6301
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6304
AC_MSG_CHECKING([for $1])
6306
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6307
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6309
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6310
and $1[]_LIBS to avoid the need to call pkg-config.
6311
See the pkg-config man page for more details.])
6313
if test $pkg_failed = yes; then
6314
_PKG_SHORT_ERRORS_SUPPORTED
6315
if test $_pkg_short_errors_supported = yes; then
6316
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6318
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6939
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6940
echo "*** See http://www.freedesktop.org/software/pkgconfig"
6944
if test $succeeded = yes; then
6945
ifelse([$3], , :, [$3])
6947
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
6320
# Put the nasty error message in config.log where it belongs
6321
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6323
ifelse([$4], , [AC_MSG_ERROR(dnl
6324
[Package requirements ($2) were not met:
6328
Consider adjusting the PKG_CONFIG_PATH environment variable if you
6329
installed software in a non-standard prefix.
6334
elif test $pkg_failed = untried; then
6335
ifelse([$4], , [AC_MSG_FAILURE(dnl
6336
[The pkg-config script could not be found or is too old. Make sure it
6337
is in your PATH or set the PKG_CONFIG environment variable to the full
6342
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6345
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6346
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6347
AC_MSG_RESULT([yes])
6348
ifelse([$3], , :, [$3])
6350
])# PKG_CHECK_MODULES
6352
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
6354
# This file is free software; the Free Software Foundation
6355
# gives unlimited permission to copy and/or distribute it,
6356
# with or without modifications, as long as this notice is preserved.
6358
# AM_AUTOMAKE_VERSION(VERSION)
6359
# ----------------------------
6360
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6361
# generated from the m4 files accompanying Automake X.Y.
6362
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6364
# AM_SET_CURRENT_AUTOMAKE_VERSION
6365
# -------------------------------
6366
# Call AM_AUTOMAKE_VERSION so it can be traced.
6367
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6368
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6369
[AM_AUTOMAKE_VERSION([1.9.6])])
6371
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
6373
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6375
# This file is free software; the Free Software Foundation
6376
# gives unlimited permission to copy and/or distribute it,
6377
# with or without modifications, as long as this notice is preserved.
6379
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6380
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6381
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6383
# Of course, Automake must honor this variable whenever it calls a
6384
# tool from the auxiliary directory. The problem is that $srcdir (and
6385
# therefore $ac_aux_dir as well) can be either absolute or relative,
6386
# depending on how configure is run. This is pretty annoying, since
6387
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6388
# source directory, any form will work fine, but in subdirectories a
6389
# relative path needs to be adjusted first.
6391
# $ac_aux_dir/missing
6392
# fails when called from a subdirectory if $ac_aux_dir is relative
6393
# $top_srcdir/$ac_aux_dir/missing
6394
# fails if $ac_aux_dir is absolute,
6395
# fails when called from a subdirectory in a VPATH build with
6396
# a relative $ac_aux_dir
6398
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6399
# are both prefixed by $srcdir. In an in-source build this is usually
6400
# harmless because $srcdir is `.', but things will broke when you
6401
# start a VPATH build or use an absolute $srcdir.
6403
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6404
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6405
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6406
# and then we would define $MISSING as
6407
# MISSING="\${SHELL} $am_aux_dir/missing"
6408
# This will work as long as MISSING is not called from configure, because
6409
# unfortunately $(top_srcdir) has no meaning in configure.
6410
# However there are other variables, like CC, which are often used in
6411
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6413
# Another solution, used here, is to always expand $ac_aux_dir to an
6414
# absolute PATH. The drawback is that using absolute paths prevent a
6415
# configured tree to be moved without reconfiguration.
6417
AC_DEFUN([AM_AUX_DIR_EXPAND],
6418
[dnl Rely on autoconf to set up CDPATH properly.
6419
AC_PREREQ([2.50])dnl
6420
# expand $ac_aux_dir to an absolute path
6421
am_aux_dir=`cd $ac_aux_dir && pwd`
6424
# AM_CONDITIONAL -*- Autoconf -*-
6426
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6427
# Free Software Foundation, Inc.
6429
# This file is free software; the Free Software Foundation
6430
# gives unlimited permission to copy and/or distribute it,
6431
# with or without modifications, as long as this notice is preserved.
6435
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6436
# -------------------------------------
6953
6437
# Define a conditional.
6955
6438
AC_DEFUN([AM_CONDITIONAL],
6440
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6441
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6443
AC_SUBST([$1_FALSE])
6451
AC_CONFIG_COMMANDS_PRE(
6452
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6453
AC_MSG_ERROR([[conditional "$1" was never defined.
6454
Usually this means the macro was only invoked conditionally.]])
6458
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6459
# Free Software Foundation, Inc.
6461
# This file is free software; the Free Software Foundation
6462
# gives unlimited permission to copy and/or distribute it,
6463
# with or without modifications, as long as this notice is preserved.
6467
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6468
# written in clear, in which case automake, when reading aclocal.m4,
6469
# will think it sees a *use*, and therefore will trigger all it's
6470
# C support machinery. Also note that it means that autoscan, seeing
6471
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6474
# _AM_DEPENDENCIES(NAME)
6475
# ----------------------
6476
# See how the compiler implements dependency checking.
6477
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6478
# We try a few techniques and use that to set a single cache variable.
6480
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6481
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6482
# dependency, and given that the user is not expected to run this macro,
6483
# just rely on AC_PROG_CC.
6484
AC_DEFUN([_AM_DEPENDENCIES],
6485
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6486
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6487
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6488
AC_REQUIRE([AM_DEP_TRACK])dnl
6490
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6491
[$1], CXX, [depcc="$CXX" am_compiler_list=],
6492
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6493
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6494
[depcc="$$1" am_compiler_list=])
6496
AC_CACHE_CHECK([dependency style of $depcc],
6497
[am_cv_$1_dependencies_compiler_type],
6498
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6499
# We make a subdir and do the tests there. Otherwise we can end up
6500
# making bogus files that we don't know about and never remove. For
6501
# instance it was reported that on HP-UX the gcc test will end up
6502
# making a dummy file named `D' -- because `-MD' means `put the output
6505
# Copy depcomp to subdir because otherwise we won't find it if we're
6506
# using a relative directory.
6507
cp "$am_depcomp" conftest.dir
6509
# We will build objects and dependencies in a subdirectory because
6510
# it helps to detect inapplicable dependency modes. For instance
6511
# both Tru64's cc and ICC support -MD to output dependencies as a
6512
# side effect of compilation, but ICC will put the dependencies in
6513
# the current directory while Tru64 will put them in the object
6517
am_cv_$1_dependencies_compiler_type=none
6518
if test "$am_compiler_list" = ""; then
6519
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6521
for depmode in $am_compiler_list; do
6522
# Setup a source with many dependencies, because some compilers
6523
# like to wrap large dependency lists on column 80 (with \), and
6524
# we should not choose a depcomp mode which is confused by this.
6526
# We need to recreate these files for each test, as the compiler may
6527
# overwrite some of them when testing with obscure command lines.
6528
# This happens at least with the AIX C compiler.
6530
for i in 1 2 3 4 5 6; do
6531
echo '#include "conftst'$i'.h"' >> sub/conftest.c
6532
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6533
# Solaris 8's {/usr,}/bin/sh.
6534
touch sub/conftst$i.h
6536
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6540
# after this tag, mechanisms are not by side-effect, so they'll
6541
# only be used when explicitly requested
6542
if test "x$enable_dependency_tracking" = xyes; then
6550
# We check with `-c' and `-o' for the sake of the "dashmstdout"
6551
# mode. It turns out that the SunPro C++ compiler does not properly
6552
# handle `-M -o', and we need to detect this.
6553
if depmode=$depmode \
6554
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6555
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6556
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6557
>/dev/null 2>conftest.err &&
6558
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6559
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6560
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6561
# icc doesn't choke on unknown options, it will just issue warnings
6562
# or remarks (even with -Werror). So we grep stderr for any message
6563
# that says an option was ignored or not supported.
6564
# When given -MP, icc 7.0 and 7.1 complain thusly:
6565
# icc: Command line warning: ignoring option '-M'; no argument required
6566
# The diagnosis changed in icc 8.0:
6567
# icc: Command line remark: option '-MP' not supported
6568
if (grep 'ignoring option' conftest.err ||
6569
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6570
am_cv_$1_dependencies_compiler_type=$depmode
6579
am_cv_$1_dependencies_compiler_type=none
6582
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6583
AM_CONDITIONAL([am__fastdep$1], [
6584
test "x$enable_dependency_tracking" != xno \
6585
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6591
# Choose a directory name for dependency files.
6592
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6593
AC_DEFUN([AM_SET_DEPDIR],
6594
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6595
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6601
AC_DEFUN([AM_DEP_TRACK],
6602
[AC_ARG_ENABLE(dependency-tracking,
6603
[ --disable-dependency-tracking speeds up one-time build
6604
--enable-dependency-tracking do not reject slow dependency extractors])
6605
if test "x$enable_dependency_tracking" != xno; then
6606
am_depcomp="$ac_aux_dir/depcomp"
6609
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6610
AC_SUBST([AMDEPBACKSLASH])
6613
# Generate code to set up dependency tracking. -*- Autoconf -*-
6615
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6616
# Free Software Foundation, Inc.
6618
# This file is free software; the Free Software Foundation
6619
# gives unlimited permission to copy and/or distribute it,
6620
# with or without modifications, as long as this notice is preserved.
6624
# _AM_OUTPUT_DEPENDENCY_COMMANDS
6625
# ------------------------------
6626
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6627
[for mf in $CONFIG_FILES; do
6628
# Strip MF so we end up with the name of the file.
6629
mf=`echo "$mf" | sed -e 's/:.*$//'`
6630
# Check whether this is an Automake generated Makefile or not.
6631
# We used to match only the files named `Makefile.in', but
6632
# some people rename them; so instead we look at the file content.
6633
# Grep'ing the first line is not enough: some people post-process
6634
# each Makefile.in and add a new line on top of each file to say so.
6635
# So let's grep whole file.
6636
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6637
dirpart=`AS_DIRNAME("$mf")`
6641
# Extract the definition of DEPDIR, am__include, and am__quote
6642
# from the Makefile without running `make'.
6643
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6644
test -z "$DEPDIR" && continue
6645
am__include=`sed -n 's/^am__include = //p' < "$mf"`
6646
test -z "am__include" && continue
6647
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6648
# When using ansi2knr, U may be empty or an underscore; expand it
6649
U=`sed -n 's/^U = //p' < "$mf"`
6650
# Find all dependency output files, they are included files with
6651
# $(DEPDIR) in their names. We invoke sed twice because it is the
6652
# simplest approach to changing $(DEPDIR) to its actual value in the
6654
for file in `sed -n "
6655
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6656
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6657
# Make sure the directory exists.
6658
test -f "$dirpart/$file" && continue
6659
fdir=`AS_DIRNAME(["$file"])`
6660
AS_MKDIR_P([$dirpart/$fdir])
6661
# echo "creating $dirpart/$file"
6662
echo '# dummy' > "$dirpart/$file"
6665
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6668
# AM_OUTPUT_DEPENDENCY_COMMANDS
6669
# -----------------------------
6670
# This macro should only be invoked once -- use via AC_REQUIRE.
6672
# This code is only required when automatic dependency tracking
6673
# is enabled. FIXME. This creates each `.P' file that we will
6674
# need in order to bootstrap the dependency handling code.
6675
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6676
[AC_CONFIG_COMMANDS([depfiles],
6677
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6678
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6681
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6682
# Free Software Foundation, Inc.
6684
# This file is free software; the Free Software Foundation
6685
# gives unlimited permission to copy and/or distribute it,
6686
# with or without modifications, as long as this notice is preserved.
6690
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6691
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6693
# Do all the work for Automake. -*- Autoconf -*-
6695
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6696
# Free Software Foundation, Inc.
6698
# This file is free software; the Free Software Foundation
6699
# gives unlimited permission to copy and/or distribute it,
6700
# with or without modifications, as long as this notice is preserved.
6704
# This macro actually does too much. Some checks are only needed if
6705
# your package does certain things. But this isn't really a big deal.
6707
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6708
# AM_INIT_AUTOMAKE([OPTIONS])
6709
# -----------------------------------------------
6710
# The call with PACKAGE and VERSION arguments is the old style
6711
# call (pre autoconf-2.50), which is being phased out. PACKAGE
6712
# and VERSION should now be passed to AC_INIT and removed from
6713
# the call to AM_INIT_AUTOMAKE.
6714
# We support both call styles for the transition. After
6715
# the next Automake release, Autoconf can make the AC_INIT
6716
# arguments mandatory, and then we can depend on a new Autoconf
6717
# release and drop the old call support.
6718
AC_DEFUN([AM_INIT_AUTOMAKE],
6719
[AC_PREREQ([2.58])dnl
6720
dnl Autoconf wants to disallow AM_ names. We explicitly allow
6721
dnl the ones we care about.
6722
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6723
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6724
AC_REQUIRE([AC_PROG_INSTALL])dnl
6725
# test to see if srcdir already configured
6726
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6727
test -f $srcdir/config.status; then
6728
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6731
# test whether we have cygpath
6732
if test -z "$CYGPATH_W"; then
6733
if (cygpath --version) >/dev/null 2>/dev/null; then
6734
CYGPATH_W='cygpath -w'
6739
AC_SUBST([CYGPATH_W])
6741
# Define the identity of the package.
6742
dnl Distinguish between old-style and new-style calls.
6744
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6745
AC_SUBST([PACKAGE], [$1])dnl
6746
AC_SUBST([VERSION], [$2])],
6747
[_AM_SET_OPTIONS([$1])dnl
6748
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6749
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6751
_AM_IF_OPTION([no-define],,
6752
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6753
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6755
# Some tools Automake needs.
6756
AC_REQUIRE([AM_SANITY_CHECK])dnl
6757
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6758
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6759
AM_MISSING_PROG(AUTOCONF, autoconf)
6760
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6761
AM_MISSING_PROG(AUTOHEADER, autoheader)
6762
AM_MISSING_PROG(MAKEINFO, makeinfo)
6764
AM_PROG_INSTALL_STRIP
6765
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6766
# We need awk for the "check" target. The system "awk" is bad on
6768
AC_REQUIRE([AC_PROG_AWK])dnl
6769
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6770
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6771
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6772
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6773
[_AM_PROG_TAR([v7])])])
6774
_AM_IF_OPTION([no-dependencies],,
6775
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6776
[_AM_DEPENDENCIES(CC)],
6777
[define([AC_PROG_CC],
6778
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6779
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6780
[_AM_DEPENDENCIES(CXX)],
6781
[define([AC_PROG_CXX],
6782
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6787
# When config.status generates a header, we must update the stamp-h file.
6788
# This file resides in the same directory as the config header
6789
# that is generated. The stamp files are numbered to have different names.
6791
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6792
# loop where config.status creates the headers, so we can generate
6793
# our stamp files there.
6794
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6795
[# Compute $1's index in $config_headers.
6797
for _am_header in $config_headers :; do
6802
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
6805
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6807
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6809
# This file is free software; the Free Software Foundation
6810
# gives unlimited permission to copy and/or distribute it,
6811
# with or without modifications, as long as this notice is preserved.
6813
# AM_PROG_INSTALL_SH
6814
# ------------------
6815
# Define $install_sh.
6816
AC_DEFUN([AM_PROG_INSTALL_SH],
6817
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6818
install_sh=${install_sh-"$am_aux_dir/install-sh"}
6819
AC_SUBST(install_sh)])
6821
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
6823
# This file is free software; the Free Software Foundation
6824
# gives unlimited permission to copy and/or distribute it,
6825
# with or without modifications, as long as this notice is preserved.
6829
# Check whether the underlying file-system supports filenames
6830
# with a leading dot. For instance MS-DOS doesn't.
6831
AC_DEFUN([AM_SET_LEADING_DOT],
6832
[rm -rf .tst 2>/dev/null
6833
mkdir .tst 2>/dev/null
6834
if test -d .tst; then
6839
rmdir .tst 2>/dev/null
6840
AC_SUBST([am__leading_dot])])
6842
# Check to see how 'make' treats includes. -*- Autoconf -*-
6844
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6846
# This file is free software; the Free Software Foundation
6847
# gives unlimited permission to copy and/or distribute it,
6848
# with or without modifications, as long as this notice is preserved.
6854
# Check to see how make treats includes.
6855
AC_DEFUN([AM_MAKE_INCLUDE],
6856
[am_make=${MAKE-make}
6857
cat > confinc << 'END'
6862
# If we don't find an include directive, just comment out the code.
6863
AC_MSG_CHECKING([for style of include used by $am_make])
6867
# First try GNU make style include.
6868
echo "include confinc" > confmf
6869
# We grep out `Entering directory' and `Leaving directory'
6870
# messages which can occur if `w' ends up in MAKEFLAGS.
6871
# In particular we don't look at `^make:' because GNU make might
6872
# be invoked under some other name (usually "gmake"), in which
6873
# case it prints its new name instead of `make'.
6874
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6879
# Now try BSD make style include.
6880
if test "$am__include" = "#"; then
6881
echo '.include "confinc"' > confmf
6882
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6883
am__include=.include
6888
AC_SUBST([am__include])
6889
AC_SUBST([am__quote])
6890
AC_MSG_RESULT([$_am_result])
6891
rm -f confinc confmf
6894
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
6896
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
6897
# Free Software Foundation, Inc.
6899
# This file is free software; the Free Software Foundation
6900
# gives unlimited permission to copy and/or distribute it,
6901
# with or without modifications, as long as this notice is preserved.
6905
# AM_MISSING_PROG(NAME, PROGRAM)
6906
# ------------------------------
6907
AC_DEFUN([AM_MISSING_PROG],
6908
[AC_REQUIRE([AM_MISSING_HAS_RUN])
6909
$1=${$1-"${am_missing_run}$2"}
6913
# AM_MISSING_HAS_RUN
6914
# ------------------
6915
# Define MISSING if not defined so far and test if it supports --run.
6916
# If it does, set am_missing_run to use it, otherwise, to nothing.
6917
AC_DEFUN([AM_MISSING_HAS_RUN],
6918
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6919
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6920
# Use eval to expand $SHELL
6921
if eval "$MISSING --run true"; then
6922
am_missing_run="$MISSING --run "
6925
AC_MSG_WARN([`missing' script is too old or missing])
6929
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
6931
# This file is free software; the Free Software Foundation
6932
# gives unlimited permission to copy and/or distribute it,
6933
# with or without modifications, as long as this notice is preserved.
6937
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6939
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6940
# created by `make install' are always world readable, even if the
6941
# installer happens to have an overly restrictive umask (e.g. 077).
6942
# This was a mistake. There are at least two reasons why we must not
6944
# - it causes special bits like SGID to be ignored,
6945
# - it may be too restrictive (some setups expect 775 directories).
6947
# Do not use -m 0755 and let people choose whatever they expect by
6950
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
6951
# Some implementations (such as Solaris 8's) are not thread-safe: if a
6952
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6953
# concurrently, both version can detect that a/ is missing, but only
6954
# one can create it and the other will error out. Consequently we
6955
# restrict ourselves to GNU make (using the --version option ensures
6957
AC_DEFUN([AM_PROG_MKDIR_P],
6958
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6959
# We used to keeping the `.' as first argument, in order to
6960
# allow $(mkdir_p) to be used without argument. As in
6961
# $(mkdir_p) $(somedir)
6962
# where $(somedir) is conditionally defined. However this is wrong
6964
# 1. if the package is installed by a user who cannot write `.'
6965
# make install will fail,
6966
# 2. the above comment should most certainly read
6967
# $(mkdir_p) $(DESTDIR)$(somedir)
6968
# so it does not work when $(somedir) is undefined and
6969
# $(DESTDIR) is not.
6970
# To support the latter case, we have to write
6971
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6972
# so the `.' trick is pointless.
6973
mkdir_p='mkdir -p --'
6975
# On NextStep and OpenStep, the `mkdir' command does not
6976
# recognize any option. It will interpret all options as
6977
# directories to create, and then abort because `.' already
6979
for d in ./-p ./--version;
6981
test -d $d && rmdir $d
6983
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6984
if test -f "$ac_aux_dir/mkinstalldirs"; then
6985
mkdir_p='$(mkinstalldirs)'
6987
mkdir_p='$(install_sh) -d'
6990
AC_SUBST([mkdir_p])])
6992
# Helper functions for option handling. -*- Autoconf -*-
6994
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6996
# This file is free software; the Free Software Foundation
6997
# gives unlimited permission to copy and/or distribute it,
6998
# with or without modifications, as long as this notice is preserved.
7002
# _AM_MANGLE_OPTION(NAME)
7003
# -----------------------
7004
AC_DEFUN([_AM_MANGLE_OPTION],
7005
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7007
# _AM_SET_OPTION(NAME)
7008
# ------------------------------
7009
# Set option NAME. Presently that only means defining a flag for this option.
7010
AC_DEFUN([_AM_SET_OPTION],
7011
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7013
# _AM_SET_OPTIONS(OPTIONS)
7014
# ----------------------------------
7015
# OPTIONS is a space-separated list of Automake options.
7016
AC_DEFUN([_AM_SET_OPTIONS],
7017
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7019
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7020
# -------------------------------------------
7021
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7022
AC_DEFUN([_AM_IF_OPTION],
7023
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7025
# Check to make sure that the build environment is sane. -*- Autoconf -*-
7027
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7028
# Free Software Foundation, Inc.
7030
# This file is free software; the Free Software Foundation
7031
# gives unlimited permission to copy and/or distribute it,
7032
# with or without modifications, as long as this notice is preserved.
7038
AC_DEFUN([AM_SANITY_CHECK],
7039
[AC_MSG_CHECKING([whether build environment is sane])
7042
echo timestamp > conftest.file
7043
# Do `set' in a subshell so we don't clobber the current shell's
7044
# arguments. Must try -L first in case configure is actually a
7045
# symlink; some systems play weird games with the mod time of symlinks
7046
# (eg FreeBSD returns the mod time of the symlink's containing
7049
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7050
if test "$[*]" = "X"; then
7052
set X `ls -t $srcdir/configure conftest.file`
7055
if test "$[*]" != "X $srcdir/configure conftest.file" \
7056
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
7058
# If neither matched, then we have a broken ls. This can happen
7059
# if, for instance, CONFIG_SHELL is bash and it inherits a
7060
# broken ls alias from the environment. This has actually
7061
# happened. Such a system could not be considered "sane".
7062
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7063
alias in your environment])
7066
test "$[2]" = conftest.file
7072
AC_MSG_ERROR([newly created file is older than distributed files!
7073
Check your system clock])
7075
AC_MSG_RESULT(yes)])
7077
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7079
# This file is free software; the Free Software Foundation
7080
# gives unlimited permission to copy and/or distribute it,
7081
# with or without modifications, as long as this notice is preserved.
7083
# AM_PROG_INSTALL_STRIP
7084
# ---------------------
7085
# One issue with vendor `install' (even GNU) is that you can't
7086
# specify the program used to strip binaries. This is especially
7087
# annoying in cross-compiling environments, where the build's strip
7088
# is unlikely to handle the host's binaries.
7089
# Fortunately install-sh will honor a STRIPPROG variable, so we
7090
# always use install-sh in `make install-strip', and initialize
7091
# STRIPPROG with the value of the STRIP variable (set by the user).
7092
AC_DEFUN([AM_PROG_INSTALL_STRIP],
7093
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7094
# Installed binaries are usually stripped using `strip' when the user
7095
# run `make install-strip'. However `strip' might not be the right
7096
# tool to use in cross-compilation environments, therefore Automake
7097
# will honor the `STRIP' environment variable to overrule this program.
7098
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7099
if test "$cross_compiling" != no; then
7100
AC_CHECK_TOOL([STRIP], [strip], :)
7102
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7103
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7105
# Check how to create a tarball. -*- Autoconf -*-
7107
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7109
# This file is free software; the Free Software Foundation
7110
# gives unlimited permission to copy and/or distribute it,
7111
# with or without modifications, as long as this notice is preserved.
7115
# _AM_PROG_TAR(FORMAT)
7116
# --------------------
7117
# Check how to create a tarball in format FORMAT.
7118
# FORMAT should be one of `v7', `ustar', or `pax'.
7120
# Substitute a variable $(am__tar) that is a command
7121
# writing to stdout a FORMAT-tarball containing the directory
7123
# tardir=directory && $(am__tar) > result.tar
7125
# Substitute a variable $(am__untar) that extract such
7126
# a tarball read from stdin.
7127
# $(am__untar) < result.tar
7128
AC_DEFUN([_AM_PROG_TAR],
7129
[# Always define AMTAR for backward compatibility.
7130
AM_MISSING_PROG([AMTAR], [tar])
7132
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7133
[m4_case([$1], [ustar],, [pax],,
7134
[m4_fatal([Unknown tar format])])
7135
AC_MSG_CHECKING([how to create a $1 tar archive])
7136
# Loop over all known methods to create a tar archive until one works.
7137
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7138
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7139
# Do not fold the above two line into one, because Tru64 sh and
7140
# Solaris sh will not grok spaces in the rhs of `-'.
7141
for _am_tool in $_am_tools
7145
for _am_tar in tar gnutar gtar;
7147
AM_RUN_LOG([$_am_tar --version]) && break
7149
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7150
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7151
am__untar="$_am_tar -xf -"
7154
# Must skip GNU tar: if it does not support --format= it doesn't create
7155
# ustar tarball either.
7156
(tar --version) >/dev/null 2>&1 && continue
7157
am__tar='tar chf - "$$tardir"'
7158
am__tar_='tar chf - "$tardir"'
7159
am__untar='tar xf -'
7162
am__tar='pax -L -x $1 -w "$$tardir"'
7163
am__tar_='pax -L -x $1 -w "$tardir"'
7167
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7168
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7169
am__untar='cpio -i -H $1 -d'
7178
# If the value was cached, stop now. We just wanted to have am__tar
7179
# and am__untar set.
7180
test -n "${am_cv_prog_tar_$1}" && break
7182
# tar/untar a dummy directory, and stop if the command works
7185
echo GrepMe > conftest.dir/file
7186
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7188
if test -s conftest.tar; then
7189
AM_RUN_LOG([$am__untar <conftest.tar])
7190
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7195
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7196
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7198
AC_SUBST([am__untar])