1
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
# lib-prefix.m4 serial 4 (gettext-0.14.2)
14
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
15
dnl This file is free software; the Free Software Foundation
16
dnl gives unlimited permission to copy and/or distribute it,
17
dnl with or without modifications, as long as this notice is preserved.
19
dnl From Bruno Haible.
21
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
22
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
23
dnl require excessive bracketing.
24
ifdef([AC_HELP_STRING],
25
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
26
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
28
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
29
dnl to access previously installed libraries. The basic assumption is that
30
dnl a user will want packages to use other packages he previously installed
31
dnl with the same --prefix option.
32
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
33
dnl libraries, but is otherwise very convenient.
34
AC_DEFUN([AC_LIB_PREFIX],
36
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
37
AC_REQUIRE([AC_PROG_CC])
38
AC_REQUIRE([AC_CANONICAL_HOST])
39
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
40
dnl By default, look in $includedir and $libdir.
42
AC_LIB_WITH_FINAL_PREFIX([
43
eval additional_includedir=\"$includedir\"
44
eval additional_libdir=\"$libdir\"
46
AC_LIB_ARG_WITH([lib-prefix],
47
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
48
--without-lib-prefix don't search for libraries in includedir and libdir],
50
if test "X$withval" = "Xno"; then
53
if test "X$withval" = "X"; then
54
AC_LIB_WITH_FINAL_PREFIX([
55
eval additional_includedir=\"$includedir\"
56
eval additional_libdir=\"$libdir\"
59
additional_includedir="$withval/include"
60
additional_libdir="$withval/lib"
64
if test $use_additional = yes; then
65
dnl Potentially add $additional_includedir to $CPPFLAGS.
67
dnl 1. if it's the standard /usr/include,
68
dnl 2. if it's already present in $CPPFLAGS,
69
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
70
dnl 4. if it doesn't exist as a directory.
71
if test "X$additional_includedir" != "X/usr/include"; then
73
for x in $CPPFLAGS; do
74
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
75
if test "X$x" = "X-I$additional_includedir"; then
80
if test -z "$haveit"; then
81
if test "X$additional_includedir" = "X/usr/local/include"; then
82
if test -n "$GCC"; then
84
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
88
if test -z "$haveit"; then
89
if test -d "$additional_includedir"; then
90
dnl Really add $additional_includedir to $CPPFLAGS.
91
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
96
dnl Potentially add $additional_libdir to $LDFLAGS.
98
dnl 1. if it's the standard /usr/lib,
99
dnl 2. if it's already present in $LDFLAGS,
100
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
101
dnl 4. if it doesn't exist as a directory.
102
if test "X$additional_libdir" != "X/usr/lib"; then
104
for x in $LDFLAGS; do
105
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
106
if test "X$x" = "X-L$additional_libdir"; then
111
if test -z "$haveit"; then
112
if test "X$additional_libdir" = "X/usr/local/lib"; then
113
if test -n "$GCC"; then
119
if test -z "$haveit"; then
120
if test -d "$additional_libdir"; then
121
dnl Really add $additional_libdir to $LDFLAGS.
122
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
130
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
131
dnl acl_final_exec_prefix, containing the values to which $prefix and
132
dnl $exec_prefix will expand at the end of the configure script.
133
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
135
dnl Unfortunately, prefix and exec_prefix get only finally determined
136
dnl at the end of configure.
137
if test "X$prefix" = "XNONE"; then
138
acl_final_prefix="$ac_default_prefix"
140
acl_final_prefix="$prefix"
142
if test "X$exec_prefix" = "XNONE"; then
143
acl_final_exec_prefix='${prefix}'
145
acl_final_exec_prefix="$exec_prefix"
147
acl_save_prefix="$prefix"
148
prefix="$acl_final_prefix"
149
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
150
prefix="$acl_save_prefix"
153
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
154
dnl variables prefix and exec_prefix bound to the values they will have
155
dnl at the end of the configure script.
156
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
158
acl_save_prefix="$prefix"
159
prefix="$acl_final_prefix"
160
acl_save_exec_prefix="$exec_prefix"
161
exec_prefix="$acl_final_exec_prefix"
163
exec_prefix="$acl_save_exec_prefix"
164
prefix="$acl_save_prefix"
167
# lib-link.m4 serial 6 (gettext-0.14.3)
168
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
169
dnl This file is free software; the Free Software Foundation
170
dnl gives unlimited permission to copy and/or distribute it,
171
dnl with or without modifications, as long as this notice is preserved.
173
dnl From Bruno Haible.
177
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
178
dnl the libraries corresponding to explicit and implicit dependencies.
179
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
180
dnl augments the CPPFLAGS variable.
181
AC_DEFUN([AC_LIB_LINKFLAGS],
183
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
184
AC_REQUIRE([AC_LIB_RPATH])
185
define([Name],[translit([$1],[./-], [___])])
186
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
187
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
188
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
189
AC_LIB_LINKFLAGS_BODY([$1], [$2])
190
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
191
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
192
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
194
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
195
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
196
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
197
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
199
AC_SUBST([LTLIB]NAME)
200
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
201
dnl results of this search when this library appears as a dependency.
207
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
208
dnl searches for libname and the libraries corresponding to explicit and
209
dnl implicit dependencies, together with the specified include files and
210
dnl the ability to compile and link the specified testcode. If found, it
211
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
212
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
213
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
214
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
215
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
217
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
218
AC_REQUIRE([AC_LIB_RPATH])
219
define([Name],[translit([$1],[./-], [___])])
220
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
221
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
223
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
225
AC_LIB_LINKFLAGS_BODY([$1], [$2])
227
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
228
dnl because if the user has installed lib[]Name and not disabled its use
229
dnl via --without-lib[]Name-prefix, he wants to use it.
230
ac_save_CPPFLAGS="$CPPFLAGS"
231
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
233
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
235
LIBS="$LIBS $LIB[]NAME"
236
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
239
if test "$ac_cv_lib[]Name" = yes; then
241
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
242
AC_MSG_CHECKING([how to link with lib[]$1])
243
AC_MSG_RESULT([$LIB[]NAME])
246
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
247
dnl $INC[]NAME either.
248
CPPFLAGS="$ac_save_CPPFLAGS"
252
AC_SUBST([HAVE_LIB]NAME)
254
AC_SUBST([LTLIB]NAME)
259
dnl Determine the platform dependent parameters needed to use rpath:
260
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
261
dnl hardcode_direct, hardcode_minus_L.
262
AC_DEFUN([AC_LIB_RPATH],
264
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
265
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
266
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
267
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
268
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
269
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
270
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
271
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
272
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
278
libext="$acl_cv_libext"
279
shlibext="$acl_cv_shlibext"
280
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
281
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
282
hardcode_direct="$acl_cv_hardcode_direct"
283
hardcode_minus_L="$acl_cv_hardcode_minus_L"
284
dnl Determine whether the user wants rpath handling at all.
286
[ --disable-rpath do not hardcode runtime library paths],
290
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
291
dnl the libraries corresponding to explicit and implicit dependencies.
292
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
293
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
295
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
296
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
297
dnl By default, look in $includedir and $libdir.
299
AC_LIB_WITH_FINAL_PREFIX([
300
eval additional_includedir=\"$includedir\"
301
eval additional_libdir=\"$libdir\"
303
AC_LIB_ARG_WITH([lib$1-prefix],
304
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
305
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
307
if test "X$withval" = "Xno"; then
310
if test "X$withval" = "X"; then
311
AC_LIB_WITH_FINAL_PREFIX([
312
eval additional_includedir=\"$includedir\"
313
eval additional_libdir=\"$libdir\"
316
additional_includedir="$withval/include"
317
additional_libdir="$withval/lib"
321
dnl Search the library and its dependencies in $additional_libdir and
322
dnl $LDFLAGS. Using breadth-first-seach.
328
names_already_handled=
329
names_next_round='$1 $2'
330
while test -n "$names_next_round"; do
331
names_this_round="$names_next_round"
333
for name in $names_this_round; do
335
for n in $names_already_handled; do
336
if test "$n" = "$name"; then
341
if test -z "$already_handled"; then
342
names_already_handled="$names_already_handled $name"
343
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
344
dnl or AC_LIB_HAVE_LINKFLAGS call.
345
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
346
eval value=\"\$HAVE_LIB$uppername\"
347
if test -n "$value"; then
348
if test "$value" = yes; then
349
eval value=\"\$LIB$uppername\"
350
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
351
eval value=\"\$LTLIB$uppername\"
352
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
354
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
355
dnl that this library doesn't exist. So just drop it.
359
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
360
dnl and the already constructed $LIBNAME/$LTLIBNAME.
365
if test $use_additional = yes; then
366
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
367
found_dir="$additional_libdir"
368
found_so="$additional_libdir/lib$name.$shlibext"
369
if test -f "$additional_libdir/lib$name.la"; then
370
found_la="$additional_libdir/lib$name.la"
373
if test -f "$additional_libdir/lib$name.$libext"; then
374
found_dir="$additional_libdir"
375
found_a="$additional_libdir/lib$name.$libext"
376
if test -f "$additional_libdir/lib$name.la"; then
377
found_la="$additional_libdir/lib$name.la"
382
if test "X$found_dir" = "X"; then
383
for x in $LDFLAGS $LTLIB[]NAME; do
384
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
387
dir=`echo "X$x" | sed -e 's/^X-L//'`
388
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
390
found_so="$dir/lib$name.$shlibext"
391
if test -f "$dir/lib$name.la"; then
392
found_la="$dir/lib$name.la"
395
if test -f "$dir/lib$name.$libext"; then
397
found_a="$dir/lib$name.$libext"
398
if test -f "$dir/lib$name.la"; then
399
found_la="$dir/lib$name.la"
405
if test "X$found_dir" != "X"; then
410
if test "X$found_dir" != "X"; then
411
dnl Found the library.
412
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
413
if test "X$found_so" != "X"; then
414
dnl Linking with a shared library. We attempt to hardcode its
415
dnl directory into the executable's runpath, unless it's the
416
dnl standard /usr/lib.
417
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
418
dnl No hardcoding is needed.
419
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
421
dnl Use an explicit option to hardcode DIR into the resulting
423
dnl Potentially add DIR to ltrpathdirs.
424
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
426
for x in $ltrpathdirs; do
427
if test "X$x" = "X$found_dir"; then
432
if test -z "$haveit"; then
433
ltrpathdirs="$ltrpathdirs $found_dir"
435
dnl The hardcoding into $LIBNAME is system dependent.
436
if test "$hardcode_direct" = yes; then
437
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
438
dnl resulting binary.
439
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
441
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
442
dnl Use an explicit option to hardcode DIR into the resulting
444
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
445
dnl Potentially add DIR to rpathdirs.
446
dnl The rpathdirs will be appended to $LIBNAME at the end.
448
for x in $rpathdirs; do
449
if test "X$x" = "X$found_dir"; then
454
if test -z "$haveit"; then
455
rpathdirs="$rpathdirs $found_dir"
458
dnl Rely on "-L$found_dir".
459
dnl But don't add it if it's already contained in the LDFLAGS
460
dnl or the already constructed $LIBNAME
462
for x in $LDFLAGS $LIB[]NAME; do
463
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
464
if test "X$x" = "X-L$found_dir"; then
469
if test -z "$haveit"; then
470
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
472
if test "$hardcode_minus_L" != no; then
473
dnl FIXME: Not sure whether we should use
474
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
476
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
478
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
479
dnl here, because this doesn't fit in flags passed to the
480
dnl compiler. So give up. No hardcoding. This affects only
481
dnl very old systems.
482
dnl FIXME: Not sure whether we should use
483
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
485
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
491
if test "X$found_a" != "X"; then
492
dnl Linking with a static library.
493
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
495
dnl We shouldn't come here, but anyway it's good to have a
497
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
500
dnl Assume the include files are nearby.
501
additional_includedir=
504
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
505
additional_includedir="$basedir/include"
508
if test "X$additional_includedir" != "X"; then
509
dnl Potentially add $additional_includedir to $INCNAME.
511
dnl 1. if it's the standard /usr/include,
512
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
513
dnl 3. if it's already present in $CPPFLAGS or the already
514
dnl constructed $INCNAME,
515
dnl 4. if it doesn't exist as a directory.
516
if test "X$additional_includedir" != "X/usr/include"; then
518
if test "X$additional_includedir" = "X/usr/local/include"; then
519
if test -n "$GCC"; then
521
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
525
if test -z "$haveit"; then
526
for x in $CPPFLAGS $INC[]NAME; do
527
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
528
if test "X$x" = "X-I$additional_includedir"; then
533
if test -z "$haveit"; then
534
if test -d "$additional_includedir"; then
535
dnl Really add $additional_includedir to $INCNAME.
536
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
542
dnl Look for dependencies.
543
if test -n "$found_la"; then
544
dnl Read the .la file. It defines the variables
545
dnl dlname, library_names, old_library, dependency_libs, current,
546
dnl age, revision, installed, dlopen, dlpreopen, libdir.
547
save_libdir="$libdir"
549
*/* | *\\*) . "$found_la" ;;
550
*) . "./$found_la" ;;
552
libdir="$save_libdir"
553
dnl We use only dependency_libs.
554
for dep in $dependency_libs; do
557
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
558
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
560
dnl 1. if it's the standard /usr/lib,
561
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
562
dnl 3. if it's already present in $LDFLAGS or the already
563
dnl constructed $LIBNAME,
564
dnl 4. if it doesn't exist as a directory.
565
if test "X$additional_libdir" != "X/usr/lib"; then
567
if test "X$additional_libdir" = "X/usr/local/lib"; then
568
if test -n "$GCC"; then
570
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
574
if test -z "$haveit"; then
576
for x in $LDFLAGS $LIB[]NAME; do
577
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
578
if test "X$x" = "X-L$additional_libdir"; then
583
if test -z "$haveit"; then
584
if test -d "$additional_libdir"; then
585
dnl Really add $additional_libdir to $LIBNAME.
586
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
590
for x in $LDFLAGS $LTLIB[]NAME; do
591
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
592
if test "X$x" = "X-L$additional_libdir"; then
597
if test -z "$haveit"; then
598
if test -d "$additional_libdir"; then
599
dnl Really add $additional_libdir to $LTLIBNAME.
600
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
607
dir=`echo "X$dep" | sed -e 's/^X-R//'`
608
if test "$enable_rpath" != no; then
609
dnl Potentially add DIR to rpathdirs.
610
dnl The rpathdirs will be appended to $LIBNAME at the end.
612
for x in $rpathdirs; do
613
if test "X$x" = "X$dir"; then
618
if test -z "$haveit"; then
619
rpathdirs="$rpathdirs $dir"
621
dnl Potentially add DIR to ltrpathdirs.
622
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
624
for x in $ltrpathdirs; do
625
if test "X$x" = "X$dir"; then
630
if test -z "$haveit"; then
631
ltrpathdirs="$ltrpathdirs $dir"
636
dnl Handle this in the next round.
637
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
640
dnl Handle this in the next round. Throw away the .la's
641
dnl directory; it is already contained in a preceding -L
643
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
646
dnl Most likely an immediate library name.
647
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
648
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
654
dnl Didn't find the library; assume it is in the system directories
655
dnl known to the linker and runtime loader. (All the system
656
dnl directories known to the linker should also be known to the
657
dnl runtime loader, otherwise the system is severely misconfigured.)
658
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
659
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
665
if test "X$rpathdirs" != "X"; then
666
if test -n "$hardcode_libdir_separator"; then
667
dnl Weird platform: only the last -rpath option counts, the user must
668
dnl pass all path elements in one option. We can arrange that for a
669
dnl single library, but not when more than one $LIBNAMEs are used.
671
for found_dir in $rpathdirs; do
672
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
674
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
675
acl_save_libdir="$libdir"
677
eval flag=\"$hardcode_libdir_flag_spec\"
678
libdir="$acl_save_libdir"
679
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
681
dnl The -rpath options are cumulative.
682
for found_dir in $rpathdirs; do
683
acl_save_libdir="$libdir"
685
eval flag=\"$hardcode_libdir_flag_spec\"
686
libdir="$acl_save_libdir"
687
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
691
if test "X$ltrpathdirs" != "X"; then
692
dnl When using libtool, the option that works for both libraries and
693
dnl executables is -R. The -R options are cumulative.
694
for found_dir in $ltrpathdirs; do
695
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
700
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
701
dnl unless already present in VAR.
702
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
703
dnl contains two or three consecutive elements that belong together.
704
AC_DEFUN([AC_LIB_APPENDTOVAR],
706
for element in [$2]; do
709
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
710
if test "X$x" = "X$element"; then
715
if test -z "$haveit"; then
716
[$1]="${[$1]}${[$1]:+ }$element"
721
# lib-ld.m4 serial 3 (gettext-0.13)
722
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
723
dnl This file is free software; the Free Software Foundation
724
dnl gives unlimited permission to copy and/or distribute it,
725
dnl with or without modifications, as long as this notice is preserved.
727
dnl Subroutines of libtool.m4,
728
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
731
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
732
AC_DEFUN([AC_LIB_PROG_LD_GNU],
733
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
734
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
735
case `$LD -v 2>&1 </dev/null` in
736
*GNU* | *'with BFD'*)
737
acl_cv_prog_gnu_ld=yes ;;
739
acl_cv_prog_gnu_ld=no ;;
741
with_gnu_ld=$acl_cv_prog_gnu_ld
744
dnl From libtool-1.4. Sets the variable LD.
745
AC_DEFUN([AC_LIB_PROG_LD],
747
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
748
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
749
AC_REQUIRE([AC_PROG_CC])dnl
750
AC_REQUIRE([AC_CANONICAL_HOST])dnl
751
# Prepare PATH_SEPARATOR.
752
# The user is always right.
753
if test "${PATH_SEPARATOR+set}" != set; then
754
echo "#! /bin/sh" >conf$$.sh
755
echo "exit 0" >>conf$$.sh
757
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
765
if test "$GCC" = yes; then
766
# Check if gcc -print-prog-name=ld gives a path.
767
AC_MSG_CHECKING([for ld used by GCC])
770
# gcc leaves a trailing carriage return which upsets mingw
771
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
773
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
776
# Accept absolute paths.
777
[[\\/]* | [A-Za-z]:[\\/]*)]
778
[re_direlt='/[^/][^/]*/\.\./']
779
# Canonicalize the path of ld
780
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
781
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
782
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
784
test -z "$LD" && LD="$ac_prog"
787
# If it fails, then pretend we aren't using GCC.
791
# If it is relative, then search for the first ld in PATH.
795
elif test "$with_gnu_ld" = yes; then
796
AC_MSG_CHECKING([for GNU ld])
798
AC_MSG_CHECKING([for non-GNU ld])
800
AC_CACHE_VAL(acl_cv_path_LD,
801
[if test -z "$LD"; then
802
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
803
for ac_dir in $PATH; do
804
test -z "$ac_dir" && ac_dir=.
805
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
806
acl_cv_path_LD="$ac_dir/$ac_prog"
807
# Check to see if the program is GNU ld. I'd rather use --version,
808
# but apparently some GNU ld's only accept -v.
809
# Break only if it was the GNU/non-GNU ld that we prefer.
810
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
811
*GNU* | *'with BFD'*)
812
test "$with_gnu_ld" != no && break ;;
814
test "$with_gnu_ld" != yes && break ;;
820
acl_cv_path_LD="$LD" # Let the user override the test with a path.
823
if test -n "$LD"; then
828
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
832
# Do all the work for Automake. This macro actually does too much --
833
# some checks are only needed if your package does certain things.
834
# But this isn't really a big deal.
839
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
841
AC_DEFUN([AM_INIT_AUTOMAKE],
842
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
843
AC_REQUIRE([AC_PROG_INSTALL])
848
dnl test to see if srcdir already configured
849
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
850
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
853
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
854
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
855
AC_REQUIRE([AM_SANITY_CHECK])
856
AC_REQUIRE([AC_ARG_PROGRAM])
857
dnl FIXME This is truly gross.
858
missing_dir=`cd $ac_aux_dir && pwd`
859
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
860
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
861
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
862
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
863
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
864
AC_REQUIRE([AC_PROG_MAKE_SET])])
866
# Copyright 2002 Free Software Foundation, Inc.
868
# This program is free software; you can redistribute it and/or modify
869
# it under the terms of the GNU General Public License as published by
870
# 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.
873
9
# This program is distributed in the hope that it will be useful,
874
# but WITHOUT ANY WARRANTY; without even the implied warranty of
875
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
876
# GNU General Public License for more details.
878
# You should have received a copy of the GNU General Public License
879
# along with this program; if not, write to the Free Software
880
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
882
# AM_AUTOMAKE_VERSION(VERSION)
883
# ----------------------------
884
# Automake X.Y traces this macro to ensure aclocal.m4 has been
885
# generated from the m4 files accompanying Automake X.Y.
886
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
888
# AM_SET_CURRENT_AUTOMAKE_VERSION
889
# -------------------------------
890
# Call AM_AUTOMAKE_VERSION so it can be traced.
891
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
892
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
893
[AM_AUTOMAKE_VERSION([1.4-p6])])
896
# Check to make sure that the build environment is sane.
899
AC_DEFUN([AM_SANITY_CHECK],
900
[AC_MSG_CHECKING([whether build environment is sane])
903
echo timestamp > conftestfile
904
# Do `set' in a subshell so we don't clobber the current shell's
905
# arguments. Must try -L first in case configure is actually a
906
# symlink; some systems play weird games with the mod time of symlinks
907
# (eg FreeBSD returns the mod time of the symlink's containing
910
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911
if test "[$]*" = "X"; then
913
set X `ls -t $srcdir/configure conftestfile`
915
if test "[$]*" != "X $srcdir/configure conftestfile" \
916
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
918
# If neither matched, then we have a broken ls. This can happen
919
# if, for instance, CONFIG_SHELL is bash and it inherits a
920
# broken ls alias from the environment. This has actually
921
# happened. Such a system could not be considered "sane".
922
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
923
alias in your environment])
926
test "[$]2" = conftestfile
932
AC_MSG_ERROR([newly created file is older than distributed files!
933
Check your system clock])
938
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
939
dnl The program must properly implement --version.
940
AC_DEFUN([AM_MISSING_PROG],
941
[AC_MSG_CHECKING(for working $2)
942
# Run test in a subshell; some versions of sh will print an error if
943
# an executable is not found, even if stderr is redirected.
944
# Redirect stdin to placate older versions of autoconf. Sigh.
945
if ($2 --version) < /dev/null > /dev/null 2>&1; then
950
AC_MSG_RESULT(missing)
954
# Like AC_CONFIG_HEADER, but automatically create stamp file.
956
AC_DEFUN([AM_CONFIG_HEADER],
958
AC_CONFIG_HEADER([$1])
959
dnl When config.status generates a header, we must update the stamp-h file.
960
dnl This file resides in the same directory as the config header
961
dnl that is generated. We must strip everything past the first ":",
962
dnl and everything past the last "/".
963
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
964
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
965
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
967
for am_file in <<$1>>; do
968
case " <<$>>CONFIG_HEADERS " in
969
*" <<$>>am_file "*<<)>>
970
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
973
am_indx=`expr "<<$>>am_indx" + 1`
978
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
979
# serial 2 IT_PROG_INTLTOOL
980
AC_DEFUN([IT_PROG_INTLTOOL],
983
if test -n "$1"; then
984
AC_MSG_CHECKING(for intltool >= $1)
986
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
987
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${ac_aux_dir}/intltool-update.in`
989
INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
992
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
993
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
995
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
1000
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1001
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1002
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1003
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1004
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1005
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1006
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1007
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1008
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1009
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1010
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1011
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1012
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1013
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1014
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1015
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1016
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1018
AC_SUBST(INTLTOOL_DESKTOP_RULE)
1019
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1020
AC_SUBST(INTLTOOL_KEYS_RULE)
1021
AC_SUBST(INTLTOOL_PROP_RULE)
1022
AC_SUBST(INTLTOOL_OAF_RULE)
1023
AC_SUBST(INTLTOOL_PONG_RULE)
1024
AC_SUBST(INTLTOOL_SERVER_RULE)
1025
AC_SUBST(INTLTOOL_SHEET_RULE)
1026
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1027
AC_SUBST(INTLTOOL_UI_RULE)
1028
AC_SUBST(INTLTOOL_XAM_RULE)
1029
AC_SUBST(INTLTOOL_KBD_RULE)
1030
AC_SUBST(INTLTOOL_XML_RULE)
1031
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1032
AC_SUBST(INTLTOOL_CAVES_RULE)
1033
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1034
AC_SUBST(INTLTOOL_THEME_RULE)
1036
# Use the tools built into the package, not the ones that are installed.
1038
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
1039
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
1040
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
1042
AC_SUBST(INTLTOOL_EXTRACT)
1043
AC_SUBST(INTLTOOL_MERGE)
1044
AC_SUBST(INTLTOOL_UPDATE)
1046
AC_PATH_PROG(INTLTOOL_PERL, perl)
1047
if test -z "$INTLTOOL_PERL"; then
1048
AC_MSG_ERROR([perl not found; required for intltool])
1050
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1051
AC_MSG_ERROR([perl 5.x required for intltool])
1053
if test "x$2" != "xno-xml"; then
1054
AC_MSG_CHECKING([for XML::Parser])
1055
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1058
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1062
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
1063
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
1064
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
1065
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
1067
# Remove file type tags (using []) from po/POTFILES.
1069
ifdef([AC_DIVERSION_ICMDS],[
1070
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
1071
[mv -f po/POTFILES po/POTFILES.tmp
1072
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
1073
rm -f po/POTFILES.tmp
1077
ifdef([AC_CONFIG_COMMANDS_PRE],[
1078
AC_CONFIG_COMMANDS_PRE([
1079
[mv -f po/POTFILES po/POTFILES.tmp
1080
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
1081
rm -f po/POTFILES.tmp
1087
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
1089
AC_CONFIG_COMMANDS([intltool], [
1091
intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
1092
-e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
1093
-e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
1094
-e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
1095
-e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
1096
-e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
1098
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
1099
> intltool-extract.out
1100
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
1101
rm -f intltool-extract.out
1103
mv -f intltool-extract.out intltool-extract
1105
chmod ugo+x intltool-extract
1106
chmod u+w intltool-extract
1108
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
1109
> intltool-merge.out
1110
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
1111
rm -f intltool-merge.out
1113
mv -f intltool-merge.out intltool-merge
1115
chmod ugo+x intltool-merge
1116
chmod u+w intltool-merge
1118
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
1119
> intltool-update.out
1120
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
1121
rm -f intltool-update.out
1123
mv -f intltool-update.out intltool-update
1125
chmod ugo+x intltool-update
1126
chmod u+w intltool-update
1128
], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
1129
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
1130
MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
1131
XGETTEXT='${INTLTOOL_XGETTEXT}')
1136
AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])
1139
# isc-posix.m4 serial 2 (gettext-0.11.2)
1140
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1141
dnl This file is free software; the Free Software Foundation
1142
dnl gives unlimited permission to copy and/or distribute it,
1143
dnl with or without modifications, as long as this notice is preserved.
1145
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1147
# This test replaces the one in autoconf.
1148
# Currently this macro should have the same name as the autoconf macro
1149
# because gettext's gettext.m4 (distributed in the automake package)
1150
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
1151
# give these diagnostics:
1152
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1153
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1155
undefine([AC_ISC_POSIX])
1157
AC_DEFUN([AC_ISC_POSIX],
1159
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1160
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1167
# @defmac AC_PROG_CC_STDC
1168
# @maindex PROG_CC_STDC
1170
# If the C compiler in not in ANSI C mode by default, try to add an option
1171
# to output variable @code{CC} to make it so. This macro tries various
1172
# options that select ANSI C on some system or another. It considers the
1173
# compiler to be in ANSI C mode if it handles function prototypes correctly.
1175
# If you use this macro, you should check after calling it whether the C
1176
# compiler has been set to accept ANSI C; if not, the shell variable
1177
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
1178
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
1179
# program @code{ansi2knr}, which comes with Ghostscript.
1182
AC_DEFUN([AM_PROG_CC_STDC],
1183
[AC_REQUIRE([AC_PROG_CC])
1184
AC_BEFORE([$0], [AC_C_INLINE])
1185
AC_BEFORE([$0], [AC_C_CONST])
1186
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
1187
dnl a magic option to avoid problems with ANSI preprocessor commands
1189
dnl FIXME: can't do this because then AC_AIX won't work due to a
1190
dnl circular dependency.
1191
dnl AC_BEFORE([$0], [AC_PROG_CPP])
1192
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
1193
AC_CACHE_VAL(am_cv_prog_cc_stdc,
1194
[am_cv_prog_cc_stdc=no
1196
# Don't try gcc -ansi; that turns off useful extensions and
1197
# breaks some systems' header files.
1198
# AIX -qlanglvl=ansi
1199
# Ultrix and OSF/1 -std1
1200
# HP-UX -Aa -D_HPUX_SOURCE
1201
# SVR4 -Xc -D__EXTENSIONS__
1202
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1204
CC="$ac_save_CC $ac_arg"
1206
[#include <stdarg.h>
1208
#include <sys/types.h>
1209
#include <sys/stat.h>
1210
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1211
struct buf { int x; };
1212
FILE * (*rcsopen) (struct buf *, struct stat *, int);
1213
static char *e (p, i)
1219
static char *f (char * (*g) (char **, int), char **p, ...)
1224
s = g (p, va_arg (v,int));
1228
int test (int i, double x);
1229
struct s1 {int (*f) (int a);};
1230
struct s2 {int (*f) (double a);};
1231
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1235
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1237
[am_cv_prog_cc_stdc="$ac_arg"; break])
1241
if test -z "$am_cv_prog_cc_stdc"; then
1242
AC_MSG_RESULT([none needed])
1244
AC_MSG_RESULT($am_cv_prog_cc_stdc)
1246
case "x$am_cv_prog_cc_stdc" in
1248
*) CC="$CC $am_cv_prog_cc_stdc" ;;
1252
dnl GNOME_COMPILE_WARNINGS
1253
dnl Turn on many useful compiler warnings
1254
dnl For now, only works on GCC
1255
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1256
dnl ******************************
1257
dnl More compiler warnings
1258
dnl ******************************
1260
AC_ARG_ENABLE(compile-warnings,
1261
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1262
[Turn on compiler warnings]),,
1263
[enable_compile_warnings="m4_default([$1],[yes])"])
1266
if test "x$GCC" != xyes; then
1267
enable_compile_warnings=no
1271
realsave_CFLAGS="$CFLAGS"
1273
case "$enable_compile_warnings" in
1278
warning_flags="-Wall"
1281
warning_flags="-Wall -Wmissing-prototypes"
1284
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1285
CFLAGS="$warning_flags $CFLAGS"
1286
for option in -Wno-sign-compare; do
1287
SAVE_CFLAGS="$CFLAGS"
1288
CFLAGS="$CFLAGS $option"
1289
AC_MSG_CHECKING([whether gcc understands $option])
1290
AC_TRY_COMPILE([], [],
1293
CFLAGS="$SAVE_CFLAGS"
1294
AC_MSG_RESULT($has_option)
1295
if test $has_option = yes; then
1296
warning_flags="$warning_flags $option"
1302
if test "$enable_compile_warnings" = "error" ; then
1303
warning_flags="$warning_flags -Werror"
1307
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1310
CFLAGS="$realsave_CFLAGS"
1311
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1312
AC_MSG_RESULT($warning_flags)
1314
AC_ARG_ENABLE(iso-c,
1315
AC_HELP_STRING([--enable-iso-c],
1316
[Try to warn if code is not ISO C ]),,
1319
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1321
if test "x$enable_iso_c" != "xno"; then
1322
if test "x$GCC" = "xyes"; then
1324
*[\ \ ]-ansi[\ \ ]*) ;;
1325
*) complCFLAGS="$complCFLAGS -ansi" ;;
1328
*[\ \ ]-pedantic[\ \ ]*) ;;
1329
*) complCFLAGS="$complCFLAGS -pedantic" ;;
1333
AC_MSG_RESULT($complCFLAGS)
1335
WARN_CFLAGS="$warning_flags $complCFLAGS"
1336
AC_SUBST(WARN_CFLAGS)
1339
dnl For C++, do basically the same thing.
1341
AC_DEFUN([GNOME_CXX_WARNINGS],[
1342
AC_ARG_ENABLE(cxx-warnings,
1343
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1344
[Turn on compiler warnings.]),,
1345
[enable_cxx_warnings="m4_default([$1],[minimum])"])
1347
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1349
if test "x$GCC" != xyes; then
1350
enable_compile_warnings=no
1352
if test "x$enable_cxx_warnings" != "xno"; then
1353
if test "x$GCC" = "xyes"; then
1354
case " $CXXFLAGS " in
1355
*[\ \ ]-Wall[\ \ ]*) ;;
1356
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
1359
## -W is not all that useful. And it cannot be controlled
1360
## with individual -Wno-xxx flags, unlike -Wall
1361
if test "x$enable_cxx_warnings" = "xyes"; then
1362
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1366
AC_MSG_RESULT($warnCXXFLAGS)
1368
AC_ARG_ENABLE(iso-cxx,
1369
AC_HELP_STRING([--enable-iso-cxx],
1370
[Try to warn if code is not ISO C++ ]),,
1371
[enable_iso_cxx=no])
1373
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1375
if test "x$enable_iso_cxx" != "xno"; then
1376
if test "x$GCC" = "xyes"; then
1377
case " $CXXFLAGS " in
1378
*[\ \ ]-ansi[\ \ ]*) ;;
1379
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1382
case " $CXXFLAGS " in
1383
*[\ \ ]-pedantic[\ \ ]*) ;;
1384
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1388
AC_MSG_RESULT($complCXXFLAGS)
1390
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1391
AC_SUBST(WARN_CXXFLAGS)
1394
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1396
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1398
# This program is free software; you can redistribute it and/or modify
1399
# it under the terms of the GNU General Public License as published by
1400
# the Free Software Foundation; either version 2 of the License, or
1401
# (at your option) any later version.
1403
# This program is distributed in the hope that it will be useful, but
1404
# WITHOUT ANY WARRANTY; without even the implied warranty of
1405
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1406
# General Public License for more details.
1408
# You should have received a copy of the GNU General Public License
1409
# along with this program; if not, write to the Free Software
1410
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1412
# As a special exception to the GNU General Public License, if you
1413
# distribute this file as part of a program that contains a
1414
# configuration script generated by Autoconf, you may include it under
1415
# the same distribution terms that you use for the rest of that program.
1417
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1418
# ----------------------------------
1419
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1420
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1421
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1422
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1423
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1424
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1426
if test -n "$PKG_CONFIG"; then
1427
_pkg_min_version=m4_default([$1], [0.9.0])
1428
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1429
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1430
AC_MSG_RESULT([yes])
1437
])# PKG_PROG_PKG_CONFIG
1439
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1441
# Check to see whether a particular set of modules exists. Similar
1442
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1445
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
1446
# this or PKG_CHECK_MODULES is called, or make sure to call
1447
# PKG_CHECK_EXISTS manually
1448
# --------------------------------------------------------------
1449
AC_DEFUN([PKG_CHECK_EXISTS],
1450
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1451
if test -n "$PKG_CONFIG" && \
1452
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1453
m4_ifval([$2], [$2], [:])
1454
m4_ifvaln([$3], [else
1459
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1460
# ---------------------------------------------
1461
m4_define([_PKG_CONFIG],
1462
[if test -n "$PKG_CONFIG"; then
1463
if test -n "$$1"; then
1466
PKG_CHECK_EXISTS([$3],
1467
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1475
# _PKG_SHORT_ERRORS_SUPPORTED
1476
# -----------------------------
1477
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1478
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1479
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1480
_pkg_short_errors_supported=yes
1482
_pkg_short_errors_supported=no
1484
])# _PKG_SHORT_ERRORS_SUPPORTED
1487
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1488
# [ACTION-IF-NOT-FOUND])
1491
# Note that if there is a possibility the first call to
1492
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1493
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1496
# --------------------------------------------------------------
1497
AC_DEFUN([PKG_CHECK_MODULES],
1498
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1499
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1500
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1503
AC_MSG_CHECKING([for $1])
1505
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1506
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1508
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1509
and $1[]_LIBS to avoid the need to call pkg-config.
1510
See the pkg-config man page for more details.])
1512
if test $pkg_failed = yes; then
1513
_PKG_SHORT_ERRORS_SUPPORTED
1514
if test $_pkg_short_errors_supported = yes; then
1515
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
1517
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1519
# Put the nasty error message in config.log where it belongs
1520
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1522
ifelse([$4], , [AC_MSG_ERROR(dnl
1523
[Package requirements ($2) were not met:
1527
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1528
installed software in a non-standard prefix.
1533
elif test $pkg_failed = untried; then
1534
ifelse([$4], , [AC_MSG_FAILURE(dnl
1535
[The pkg-config script could not be found or is too old. Make sure it
1536
is in your PATH or set the PKG_CONFIG environment variable to the full
1541
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1544
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1545
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1546
AC_MSG_RESULT([yes])
1547
ifelse([$3], , :, [$3])
1549
])# PKG_CHECK_MODULES
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1551
14
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1552
15
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1947
410
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
413
dnl GNOME_COMPILE_WARNINGS
414
dnl Turn on many useful compiler warnings
415
dnl For now, only works on GCC
416
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
417
dnl ******************************
418
dnl More compiler warnings
419
dnl ******************************
421
AC_ARG_ENABLE(compile-warnings,
422
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
423
[Turn on compiler warnings]),,
424
[enable_compile_warnings="m4_default([$1],[yes])"])
427
if test "x$GCC" != xyes; then
428
enable_compile_warnings=no
432
realsave_CFLAGS="$CFLAGS"
434
case "$enable_compile_warnings" in
439
warning_flags="-Wall"
442
warning_flags="-Wall -Wmissing-prototypes"
445
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
446
CFLAGS="$warning_flags $CFLAGS"
447
for option in -Wno-sign-compare; do
448
SAVE_CFLAGS="$CFLAGS"
449
CFLAGS="$CFLAGS $option"
450
AC_MSG_CHECKING([whether gcc understands $option])
451
AC_TRY_COMPILE([], [],
454
CFLAGS="$SAVE_CFLAGS"
455
AC_MSG_RESULT($has_option)
456
if test $has_option = yes; then
457
warning_flags="$warning_flags $option"
463
if test "$enable_compile_warnings" = "error" ; then
464
warning_flags="$warning_flags -Werror"
468
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
471
CFLAGS="$realsave_CFLAGS"
472
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
473
AC_MSG_RESULT($warning_flags)
476
AC_HELP_STRING([--enable-iso-c],
477
[Try to warn if code is not ISO C ]),,
480
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
482
if test "x$enable_iso_c" != "xno"; then
483
if test "x$GCC" = "xyes"; then
485
*[\ \ ]-ansi[\ \ ]*) ;;
486
*) complCFLAGS="$complCFLAGS -ansi" ;;
489
*[\ \ ]-pedantic[\ \ ]*) ;;
490
*) complCFLAGS="$complCFLAGS -pedantic" ;;
494
AC_MSG_RESULT($complCFLAGS)
496
WARN_CFLAGS="$warning_flags $complCFLAGS"
497
AC_SUBST(WARN_CFLAGS)
500
dnl For C++, do basically the same thing.
502
AC_DEFUN([GNOME_CXX_WARNINGS],[
503
AC_ARG_ENABLE(cxx-warnings,
504
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
505
[Turn on compiler warnings.]),,
506
[enable_cxx_warnings="m4_default([$1],[minimum])"])
508
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
510
if test "x$GCC" != xyes; then
511
enable_compile_warnings=no
513
if test "x$enable_cxx_warnings" != "xno"; then
514
if test "x$GCC" = "xyes"; then
515
case " $CXXFLAGS " in
516
*[\ \ ]-Wall[\ \ ]*) ;;
517
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
520
## -W is not all that useful. And it cannot be controlled
521
## with individual -Wno-xxx flags, unlike -Wall
522
if test "x$enable_cxx_warnings" = "xyes"; then
523
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
527
AC_MSG_RESULT($warnCXXFLAGS)
529
AC_ARG_ENABLE(iso-cxx,
530
AC_HELP_STRING([--enable-iso-cxx],
531
[Try to warn if code is not ISO C++ ]),,
534
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
536
if test "x$enable_iso_cxx" != "xno"; then
537
if test "x$GCC" = "xyes"; then
538
case " $CXXFLAGS " in
539
*[\ \ ]-ansi[\ \ ]*) ;;
540
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
543
case " $CXXFLAGS " in
544
*[\ \ ]-pedantic[\ \ ]*) ;;
545
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
549
AC_MSG_RESULT($complCXXFLAGS)
551
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
552
AC_SUBST(WARN_CXXFLAGS)
556
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
557
# serial 2 IT_PROG_INTLTOOL
558
AC_DEFUN([IT_PROG_INTLTOOL],
559
[AC_PREREQ([2.50])dnl
561
case "$am__api_version" in
563
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
569
if test -n "$1"; then
570
AC_MSG_CHECKING(for intltool >= $1)
572
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 100 + $ 2; }'`
573
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
574
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in`
576
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
577
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
578
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
581
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
582
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
583
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
584
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
585
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
586
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
587
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
588
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
589
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
590
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
591
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
592
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
593
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
594
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
595
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
596
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
597
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
598
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
600
AC_SUBST(INTLTOOL_DESKTOP_RULE)
601
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
602
AC_SUBST(INTLTOOL_KEYS_RULE)
603
AC_SUBST(INTLTOOL_PROP_RULE)
604
AC_SUBST(INTLTOOL_OAF_RULE)
605
AC_SUBST(INTLTOOL_PONG_RULE)
606
AC_SUBST(INTLTOOL_SERVER_RULE)
607
AC_SUBST(INTLTOOL_SHEET_RULE)
608
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
609
AC_SUBST(INTLTOOL_UI_RULE)
610
AC_SUBST(INTLTOOL_XAM_RULE)
611
AC_SUBST(INTLTOOL_KBD_RULE)
612
AC_SUBST(INTLTOOL_XML_RULE)
613
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
614
AC_SUBST(INTLTOOL_CAVES_RULE)
615
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
616
AC_SUBST(INTLTOOL_THEME_RULE)
617
AC_SUBST(INTLTOOL_SERVICE_RULE)
619
# Use the tools built into the package, not the ones that are installed.
620
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
621
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
622
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
624
AC_PATH_PROG(INTLTOOL_PERL, perl)
625
if test -z "$INTLTOOL_PERL"; then
626
AC_MSG_ERROR([perl not found; required for intltool])
628
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
629
AC_MSG_ERROR([perl 5.x required for intltool])
631
if test "x$2" != "xno-xml"; then
632
AC_MSG_CHECKING([for XML::Parser])
633
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
636
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
640
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
641
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
642
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
643
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
647
dnl The following is very similar to
649
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
651
dnl with the following slight differences:
652
dnl - the *.in files are in ac_aux_dir,
653
dnl - if the file haven't changed upon reconfigure, it's not touched,
654
dnl - the evaluation of the third parameter enables a hack which computes
655
dnl the actual value of $libdir,
656
dnl - the user sees "executing intltool commands", instead of
657
dnl "creating intltool-extract" and such.
659
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
662
AC_CONFIG_COMMANDS([intltool], [
664
for file in intltool-extract intltool-merge intltool-update; do
665
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
666
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
667
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
668
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
669
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
670
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
671
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
672
< ${ac_aux_dir}/${file}.in > ${file}.out
673
if cmp -s ${file} ${file}.out 2>/dev/null; then
676
mv -f ${file}.out ${file}
683
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
684
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
685
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
686
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
687
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
692
# IT_PO_SUBDIR(DIRNAME)
693
# ---------------------
694
# All po subdirs have to be declared with this macro; the subdir "po" is
695
# declared by IT_PROG_INTLTOOL.
697
AC_DEFUN([IT_PO_SUBDIR],
698
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
700
dnl The following CONFIG_COMMANDS should be exetuted at the very end
701
dnl of config.status.
702
AC_CONFIG_COMMANDS_PRE([
703
AC_CONFIG_COMMANDS([$1/stamp-it], [
704
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
709
'"s|^| $ac_top_srcdir/|" \
710
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
712
if test ! -f "$1/Makefile"; then
713
AC_MSG_ERROR([$1/Makefile is not ready.])
715
mv "$1/Makefile" "$1/Makefile.tmp"
716
[sed '/^POTFILES =/,/[^\\]$/ {
720
' "$1/Makefile.tmp" >"$1/Makefile"]
721
rm -f "$1/Makefile.tmp"
722
mv "$1/stamp-it.tmp" "$1/stamp-it"
729
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
730
# A hint is needed for aclocal from Automake <= 1.9.4:
731
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
734
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
736
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
738
# This program is free software; you can redistribute it and/or modify
739
# it under the terms of the GNU General Public License as published by
740
# the Free Software Foundation; either version 2 of the License, or
741
# (at your option) any later version.
743
# This program is distributed in the hope that it will be useful, but
744
# WITHOUT ANY WARRANTY; without even the implied warranty of
745
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
746
# General Public License for more details.
748
# You should have received a copy of the GNU General Public License
749
# along with this program; if not, write to the Free Software
750
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
752
# As a special exception to the GNU General Public License, if you
753
# distribute this file as part of a program that contains a
754
# configuration script generated by Autoconf, you may include it under
755
# the same distribution terms that you use for the rest of that program.
757
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
758
# ----------------------------------
759
AC_DEFUN([PKG_PROG_PKG_CONFIG],
760
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
761
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
762
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
763
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
764
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
766
if test -n "$PKG_CONFIG"; then
767
_pkg_min_version=m4_default([$1], [0.9.0])
768
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
769
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
777
])# PKG_PROG_PKG_CONFIG
779
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
781
# Check to see whether a particular set of modules exists. Similar
782
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
785
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
786
# this or PKG_CHECK_MODULES is called, or make sure to call
787
# PKG_CHECK_EXISTS manually
788
# --------------------------------------------------------------
789
AC_DEFUN([PKG_CHECK_EXISTS],
790
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
791
if test -n "$PKG_CONFIG" && \
792
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
793
m4_ifval([$2], [$2], [:])
794
m4_ifvaln([$3], [else
799
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
800
# ---------------------------------------------
801
m4_define([_PKG_CONFIG],
802
[if test -n "$PKG_CONFIG"; then
803
if test -n "$$1"; then
806
PKG_CHECK_EXISTS([$3],
807
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
815
# _PKG_SHORT_ERRORS_SUPPORTED
816
# -----------------------------
817
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
818
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
819
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
820
_pkg_short_errors_supported=yes
822
_pkg_short_errors_supported=no
824
])# _PKG_SHORT_ERRORS_SUPPORTED
827
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
828
# [ACTION-IF-NOT-FOUND])
831
# Note that if there is a possibility the first call to
832
# PKG_CHECK_MODULES might not happen, you should be sure to include an
833
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
836
# --------------------------------------------------------------
837
AC_DEFUN([PKG_CHECK_MODULES],
838
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
839
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
840
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
843
AC_MSG_CHECKING([for $1])
845
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
846
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
848
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
849
and $1[]_LIBS to avoid the need to call pkg-config.
850
See the pkg-config man page for more details.])
852
if test $pkg_failed = yes; then
853
_PKG_SHORT_ERRORS_SUPPORTED
854
if test $_pkg_short_errors_supported = yes; then
855
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
857
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
859
# Put the nasty error message in config.log where it belongs
860
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
862
ifelse([$4], , [AC_MSG_ERROR(dnl
863
[Package requirements ($2) were not met:
867
Consider adjusting the PKG_CONFIG_PATH environment variable if you
868
installed software in a non-standard prefix.
873
elif test $pkg_failed = untried; then
874
ifelse([$4], , [AC_MSG_FAILURE(dnl
875
[The pkg-config script could not be found or is too old. Make sure it
876
is in your PATH or set the PKG_CONFIG environment variable to the full
881
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
884
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
885
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
887
ifelse([$3], , :, [$3])
889
])# PKG_CHECK_MODULES
891
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
893
# This file is free software; the Free Software Foundation
894
# gives unlimited permission to copy and/or distribute it,
895
# with or without modifications, as long as this notice is preserved.
897
# AM_AUTOMAKE_VERSION(VERSION)
898
# ----------------------------
899
# Automake X.Y traces this macro to ensure aclocal.m4 has been
900
# generated from the m4 files accompanying Automake X.Y.
901
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
903
# AM_SET_CURRENT_AUTOMAKE_VERSION
904
# -------------------------------
905
# Call AM_AUTOMAKE_VERSION so it can be traced.
906
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
907
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
908
[AM_AUTOMAKE_VERSION([1.9.6])])
910
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
912
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
914
# This file is free software; the Free Software Foundation
915
# gives unlimited permission to copy and/or distribute it,
916
# with or without modifications, as long as this notice is preserved.
918
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
919
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
920
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
922
# Of course, Automake must honor this variable whenever it calls a
923
# tool from the auxiliary directory. The problem is that $srcdir (and
924
# therefore $ac_aux_dir as well) can be either absolute or relative,
925
# depending on how configure is run. This is pretty annoying, since
926
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
927
# source directory, any form will work fine, but in subdirectories a
928
# relative path needs to be adjusted first.
930
# $ac_aux_dir/missing
931
# fails when called from a subdirectory if $ac_aux_dir is relative
932
# $top_srcdir/$ac_aux_dir/missing
933
# fails if $ac_aux_dir is absolute,
934
# fails when called from a subdirectory in a VPATH build with
935
# a relative $ac_aux_dir
937
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
938
# are both prefixed by $srcdir. In an in-source build this is usually
939
# harmless because $srcdir is `.', but things will broke when you
940
# start a VPATH build or use an absolute $srcdir.
942
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
943
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
944
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
945
# and then we would define $MISSING as
946
# MISSING="\${SHELL} $am_aux_dir/missing"
947
# This will work as long as MISSING is not called from configure, because
948
# unfortunately $(top_srcdir) has no meaning in configure.
949
# However there are other variables, like CC, which are often used in
950
# configure, and could therefore not use this "fixed" $ac_aux_dir.
952
# Another solution, used here, is to always expand $ac_aux_dir to an
953
# absolute PATH. The drawback is that using absolute paths prevent a
954
# configured tree to be moved without reconfiguration.
956
AC_DEFUN([AM_AUX_DIR_EXPAND],
957
[dnl Rely on autoconf to set up CDPATH properly.
959
# expand $ac_aux_dir to an absolute path
960
am_aux_dir=`cd $ac_aux_dir && pwd`
964
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
965
# Free Software Foundation, Inc.
967
# This file is free software; the Free Software Foundation
968
# gives unlimited permission to copy and/or distribute it,
969
# with or without modifications, as long as this notice is preserved.
973
# This was merged into AC_PROG_CC in Autoconf.
975
AU_DEFUN([AM_PROG_CC_STDC],
977
AC_DIAGNOSE([obsolete], [$0:
978
your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
979
`ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
980
you adjust the code. You can also remove the above call to
981
AC_PROG_CC if you already called it elsewhere.])
982
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
984
AU_DEFUN([fp_PROG_CC_STDC])
986
# AM_CONDITIONAL -*- Autoconf -*-
988
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
989
# Free Software Foundation, Inc.
991
# This file is free software; the Free Software Foundation
992
# gives unlimited permission to copy and/or distribute it,
993
# with or without modifications, as long as this notice is preserved.
997
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
998
# -------------------------------------
999
# Define a conditional.
1000
AC_DEFUN([AM_CONDITIONAL],
1002
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1003
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1005
AC_SUBST([$1_FALSE])
1013
AC_CONFIG_COMMANDS_PRE(
1014
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1015
AC_MSG_ERROR([[conditional "$1" was never defined.
1016
Usually this means the macro was only invoked conditionally.]])
1020
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1021
# Free Software Foundation, Inc.
1023
# This file is free software; the Free Software Foundation
1024
# gives unlimited permission to copy and/or distribute it,
1025
# with or without modifications, as long as this notice is preserved.
1029
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1030
# written in clear, in which case automake, when reading aclocal.m4,
1031
# will think it sees a *use*, and therefore will trigger all it's
1032
# C support machinery. Also note that it means that autoscan, seeing
1033
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1036
# _AM_DEPENDENCIES(NAME)
1037
# ----------------------
1038
# See how the compiler implements dependency checking.
1039
# NAME is "CC", "CXX", "GCJ", or "OBJC".
1040
# We try a few techniques and use that to set a single cache variable.
1042
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1043
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1044
# dependency, and given that the user is not expected to run this macro,
1045
# just rely on AC_PROG_CC.
1046
AC_DEFUN([_AM_DEPENDENCIES],
1047
[AC_REQUIRE([AM_SET_DEPDIR])dnl
1048
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1049
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1050
AC_REQUIRE([AM_DEP_TRACK])dnl
1052
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1053
[$1], CXX, [depcc="$CXX" am_compiler_list=],
1054
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1055
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1056
[depcc="$$1" am_compiler_list=])
1058
AC_CACHE_CHECK([dependency style of $depcc],
1059
[am_cv_$1_dependencies_compiler_type],
1060
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1061
# We make a subdir and do the tests there. Otherwise we can end up
1062
# making bogus files that we don't know about and never remove. For
1063
# instance it was reported that on HP-UX the gcc test will end up
1064
# making a dummy file named `D' -- because `-MD' means `put the output
1067
# Copy depcomp to subdir because otherwise we won't find it if we're
1068
# using a relative directory.
1069
cp "$am_depcomp" conftest.dir
1071
# We will build objects and dependencies in a subdirectory because
1072
# it helps to detect inapplicable dependency modes. For instance
1073
# both Tru64's cc and ICC support -MD to output dependencies as a
1074
# side effect of compilation, but ICC will put the dependencies in
1075
# the current directory while Tru64 will put them in the object
1079
am_cv_$1_dependencies_compiler_type=none
1080
if test "$am_compiler_list" = ""; then
1081
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1083
for depmode in $am_compiler_list; do
1084
# Setup a source with many dependencies, because some compilers
1085
# like to wrap large dependency lists on column 80 (with \), and
1086
# we should not choose a depcomp mode which is confused by this.
1088
# We need to recreate these files for each test, as the compiler may
1089
# overwrite some of them when testing with obscure command lines.
1090
# This happens at least with the AIX C compiler.
1092
for i in 1 2 3 4 5 6; do
1093
echo '#include "conftst'$i'.h"' >> sub/conftest.c
1094
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1095
# Solaris 8's {/usr,}/bin/sh.
1096
touch sub/conftst$i.h
1098
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1102
# after this tag, mechanisms are not by side-effect, so they'll
1103
# only be used when explicitly requested
1104
if test "x$enable_dependency_tracking" = xyes; then
1112
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1113
# mode. It turns out that the SunPro C++ compiler does not properly
1114
# handle `-M -o', and we need to detect this.
1115
if depmode=$depmode \
1116
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1117
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1118
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1119
>/dev/null 2>conftest.err &&
1120
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1121
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1122
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1123
# icc doesn't choke on unknown options, it will just issue warnings
1124
# or remarks (even with -Werror). So we grep stderr for any message
1125
# that says an option was ignored or not supported.
1126
# When given -MP, icc 7.0 and 7.1 complain thusly:
1127
# icc: Command line warning: ignoring option '-M'; no argument required
1128
# The diagnosis changed in icc 8.0:
1129
# icc: Command line remark: option '-MP' not supported
1130
if (grep 'ignoring option' conftest.err ||
1131
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1132
am_cv_$1_dependencies_compiler_type=$depmode
1141
am_cv_$1_dependencies_compiler_type=none
1144
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1145
AM_CONDITIONAL([am__fastdep$1], [
1146
test "x$enable_dependency_tracking" != xno \
1147
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1153
# Choose a directory name for dependency files.
1154
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1155
AC_DEFUN([AM_SET_DEPDIR],
1156
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1157
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1163
AC_DEFUN([AM_DEP_TRACK],
1164
[AC_ARG_ENABLE(dependency-tracking,
1165
[ --disable-dependency-tracking speeds up one-time build
1166
--enable-dependency-tracking do not reject slow dependency extractors])
1167
if test "x$enable_dependency_tracking" != xno; then
1168
am_depcomp="$ac_aux_dir/depcomp"
1171
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1172
AC_SUBST([AMDEPBACKSLASH])
1175
# Generate code to set up dependency tracking. -*- Autoconf -*-
1177
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1178
# Free Software Foundation, Inc.
1180
# This file is free software; the Free Software Foundation
1181
# gives unlimited permission to copy and/or distribute it,
1182
# with or without modifications, as long as this notice is preserved.
1186
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1187
# ------------------------------
1188
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1189
[for mf in $CONFIG_FILES; do
1190
# Strip MF so we end up with the name of the file.
1191
mf=`echo "$mf" | sed -e 's/:.*$//'`
1192
# Check whether this is an Automake generated Makefile or not.
1193
# We used to match only the files named `Makefile.in', but
1194
# some people rename them; so instead we look at the file content.
1195
# Grep'ing the first line is not enough: some people post-process
1196
# each Makefile.in and add a new line on top of each file to say so.
1197
# So let's grep whole file.
1198
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1199
dirpart=`AS_DIRNAME("$mf")`
1203
# Extract the definition of DEPDIR, am__include, and am__quote
1204
# from the Makefile without running `make'.
1205
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1206
test -z "$DEPDIR" && continue
1207
am__include=`sed -n 's/^am__include = //p' < "$mf"`
1208
test -z "am__include" && continue
1209
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1210
# When using ansi2knr, U may be empty or an underscore; expand it
1211
U=`sed -n 's/^U = //p' < "$mf"`
1212
# Find all dependency output files, they are included files with
1213
# $(DEPDIR) in their names. We invoke sed twice because it is the
1214
# simplest approach to changing $(DEPDIR) to its actual value in the
1216
for file in `sed -n "
1217
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1218
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1219
# Make sure the directory exists.
1220
test -f "$dirpart/$file" && continue
1221
fdir=`AS_DIRNAME(["$file"])`
1222
AS_MKDIR_P([$dirpart/$fdir])
1223
# echo "creating $dirpart/$file"
1224
echo '# dummy' > "$dirpart/$file"
1227
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1230
# AM_OUTPUT_DEPENDENCY_COMMANDS
1231
# -----------------------------
1232
# This macro should only be invoked once -- use via AC_REQUIRE.
1234
# This code is only required when automatic dependency tracking
1235
# is enabled. FIXME. This creates each `.P' file that we will
1236
# need in order to bootstrap the dependency handling code.
1237
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1238
[AC_CONFIG_COMMANDS([depfiles],
1239
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1240
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1243
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1244
# Free Software Foundation, Inc.
1246
# This file is free software; the Free Software Foundation
1247
# gives unlimited permission to copy and/or distribute it,
1248
# with or without modifications, as long as this notice is preserved.
1252
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1253
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1255
# Do all the work for Automake. -*- Autoconf -*-
1257
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
1258
# Free Software Foundation, Inc.
1260
# This file is free software; the Free Software Foundation
1261
# gives unlimited permission to copy and/or distribute it,
1262
# with or without modifications, as long as this notice is preserved.
1266
# This macro actually does too much. Some checks are only needed if
1267
# your package does certain things. But this isn't really a big deal.
1269
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1270
# AM_INIT_AUTOMAKE([OPTIONS])
1271
# -----------------------------------------------
1272
# The call with PACKAGE and VERSION arguments is the old style
1273
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1274
# and VERSION should now be passed to AC_INIT and removed from
1275
# the call to AM_INIT_AUTOMAKE.
1276
# We support both call styles for the transition. After
1277
# the next Automake release, Autoconf can make the AC_INIT
1278
# arguments mandatory, and then we can depend on a new Autoconf
1279
# release and drop the old call support.
1280
AC_DEFUN([AM_INIT_AUTOMAKE],
1281
[AC_PREREQ([2.58])dnl
1282
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1283
dnl the ones we care about.
1284
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1285
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1286
AC_REQUIRE([AC_PROG_INSTALL])dnl
1287
# test to see if srcdir already configured
1288
if test "`cd $srcdir && pwd`" != "`pwd`" &&
1289
test -f $srcdir/config.status; then
1290
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1293
# test whether we have cygpath
1294
if test -z "$CYGPATH_W"; then
1295
if (cygpath --version) >/dev/null 2>/dev/null; then
1296
CYGPATH_W='cygpath -w'
1301
AC_SUBST([CYGPATH_W])
1303
# Define the identity of the package.
1304
dnl Distinguish between old-style and new-style calls.
1306
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1307
AC_SUBST([PACKAGE], [$1])dnl
1308
AC_SUBST([VERSION], [$2])],
1309
[_AM_SET_OPTIONS([$1])dnl
1310
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1311
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1313
_AM_IF_OPTION([no-define],,
1314
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1315
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1317
# Some tools Automake needs.
1318
AC_REQUIRE([AM_SANITY_CHECK])dnl
1319
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1320
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1321
AM_MISSING_PROG(AUTOCONF, autoconf)
1322
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1323
AM_MISSING_PROG(AUTOHEADER, autoheader)
1324
AM_MISSING_PROG(MAKEINFO, makeinfo)
1326
AM_PROG_INSTALL_STRIP
1327
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1328
# We need awk for the "check" target. The system "awk" is bad on
1330
AC_REQUIRE([AC_PROG_AWK])dnl
1331
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1332
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1333
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1334
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1335
[_AM_PROG_TAR([v7])])])
1336
_AM_IF_OPTION([no-dependencies],,
1337
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1338
[_AM_DEPENDENCIES(CC)],
1339
[define([AC_PROG_CC],
1340
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1341
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1342
[_AM_DEPENDENCIES(CXX)],
1343
[define([AC_PROG_CXX],
1344
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1349
# When config.status generates a header, we must update the stamp-h file.
1350
# This file resides in the same directory as the config header
1351
# that is generated. The stamp files are numbered to have different names.
1353
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1354
# loop where config.status creates the headers, so we can generate
1355
# our stamp files there.
1356
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1357
[# Compute $1's index in $config_headers.
1359
for _am_header in $config_headers :; do
1364
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1367
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1369
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1371
# This file is free software; the Free Software Foundation
1372
# gives unlimited permission to copy and/or distribute it,
1373
# with or without modifications, as long as this notice is preserved.
1375
# AM_PROG_INSTALL_SH
1376
# ------------------
1377
# Define $install_sh.
1378
AC_DEFUN([AM_PROG_INSTALL_SH],
1379
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1380
install_sh=${install_sh-"$am_aux_dir/install-sh"}
1381
AC_SUBST(install_sh)])
1383
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1385
# This file is free software; the Free Software Foundation
1386
# gives unlimited permission to copy and/or distribute it,
1387
# with or without modifications, as long as this notice is preserved.
1391
# Check whether the underlying file-system supports filenames
1392
# with a leading dot. For instance MS-DOS doesn't.
1393
AC_DEFUN([AM_SET_LEADING_DOT],
1394
[rm -rf .tst 2>/dev/null
1395
mkdir .tst 2>/dev/null
1396
if test -d .tst; then
1401
rmdir .tst 2>/dev/null
1402
AC_SUBST([am__leading_dot])])
1404
# Check to see how 'make' treats includes. -*- Autoconf -*-
1406
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1408
# This file is free software; the Free Software Foundation
1409
# gives unlimited permission to copy and/or distribute it,
1410
# with or without modifications, as long as this notice is preserved.
1416
# Check to see how make treats includes.
1417
AC_DEFUN([AM_MAKE_INCLUDE],
1418
[am_make=${MAKE-make}
1419
cat > confinc << 'END'
1424
# If we don't find an include directive, just comment out the code.
1425
AC_MSG_CHECKING([for style of include used by $am_make])
1429
# First try GNU make style include.
1430
echo "include confinc" > confmf
1431
# We grep out `Entering directory' and `Leaving directory'
1432
# messages which can occur if `w' ends up in MAKEFLAGS.
1433
# In particular we don't look at `^make:' because GNU make might
1434
# be invoked under some other name (usually "gmake"), in which
1435
# case it prints its new name instead of `make'.
1436
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1441
# Now try BSD make style include.
1442
if test "$am__include" = "#"; then
1443
echo '.include "confinc"' > confmf
1444
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1445
am__include=.include
1450
AC_SUBST([am__include])
1451
AC_SUBST([am__quote])
1452
AC_MSG_RESULT([$_am_result])
1453
rm -f confinc confmf
1456
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1458
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
1459
# Free Software Foundation, Inc.
1461
# This file is free software; the Free Software Foundation
1462
# gives unlimited permission to copy and/or distribute it,
1463
# with or without modifications, as long as this notice is preserved.
1467
# AM_MISSING_PROG(NAME, PROGRAM)
1468
# ------------------------------
1469
AC_DEFUN([AM_MISSING_PROG],
1470
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1471
$1=${$1-"${am_missing_run}$2"}
1475
# AM_MISSING_HAS_RUN
1476
# ------------------
1477
# Define MISSING if not defined so far and test if it supports --run.
1478
# If it does, set am_missing_run to use it, otherwise, to nothing.
1479
AC_DEFUN([AM_MISSING_HAS_RUN],
1480
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1481
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1482
# Use eval to expand $SHELL
1483
if eval "$MISSING --run true"; then
1484
am_missing_run="$MISSING --run "
1487
AC_MSG_WARN([`missing' script is too old or missing])
1491
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
1493
# This file is free software; the Free Software Foundation
1494
# gives unlimited permission to copy and/or distribute it,
1495
# with or without modifications, as long as this notice is preserved.
1499
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
1501
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
1502
# created by `make install' are always world readable, even if the
1503
# installer happens to have an overly restrictive umask (e.g. 077).
1504
# This was a mistake. There are at least two reasons why we must not
1506
# - it causes special bits like SGID to be ignored,
1507
# - it may be too restrictive (some setups expect 775 directories).
1509
# Do not use -m 0755 and let people choose whatever they expect by
1512
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
1513
# Some implementations (such as Solaris 8's) are not thread-safe: if a
1514
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
1515
# concurrently, both version can detect that a/ is missing, but only
1516
# one can create it and the other will error out. Consequently we
1517
# restrict ourselves to GNU make (using the --version option ensures
1519
AC_DEFUN([AM_PROG_MKDIR_P],
1520
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1521
# We used to keeping the `.' as first argument, in order to
1522
# allow $(mkdir_p) to be used without argument. As in
1523
# $(mkdir_p) $(somedir)
1524
# where $(somedir) is conditionally defined. However this is wrong
1526
# 1. if the package is installed by a user who cannot write `.'
1527
# make install will fail,
1528
# 2. the above comment should most certainly read
1529
# $(mkdir_p) $(DESTDIR)$(somedir)
1530
# so it does not work when $(somedir) is undefined and
1531
# $(DESTDIR) is not.
1532
# To support the latter case, we have to write
1533
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1534
# so the `.' trick is pointless.
1535
mkdir_p='mkdir -p --'
1537
# On NextStep and OpenStep, the `mkdir' command does not
1538
# recognize any option. It will interpret all options as
1539
# directories to create, and then abort because `.' already
1541
for d in ./-p ./--version;
1543
test -d $d && rmdir $d
1545
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1546
if test -f "$ac_aux_dir/mkinstalldirs"; then
1547
mkdir_p='$(mkinstalldirs)'
1549
mkdir_p='$(install_sh) -d'
1552
AC_SUBST([mkdir_p])])
1554
# Helper functions for option handling. -*- Autoconf -*-
1556
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1558
# This file is free software; the Free Software Foundation
1559
# gives unlimited permission to copy and/or distribute it,
1560
# with or without modifications, as long as this notice is preserved.
1564
# _AM_MANGLE_OPTION(NAME)
1565
# -----------------------
1566
AC_DEFUN([_AM_MANGLE_OPTION],
1567
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1569
# _AM_SET_OPTION(NAME)
1570
# ------------------------------
1571
# Set option NAME. Presently that only means defining a flag for this option.
1572
AC_DEFUN([_AM_SET_OPTION],
1573
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1575
# _AM_SET_OPTIONS(OPTIONS)
1576
# ----------------------------------
1577
# OPTIONS is a space-separated list of Automake options.
1578
AC_DEFUN([_AM_SET_OPTIONS],
1579
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1581
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1582
# -------------------------------------------
1583
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1584
AC_DEFUN([_AM_IF_OPTION],
1585
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1587
# Check to make sure that the build environment is sane. -*- Autoconf -*-
1589
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1590
# Free Software Foundation, Inc.
1592
# This file is free software; the Free Software Foundation
1593
# gives unlimited permission to copy and/or distribute it,
1594
# with or without modifications, as long as this notice is preserved.
1600
AC_DEFUN([AM_SANITY_CHECK],
1601
[AC_MSG_CHECKING([whether build environment is sane])
1604
echo timestamp > conftest.file
1605
# Do `set' in a subshell so we don't clobber the current shell's
1606
# arguments. Must try -L first in case configure is actually a
1607
# symlink; some systems play weird games with the mod time of symlinks
1608
# (eg FreeBSD returns the mod time of the symlink's containing
1611
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1612
if test "$[*]" = "X"; then
1614
set X `ls -t $srcdir/configure conftest.file`
1617
if test "$[*]" != "X $srcdir/configure conftest.file" \
1618
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1620
# If neither matched, then we have a broken ls. This can happen
1621
# if, for instance, CONFIG_SHELL is bash and it inherits a
1622
# broken ls alias from the environment. This has actually
1623
# happened. Such a system could not be considered "sane".
1624
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1625
alias in your environment])
1628
test "$[2]" = conftest.file
1634
AC_MSG_ERROR([newly created file is older than distributed files!
1635
Check your system clock])
1637
AC_MSG_RESULT(yes)])
1639
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1641
# This file is free software; the Free Software Foundation
1642
# gives unlimited permission to copy and/or distribute it,
1643
# with or without modifications, as long as this notice is preserved.
1645
# AM_PROG_INSTALL_STRIP
1646
# ---------------------
1647
# One issue with vendor `install' (even GNU) is that you can't
1648
# specify the program used to strip binaries. This is especially
1649
# annoying in cross-compiling environments, where the build's strip
1650
# is unlikely to handle the host's binaries.
1651
# Fortunately install-sh will honor a STRIPPROG variable, so we
1652
# always use install-sh in `make install-strip', and initialize
1653
# STRIPPROG with the value of the STRIP variable (set by the user).
1654
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1655
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1656
# Installed binaries are usually stripped using `strip' when the user
1657
# run `make install-strip'. However `strip' might not be the right
1658
# tool to use in cross-compilation environments, therefore Automake
1659
# will honor the `STRIP' environment variable to overrule this program.
1660
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1661
if test "$cross_compiling" != no; then
1662
AC_CHECK_TOOL([STRIP], [strip], :)
1664
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1665
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1667
# Check how to create a tarball. -*- Autoconf -*-
1669
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1671
# This file is free software; the Free Software Foundation
1672
# gives unlimited permission to copy and/or distribute it,
1673
# with or without modifications, as long as this notice is preserved.
1677
# _AM_PROG_TAR(FORMAT)
1678
# --------------------
1679
# Check how to create a tarball in format FORMAT.
1680
# FORMAT should be one of `v7', `ustar', or `pax'.
1682
# Substitute a variable $(am__tar) that is a command
1683
# writing to stdout a FORMAT-tarball containing the directory
1685
# tardir=directory && $(am__tar) > result.tar
1687
# Substitute a variable $(am__untar) that extract such
1688
# a tarball read from stdin.
1689
# $(am__untar) < result.tar
1690
AC_DEFUN([_AM_PROG_TAR],
1691
[# Always define AMTAR for backward compatibility.
1692
AM_MISSING_PROG([AMTAR], [tar])
1694
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1695
[m4_case([$1], [ustar],, [pax],,
1696
[m4_fatal([Unknown tar format])])
1697
AC_MSG_CHECKING([how to create a $1 tar archive])
1698
# Loop over all known methods to create a tar archive until one works.
1699
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1700
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1701
# Do not fold the above two line into one, because Tru64 sh and
1702
# Solaris sh will not grok spaces in the rhs of `-'.
1703
for _am_tool in $_am_tools
1707
for _am_tar in tar gnutar gtar;
1709
AM_RUN_LOG([$_am_tar --version]) && break
1711
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1712
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1713
am__untar="$_am_tar -xf -"
1716
# Must skip GNU tar: if it does not support --format= it doesn't create
1717
# ustar tarball either.
1718
(tar --version) >/dev/null 2>&1 && continue
1719
am__tar='tar chf - "$$tardir"'
1720
am__tar_='tar chf - "$tardir"'
1721
am__untar='tar xf -'
1724
am__tar='pax -L -x $1 -w "$$tardir"'
1725
am__tar_='pax -L -x $1 -w "$tardir"'
1729
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1730
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1731
am__untar='cpio -i -H $1 -d'
1740
# If the value was cached, stop now. We just wanted to have am__tar
1741
# and am__untar set.
1742
test -n "${am_cv_prog_tar_$1}" && break
1744
# tar/untar a dummy directory, and stop if the command works
1747
echo GrepMe > conftest.dir/file
1748
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1750
if test -s conftest.tar; then
1751
AM_RUN_LOG([$am__untar <conftest.tar])
1752
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1757
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1758
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1760
AC_SUBST([am__untar])