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
dnl @synopsis AX_FUNC_POSIX_MEMALIGN
15
dnl Some versions of posix_memalign (notably glibc 2.2.5) incorrectly
16
dnl apply their power-of-two check to the size argument, not the alignment
17
dnl argument. AX_FUNC_POSIX_MEMALIGN defines HAVE_POSIX_MEMALIGN if the
18
dnl power-of-two check is correctly applied to the alignment argument.
21
dnl @author Scott Pakin <pakin@uiuc.edu>
23
AC_DEFUN([AX_FUNC_POSIX_MEMALIGN],
24
[AC_CACHE_CHECK([for working posix_memalign],
25
[ax_cv_func_posix_memalign_works],
34
/* Some versions of glibc incorrectly perform the alignment check on
36
exit (posix_memalign (&buffer, sizeof(void *), 123) != 0);
39
[ax_cv_func_posix_memalign_works=yes],
40
[ax_cv_func_posix_memalign_works=no],
41
[ax_cv_func_posix_memalign_works=no])])
42
if test "$ax_cv_func_posix_memalign_works" = "yes" ; then
43
AC_DEFINE([HAVE_POSIX_MEMALIGN], [1],
44
[Define to 1 if `posix_memalign' works.])
48
# lib-prefix.m4 serial 3 (gettext-0.13)
49
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
50
dnl This file is free software, distributed under the terms of the GNU
51
dnl General Public License. As a special exception to the GNU General
52
dnl Public License, this file may be distributed as part of a program
53
dnl that contains a configuration script generated by Autoconf, under
54
dnl the same distribution terms as the rest of that program.
56
dnl From Bruno Haible.
58
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
59
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
60
dnl require excessive bracketing.
61
ifdef([AC_HELP_STRING],
62
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
63
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
65
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
66
dnl to access previously installed libraries. The basic assumption is that
67
dnl a user will want packages to use other packages he previously installed
68
dnl with the same --prefix option.
69
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
70
dnl libraries, but is otherwise very convenient.
71
AC_DEFUN([AC_LIB_PREFIX],
73
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
74
AC_REQUIRE([AC_PROG_CC])
75
AC_REQUIRE([AC_CANONICAL_HOST])
76
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
77
dnl By default, look in $includedir and $libdir.
79
AC_LIB_WITH_FINAL_PREFIX([
80
eval additional_includedir=\"$includedir\"
81
eval additional_libdir=\"$libdir\"
83
AC_LIB_ARG_WITH([lib-prefix],
84
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
85
--without-lib-prefix don't search for libraries in includedir and libdir],
87
if test "X$withval" = "Xno"; then
90
if test "X$withval" = "X"; then
91
AC_LIB_WITH_FINAL_PREFIX([
92
eval additional_includedir=\"$includedir\"
93
eval additional_libdir=\"$libdir\"
96
additional_includedir="$withval/include"
97
additional_libdir="$withval/lib"
101
if test $use_additional = yes; then
102
dnl Potentially add $additional_includedir to $CPPFLAGS.
104
dnl 1. if it's the standard /usr/include,
105
dnl 2. if it's already present in $CPPFLAGS,
106
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
107
dnl 4. if it doesn't exist as a directory.
108
if test "X$additional_includedir" != "X/usr/include"; then
110
for x in $CPPFLAGS; do
111
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
112
if test "X$x" = "X-I$additional_includedir"; then
117
if test -z "$haveit"; then
118
if test "X$additional_includedir" = "X/usr/local/include"; then
119
if test -n "$GCC"; then
125
if test -z "$haveit"; then
126
if test -d "$additional_includedir"; then
127
dnl Really add $additional_includedir to $CPPFLAGS.
128
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
133
dnl Potentially add $additional_libdir to $LDFLAGS.
135
dnl 1. if it's the standard /usr/lib,
136
dnl 2. if it's already present in $LDFLAGS,
137
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
138
dnl 4. if it doesn't exist as a directory.
139
if test "X$additional_libdir" != "X/usr/lib"; then
141
for x in $LDFLAGS; do
142
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
143
if test "X$x" = "X-L$additional_libdir"; then
148
if test -z "$haveit"; then
149
if test "X$additional_libdir" = "X/usr/local/lib"; then
150
if test -n "$GCC"; then
156
if test -z "$haveit"; then
157
if test -d "$additional_libdir"; then
158
dnl Really add $additional_libdir to $LDFLAGS.
159
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
167
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
168
dnl acl_final_exec_prefix, containing the values to which $prefix and
169
dnl $exec_prefix will expand at the end of the configure script.
170
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
172
dnl Unfortunately, prefix and exec_prefix get only finally determined
173
dnl at the end of configure.
174
if test "X$prefix" = "XNONE"; then
175
acl_final_prefix="$ac_default_prefix"
177
acl_final_prefix="$prefix"
179
if test "X$exec_prefix" = "XNONE"; then
180
acl_final_exec_prefix='${prefix}'
182
acl_final_exec_prefix="$exec_prefix"
184
acl_save_prefix="$prefix"
185
prefix="$acl_final_prefix"
186
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
187
prefix="$acl_save_prefix"
190
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
191
dnl variables prefix and exec_prefix bound to the values they will have
192
dnl at the end of the configure script.
193
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
195
acl_save_prefix="$prefix"
196
prefix="$acl_final_prefix"
197
acl_save_exec_prefix="$exec_prefix"
198
exec_prefix="$acl_final_exec_prefix"
200
exec_prefix="$acl_save_exec_prefix"
201
prefix="$acl_save_prefix"
204
# lib-link.m4 serial 4 (gettext-0.12)
205
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
206
dnl This file is free software, distributed under the terms of the GNU
207
dnl General Public License. As a special exception to the GNU General
208
dnl Public License, this file may be distributed as part of a program
209
dnl that contains a configuration script generated by Autoconf, under
210
dnl the same distribution terms as the rest of that program.
212
dnl From Bruno Haible.
214
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
215
dnl the libraries corresponding to explicit and implicit dependencies.
216
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
217
dnl augments the CPPFLAGS variable.
218
AC_DEFUN([AC_LIB_LINKFLAGS],
220
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
221
AC_REQUIRE([AC_LIB_RPATH])
222
define([Name],[translit([$1],[./-], [___])])
223
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
224
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
225
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
226
AC_LIB_LINKFLAGS_BODY([$1], [$2])
227
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
228
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
229
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
231
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
232
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
233
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
234
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
236
AC_SUBST([LTLIB]NAME)
237
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
238
dnl results of this search when this library appears as a dependency.
244
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
245
dnl searches for libname and the libraries corresponding to explicit and
246
dnl implicit dependencies, together with the specified include files and
247
dnl the ability to compile and link the specified testcode. If found, it
248
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
249
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
250
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
251
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
252
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
254
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
255
AC_REQUIRE([AC_LIB_RPATH])
256
define([Name],[translit([$1],[./-], [___])])
257
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
258
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
260
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
262
AC_LIB_LINKFLAGS_BODY([$1], [$2])
264
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
265
dnl because if the user has installed lib[]Name and not disabled its use
266
dnl via --without-lib[]Name-prefix, he wants to use it.
267
ac_save_CPPFLAGS="$CPPFLAGS"
268
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
270
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
272
LIBS="$LIBS $LIB[]NAME"
273
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
276
if test "$ac_cv_lib[]Name" = yes; then
278
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
279
AC_MSG_CHECKING([how to link with lib[]$1])
280
AC_MSG_RESULT([$LIB[]NAME])
283
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
284
dnl $INC[]NAME either.
285
CPPFLAGS="$ac_save_CPPFLAGS"
289
AC_SUBST([HAVE_LIB]NAME)
291
AC_SUBST([LTLIB]NAME)
296
dnl Determine the platform dependent parameters needed to use rpath:
297
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
298
dnl hardcode_direct, hardcode_minus_L.
299
AC_DEFUN([AC_LIB_RPATH],
301
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
302
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
303
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
304
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
305
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
306
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
307
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
313
libext="$acl_cv_libext"
314
shlibext="$acl_cv_shlibext"
315
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
316
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
317
hardcode_direct="$acl_cv_hardcode_direct"
318
hardcode_minus_L="$acl_cv_hardcode_minus_L"
319
dnl Determine whether the user wants rpath handling at all.
321
[ --disable-rpath do not hardcode runtime library paths],
325
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
326
dnl the libraries corresponding to explicit and implicit dependencies.
327
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
328
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
330
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
331
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
332
dnl By default, look in $includedir and $libdir.
334
AC_LIB_WITH_FINAL_PREFIX([
335
eval additional_includedir=\"$includedir\"
336
eval additional_libdir=\"$libdir\"
338
AC_LIB_ARG_WITH([lib$1-prefix],
339
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
340
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
342
if test "X$withval" = "Xno"; then
345
if test "X$withval" = "X"; then
346
AC_LIB_WITH_FINAL_PREFIX([
347
eval additional_includedir=\"$includedir\"
348
eval additional_libdir=\"$libdir\"
351
additional_includedir="$withval/include"
352
additional_libdir="$withval/lib"
356
dnl Search the library and its dependencies in $additional_libdir and
357
dnl $LDFLAGS. Using breadth-first-seach.
363
names_already_handled=
364
names_next_round='$1 $2'
365
while test -n "$names_next_round"; do
366
names_this_round="$names_next_round"
368
for name in $names_this_round; do
370
for n in $names_already_handled; do
371
if test "$n" = "$name"; then
376
if test -z "$already_handled"; then
377
names_already_handled="$names_already_handled $name"
378
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
379
dnl or AC_LIB_HAVE_LINKFLAGS call.
380
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
381
eval value=\"\$HAVE_LIB$uppername\"
382
if test -n "$value"; then
383
if test "$value" = yes; then
384
eval value=\"\$LIB$uppername\"
385
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
386
eval value=\"\$LTLIB$uppername\"
387
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
389
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
390
dnl that this library doesn't exist. So just drop it.
394
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
395
dnl and the already constructed $LIBNAME/$LTLIBNAME.
400
if test $use_additional = yes; then
401
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
402
found_dir="$additional_libdir"
403
found_so="$additional_libdir/lib$name.$shlibext"
404
if test -f "$additional_libdir/lib$name.la"; then
405
found_la="$additional_libdir/lib$name.la"
408
if test -f "$additional_libdir/lib$name.$libext"; then
409
found_dir="$additional_libdir"
410
found_a="$additional_libdir/lib$name.$libext"
411
if test -f "$additional_libdir/lib$name.la"; then
412
found_la="$additional_libdir/lib$name.la"
417
if test "X$found_dir" = "X"; then
418
for x in $LDFLAGS $LTLIB[]NAME; do
419
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
422
dir=`echo "X$x" | sed -e 's/^X-L//'`
423
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
425
found_so="$dir/lib$name.$shlibext"
426
if test -f "$dir/lib$name.la"; then
427
found_la="$dir/lib$name.la"
430
if test -f "$dir/lib$name.$libext"; then
432
found_a="$dir/lib$name.$libext"
433
if test -f "$dir/lib$name.la"; then
434
found_la="$dir/lib$name.la"
440
if test "X$found_dir" != "X"; then
445
if test "X$found_dir" != "X"; then
446
dnl Found the library.
447
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
448
if test "X$found_so" != "X"; then
449
dnl Linking with a shared library. We attempt to hardcode its
450
dnl directory into the executable's runpath, unless it's the
451
dnl standard /usr/lib.
452
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
453
dnl No hardcoding is needed.
454
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
456
dnl Use an explicit option to hardcode DIR into the resulting
458
dnl Potentially add DIR to ltrpathdirs.
459
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
461
for x in $ltrpathdirs; do
462
if test "X$x" = "X$found_dir"; then
467
if test -z "$haveit"; then
468
ltrpathdirs="$ltrpathdirs $found_dir"
470
dnl The hardcoding into $LIBNAME is system dependent.
471
if test "$hardcode_direct" = yes; then
472
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
473
dnl resulting binary.
474
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
476
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
477
dnl Use an explicit option to hardcode DIR into the resulting
479
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
480
dnl Potentially add DIR to rpathdirs.
481
dnl The rpathdirs will be appended to $LIBNAME at the end.
483
for x in $rpathdirs; do
484
if test "X$x" = "X$found_dir"; then
489
if test -z "$haveit"; then
490
rpathdirs="$rpathdirs $found_dir"
493
dnl Rely on "-L$found_dir".
494
dnl But don't add it if it's already contained in the LDFLAGS
495
dnl or the already constructed $LIBNAME
497
for x in $LDFLAGS $LIB[]NAME; do
498
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
499
if test "X$x" = "X-L$found_dir"; then
504
if test -z "$haveit"; then
505
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
507
if test "$hardcode_minus_L" != no; then
508
dnl FIXME: Not sure whether we should use
509
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
511
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
513
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
514
dnl here, because this doesn't fit in flags passed to the
515
dnl compiler. So give up. No hardcoding. This affects only
516
dnl very old systems.
517
dnl FIXME: Not sure whether we should use
518
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
520
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
526
if test "X$found_a" != "X"; then
527
dnl Linking with a static library.
528
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
530
dnl We shouldn't come here, but anyway it's good to have a
532
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
535
dnl Assume the include files are nearby.
536
additional_includedir=
539
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
540
additional_includedir="$basedir/include"
543
if test "X$additional_includedir" != "X"; then
544
dnl Potentially add $additional_includedir to $INCNAME.
546
dnl 1. if it's the standard /usr/include,
547
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
548
dnl 3. if it's already present in $CPPFLAGS or the already
549
dnl constructed $INCNAME,
550
dnl 4. if it doesn't exist as a directory.
551
if test "X$additional_includedir" != "X/usr/include"; then
553
if test "X$additional_includedir" = "X/usr/local/include"; then
554
if test -n "$GCC"; then
560
if test -z "$haveit"; then
561
for x in $CPPFLAGS $INC[]NAME; do
562
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
563
if test "X$x" = "X-I$additional_includedir"; then
568
if test -z "$haveit"; then
569
if test -d "$additional_includedir"; then
570
dnl Really add $additional_includedir to $INCNAME.
571
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
577
dnl Look for dependencies.
578
if test -n "$found_la"; then
579
dnl Read the .la file. It defines the variables
580
dnl dlname, library_names, old_library, dependency_libs, current,
581
dnl age, revision, installed, dlopen, dlpreopen, libdir.
582
save_libdir="$libdir"
584
*/* | *\\*) . "$found_la" ;;
585
*) . "./$found_la" ;;
587
libdir="$save_libdir"
588
dnl We use only dependency_libs.
589
for dep in $dependency_libs; do
592
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
593
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
595
dnl 1. if it's the standard /usr/lib,
596
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
597
dnl 3. if it's already present in $LDFLAGS or the already
598
dnl constructed $LIBNAME,
599
dnl 4. if it doesn't exist as a directory.
600
if test "X$additional_libdir" != "X/usr/lib"; then
602
if test "X$additional_libdir" = "X/usr/local/lib"; then
603
if test -n "$GCC"; then
609
if test -z "$haveit"; then
611
for x in $LDFLAGS $LIB[]NAME; do
612
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
613
if test "X$x" = "X-L$additional_libdir"; then
618
if test -z "$haveit"; then
619
if test -d "$additional_libdir"; then
620
dnl Really add $additional_libdir to $LIBNAME.
621
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
625
for x in $LDFLAGS $LTLIB[]NAME; do
626
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
627
if test "X$x" = "X-L$additional_libdir"; then
632
if test -z "$haveit"; then
633
if test -d "$additional_libdir"; then
634
dnl Really add $additional_libdir to $LTLIBNAME.
635
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
642
dir=`echo "X$dep" | sed -e 's/^X-R//'`
643
if test "$enable_rpath" != no; then
644
dnl Potentially add DIR to rpathdirs.
645
dnl The rpathdirs will be appended to $LIBNAME at the end.
647
for x in $rpathdirs; do
648
if test "X$x" = "X$dir"; then
653
if test -z "$haveit"; then
654
rpathdirs="$rpathdirs $dir"
656
dnl Potentially add DIR to ltrpathdirs.
657
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
659
for x in $ltrpathdirs; do
660
if test "X$x" = "X$dir"; then
665
if test -z "$haveit"; then
666
ltrpathdirs="$ltrpathdirs $dir"
671
dnl Handle this in the next round.
672
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
675
dnl Handle this in the next round. Throw away the .la's
676
dnl directory; it is already contained in a preceding -L
678
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
681
dnl Most likely an immediate library name.
682
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
683
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
689
dnl Didn't find the library; assume it is in the system directories
690
dnl known to the linker and runtime loader. (All the system
691
dnl directories known to the linker should also be known to the
692
dnl runtime loader, otherwise the system is severely misconfigured.)
693
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
694
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
700
if test "X$rpathdirs" != "X"; then
701
if test -n "$hardcode_libdir_separator"; then
702
dnl Weird platform: only the last -rpath option counts, the user must
703
dnl pass all path elements in one option. We can arrange that for a
704
dnl single library, but not when more than one $LIBNAMEs are used.
706
for found_dir in $rpathdirs; do
707
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
709
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
710
acl_save_libdir="$libdir"
712
eval flag=\"$hardcode_libdir_flag_spec\"
713
libdir="$acl_save_libdir"
714
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
716
dnl The -rpath options are cumulative.
717
for found_dir in $rpathdirs; do
718
acl_save_libdir="$libdir"
720
eval flag=\"$hardcode_libdir_flag_spec\"
721
libdir="$acl_save_libdir"
722
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
726
if test "X$ltrpathdirs" != "X"; then
727
dnl When using libtool, the option that works for both libraries and
728
dnl executables is -R. The -R options are cumulative.
729
for found_dir in $ltrpathdirs; do
730
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
735
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
736
dnl unless already present in VAR.
737
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
738
dnl contains two or three consecutive elements that belong together.
739
AC_DEFUN([AC_LIB_APPENDTOVAR],
741
for element in [$2]; do
744
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
745
if test "X$x" = "X$element"; then
750
if test -z "$haveit"; then
751
[$1]="${[$1]}${[$1]:+ }$element"
756
# lib-ld.m4 serial 3 (gettext-0.13)
757
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
758
dnl This file is free software, distributed under the terms of the GNU
759
dnl General Public License. As a special exception to the GNU General
760
dnl Public License, this file may be distributed as part of a program
761
dnl that contains a configuration script generated by Autoconf, under
762
dnl the same distribution terms as the rest of that program.
764
dnl Subroutines of libtool.m4,
765
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
768
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
769
AC_DEFUN([AC_LIB_PROG_LD_GNU],
770
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
771
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
772
case `$LD -v 2>&1 </dev/null` in
773
*GNU* | *'with BFD'*)
774
acl_cv_prog_gnu_ld=yes ;;
776
acl_cv_prog_gnu_ld=no ;;
778
with_gnu_ld=$acl_cv_prog_gnu_ld
781
dnl From libtool-1.4. Sets the variable LD.
782
AC_DEFUN([AC_LIB_PROG_LD],
784
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
785
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
786
AC_REQUIRE([AC_PROG_CC])dnl
787
AC_REQUIRE([AC_CANONICAL_HOST])dnl
788
# Prepare PATH_SEPARATOR.
789
# The user is always right.
790
if test "${PATH_SEPARATOR+set}" != set; then
791
echo "#! /bin/sh" >conf$$.sh
792
echo "exit 0" >>conf$$.sh
794
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
802
if test "$GCC" = yes; then
803
# Check if gcc -print-prog-name=ld gives a path.
804
AC_MSG_CHECKING([for ld used by GCC])
807
# gcc leaves a trailing carriage return which upsets mingw
808
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
810
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
813
# Accept absolute paths.
814
[[\\/]* | [A-Za-z]:[\\/]*)]
815
[re_direlt='/[^/][^/]*/\.\./']
816
# Canonicalize the path of ld
817
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
818
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
819
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
821
test -z "$LD" && LD="$ac_prog"
824
# If it fails, then pretend we aren't using GCC.
828
# If it is relative, then search for the first ld in PATH.
832
elif test "$with_gnu_ld" = yes; then
833
AC_MSG_CHECKING([for GNU ld])
835
AC_MSG_CHECKING([for non-GNU ld])
837
AC_CACHE_VAL(acl_cv_path_LD,
838
[if test -z "$LD"; then
839
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
840
for ac_dir in $PATH; do
841
test -z "$ac_dir" && ac_dir=.
842
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
843
acl_cv_path_LD="$ac_dir/$ac_prog"
844
# Check to see if the program is GNU ld. I'd rather use --version,
845
# but apparently some GNU ld's only accept -v.
846
# Break only if it was the GNU/non-GNU ld that we prefer.
847
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
848
*GNU* | *'with BFD'*)
849
test "$with_gnu_ld" != no && break ;;
851
test "$with_gnu_ld" != yes && break ;;
857
acl_cv_path_LD="$LD" # Let the user override the test with a path.
860
if test -n "$LD"; then
865
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
869
# Do all the work for Automake. This macro actually does too much --
870
# some checks are only needed if your package does certain things.
871
# But this isn't really a big deal.
876
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
878
AC_DEFUN([AM_INIT_AUTOMAKE],
879
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
880
AC_REQUIRE([AC_PROG_INSTALL])
885
dnl test to see if srcdir already configured
886
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
887
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
890
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
891
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
892
AC_REQUIRE([AM_SANITY_CHECK])
893
AC_REQUIRE([AC_ARG_PROGRAM])
894
dnl FIXME This is truly gross.
895
missing_dir=`cd $ac_aux_dir && pwd`
896
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
897
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
898
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
899
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
900
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
901
AC_REQUIRE([AC_PROG_MAKE_SET])])
903
# Copyright 2002 Free Software Foundation, Inc.
905
# This program is free software; you can redistribute it and/or modify
906
# it under the terms of the GNU General Public License as published by
907
# 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.
910
9
# This program is distributed in the hope that it will be useful,
911
# but WITHOUT ANY WARRANTY; without even the implied warranty of
912
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
913
# GNU General Public License for more details.
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
915
# You should have received a copy of the GNU General Public License
916
# along with this program; if not, write to the Free Software
917
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
14
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
919
20
# AM_AUTOMAKE_VERSION(VERSION)
920
21
# ----------------------------
921
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
922
23
# generated from the m4 files accompanying Automake X.Y.
923
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
925
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
926
27
# -------------------------------
927
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
928
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
929
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
930
[AM_AUTOMAKE_VERSION([1.4-p6])])
933
# Check to make sure that the build environment is sane.
31
[AM_AUTOMAKE_VERSION([1.9.6])])
33
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
35
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
43
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
45
# Of course, Automake must honor this variable whenever it calls a
46
# tool from the auxiliary directory. The problem is that $srcdir (and
47
# therefore $ac_aux_dir as well) can be either absolute or relative,
48
# depending on how configure is run. This is pretty annoying, since
49
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
50
# source directory, any form will work fine, but in subdirectories a
51
# relative path needs to be adjusted first.
54
# fails when called from a subdirectory if $ac_aux_dir is relative
55
# $top_srcdir/$ac_aux_dir/missing
56
# fails if $ac_aux_dir is absolute,
57
# fails when called from a subdirectory in a VPATH build with
58
# a relative $ac_aux_dir
60
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
61
# are both prefixed by $srcdir. In an in-source build this is usually
62
# harmless because $srcdir is `.', but things will broke when you
63
# start a VPATH build or use an absolute $srcdir.
65
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
66
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
67
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
68
# and then we would define $MISSING as
69
# MISSING="\${SHELL} $am_aux_dir/missing"
70
# This will work as long as MISSING is not called from configure, because
71
# unfortunately $(top_srcdir) has no meaning in configure.
72
# However there are other variables, like CC, which are often used in
73
# configure, and could therefore not use this "fixed" $ac_aux_dir.
75
# Another solution, used here, is to always expand $ac_aux_dir to an
76
# absolute PATH. The drawback is that using absolute paths prevent a
77
# configured tree to be moved without reconfiguration.
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
80
[dnl Rely on autoconf to set up CDPATH properly.
82
# expand $ac_aux_dir to an absolute path
83
am_aux_dir=`cd $ac_aux_dir && pwd`
86
# AM_CONDITIONAL -*- Autoconf -*-
88
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
89
# Free Software Foundation, Inc.
91
# This file is free software; the Free Software Foundation
92
# gives unlimited permission to copy and/or distribute it,
93
# with or without modifications, as long as this notice is preserved.
97
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
98
# -------------------------------------
99
# Define a conditional.
100
AC_DEFUN([AM_CONDITIONAL],
102
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
103
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
113
AC_CONFIG_COMMANDS_PRE(
114
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115
AC_MSG_ERROR([[conditional "$1" was never defined.
116
Usually this means the macro was only invoked conditionally.]])
120
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121
# Free Software Foundation, Inc.
123
# This file is free software; the Free Software Foundation
124
# gives unlimited permission to copy and/or distribute it,
125
# with or without modifications, as long as this notice is preserved.
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130
# written in clear, in which case automake, when reading aclocal.m4,
131
# will think it sees a *use*, and therefore will trigger all it's
132
# C support machinery. Also note that it means that autoscan, seeing
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
136
# _AM_DEPENDENCIES(NAME)
137
# ----------------------
138
# See how the compiler implements dependency checking.
139
# NAME is "CC", "CXX", "GCJ", or "OBJC".
140
# We try a few techniques and use that to set a single cache variable.
142
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
143
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
144
# dependency, and given that the user is not expected to run this macro,
145
# just rely on AC_PROG_CC.
146
AC_DEFUN([_AM_DEPENDENCIES],
147
[AC_REQUIRE([AM_SET_DEPDIR])dnl
148
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
149
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
150
AC_REQUIRE([AM_DEP_TRACK])dnl
152
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
153
[$1], CXX, [depcc="$CXX" am_compiler_list=],
154
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
155
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
156
[depcc="$$1" am_compiler_list=])
158
AC_CACHE_CHECK([dependency style of $depcc],
159
[am_cv_$1_dependencies_compiler_type],
160
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
161
# We make a subdir and do the tests there. Otherwise we can end up
162
# making bogus files that we don't know about and never remove. For
163
# instance it was reported that on HP-UX the gcc test will end up
164
# making a dummy file named `D' -- because `-MD' means `put the output
167
# Copy depcomp to subdir because otherwise we won't find it if we're
168
# using a relative directory.
169
cp "$am_depcomp" conftest.dir
171
# We will build objects and dependencies in a subdirectory because
172
# it helps to detect inapplicable dependency modes. For instance
173
# both Tru64's cc and ICC support -MD to output dependencies as a
174
# side effect of compilation, but ICC will put the dependencies in
175
# the current directory while Tru64 will put them in the object
179
am_cv_$1_dependencies_compiler_type=none
180
if test "$am_compiler_list" = ""; then
181
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
183
for depmode in $am_compiler_list; do
184
# Setup a source with many dependencies, because some compilers
185
# like to wrap large dependency lists on column 80 (with \), and
186
# we should not choose a depcomp mode which is confused by this.
188
# We need to recreate these files for each test, as the compiler may
189
# overwrite some of them when testing with obscure command lines.
190
# This happens at least with the AIX C compiler.
192
for i in 1 2 3 4 5 6; do
193
echo '#include "conftst'$i'.h"' >> sub/conftest.c
194
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
195
# Solaris 8's {/usr,}/bin/sh.
196
touch sub/conftst$i.h
198
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
202
# after this tag, mechanisms are not by side-effect, so they'll
203
# only be used when explicitly requested
204
if test "x$enable_dependency_tracking" = xyes; then
212
# We check with `-c' and `-o' for the sake of the "dashmstdout"
213
# mode. It turns out that the SunPro C++ compiler does not properly
214
# handle `-M -o', and we need to detect this.
215
if depmode=$depmode \
216
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
217
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
218
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
219
>/dev/null 2>conftest.err &&
220
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
221
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223
# icc doesn't choke on unknown options, it will just issue warnings
224
# or remarks (even with -Werror). So we grep stderr for any message
225
# that says an option was ignored or not supported.
226
# When given -MP, icc 7.0 and 7.1 complain thusly:
227
# icc: Command line warning: ignoring option '-M'; no argument required
228
# The diagnosis changed in icc 8.0:
229
# icc: Command line remark: option '-MP' not supported
230
if (grep 'ignoring option' conftest.err ||
231
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
232
am_cv_$1_dependencies_compiler_type=$depmode
241
am_cv_$1_dependencies_compiler_type=none
244
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
245
AM_CONDITIONAL([am__fastdep$1], [
246
test "x$enable_dependency_tracking" != xno \
247
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
253
# Choose a directory name for dependency files.
254
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
255
AC_DEFUN([AM_SET_DEPDIR],
256
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
257
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
263
AC_DEFUN([AM_DEP_TRACK],
264
[AC_ARG_ENABLE(dependency-tracking,
265
[ --disable-dependency-tracking speeds up one-time build
266
--enable-dependency-tracking do not reject slow dependency extractors])
267
if test "x$enable_dependency_tracking" != xno; then
268
am_depcomp="$ac_aux_dir/depcomp"
271
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
272
AC_SUBST([AMDEPBACKSLASH])
275
# Generate code to set up dependency tracking. -*- Autoconf -*-
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
278
# Free Software Foundation, Inc.
280
# This file is free software; the Free Software Foundation
281
# gives unlimited permission to copy and/or distribute it,
282
# with or without modifications, as long as this notice is preserved.
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
287
# ------------------------------
288
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
289
[for mf in $CONFIG_FILES; do
290
# Strip MF so we end up with the name of the file.
291
mf=`echo "$mf" | sed -e 's/:.*$//'`
292
# Check whether this is an Automake generated Makefile or not.
293
# We used to match only the files named `Makefile.in', but
294
# some people rename them; so instead we look at the file content.
295
# Grep'ing the first line is not enough: some people post-process
296
# each Makefile.in and add a new line on top of each file to say so.
297
# So let's grep whole file.
298
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
299
dirpart=`AS_DIRNAME("$mf")`
303
# Extract the definition of DEPDIR, am__include, and am__quote
304
# from the Makefile without running `make'.
305
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
306
test -z "$DEPDIR" && continue
307
am__include=`sed -n 's/^am__include = //p' < "$mf"`
308
test -z "am__include" && continue
309
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310
# When using ansi2knr, U may be empty or an underscore; expand it
311
U=`sed -n 's/^U = //p' < "$mf"`
312
# Find all dependency output files, they are included files with
313
# $(DEPDIR) in their names. We invoke sed twice because it is the
314
# simplest approach to changing $(DEPDIR) to its actual value in the
316
for file in `sed -n "
317
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
318
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319
# Make sure the directory exists.
320
test -f "$dirpart/$file" && continue
321
fdir=`AS_DIRNAME(["$file"])`
322
AS_MKDIR_P([$dirpart/$fdir])
323
# echo "creating $dirpart/$file"
324
echo '# dummy' > "$dirpart/$file"
327
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
330
# AM_OUTPUT_DEPENDENCY_COMMANDS
331
# -----------------------------
332
# This macro should only be invoked once -- use via AC_REQUIRE.
334
# This code is only required when automatic dependency tracking
335
# is enabled. FIXME. This creates each `.P' file that we will
336
# need in order to bootstrap the dependency handling code.
337
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
338
[AC_CONFIG_COMMANDS([depfiles],
339
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
340
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
343
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
344
# Free Software Foundation, Inc.
346
# This file is free software; the Free Software Foundation
347
# gives unlimited permission to copy and/or distribute it,
348
# with or without modifications, as long as this notice is preserved.
352
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
353
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
355
# Do all the work for Automake. -*- Autoconf -*-
357
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
358
# Free Software Foundation, Inc.
360
# This file is free software; the Free Software Foundation
361
# gives unlimited permission to copy and/or distribute it,
362
# with or without modifications, as long as this notice is preserved.
366
# This macro actually does too much. Some checks are only needed if
367
# your package does certain things. But this isn't really a big deal.
369
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
370
# AM_INIT_AUTOMAKE([OPTIONS])
371
# -----------------------------------------------
372
# The call with PACKAGE and VERSION arguments is the old style
373
# call (pre autoconf-2.50), which is being phased out. PACKAGE
374
# and VERSION should now be passed to AC_INIT and removed from
375
# the call to AM_INIT_AUTOMAKE.
376
# We support both call styles for the transition. After
377
# the next Automake release, Autoconf can make the AC_INIT
378
# arguments mandatory, and then we can depend on a new Autoconf
379
# release and drop the old call support.
380
AC_DEFUN([AM_INIT_AUTOMAKE],
381
[AC_PREREQ([2.58])dnl
382
dnl Autoconf wants to disallow AM_ names. We explicitly allow
383
dnl the ones we care about.
384
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
385
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
386
AC_REQUIRE([AC_PROG_INSTALL])dnl
387
# test to see if srcdir already configured
388
if test "`cd $srcdir && pwd`" != "`pwd`" &&
389
test -f $srcdir/config.status; then
390
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
393
# test whether we have cygpath
394
if test -z "$CYGPATH_W"; then
395
if (cygpath --version) >/dev/null 2>/dev/null; then
396
CYGPATH_W='cygpath -w'
401
AC_SUBST([CYGPATH_W])
403
# Define the identity of the package.
404
dnl Distinguish between old-style and new-style calls.
406
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
407
AC_SUBST([PACKAGE], [$1])dnl
408
AC_SUBST([VERSION], [$2])],
409
[_AM_SET_OPTIONS([$1])dnl
410
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
411
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
413
_AM_IF_OPTION([no-define],,
414
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
415
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
417
# Some tools Automake needs.
418
AC_REQUIRE([AM_SANITY_CHECK])dnl
419
AC_REQUIRE([AC_ARG_PROGRAM])dnl
420
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
421
AM_MISSING_PROG(AUTOCONF, autoconf)
422
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
423
AM_MISSING_PROG(AUTOHEADER, autoheader)
424
AM_MISSING_PROG(MAKEINFO, makeinfo)
426
AM_PROG_INSTALL_STRIP
427
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
428
# We need awk for the "check" target. The system "awk" is bad on
430
AC_REQUIRE([AC_PROG_AWK])dnl
431
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
432
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
433
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
434
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
435
[_AM_PROG_TAR([v7])])])
436
_AM_IF_OPTION([no-dependencies],,
437
[AC_PROVIDE_IFELSE([AC_PROG_CC],
438
[_AM_DEPENDENCIES(CC)],
439
[define([AC_PROG_CC],
440
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
441
AC_PROVIDE_IFELSE([AC_PROG_CXX],
442
[_AM_DEPENDENCIES(CXX)],
443
[define([AC_PROG_CXX],
444
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
449
# When config.status generates a header, we must update the stamp-h file.
450
# This file resides in the same directory as the config header
451
# that is generated. The stamp files are numbered to have different names.
453
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
454
# loop where config.status creates the headers, so we can generate
455
# our stamp files there.
456
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
457
[# Compute $1's index in $config_headers.
459
for _am_header in $config_headers :; do
464
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
467
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
469
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
471
# This file is free software; the Free Software Foundation
472
# gives unlimited permission to copy and/or distribute it,
473
# with or without modifications, as long as this notice is preserved.
477
# Define $install_sh.
478
AC_DEFUN([AM_PROG_INSTALL_SH],
479
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
480
install_sh=${install_sh-"$am_aux_dir/install-sh"}
481
AC_SUBST(install_sh)])
483
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
485
# This file is free software; the Free Software Foundation
486
# gives unlimited permission to copy and/or distribute it,
487
# with or without modifications, as long as this notice is preserved.
491
# Check whether the underlying file-system supports filenames
492
# with a leading dot. For instance MS-DOS doesn't.
493
AC_DEFUN([AM_SET_LEADING_DOT],
494
[rm -rf .tst 2>/dev/null
495
mkdir .tst 2>/dev/null
496
if test -d .tst; then
501
rmdir .tst 2>/dev/null
502
AC_SUBST([am__leading_dot])])
504
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
505
# Free Software Foundation, Inc.
507
# This file is free software; the Free Software Foundation
508
# gives unlimited permission to copy and/or distribute it,
509
# with or without modifications, as long as this notice is preserved.
515
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
516
# "missing" invocation, for better error output.
517
AC_DEFUN([AM_PROG_LEX],
519
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
520
AC_REQUIRE([AC_PROG_LEX])dnl
521
if test "$LEX" = :; then
522
LEX=${am_missing_run}flex
525
# Check to see how 'make' treats includes. -*- Autoconf -*-
527
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
529
# This file is free software; the Free Software Foundation
530
# gives unlimited permission to copy and/or distribute it,
531
# with or without modifications, as long as this notice is preserved.
537
# Check to see how make treats includes.
538
AC_DEFUN([AM_MAKE_INCLUDE],
539
[am_make=${MAKE-make}
540
cat > confinc << 'END'
545
# If we don't find an include directive, just comment out the code.
546
AC_MSG_CHECKING([for style of include used by $am_make])
550
# First try GNU make style include.
551
echo "include confinc" > confmf
552
# We grep out `Entering directory' and `Leaving directory'
553
# messages which can occur if `w' ends up in MAKEFLAGS.
554
# In particular we don't look at `^make:' because GNU make might
555
# be invoked under some other name (usually "gmake"), in which
556
# case it prints its new name instead of `make'.
557
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
562
# Now try BSD make style include.
563
if test "$am__include" = "#"; then
564
echo '.include "confinc"' > confmf
565
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
571
AC_SUBST([am__include])
572
AC_SUBST([am__quote])
573
AC_MSG_RESULT([$_am_result])
577
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
579
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
580
# Free Software Foundation, Inc.
582
# This file is free software; the Free Software Foundation
583
# gives unlimited permission to copy and/or distribute it,
584
# with or without modifications, as long as this notice is preserved.
588
# AM_MISSING_PROG(NAME, PROGRAM)
589
# ------------------------------
590
AC_DEFUN([AM_MISSING_PROG],
591
[AC_REQUIRE([AM_MISSING_HAS_RUN])
592
$1=${$1-"${am_missing_run}$2"}
598
# Define MISSING if not defined so far and test if it supports --run.
599
# If it does, set am_missing_run to use it, otherwise, to nothing.
600
AC_DEFUN([AM_MISSING_HAS_RUN],
601
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
602
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
603
# Use eval to expand $SHELL
604
if eval "$MISSING --run true"; then
605
am_missing_run="$MISSING --run "
608
AC_MSG_WARN([`missing' script is too old or missing])
612
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
614
# This file is free software; the Free Software Foundation
615
# gives unlimited permission to copy and/or distribute it,
616
# with or without modifications, as long as this notice is preserved.
620
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
622
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
623
# created by `make install' are always world readable, even if the
624
# installer happens to have an overly restrictive umask (e.g. 077).
625
# This was a mistake. There are at least two reasons why we must not
627
# - it causes special bits like SGID to be ignored,
628
# - it may be too restrictive (some setups expect 775 directories).
630
# Do not use -m 0755 and let people choose whatever they expect by
633
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
634
# Some implementations (such as Solaris 8's) are not thread-safe: if a
635
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
636
# concurrently, both version can detect that a/ is missing, but only
637
# one can create it and the other will error out. Consequently we
638
# restrict ourselves to GNU make (using the --version option ensures
640
AC_DEFUN([AM_PROG_MKDIR_P],
641
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
642
# We used to keeping the `.' as first argument, in order to
643
# allow $(mkdir_p) to be used without argument. As in
644
# $(mkdir_p) $(somedir)
645
# where $(somedir) is conditionally defined. However this is wrong
647
# 1. if the package is installed by a user who cannot write `.'
648
# make install will fail,
649
# 2. the above comment should most certainly read
650
# $(mkdir_p) $(DESTDIR)$(somedir)
651
# so it does not work when $(somedir) is undefined and
653
# To support the latter case, we have to write
654
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
655
# so the `.' trick is pointless.
656
mkdir_p='mkdir -p --'
658
# On NextStep and OpenStep, the `mkdir' command does not
659
# recognize any option. It will interpret all options as
660
# directories to create, and then abort because `.' already
662
for d in ./-p ./--version;
664
test -d $d && rmdir $d
666
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
667
if test -f "$ac_aux_dir/mkinstalldirs"; then
668
mkdir_p='$(mkinstalldirs)'
670
mkdir_p='$(install_sh) -d'
673
AC_SUBST([mkdir_p])])
675
# Helper functions for option handling. -*- Autoconf -*-
677
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
679
# This file is free software; the Free Software Foundation
680
# gives unlimited permission to copy and/or distribute it,
681
# with or without modifications, as long as this notice is preserved.
685
# _AM_MANGLE_OPTION(NAME)
686
# -----------------------
687
AC_DEFUN([_AM_MANGLE_OPTION],
688
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
690
# _AM_SET_OPTION(NAME)
691
# ------------------------------
692
# Set option NAME. Presently that only means defining a flag for this option.
693
AC_DEFUN([_AM_SET_OPTION],
694
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
696
# _AM_SET_OPTIONS(OPTIONS)
697
# ----------------------------------
698
# OPTIONS is a space-separated list of Automake options.
699
AC_DEFUN([_AM_SET_OPTIONS],
700
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
702
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
703
# -------------------------------------------
704
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
705
AC_DEFUN([_AM_IF_OPTION],
706
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
708
# Check to make sure that the build environment is sane. -*- Autoconf -*-
710
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
711
# Free Software Foundation, Inc.
713
# This file is free software; the Free Software Foundation
714
# gives unlimited permission to copy and/or distribute it,
715
# with or without modifications, as long as this notice is preserved.
936
721
AC_DEFUN([AM_SANITY_CHECK],
937
722
[AC_MSG_CHECKING([whether build environment is sane])
940
echo timestamp > conftestfile
725
echo timestamp > conftest.file
941
726
# Do `set' in a subshell so we don't clobber the current shell's
942
727
# arguments. Must try -L first in case configure is actually a
943
728
# symlink; some systems play weird games with the mod time of symlinks
944
729
# (eg FreeBSD returns the mod time of the symlink's containing
947
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
948
if test "[$]*" = "X"; then
732
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
733
if test "$[*]" = "X"; then
949
734
# -L didn't work.
950
set X `ls -t $srcdir/configure conftestfile`
735
set X `ls -t $srcdir/configure conftest.file`
952
if test "[$]*" != "X $srcdir/configure conftestfile" \
953
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
738
if test "$[*]" != "X $srcdir/configure conftest.file" \
739
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
955
741
# If neither matched, then we have a broken ls. This can happen
956
742
# if, for instance, CONFIG_SHELL is bash and it inherits a