1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# lib-link.m4 serial 21 (gettext-0.18)
23
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
24
dnl This file is free software; the Free Software Foundation
25
dnl gives unlimited permission to copy and/or distribute it,
26
dnl with or without modifications, as long as this notice is preserved.
28
dnl From Bruno Haible.
32
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
33
dnl the libraries corresponding to explicit and implicit dependencies.
34
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
35
dnl augments the CPPFLAGS variable.
36
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
37
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
38
AC_DEFUN([AC_LIB_LINKFLAGS],
40
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
41
AC_REQUIRE([AC_LIB_RPATH])
42
pushdef([Name],[translit([$1],[./-], [___])])
43
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
44
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
45
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
46
AC_LIB_LINKFLAGS_BODY([$1], [$2])
47
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
48
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
49
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
50
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
52
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
53
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
54
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
55
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
56
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
59
AC_SUBST([LIB]NAME[_PREFIX])
60
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
61
dnl results of this search when this library appears as a dependency.
67
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
68
dnl searches for libname and the libraries corresponding to explicit and
69
dnl implicit dependencies, together with the specified include files and
70
dnl the ability to compile and link the specified testcode. The missing-message
71
dnl defaults to 'no' and may contain additional hints for the user.
72
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
73
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
74
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
75
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
76
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
77
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
78
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
80
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
81
AC_REQUIRE([AC_LIB_RPATH])
82
pushdef([Name],[translit([$1],[./-], [___])])
83
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
84
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
86
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
88
AC_LIB_LINKFLAGS_BODY([$1], [$2])
90
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
91
dnl because if the user has installed lib[]Name and not disabled its use
92
dnl via --without-lib[]Name-prefix, he wants to use it.
93
ac_save_CPPFLAGS="$CPPFLAGS"
94
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
96
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
98
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
99
dnl because these -l options might require -L options that are present in
100
dnl LIBS. -l options benefit only from the -L options listed before it.
101
dnl Otherwise, add it to the front of LIBS, because it may be a static
102
dnl library that depends on another static library that is present in LIBS.
103
dnl Static libraries benefit only from the static libraries listed after
105
case " $LIB[]NAME" in
106
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
107
*) LIBS="$LIB[]NAME $LIBS" ;;
109
AC_TRY_LINK([$3], [$4],
110
[ac_cv_lib[]Name=yes],
111
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
114
if test "$ac_cv_lib[]Name" = yes; then
116
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
117
AC_MSG_CHECKING([how to link with lib[]$1])
118
AC_MSG_RESULT([$LIB[]NAME])
121
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
122
dnl $INC[]NAME either.
123
CPPFLAGS="$ac_save_CPPFLAGS"
128
AC_SUBST([HAVE_LIB]NAME)
130
AC_SUBST([LTLIB]NAME)
131
AC_SUBST([LIB]NAME[_PREFIX])
136
dnl Determine the platform dependent parameters needed to use rpath:
139
dnl acl_hardcode_libdir_flag_spec,
140
dnl acl_hardcode_libdir_separator,
141
dnl acl_hardcode_direct,
142
dnl acl_hardcode_minus_L.
143
AC_DEFUN([AC_LIB_RPATH],
145
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
146
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
147
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
148
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
149
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
150
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
151
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
152
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
153
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
159
acl_libext="$acl_cv_libext"
160
acl_shlibext="$acl_cv_shlibext"
161
acl_libname_spec="$acl_cv_libname_spec"
162
acl_library_names_spec="$acl_cv_library_names_spec"
163
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
164
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
165
acl_hardcode_direct="$acl_cv_hardcode_direct"
166
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
167
dnl Determine whether the user wants rpath handling at all.
168
AC_ARG_ENABLE([rpath],
169
[ --disable-rpath do not hardcode runtime library paths],
173
dnl AC_LIB_FROMPACKAGE(name, package)
174
dnl declares that libname comes from the given package. The configure file
175
dnl will then not have a --with-libname-prefix option but a
176
dnl --with-package-prefix option. Several libraries can come from the same
177
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
178
dnl macro call that searches for libname.
179
AC_DEFUN([AC_LIB_FROMPACKAGE],
181
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
182
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
183
define([acl_frompackage_]NAME, [$2])
186
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
187
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
188
define([acl_libsinpackage_]PACKUP,
189
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
194
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
195
dnl the libraries corresponding to explicit and implicit dependencies.
196
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
197
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
198
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
199
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
201
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
202
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
203
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
204
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
205
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
206
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
207
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
208
dnl Autoconf >= 2.61 supports dots in --with options.
209
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
210
dnl By default, look in $includedir and $libdir.
212
AC_LIB_WITH_FINAL_PREFIX([
213
eval additional_includedir=\"$includedir\"
214
eval additional_libdir=\"$libdir\"
216
AC_ARG_WITH(P_A_C_K[-prefix],
217
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
218
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
220
if test "X$withval" = "Xno"; then
223
if test "X$withval" = "X"; then
224
AC_LIB_WITH_FINAL_PREFIX([
225
eval additional_includedir=\"$includedir\"
226
eval additional_libdir=\"$libdir\"
229
additional_includedir="$withval/include"
230
additional_libdir="$withval/$acl_libdirstem"
231
if test "$acl_libdirstem2" != "$acl_libdirstem" \
232
&& ! test -d "$withval/$acl_libdirstem"; then
233
additional_libdir="$withval/$acl_libdirstem2"
238
dnl Search the library and its dependencies in $additional_libdir and
239
dnl $LDFLAGS. Using breadth-first-seach.
244
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
245
dnl computed. So it has to be reset here.
249
names_already_handled=
250
names_next_round='$1 $2'
251
while test -n "$names_next_round"; do
252
names_this_round="$names_next_round"
254
for name in $names_this_round; do
256
for n in $names_already_handled; do
257
if test "$n" = "$name"; then
262
if test -z "$already_handled"; then
263
names_already_handled="$names_already_handled $name"
264
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
265
dnl or AC_LIB_HAVE_LINKFLAGS call.
266
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
267
eval value=\"\$HAVE_LIB$uppername\"
268
if test -n "$value"; then
269
if test "$value" = yes; then
270
eval value=\"\$LIB$uppername\"
271
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
272
eval value=\"\$LTLIB$uppername\"
273
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
275
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
276
dnl that this library doesn't exist. So just drop it.
280
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
281
dnl and the already constructed $LIBNAME/$LTLIBNAME.
286
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
287
if test -n "$acl_shlibext"; then
288
shrext=".$acl_shlibext" # typically: shrext=.so
292
if test $use_additional = yes; then
293
dir="$additional_libdir"
294
dnl The same code as in the loop below:
295
dnl First look for a shared library.
296
if test -n "$acl_shlibext"; then
297
if test -f "$dir/$libname$shrext"; then
299
found_so="$dir/$libname$shrext"
301
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
303
for f in "$libname$shrext".*; do echo "$f"; done \
304
| sed -e "s,^$libname$shrext\\\\.,," \
305
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
306
| sed 1q ) 2>/dev/null`
307
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
309
found_so="$dir/$libname$shrext.$ver"
312
eval library_names=\"$acl_library_names_spec\"
313
for f in $library_names; do
314
if test -f "$dir/$f"; then
323
dnl Then look for a static library.
324
if test "X$found_dir" = "X"; then
325
if test -f "$dir/$libname.$acl_libext"; then
327
found_a="$dir/$libname.$acl_libext"
330
if test "X$found_dir" != "X"; then
331
if test -f "$dir/$libname.la"; then
332
found_la="$dir/$libname.la"
336
if test "X$found_dir" = "X"; then
337
for x in $LDFLAGS $LTLIB[]NAME; do
338
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
341
dir=`echo "X$x" | sed -e 's/^X-L//'`
342
dnl First look for a shared library.
343
if test -n "$acl_shlibext"; then
344
if test -f "$dir/$libname$shrext"; then
346
found_so="$dir/$libname$shrext"
348
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
350
for f in "$libname$shrext".*; do echo "$f"; done \
351
| sed -e "s,^$libname$shrext\\\\.,," \
352
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
353
| sed 1q ) 2>/dev/null`
354
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
356
found_so="$dir/$libname$shrext.$ver"
359
eval library_names=\"$acl_library_names_spec\"
360
for f in $library_names; do
361
if test -f "$dir/$f"; then
370
dnl Then look for a static library.
371
if test "X$found_dir" = "X"; then
372
if test -f "$dir/$libname.$acl_libext"; then
374
found_a="$dir/$libname.$acl_libext"
377
if test "X$found_dir" != "X"; then
378
if test -f "$dir/$libname.la"; then
379
found_la="$dir/$libname.la"
384
if test "X$found_dir" != "X"; then
389
if test "X$found_dir" != "X"; then
390
dnl Found the library.
391
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
392
if test "X$found_so" != "X"; then
393
dnl Linking with a shared library. We attempt to hardcode its
394
dnl directory into the executable's runpath, unless it's the
395
dnl standard /usr/lib.
396
if test "$enable_rpath" = no \
397
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
398
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
399
dnl No hardcoding is needed.
400
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
402
dnl Use an explicit option to hardcode DIR into the resulting
404
dnl Potentially add DIR to ltrpathdirs.
405
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
407
for x in $ltrpathdirs; do
408
if test "X$x" = "X$found_dir"; then
413
if test -z "$haveit"; then
414
ltrpathdirs="$ltrpathdirs $found_dir"
416
dnl The hardcoding into $LIBNAME is system dependent.
417
if test "$acl_hardcode_direct" = yes; then
418
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
419
dnl resulting binary.
420
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
422
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
423
dnl Use an explicit option to hardcode DIR into the resulting
425
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
426
dnl Potentially add DIR to rpathdirs.
427
dnl The rpathdirs will be appended to $LIBNAME at the end.
429
for x in $rpathdirs; do
430
if test "X$x" = "X$found_dir"; then
435
if test -z "$haveit"; then
436
rpathdirs="$rpathdirs $found_dir"
439
dnl Rely on "-L$found_dir".
440
dnl But don't add it if it's already contained in the LDFLAGS
441
dnl or the already constructed $LIBNAME
443
for x in $LDFLAGS $LIB[]NAME; do
444
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
445
if test "X$x" = "X-L$found_dir"; then
450
if test -z "$haveit"; then
451
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
453
if test "$acl_hardcode_minus_L" != no; then
454
dnl FIXME: Not sure whether we should use
455
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
457
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
459
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
460
dnl here, because this doesn't fit in flags passed to the
461
dnl compiler. So give up. No hardcoding. This affects only
462
dnl very old systems.
463
dnl FIXME: Not sure whether we should use
464
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
466
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
472
if test "X$found_a" != "X"; then
473
dnl Linking with a static library.
474
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
476
dnl We shouldn't come here, but anyway it's good to have a
478
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
481
dnl Assume the include files are nearby.
482
additional_includedir=
484
*/$acl_libdirstem | */$acl_libdirstem/)
485
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
486
if test "$name" = '$1'; then
487
LIB[]NAME[]_PREFIX="$basedir"
489
additional_includedir="$basedir/include"
491
*/$acl_libdirstem2 | */$acl_libdirstem2/)
492
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
493
if test "$name" = '$1'; then
494
LIB[]NAME[]_PREFIX="$basedir"
496
additional_includedir="$basedir/include"
499
if test "X$additional_includedir" != "X"; then
500
dnl Potentially add $additional_includedir to $INCNAME.
502
dnl 1. if it's the standard /usr/include,
503
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
504
dnl 3. if it's already present in $CPPFLAGS or the already
505
dnl constructed $INCNAME,
506
dnl 4. if it doesn't exist as a directory.
507
if test "X$additional_includedir" != "X/usr/include"; then
509
if test "X$additional_includedir" = "X/usr/local/include"; then
510
if test -n "$GCC"; then
512
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
516
if test -z "$haveit"; then
517
for x in $CPPFLAGS $INC[]NAME; do
518
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
519
if test "X$x" = "X-I$additional_includedir"; then
524
if test -z "$haveit"; then
525
if test -d "$additional_includedir"; then
526
dnl Really add $additional_includedir to $INCNAME.
527
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
533
dnl Look for dependencies.
534
if test -n "$found_la"; then
535
dnl Read the .la file. It defines the variables
536
dnl dlname, library_names, old_library, dependency_libs, current,
537
dnl age, revision, installed, dlopen, dlpreopen, libdir.
538
save_libdir="$libdir"
540
*/* | *\\*) . "$found_la" ;;
541
*) . "./$found_la" ;;
543
libdir="$save_libdir"
544
dnl We use only dependency_libs.
545
for dep in $dependency_libs; do
548
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
549
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
551
dnl 1. if it's the standard /usr/lib,
552
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
553
dnl 3. if it's already present in $LDFLAGS or the already
554
dnl constructed $LIBNAME,
555
dnl 4. if it doesn't exist as a directory.
556
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
557
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
559
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
560
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
561
if test -n "$GCC"; then
563
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
567
if test -z "$haveit"; then
569
for x in $LDFLAGS $LIB[]NAME; do
570
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
571
if test "X$x" = "X-L$additional_libdir"; then
576
if test -z "$haveit"; then
577
if test -d "$additional_libdir"; then
578
dnl Really add $additional_libdir to $LIBNAME.
579
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
583
for x in $LDFLAGS $LTLIB[]NAME; do
584
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
585
if test "X$x" = "X-L$additional_libdir"; then
590
if test -z "$haveit"; then
591
if test -d "$additional_libdir"; then
592
dnl Really add $additional_libdir to $LTLIBNAME.
593
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
600
dir=`echo "X$dep" | sed -e 's/^X-R//'`
601
if test "$enable_rpath" != no; then
602
dnl Potentially add DIR to rpathdirs.
603
dnl The rpathdirs will be appended to $LIBNAME at the end.
605
for x in $rpathdirs; do
606
if test "X$x" = "X$dir"; then
611
if test -z "$haveit"; then
612
rpathdirs="$rpathdirs $dir"
614
dnl Potentially add DIR to ltrpathdirs.
615
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
617
for x in $ltrpathdirs; do
618
if test "X$x" = "X$dir"; then
623
if test -z "$haveit"; then
624
ltrpathdirs="$ltrpathdirs $dir"
629
dnl Handle this in the next round.
630
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
633
dnl Handle this in the next round. Throw away the .la's
634
dnl directory; it is already contained in a preceding -L
636
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
639
dnl Most likely an immediate library name.
640
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
641
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
647
dnl Didn't find the library; assume it is in the system directories
648
dnl known to the linker and runtime loader. (All the system
649
dnl directories known to the linker should also be known to the
650
dnl runtime loader, otherwise the system is severely misconfigured.)
651
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
652
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
658
if test "X$rpathdirs" != "X"; then
659
if test -n "$acl_hardcode_libdir_separator"; then
660
dnl Weird platform: only the last -rpath option counts, the user must
661
dnl pass all path elements in one option. We can arrange that for a
662
dnl single library, but not when more than one $LIBNAMEs are used.
664
for found_dir in $rpathdirs; do
665
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
667
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
668
acl_save_libdir="$libdir"
670
eval flag=\"$acl_hardcode_libdir_flag_spec\"
671
libdir="$acl_save_libdir"
672
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
674
dnl The -rpath options are cumulative.
675
for found_dir in $rpathdirs; do
676
acl_save_libdir="$libdir"
678
eval flag=\"$acl_hardcode_libdir_flag_spec\"
679
libdir="$acl_save_libdir"
680
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
684
if test "X$ltrpathdirs" != "X"; then
685
dnl When using libtool, the option that works for both libraries and
686
dnl executables is -R. The -R options are cumulative.
687
for found_dir in $ltrpathdirs; do
688
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
698
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
699
dnl unless already present in VAR.
700
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
701
dnl contains two or three consecutive elements that belong together.
702
AC_DEFUN([AC_LIB_APPENDTOVAR],
704
for element in [$2]; do
707
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
708
if test "X$x" = "X$element"; then
713
if test -z "$haveit"; then
714
[$1]="${[$1]}${[$1]:+ }$element"
719
dnl For those cases where a variable contains several -L and -l options
720
dnl referring to unknown libraries and directories, this macro determines the
721
dnl necessary additional linker options for the runtime path.
722
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
723
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
724
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
725
dnl otherwise linking without libtool is assumed.
726
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
728
AC_REQUIRE([AC_LIB_RPATH])
729
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
731
if test "$enable_rpath" != no; then
732
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
733
dnl Use an explicit option to hardcode directories into the resulting
738
if test -n "$next"; then
740
dnl No need to hardcode the standard /usr/lib.
741
if test "X$dir" != "X/usr/$acl_libdirstem" \
742
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
743
rpathdirs="$rpathdirs $dir"
749
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
750
dnl No need to hardcode the standard /usr/lib.
751
if test "X$dir" != "X/usr/$acl_libdirstem" \
752
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
753
rpathdirs="$rpathdirs $dir"
760
if test "X$rpathdirs" != "X"; then
761
if test -n ""$3""; then
762
dnl libtool is used for linking. Use -R options.
763
for dir in $rpathdirs; do
764
$1="${$1}${$1:+ }-R$dir"
767
dnl The linker is used for linking directly.
768
if test -n "$acl_hardcode_libdir_separator"; then
769
dnl Weird platform: only the last -rpath option counts, the user
770
dnl must pass all path elements in one option.
772
for dir in $rpathdirs; do
773
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
775
acl_save_libdir="$libdir"
777
eval flag=\"$acl_hardcode_libdir_flag_spec\"
778
libdir="$acl_save_libdir"
781
dnl The -rpath options are cumulative.
782
for dir in $rpathdirs; do
783
acl_save_libdir="$libdir"
785
eval flag=\"$acl_hardcode_libdir_flag_spec\"
786
libdir="$acl_save_libdir"
787
$1="${$1}${$1:+ }$flag"
797
# lib-prefix.m4 serial 7 (gettext-0.18)
798
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
799
dnl This file is free software; the Free Software Foundation
800
dnl gives unlimited permission to copy and/or distribute it,
801
dnl with or without modifications, as long as this notice is preserved.
803
dnl From Bruno Haible.
805
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
806
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
807
dnl require excessive bracketing.
808
ifdef([AC_HELP_STRING],
809
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
810
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
812
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
813
dnl to access previously installed libraries. The basic assumption is that
814
dnl a user will want packages to use other packages he previously installed
815
dnl with the same --prefix option.
816
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
817
dnl libraries, but is otherwise very convenient.
818
AC_DEFUN([AC_LIB_PREFIX],
820
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
821
AC_REQUIRE([AC_PROG_CC])
822
AC_REQUIRE([AC_CANONICAL_HOST])
823
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
824
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
825
dnl By default, look in $includedir and $libdir.
827
AC_LIB_WITH_FINAL_PREFIX([
828
eval additional_includedir=\"$includedir\"
829
eval additional_libdir=\"$libdir\"
831
AC_LIB_ARG_WITH([lib-prefix],
832
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
833
--without-lib-prefix don't search for libraries in includedir and libdir],
835
if test "X$withval" = "Xno"; then
838
if test "X$withval" = "X"; then
839
AC_LIB_WITH_FINAL_PREFIX([
840
eval additional_includedir=\"$includedir\"
841
eval additional_libdir=\"$libdir\"
844
additional_includedir="$withval/include"
845
additional_libdir="$withval/$acl_libdirstem"
849
if test $use_additional = yes; then
850
dnl Potentially add $additional_includedir to $CPPFLAGS.
852
dnl 1. if it's the standard /usr/include,
853
dnl 2. if it's already present in $CPPFLAGS,
854
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
855
dnl 4. if it doesn't exist as a directory.
856
if test "X$additional_includedir" != "X/usr/include"; then
858
for x in $CPPFLAGS; do
859
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
860
if test "X$x" = "X-I$additional_includedir"; then
865
if test -z "$haveit"; then
866
if test "X$additional_includedir" = "X/usr/local/include"; then
867
if test -n "$GCC"; then
869
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
873
if test -z "$haveit"; then
874
if test -d "$additional_includedir"; then
875
dnl Really add $additional_includedir to $CPPFLAGS.
876
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
881
dnl Potentially add $additional_libdir to $LDFLAGS.
883
dnl 1. if it's the standard /usr/lib,
884
dnl 2. if it's already present in $LDFLAGS,
885
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
886
dnl 4. if it doesn't exist as a directory.
887
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
889
for x in $LDFLAGS; do
890
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
891
if test "X$x" = "X-L$additional_libdir"; then
896
if test -z "$haveit"; then
897
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
898
if test -n "$GCC"; then
904
if test -z "$haveit"; then
905
if test -d "$additional_libdir"; then
906
dnl Really add $additional_libdir to $LDFLAGS.
907
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
915
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
916
dnl acl_final_exec_prefix, containing the values to which $prefix and
917
dnl $exec_prefix will expand at the end of the configure script.
918
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
920
dnl Unfortunately, prefix and exec_prefix get only finally determined
921
dnl at the end of configure.
922
if test "X$prefix" = "XNONE"; then
923
acl_final_prefix="$ac_default_prefix"
925
acl_final_prefix="$prefix"
927
if test "X$exec_prefix" = "XNONE"; then
928
acl_final_exec_prefix='${prefix}'
930
acl_final_exec_prefix="$exec_prefix"
932
acl_save_prefix="$prefix"
933
prefix="$acl_final_prefix"
934
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
935
prefix="$acl_save_prefix"
938
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
939
dnl variables prefix and exec_prefix bound to the values they will have
940
dnl at the end of the configure script.
941
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
943
acl_save_prefix="$prefix"
944
prefix="$acl_final_prefix"
945
acl_save_exec_prefix="$exec_prefix"
946
exec_prefix="$acl_final_exec_prefix"
948
exec_prefix="$acl_save_exec_prefix"
949
prefix="$acl_save_prefix"
952
dnl AC_LIB_PREPARE_MULTILIB creates
953
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
954
dnl "lib" or "lib64" or "lib/64",
955
dnl - a variable acl_libdirstem2, as a secondary possible value for
956
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
958
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
960
dnl There is no formal standard regarding lib and lib64.
961
dnl On glibc systems, the current practice is that on a system supporting
962
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
963
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
964
dnl the compiler's default mode by looking at the compiler's library search
965
dnl path. If at least one of its elements ends in /lib64 or points to a
966
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
967
dnl Otherwise we use the default, namely "lib".
968
dnl On Solaris systems, the current practice is that on a system supporting
969
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
970
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
971
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
972
AC_REQUIRE([AC_CANONICAL_HOST])
977
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
978
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
979
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
980
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
981
dnl symlink is missing, so we set acl_libdirstem2 too.
982
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
983
[AC_EGREP_CPP([sixtyfour bits], [
987
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
989
if test $gl_cv_solaris_64bit = yes; then
990
acl_libdirstem=lib/64
992
sparc*) acl_libdirstem2=lib/sparcv9 ;;
993
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
998
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
999
if test -n "$searchpath"; then
1000
acl_save_IFS="${IFS= }"; IFS=":"
1001
for searchdir in $searchpath; do
1002
if test -d "$searchdir"; then
1003
case "$searchdir" in
1004
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1006
# Better ignore directories of this form. They are misleading.
1008
*) searchdir=`cd "$searchdir" && pwd`
1009
case "$searchdir" in
1010
*/lib64 ) acl_libdirstem=lib64 ;;
1019
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1022
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1023
# serial 1 (pkg-config-0.24)
1025
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
1027
# This program is free software; you can redistribute it and/or modify
1028
# it under the terms of the GNU General Public License as published by
1029
# the Free Software Foundation; either version 2 of the License, or
1030
# (at your option) any later version.
1032
# This program is distributed in the hope that it will be useful, but
1033
# WITHOUT ANY WARRANTY; without even the implied warranty of
1034
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1035
# General Public License for more details.
1037
# You should have received a copy of the GNU General Public License
1038
# along with this program; if not, write to the Free Software
1039
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1041
# As a special exception to the GNU General Public License, if you
1042
# distribute this file as part of a program that contains a
1043
# configuration script generated by Autoconf, you may include it under
1044
# the same distribution terms that you use for the rest of that program.
1046
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1047
# ----------------------------------
1048
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1049
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1050
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1051
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1052
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1053
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1055
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1056
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1058
if test -n "$PKG_CONFIG"; then
1059
_pkg_min_version=m4_default([$1], [0.9.0])
1060
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1061
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1062
AC_MSG_RESULT([yes])
1068
])# PKG_PROG_PKG_CONFIG
1070
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1072
# Check to see whether a particular set of modules exists. Similar
1073
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1075
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1076
# only at the first occurence in configure.ac, so if the first place
1077
# it's called might be skipped (such as if it is within an "if", you
1078
# have to call PKG_CHECK_EXISTS manually
1079
# --------------------------------------------------------------
1080
AC_DEFUN([PKG_CHECK_EXISTS],
1081
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1082
if test -n "$PKG_CONFIG" && \
1083
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1084
m4_default([$2], [:])
1085
m4_ifvaln([$3], [else
1089
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1090
# ---------------------------------------------
1091
m4_define([_PKG_CONFIG],
1092
[if test -n "$$1"; then
1094
elif test -n "$PKG_CONFIG"; then
1095
PKG_CHECK_EXISTS([$3],
1096
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1103
# _PKG_SHORT_ERRORS_SUPPORTED
1104
# -----------------------------
1105
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1106
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1107
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1108
_pkg_short_errors_supported=yes
1110
_pkg_short_errors_supported=no
1112
])# _PKG_SHORT_ERRORS_SUPPORTED
1115
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1116
# [ACTION-IF-NOT-FOUND])
1119
# Note that if there is a possibility the first call to
1120
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1121
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1124
# --------------------------------------------------------------
1125
AC_DEFUN([PKG_CHECK_MODULES],
1126
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1127
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1128
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1131
AC_MSG_CHECKING([for $1])
1133
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1134
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1136
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1137
and $1[]_LIBS to avoid the need to call pkg-config.
1138
See the pkg-config man page for more details.])
1140
if test $pkg_failed = yes; then
1142
_PKG_SHORT_ERRORS_SUPPORTED
1143
if test $_pkg_short_errors_supported = yes; then
1144
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1146
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1148
# Put the nasty error message in config.log where it belongs
1149
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1151
m4_default([$4], [AC_MSG_ERROR(
1152
[Package requirements ($2) were not met:
1156
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1157
installed software in a non-standard prefix.
1161
elif test $pkg_failed = untried; then
1163
m4_default([$4], [AC_MSG_FAILURE(
1164
[The pkg-config script could not be found or is too old. Make sure it
1165
is in your PATH or set the PKG_CONFIG environment variable to the full
1170
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
1173
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1174
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1175
AC_MSG_RESULT([yes])
1178
])# PKG_CHECK_MODULES
1180
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1182
# This file is free software; the Free Software Foundation
1183
# gives unlimited permission to copy and/or distribute it,
1184
# with or without modifications, as long as this notice is preserved.
1186
# AM_AUTOMAKE_VERSION(VERSION)
1187
# ----------------------------
1188
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1189
# generated from the m4 files accompanying Automake X.Y.
1190
# (This private macro should not be called outside this file.)
1191
AC_DEFUN([AM_AUTOMAKE_VERSION],
1192
[am__api_version='1.11'
1193
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1194
dnl require some minimum version. Point them to the right macro.
1195
m4_if([$1], [1.11.1], [],
1196
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1199
# _AM_AUTOCONF_VERSION(VERSION)
1200
# -----------------------------
1201
# aclocal traces this macro to find the Autoconf version.
1202
# This is a private macro too. Using m4_define simplifies
1203
# the logic in aclocal, which can simply ignore this definition.
1204
m4_define([_AM_AUTOCONF_VERSION], [])
1206
# AM_SET_CURRENT_AUTOMAKE_VERSION
1207
# -------------------------------
1208
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1209
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1210
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1211
[AM_AUTOMAKE_VERSION([1.11.1])dnl
1212
m4_ifndef([AC_AUTOCONF_VERSION],
1213
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1214
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1216
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
1218
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1220
# This file is free software; the Free Software Foundation
1221
# gives unlimited permission to copy and/or distribute it,
1222
# with or without modifications, as long as this notice is preserved.
1224
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1225
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1226
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1228
# Of course, Automake must honor this variable whenever it calls a
1229
# tool from the auxiliary directory. The problem is that $srcdir (and
1230
# therefore $ac_aux_dir as well) can be either absolute or relative,
1231
# depending on how configure is run. This is pretty annoying, since
1232
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1233
# source directory, any form will work fine, but in subdirectories a
1234
# relative path needs to be adjusted first.
1236
# $ac_aux_dir/missing
1237
# fails when called from a subdirectory if $ac_aux_dir is relative
1238
# $top_srcdir/$ac_aux_dir/missing
1239
# fails if $ac_aux_dir is absolute,
1240
# fails when called from a subdirectory in a VPATH build with
1241
# a relative $ac_aux_dir
1243
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1244
# are both prefixed by $srcdir. In an in-source build this is usually
1245
# harmless because $srcdir is `.', but things will broke when you
1246
# start a VPATH build or use an absolute $srcdir.
1248
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1249
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1250
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1251
# and then we would define $MISSING as
1252
# MISSING="\${SHELL} $am_aux_dir/missing"
1253
# This will work as long as MISSING is not called from configure, because
1254
# unfortunately $(top_srcdir) has no meaning in configure.
1255
# However there are other variables, like CC, which are often used in
1256
# configure, and could therefore not use this "fixed" $ac_aux_dir.
1258
# Another solution, used here, is to always expand $ac_aux_dir to an
1259
# absolute PATH. The drawback is that using absolute paths prevent a
1260
# configured tree to be moved without reconfiguration.
1262
AC_DEFUN([AM_AUX_DIR_EXPAND],
1263
[dnl Rely on autoconf to set up CDPATH properly.
1264
AC_PREREQ([2.50])dnl
1265
# expand $ac_aux_dir to an absolute path
1266
am_aux_dir=`cd $ac_aux_dir && pwd`
1269
# AM_CONDITIONAL -*- Autoconf -*-
1271
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1272
# Free Software Foundation, Inc.
1274
# This file is free software; the Free Software Foundation
1275
# gives unlimited permission to copy and/or distribute it,
1276
# with or without modifications, as long as this notice is preserved.
1280
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1281
# -------------------------------------
1282
# Define a conditional.
1283
AC_DEFUN([AM_CONDITIONAL],
1285
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1286
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1287
AC_SUBST([$1_TRUE])dnl
1288
AC_SUBST([$1_FALSE])dnl
1289
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1290
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1291
m4_define([_AM_COND_VALUE_$1], [$2])dnl
1299
AC_CONFIG_COMMANDS_PRE(
1300
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1301
AC_MSG_ERROR([[conditional "$1" was never defined.
1302
Usually this means the macro was only invoked conditionally.]])
1305
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1306
# Free Software Foundation, Inc.
1308
# This file is free software; the Free Software Foundation
1309
# gives unlimited permission to copy and/or distribute it,
1310
# with or without modifications, as long as this notice is preserved.
1314
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1315
# written in clear, in which case automake, when reading aclocal.m4,
1316
# will think it sees a *use*, and therefore will trigger all it's
1317
# C support machinery. Also note that it means that autoscan, seeing
1318
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1321
# _AM_DEPENDENCIES(NAME)
1322
# ----------------------
1323
# See how the compiler implements dependency checking.
1324
# NAME is "CC", "CXX", "GCJ", or "OBJC".
1325
# We try a few techniques and use that to set a single cache variable.
1327
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1328
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1329
# dependency, and given that the user is not expected to run this macro,
1330
# just rely on AC_PROG_CC.
1331
AC_DEFUN([_AM_DEPENDENCIES],
1332
[AC_REQUIRE([AM_SET_DEPDIR])dnl
1333
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1334
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1335
AC_REQUIRE([AM_DEP_TRACK])dnl
1337
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1338
[$1], CXX, [depcc="$CXX" am_compiler_list=],
1339
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1340
[$1], UPC, [depcc="$UPC" am_compiler_list=],
1341
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1342
[depcc="$$1" am_compiler_list=])
1344
AC_CACHE_CHECK([dependency style of $depcc],
1345
[am_cv_$1_dependencies_compiler_type],
1346
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1347
# We make a subdir and do the tests there. Otherwise we can end up
1348
# making bogus files that we don't know about and never remove. For
1349
# instance it was reported that on HP-UX the gcc test will end up
1350
# making a dummy file named `D' -- because `-MD' means `put the output
1353
# Copy depcomp to subdir because otherwise we won't find it if we're
1354
# using a relative directory.
1355
cp "$am_depcomp" conftest.dir
1357
# We will build objects and dependencies in a subdirectory because
1358
# it helps to detect inapplicable dependency modes. For instance
1359
# both Tru64's cc and ICC support -MD to output dependencies as a
1360
# side effect of compilation, but ICC will put the dependencies in
1361
# the current directory while Tru64 will put them in the object
1365
am_cv_$1_dependencies_compiler_type=none
1366
if test "$am_compiler_list" = ""; then
1367
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1371
[case " $depcc " in #(
1372
*\ -arch\ *\ -arch\ *) am__universal=true ;;
1375
[case " $depcc " in #(
1376
*\ -arch\ *\ -arch\ *) am__universal=true ;;
1379
for depmode in $am_compiler_list; do
1380
# Setup a source with many dependencies, because some compilers
1381
# like to wrap large dependency lists on column 80 (with \), and
1382
# we should not choose a depcomp mode which is confused by this.
1384
# We need to recreate these files for each test, as the compiler may
1385
# overwrite some of them when testing with obscure command lines.
1386
# This happens at least with the AIX C compiler.
1388
for i in 1 2 3 4 5 6; do
1389
echo '#include "conftst'$i'.h"' >> sub/conftest.c
1390
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1391
# Solaris 8's {/usr,}/bin/sh.
1392
touch sub/conftst$i.h
1394
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1396
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1397
# mode. It turns out that the SunPro C++ compiler does not properly
1398
# handle `-M -o', and we need to detect this. Also, some Intel
1399
# versions had trouble with output in subdirs
1400
am__obj=sub/conftest.${OBJEXT-o}
1401
am__minus_obj="-o $am__obj"
1404
# This depmode causes a compiler race in universal mode.
1405
test "$am__universal" = false || continue
1408
# after this tag, mechanisms are not by side-effect, so they'll
1409
# only be used when explicitly requested
1410
if test "x$enable_dependency_tracking" = xyes; then
1416
msvisualcpp | msvcmsys)
1417
# This compiler won't grok `-c -o', but also, the minuso test has
1418
# not run yet. These depmodes are late enough in the game, and
1419
# so weak that their functioning should not be impacted.
1420
am__obj=conftest.${OBJEXT-o}
1425
if depmode=$depmode \
1426
source=sub/conftest.c object=$am__obj \
1427
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1428
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1429
>/dev/null 2>conftest.err &&
1430
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1431
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1432
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1433
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1434
# icc doesn't choke on unknown options, it will just issue warnings
1435
# or remarks (even with -Werror). So we grep stderr for any message
1436
# that says an option was ignored or not supported.
1437
# When given -MP, icc 7.0 and 7.1 complain thusly:
1438
# icc: Command line warning: ignoring option '-M'; no argument required
1439
# The diagnosis changed in icc 8.0:
1440
# icc: Command line remark: option '-MP' not supported
1441
if (grep 'ignoring option' conftest.err ||
1442
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1443
am_cv_$1_dependencies_compiler_type=$depmode
1452
am_cv_$1_dependencies_compiler_type=none
1455
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1456
AM_CONDITIONAL([am__fastdep$1], [
1457
test "x$enable_dependency_tracking" != xno \
1458
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1464
# Choose a directory name for dependency files.
1465
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1466
AC_DEFUN([AM_SET_DEPDIR],
1467
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1468
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1474
AC_DEFUN([AM_DEP_TRACK],
1475
[AC_ARG_ENABLE(dependency-tracking,
1476
[ --disable-dependency-tracking speeds up one-time build
1477
--enable-dependency-tracking do not reject slow dependency extractors])
1478
if test "x$enable_dependency_tracking" != xno; then
1479
am_depcomp="$ac_aux_dir/depcomp"
1482
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1483
AC_SUBST([AMDEPBACKSLASH])dnl
1484
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1487
# Generate code to set up dependency tracking. -*- Autoconf -*-
1489
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1490
# Free Software Foundation, Inc.
1492
# This file is free software; the Free Software Foundation
1493
# gives unlimited permission to copy and/or distribute it,
1494
# with or without modifications, as long as this notice is preserved.
1498
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1499
# ------------------------------
1500
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1502
# Autoconf 2.62 quotes --file arguments for eval, but not when files
1503
# are listed without --file. Let's play safe and only enable the eval
1504
# if we detect the quoting.
1505
case $CONFIG_FILES in
1506
*\'*) eval set x "$CONFIG_FILES" ;;
1507
*) set x $CONFIG_FILES ;;
1512
# Strip MF so we end up with the name of the file.
1513
mf=`echo "$mf" | sed -e 's/:.*$//'`
1514
# Check whether this is an Automake generated Makefile or not.
1515
# We used to match only the files named `Makefile.in', but
1516
# some people rename them; so instead we look at the file content.
1517
# Grep'ing the first line is not enough: some people post-process
1518
# each Makefile.in and add a new line on top of each file to say so.
1519
# Grep'ing the whole file is not good either: AIX grep has a line
1520
# limit of 2048, but all sed's we know have understand at least 4000.
1521
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1522
dirpart=`AS_DIRNAME("$mf")`
1526
# Extract the definition of DEPDIR, am__include, and am__quote
1527
# from the Makefile without running `make'.
1528
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1529
test -z "$DEPDIR" && continue
1530
am__include=`sed -n 's/^am__include = //p' < "$mf"`
1531
test -z "am__include" && continue
1532
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1533
# When using ansi2knr, U may be empty or an underscore; expand it
1534
U=`sed -n 's/^U = //p' < "$mf"`
1535
# Find all dependency output files, they are included files with
1536
# $(DEPDIR) in their names. We invoke sed twice because it is the
1537
# simplest approach to changing $(DEPDIR) to its actual value in the
1539
for file in `sed -n "
1540
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1541
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1542
# Make sure the directory exists.
1543
test -f "$dirpart/$file" && continue
1544
fdir=`AS_DIRNAME(["$file"])`
1545
AS_MKDIR_P([$dirpart/$fdir])
1546
# echo "creating $dirpart/$file"
1547
echo '# dummy' > "$dirpart/$file"
1551
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1554
# AM_OUTPUT_DEPENDENCY_COMMANDS
1555
# -----------------------------
1556
# This macro should only be invoked once -- use via AC_REQUIRE.
1558
# This code is only required when automatic dependency tracking
1559
# is enabled. FIXME. This creates each `.P' file that we will
1560
# need in order to bootstrap the dependency handling code.
1561
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1562
[AC_CONFIG_COMMANDS([depfiles],
1563
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1564
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1567
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1568
# Free Software Foundation, Inc.
1570
# This file is free software; the Free Software Foundation
1571
# gives unlimited permission to copy and/or distribute it,
1572
# with or without modifications, as long as this notice is preserved.
1576
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1577
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1579
# Do all the work for Automake. -*- Autoconf -*-
1581
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1582
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1584
# This file is free software; the Free Software Foundation
1585
# gives unlimited permission to copy and/or distribute it,
1586
# with or without modifications, as long as this notice is preserved.
1590
# This macro actually does too much. Some checks are only needed if
1591
# your package does certain things. But this isn't really a big deal.
1593
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1594
# AM_INIT_AUTOMAKE([OPTIONS])
1595
# -----------------------------------------------
1596
# The call with PACKAGE and VERSION arguments is the old style
1597
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1598
# and VERSION should now be passed to AC_INIT and removed from
1599
# the call to AM_INIT_AUTOMAKE.
1600
# We support both call styles for the transition. After
1601
# the next Automake release, Autoconf can make the AC_INIT
1602
# arguments mandatory, and then we can depend on a new Autoconf
1603
# release and drop the old call support.
1604
AC_DEFUN([AM_INIT_AUTOMAKE],
1605
[AC_PREREQ([2.62])dnl
1606
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1607
dnl the ones we care about.
1608
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1609
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1610
AC_REQUIRE([AC_PROG_INSTALL])dnl
1611
if test "`cd $srcdir && pwd`" != "`pwd`"; then
1612
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1613
# is not polluted with repeated "-I."
1614
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1615
# test to see if srcdir already configured
1616
if test -f $srcdir/config.status; then
1617
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1621
# test whether we have cygpath
1622
if test -z "$CYGPATH_W"; then
1623
if (cygpath --version) >/dev/null 2>/dev/null; then
1624
CYGPATH_W='cygpath -w'
1629
AC_SUBST([CYGPATH_W])
1631
# Define the identity of the package.
1632
dnl Distinguish between old-style and new-style calls.
1634
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1635
AC_SUBST([PACKAGE], [$1])dnl
1636
AC_SUBST([VERSION], [$2])],
1637
[_AM_SET_OPTIONS([$1])dnl
1638
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1639
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1640
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1641
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1642
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1644
_AM_IF_OPTION([no-define],,
1645
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1646
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1648
# Some tools Automake needs.
1649
AC_REQUIRE([AM_SANITY_CHECK])dnl
1650
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1651
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1652
AM_MISSING_PROG(AUTOCONF, autoconf)
1653
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1654
AM_MISSING_PROG(AUTOHEADER, autoheader)
1655
AM_MISSING_PROG(MAKEINFO, makeinfo)
1656
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1657
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1658
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1659
# We need awk for the "check" target. The system "awk" is bad on
1661
AC_REQUIRE([AC_PROG_AWK])dnl
1662
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1663
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1664
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1665
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1666
[_AM_PROG_TAR([v7])])])
1667
_AM_IF_OPTION([no-dependencies],,
1668
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1669
[_AM_DEPENDENCIES(CC)],
1670
[define([AC_PROG_CC],
1671
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1672
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1673
[_AM_DEPENDENCIES(CXX)],
1674
[define([AC_PROG_CXX],
1675
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1676
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1677
[_AM_DEPENDENCIES(OBJC)],
1678
[define([AC_PROG_OBJC],
1679
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1681
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1682
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1683
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1684
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1685
AC_CONFIG_COMMANDS_PRE(dnl
1686
[m4_provide_if([_AM_COMPILER_EXEEXT],
1687
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1690
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1691
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1692
dnl mangled by Autoconf and run in a shell conditional statement.
1693
m4_define([_AC_COMPILER_EXEEXT],
1694
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1697
# When config.status generates a header, we must update the stamp-h file.
1698
# This file resides in the same directory as the config header
1699
# that is generated. The stamp files are numbered to have different names.
1701
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1702
# loop where config.status creates the headers, so we can generate
1703
# our stamp files there.
1704
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1705
[# Compute $1's index in $config_headers.
1708
for _am_header in $config_headers :; do
1710
$_am_arg | $_am_arg:* )
1713
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1716
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1718
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1720
# This file is free software; the Free Software Foundation
1721
# gives unlimited permission to copy and/or distribute it,
1722
# with or without modifications, as long as this notice is preserved.
1724
# AM_PROG_INSTALL_SH
1725
# ------------------
1726
# Define $install_sh.
1727
AC_DEFUN([AM_PROG_INSTALL_SH],
1728
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1729
if test x"${install_sh}" != xset; then
1732
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1734
install_sh="\${SHELL} $am_aux_dir/install-sh"
1737
AC_SUBST(install_sh)])
1739
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1741
# This file is free software; the Free Software Foundation
1742
# gives unlimited permission to copy and/or distribute it,
1743
# with or without modifications, as long as this notice is preserved.
1747
# Check whether the underlying file-system supports filenames
1748
# with a leading dot. For instance MS-DOS doesn't.
1749
AC_DEFUN([AM_SET_LEADING_DOT],
1750
[rm -rf .tst 2>/dev/null
1751
mkdir .tst 2>/dev/null
1752
if test -d .tst; then
1757
rmdir .tst 2>/dev/null
1758
AC_SUBST([am__leading_dot])])
1760
# Check to see how 'make' treats includes. -*- Autoconf -*-
1762
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1764
# This file is free software; the Free Software Foundation
1765
# gives unlimited permission to copy and/or distribute it,
1766
# with or without modifications, as long as this notice is preserved.
1772
# Check to see how make treats includes.
1773
AC_DEFUN([AM_MAKE_INCLUDE],
1774
[am_make=${MAKE-make}
1775
cat > confinc << 'END'
1777
@echo this is the am__doit target
1780
# If we don't find an include directive, just comment out the code.
1781
AC_MSG_CHECKING([for style of include used by $am_make])
1785
# First try GNU make style include.
1786
echo "include confinc" > confmf
1787
# Ignore all kinds of additional output from `make'.
1788
case `$am_make -s -f confmf 2> /dev/null` in #(
1789
*the\ am__doit\ target*)
1795
# Now try BSD make style include.
1796
if test "$am__include" = "#"; then
1797
echo '.include "confinc"' > confmf
1798
case `$am_make -s -f confmf 2> /dev/null` in #(
1799
*the\ am__doit\ target*)
1800
am__include=.include
1806
AC_SUBST([am__include])
1807
AC_SUBST([am__quote])
1808
AC_MSG_RESULT([$_am_result])
1809
rm -f confinc confmf
1812
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1814
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1815
# Free Software Foundation, Inc.
1817
# This file is free software; the Free Software Foundation
1818
# gives unlimited permission to copy and/or distribute it,
1819
# with or without modifications, as long as this notice is preserved.
1823
# AM_MISSING_PROG(NAME, PROGRAM)
1824
# ------------------------------
1825
AC_DEFUN([AM_MISSING_PROG],
1826
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1827
$1=${$1-"${am_missing_run}$2"}
1831
# AM_MISSING_HAS_RUN
1832
# ------------------
1833
# Define MISSING if not defined so far and test if it supports --run.
1834
# If it does, set am_missing_run to use it, otherwise, to nothing.
1835
AC_DEFUN([AM_MISSING_HAS_RUN],
1836
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1837
AC_REQUIRE_AUX_FILE([missing])dnl
1838
if test x"${MISSING+set}" != xset; then
1841
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1843
MISSING="\${SHELL} $am_aux_dir/missing" ;;
1846
# Use eval to expand $SHELL
1847
if eval "$MISSING --run true"; then
1848
am_missing_run="$MISSING --run "
1851
AC_MSG_WARN([`missing' script is too old or missing])
1855
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1857
# This file is free software; the Free Software Foundation
1858
# gives unlimited permission to copy and/or distribute it,
1859
# with or without modifications, as long as this notice is preserved.
1863
# Check for `mkdir -p'.
1864
AC_DEFUN([AM_PROG_MKDIR_P],
1865
[AC_PREREQ([2.60])dnl
1866
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1867
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1868
dnl while keeping a definition of mkdir_p for backward compatibility.
1869
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1870
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1871
dnl Makefile.ins that do not define MKDIR_P, so we do our own
1872
dnl adjustment using top_builddir (which is defined more often than
1874
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1876
[[\\/$]]* | ?:[[\\/]]*) ;;
1877
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1881
# Helper functions for option handling. -*- Autoconf -*-
1883
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1885
# This file is free software; the Free Software Foundation
1886
# gives unlimited permission to copy and/or distribute it,
1887
# with or without modifications, as long as this notice is preserved.
1891
# _AM_MANGLE_OPTION(NAME)
1892
# -----------------------
1893
AC_DEFUN([_AM_MANGLE_OPTION],
1894
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1896
# _AM_SET_OPTION(NAME)
1897
# ------------------------------
1898
# Set option NAME. Presently that only means defining a flag for this option.
1899
AC_DEFUN([_AM_SET_OPTION],
1900
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1902
# _AM_SET_OPTIONS(OPTIONS)
1903
# ----------------------------------
1904
# OPTIONS is a space-separated list of Automake options.
1905
AC_DEFUN([_AM_SET_OPTIONS],
1906
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1908
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1909
# -------------------------------------------
1910
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1911
AC_DEFUN([_AM_IF_OPTION],
1912
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1914
# Check to make sure that the build environment is sane. -*- Autoconf -*-
1916
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1917
# Free Software Foundation, Inc.
1919
# This file is free software; the Free Software Foundation
1920
# gives unlimited permission to copy and/or distribute it,
1921
# with or without modifications, as long as this notice is preserved.
1927
AC_DEFUN([AM_SANITY_CHECK],
1928
[AC_MSG_CHECKING([whether build environment is sane])
1931
echo timestamp > conftest.file
1932
# Reject unsafe characters in $srcdir or the absolute working directory
1933
# name. Accept space and tab only in the latter.
1937
*[[\\\"\#\$\&\'\`$am_lf]]*)
1938
AC_MSG_ERROR([unsafe absolute working directory name]);;
1941
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1942
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1945
# Do `set' in a subshell so we don't clobber the current shell's
1946
# arguments. Must try -L first in case configure is actually a
1947
# symlink; some systems play weird games with the mod time of symlinks
1948
# (eg FreeBSD returns the mod time of the symlink's containing
1951
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1952
if test "$[*]" = "X"; then
1954
set X `ls -t "$srcdir/configure" conftest.file`
1957
if test "$[*]" != "X $srcdir/configure conftest.file" \
1958
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1960
# If neither matched, then we have a broken ls. This can happen
1961
# if, for instance, CONFIG_SHELL is bash and it inherits a
1962
# broken ls alias from the environment. This has actually
1963
# happened. Such a system could not be considered "sane".
1964
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1965
alias in your environment])
1968
test "$[2]" = conftest.file
1974
AC_MSG_ERROR([newly created file is older than distributed files!
1975
Check your system clock])
1977
AC_MSG_RESULT(yes)])
1979
# Copyright (C) 2009 Free Software Foundation, Inc.
1981
# This file is free software; the Free Software Foundation
1982
# gives unlimited permission to copy and/or distribute it,
1983
# with or without modifications, as long as this notice is preserved.
1987
# AM_SILENT_RULES([DEFAULT])
1988
# --------------------------
1989
# Enable less verbose build rules; with the default set to DEFAULT
1990
# (`yes' being less verbose, `no' or empty being verbose).
1991
AC_DEFUN([AM_SILENT_RULES],
1992
[AC_ARG_ENABLE([silent-rules],
1993
[ --enable-silent-rules less verbose build output (undo: `make V=1')
1994
--disable-silent-rules verbose build output (undo: `make V=0')])
1995
case $enable_silent_rules in
1996
yes) AM_DEFAULT_VERBOSITY=0;;
1997
no) AM_DEFAULT_VERBOSITY=1;;
1998
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2000
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2002
AC_SUBST([AM_BACKSLASH])dnl
2003
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2006
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2008
# This file is free software; the Free Software Foundation
2009
# gives unlimited permission to copy and/or distribute it,
2010
# with or without modifications, as long as this notice is preserved.
2012
# AM_PROG_INSTALL_STRIP
2013
# ---------------------
2014
# One issue with vendor `install' (even GNU) is that you can't
2015
# specify the program used to strip binaries. This is especially
2016
# annoying in cross-compiling environments, where the build's strip
2017
# is unlikely to handle the host's binaries.
2018
# Fortunately install-sh will honor a STRIPPROG variable, so we
2019
# always use install-sh in `make install-strip', and initialize
2020
# STRIPPROG with the value of the STRIP variable (set by the user).
2021
AC_DEFUN([AM_PROG_INSTALL_STRIP],
2022
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2023
# Installed binaries are usually stripped using `strip' when the user
2024
# run `make install-strip'. However `strip' might not be the right
2025
# tool to use in cross-compilation environments, therefore Automake
2026
# will honor the `STRIP' environment variable to overrule this program.
2027
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2028
if test "$cross_compiling" != no; then
2029
AC_CHECK_TOOL([STRIP], [strip], :)
2031
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2032
AC_SUBST([INSTALL_STRIP_PROGRAM])])
2034
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2036
# This file is free software; the Free Software Foundation
2037
# gives unlimited permission to copy and/or distribute it,
2038
# with or without modifications, as long as this notice is preserved.
2042
# _AM_SUBST_NOTMAKE(VARIABLE)
2043
# ---------------------------
2044
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2045
# This macro is traced by Automake.
2046
AC_DEFUN([_AM_SUBST_NOTMAKE])
2048
# AM_SUBST_NOTMAKE(VARIABLE)
2049
# ---------------------------
2050
# Public sister of _AM_SUBST_NOTMAKE.
2051
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2053
# Check how to create a tarball. -*- Autoconf -*-
2055
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2057
# This file is free software; the Free Software Foundation
2058
# gives unlimited permission to copy and/or distribute it,
2059
# with or without modifications, as long as this notice is preserved.
2063
# _AM_PROG_TAR(FORMAT)
2064
# --------------------
2065
# Check how to create a tarball in format FORMAT.
2066
# FORMAT should be one of `v7', `ustar', or `pax'.
2068
# Substitute a variable $(am__tar) that is a command
2069
# writing to stdout a FORMAT-tarball containing the directory
2071
# tardir=directory && $(am__tar) > result.tar
2073
# Substitute a variable $(am__untar) that extract such
2074
# a tarball read from stdin.
2075
# $(am__untar) < result.tar
2076
AC_DEFUN([_AM_PROG_TAR],
2077
[# Always define AMTAR for backward compatibility.
2078
AM_MISSING_PROG([AMTAR], [tar])
2080
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2081
[m4_case([$1], [ustar],, [pax],,
2082
[m4_fatal([Unknown tar format])])
2083
AC_MSG_CHECKING([how to create a $1 tar archive])
2084
# Loop over all known methods to create a tar archive until one works.
2085
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2086
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
2087
# Do not fold the above two line into one, because Tru64 sh and
2088
# Solaris sh will not grok spaces in the rhs of `-'.
2089
for _am_tool in $_am_tools
2093
for _am_tar in tar gnutar gtar;
2095
AM_RUN_LOG([$_am_tar --version]) && break
2097
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2098
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2099
am__untar="$_am_tar -xf -"
2102
# Must skip GNU tar: if it does not support --format= it doesn't create
2103
# ustar tarball either.
2104
(tar --version) >/dev/null 2>&1 && continue
2105
am__tar='tar chf - "$$tardir"'
2106
am__tar_='tar chf - "$tardir"'
2107
am__untar='tar xf -'
2110
am__tar='pax -L -x $1 -w "$$tardir"'
2111
am__tar_='pax -L -x $1 -w "$tardir"'
2115
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2116
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2117
am__untar='cpio -i -H $1 -d'
2126
# If the value was cached, stop now. We just wanted to have am__tar
2127
# and am__untar set.
2128
test -n "${am_cv_prog_tar_$1}" && break
2130
# tar/untar a dummy directory, and stop if the command works
2133
echo GrepMe > conftest.dir/file
2134
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2136
if test -s conftest.tar; then
2137
AM_RUN_LOG([$am__untar <conftest.tar])
2138
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2143
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2144
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2146
AC_SUBST([am__untar])
2149
m4_include([m4/acx_pthread.m4])
2150
m4_include([m4/define-dir.m4])
2151
m4_include([m4/gtk-doc.m4])
2152
m4_include([m4/iconv.m4])
2153
m4_include([m4/introspection.m4])
2154
m4_include([m4/libjpeg.m4])
2155
m4_include([m4/libtool.m4])
2156
m4_include([m4/ltoptions.m4])
2157
m4_include([m4/ltsugar.m4])
2158
m4_include([m4/ltversion.m4])
2159
m4_include([m4/lt~obsolete.m4])
2160
m4_include([m4/qt.m4])