1
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6
# This file is free software; the Free Software Foundation
7
# gives unlimited permission to copy and/or distribute it,
8
# with or without modifications, as long as this notice is preserved.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
m4_ifndef([AC_AUTOCONF_VERSION],
16
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18
[m4_warning([this file was generated for autoconf 2.68.
19
You have another version of autoconf. It may work, but is not guaranteed to.
20
If you have problems, you may need to regenerate the build system entirely.
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
23
# lib-ld.m4 serial 4 (gettext-0.18)
24
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
25
dnl This file is free software; the Free Software Foundation
26
dnl gives unlimited permission to copy and/or distribute it,
27
dnl with or without modifications, as long as this notice is preserved.
29
dnl Subroutines of libtool.m4,
30
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
33
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
34
AC_DEFUN([AC_LIB_PROG_LD_GNU],
35
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
36
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
37
case `$LD -v 2>&1 </dev/null` in
39
acl_cv_prog_gnu_ld=yes ;;
41
acl_cv_prog_gnu_ld=no ;;
43
with_gnu_ld=$acl_cv_prog_gnu_ld
46
dnl From libtool-1.4. Sets the variable LD.
47
AC_DEFUN([AC_LIB_PROG_LD],
48
[AC_ARG_WITH([gnu-ld],
49
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
50
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
51
AC_REQUIRE([AC_PROG_CC])dnl
52
AC_REQUIRE([AC_CANONICAL_HOST])dnl
53
# Prepare PATH_SEPARATOR.
54
# The user is always right.
55
if test "${PATH_SEPARATOR+set}" != set; then
56
echo "#! /bin/sh" >conf$$.sh
57
echo "exit 0" >>conf$$.sh
59
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
67
if test "$GCC" = yes; then
68
# Check if gcc -print-prog-name=ld gives a path.
69
AC_MSG_CHECKING([for ld used by GCC])
72
# gcc leaves a trailing carriage return which upsets mingw
73
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
75
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
78
# Accept absolute paths.
79
[[\\/]* | [A-Za-z]:[\\/]*)]
80
[re_direlt='/[^/][^/]*/\.\./']
81
# Canonicalize the path of ld
82
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
83
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
84
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
86
test -z "$LD" && LD="$ac_prog"
89
# If it fails, then pretend we aren't using GCC.
93
# If it is relative, then search for the first ld in PATH.
97
elif test "$with_gnu_ld" = yes; then
98
AC_MSG_CHECKING([for GNU ld])
100
AC_MSG_CHECKING([for non-GNU ld])
102
AC_CACHE_VAL([acl_cv_path_LD],
103
[if test -z "$LD"; then
104
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
105
for ac_dir in $PATH; do
106
test -z "$ac_dir" && ac_dir=.
107
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
108
acl_cv_path_LD="$ac_dir/$ac_prog"
109
# Check to see if the program is GNU ld. I'd rather use --version,
110
# but apparently some GNU ld's only accept -v.
111
# Break only if it was the GNU/non-GNU ld that we prefer.
112
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
113
*GNU* | *'with BFD'*)
114
test "$with_gnu_ld" != no && break ;;
116
test "$with_gnu_ld" != yes && break ;;
122
acl_cv_path_LD="$LD" # Let the user override the test with a path.
125
if test -n "$LD"; then
130
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
134
# lib-link.m4 serial 21 (gettext-0.18)
135
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
136
dnl This file is free software; the Free Software Foundation
137
dnl gives unlimited permission to copy and/or distribute it,
138
dnl with or without modifications, as long as this notice is preserved.
140
dnl From Bruno Haible.
144
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
145
dnl the libraries corresponding to explicit and implicit dependencies.
146
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
147
dnl augments the CPPFLAGS variable.
148
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
149
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
150
AC_DEFUN([AC_LIB_LINKFLAGS],
152
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
153
AC_REQUIRE([AC_LIB_RPATH])
154
pushdef([Name],[translit([$1],[./-], [___])])
155
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
156
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
157
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
158
AC_LIB_LINKFLAGS_BODY([$1], [$2])
159
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
160
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
161
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
162
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
164
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
165
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
166
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
167
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
168
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
170
AC_SUBST([LTLIB]NAME)
171
AC_SUBST([LIB]NAME[_PREFIX])
172
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
173
dnl results of this search when this library appears as a dependency.
179
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
180
dnl searches for libname and the libraries corresponding to explicit and
181
dnl implicit dependencies, together with the specified include files and
182
dnl the ability to compile and link the specified testcode. The missing-message
183
dnl defaults to 'no' and may contain additional hints for the user.
184
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
185
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
186
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
187
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
188
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
189
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
190
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
192
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
193
AC_REQUIRE([AC_LIB_RPATH])
194
pushdef([Name],[translit([$1],[./-], [___])])
195
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
196
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
198
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
200
AC_LIB_LINKFLAGS_BODY([$1], [$2])
202
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
203
dnl because if the user has installed lib[]Name and not disabled its use
204
dnl via --without-lib[]Name-prefix, he wants to use it.
205
ac_save_CPPFLAGS="$CPPFLAGS"
206
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
208
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
210
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
211
dnl because these -l options might require -L options that are present in
212
dnl LIBS. -l options benefit only from the -L options listed before it.
213
dnl Otherwise, add it to the front of LIBS, because it may be a static
214
dnl library that depends on another static library that is present in LIBS.
215
dnl Static libraries benefit only from the static libraries listed after
217
case " $LIB[]NAME" in
218
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
219
*) LIBS="$LIB[]NAME $LIBS" ;;
221
AC_TRY_LINK([$3], [$4],
222
[ac_cv_lib[]Name=yes],
223
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
226
if test "$ac_cv_lib[]Name" = yes; then
228
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
229
AC_MSG_CHECKING([how to link with lib[]$1])
230
AC_MSG_RESULT([$LIB[]NAME])
233
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
234
dnl $INC[]NAME either.
235
CPPFLAGS="$ac_save_CPPFLAGS"
240
AC_SUBST([HAVE_LIB]NAME)
242
AC_SUBST([LTLIB]NAME)
243
AC_SUBST([LIB]NAME[_PREFIX])
248
dnl Determine the platform dependent parameters needed to use rpath:
251
dnl acl_hardcode_libdir_flag_spec,
252
dnl acl_hardcode_libdir_separator,
253
dnl acl_hardcode_direct,
254
dnl acl_hardcode_minus_L.
255
AC_DEFUN([AC_LIB_RPATH],
257
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
258
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
259
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
260
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
261
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
262
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
263
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
264
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
265
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
271
acl_libext="$acl_cv_libext"
272
acl_shlibext="$acl_cv_shlibext"
273
acl_libname_spec="$acl_cv_libname_spec"
274
acl_library_names_spec="$acl_cv_library_names_spec"
275
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
276
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
277
acl_hardcode_direct="$acl_cv_hardcode_direct"
278
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
279
dnl Determine whether the user wants rpath handling at all.
280
AC_ARG_ENABLE([rpath],
281
[ --disable-rpath do not hardcode runtime library paths],
285
dnl AC_LIB_FROMPACKAGE(name, package)
286
dnl declares that libname comes from the given package. The configure file
287
dnl will then not have a --with-libname-prefix option but a
288
dnl --with-package-prefix option. Several libraries can come from the same
289
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
290
dnl macro call that searches for libname.
291
AC_DEFUN([AC_LIB_FROMPACKAGE],
293
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
294
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
295
define([acl_frompackage_]NAME, [$2])
298
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
299
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
300
define([acl_libsinpackage_]PACKUP,
301
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
306
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
307
dnl the libraries corresponding to explicit and implicit dependencies.
308
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
309
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
310
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
311
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
313
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
314
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
315
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
316
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
317
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
318
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
319
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
320
dnl Autoconf >= 2.61 supports dots in --with options.
321
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
322
dnl By default, look in $includedir and $libdir.
324
AC_LIB_WITH_FINAL_PREFIX([
325
eval additional_includedir=\"$includedir\"
326
eval additional_libdir=\"$libdir\"
328
AC_ARG_WITH(P_A_C_K[-prefix],
329
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
330
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
332
if test "X$withval" = "Xno"; then
335
if test "X$withval" = "X"; then
336
AC_LIB_WITH_FINAL_PREFIX([
337
eval additional_includedir=\"$includedir\"
338
eval additional_libdir=\"$libdir\"
341
additional_includedir="$withval/include"
342
additional_libdir="$withval/$acl_libdirstem"
343
if test "$acl_libdirstem2" != "$acl_libdirstem" \
344
&& ! test -d "$withval/$acl_libdirstem"; then
345
additional_libdir="$withval/$acl_libdirstem2"
350
dnl Search the library and its dependencies in $additional_libdir and
351
dnl $LDFLAGS. Using breadth-first-seach.
356
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
357
dnl computed. So it has to be reset here.
361
names_already_handled=
362
names_next_round='$1 $2'
363
while test -n "$names_next_round"; do
364
names_this_round="$names_next_round"
366
for name in $names_this_round; do
368
for n in $names_already_handled; do
369
if test "$n" = "$name"; then
374
if test -z "$already_handled"; then
375
names_already_handled="$names_already_handled $name"
376
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
377
dnl or AC_LIB_HAVE_LINKFLAGS call.
378
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
379
eval value=\"\$HAVE_LIB$uppername\"
380
if test -n "$value"; then
381
if test "$value" = yes; then
382
eval value=\"\$LIB$uppername\"
383
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
384
eval value=\"\$LTLIB$uppername\"
385
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
387
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
388
dnl that this library doesn't exist. So just drop it.
392
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
393
dnl and the already constructed $LIBNAME/$LTLIBNAME.
398
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
399
if test -n "$acl_shlibext"; then
400
shrext=".$acl_shlibext" # typically: shrext=.so
404
if test $use_additional = yes; then
405
dir="$additional_libdir"
406
dnl The same code as in the loop below:
407
dnl First look for a shared library.
408
if test -n "$acl_shlibext"; then
409
if test -f "$dir/$libname$shrext"; then
411
found_so="$dir/$libname$shrext"
413
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
415
for f in "$libname$shrext".*; do echo "$f"; done \
416
| sed -e "s,^$libname$shrext\\\\.,," \
417
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
418
| sed 1q ) 2>/dev/null`
419
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
421
found_so="$dir/$libname$shrext.$ver"
424
eval library_names=\"$acl_library_names_spec\"
425
for f in $library_names; do
426
if test -f "$dir/$f"; then
435
dnl Then look for a static library.
436
if test "X$found_dir" = "X"; then
437
if test -f "$dir/$libname.$acl_libext"; then
439
found_a="$dir/$libname.$acl_libext"
442
if test "X$found_dir" != "X"; then
443
if test -f "$dir/$libname.la"; then
444
found_la="$dir/$libname.la"
448
if test "X$found_dir" = "X"; then
449
for x in $LDFLAGS $LTLIB[]NAME; do
450
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
453
dir=`echo "X$x" | sed -e 's/^X-L//'`
454
dnl First look for a shared library.
455
if test -n "$acl_shlibext"; then
456
if test -f "$dir/$libname$shrext"; then
458
found_so="$dir/$libname$shrext"
460
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
462
for f in "$libname$shrext".*; do echo "$f"; done \
463
| sed -e "s,^$libname$shrext\\\\.,," \
464
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
465
| sed 1q ) 2>/dev/null`
466
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
468
found_so="$dir/$libname$shrext.$ver"
471
eval library_names=\"$acl_library_names_spec\"
472
for f in $library_names; do
473
if test -f "$dir/$f"; then
482
dnl Then look for a static library.
483
if test "X$found_dir" = "X"; then
484
if test -f "$dir/$libname.$acl_libext"; then
486
found_a="$dir/$libname.$acl_libext"
489
if test "X$found_dir" != "X"; then
490
if test -f "$dir/$libname.la"; then
491
found_la="$dir/$libname.la"
496
if test "X$found_dir" != "X"; then
501
if test "X$found_dir" != "X"; then
502
dnl Found the library.
503
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
504
if test "X$found_so" != "X"; then
505
dnl Linking with a shared library. We attempt to hardcode its
506
dnl directory into the executable's runpath, unless it's the
507
dnl standard /usr/lib.
508
if test "$enable_rpath" = no \
509
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
510
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
511
dnl No hardcoding is needed.
512
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
514
dnl Use an explicit option to hardcode DIR into the resulting
516
dnl Potentially add DIR to ltrpathdirs.
517
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
519
for x in $ltrpathdirs; do
520
if test "X$x" = "X$found_dir"; then
525
if test -z "$haveit"; then
526
ltrpathdirs="$ltrpathdirs $found_dir"
528
dnl The hardcoding into $LIBNAME is system dependent.
529
if test "$acl_hardcode_direct" = yes; then
530
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
531
dnl resulting binary.
532
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
534
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
535
dnl Use an explicit option to hardcode DIR into the resulting
537
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
538
dnl Potentially add DIR to rpathdirs.
539
dnl The rpathdirs will be appended to $LIBNAME at the end.
541
for x in $rpathdirs; do
542
if test "X$x" = "X$found_dir"; then
547
if test -z "$haveit"; then
548
rpathdirs="$rpathdirs $found_dir"
551
dnl Rely on "-L$found_dir".
552
dnl But don't add it if it's already contained in the LDFLAGS
553
dnl or the already constructed $LIBNAME
555
for x in $LDFLAGS $LIB[]NAME; do
556
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
557
if test "X$x" = "X-L$found_dir"; then
562
if test -z "$haveit"; then
563
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
565
if test "$acl_hardcode_minus_L" != no; then
566
dnl FIXME: Not sure whether we should use
567
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
569
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
571
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
572
dnl here, because this doesn't fit in flags passed to the
573
dnl compiler. So give up. No hardcoding. This affects only
574
dnl very old systems.
575
dnl FIXME: Not sure whether we should use
576
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
578
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
584
if test "X$found_a" != "X"; then
585
dnl Linking with a static library.
586
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
588
dnl We shouldn't come here, but anyway it's good to have a
590
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
593
dnl Assume the include files are nearby.
594
additional_includedir=
596
*/$acl_libdirstem | */$acl_libdirstem/)
597
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
598
if test "$name" = '$1'; then
599
LIB[]NAME[]_PREFIX="$basedir"
601
additional_includedir="$basedir/include"
603
*/$acl_libdirstem2 | */$acl_libdirstem2/)
604
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
605
if test "$name" = '$1'; then
606
LIB[]NAME[]_PREFIX="$basedir"
608
additional_includedir="$basedir/include"
611
if test "X$additional_includedir" != "X"; then
612
dnl Potentially add $additional_includedir to $INCNAME.
614
dnl 1. if it's the standard /usr/include,
615
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
616
dnl 3. if it's already present in $CPPFLAGS or the already
617
dnl constructed $INCNAME,
618
dnl 4. if it doesn't exist as a directory.
619
if test "X$additional_includedir" != "X/usr/include"; then
621
if test "X$additional_includedir" = "X/usr/local/include"; then
622
if test -n "$GCC"; then
624
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
628
if test -z "$haveit"; then
629
for x in $CPPFLAGS $INC[]NAME; do
630
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
631
if test "X$x" = "X-I$additional_includedir"; then
636
if test -z "$haveit"; then
637
if test -d "$additional_includedir"; then
638
dnl Really add $additional_includedir to $INCNAME.
639
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
645
dnl Look for dependencies.
646
if test -n "$found_la"; then
647
dnl Read the .la file. It defines the variables
648
dnl dlname, library_names, old_library, dependency_libs, current,
649
dnl age, revision, installed, dlopen, dlpreopen, libdir.
650
save_libdir="$libdir"
652
*/* | *\\*) . "$found_la" ;;
653
*) . "./$found_la" ;;
655
libdir="$save_libdir"
656
dnl We use only dependency_libs.
657
for dep in $dependency_libs; do
660
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
661
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
663
dnl 1. if it's the standard /usr/lib,
664
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
665
dnl 3. if it's already present in $LDFLAGS or the already
666
dnl constructed $LIBNAME,
667
dnl 4. if it doesn't exist as a directory.
668
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
669
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
671
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
672
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
673
if test -n "$GCC"; then
675
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
679
if test -z "$haveit"; then
681
for x in $LDFLAGS $LIB[]NAME; do
682
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
683
if test "X$x" = "X-L$additional_libdir"; then
688
if test -z "$haveit"; then
689
if test -d "$additional_libdir"; then
690
dnl Really add $additional_libdir to $LIBNAME.
691
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
695
for x in $LDFLAGS $LTLIB[]NAME; do
696
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
697
if test "X$x" = "X-L$additional_libdir"; then
702
if test -z "$haveit"; then
703
if test -d "$additional_libdir"; then
704
dnl Really add $additional_libdir to $LTLIBNAME.
705
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
712
dir=`echo "X$dep" | sed -e 's/^X-R//'`
713
if test "$enable_rpath" != no; then
714
dnl Potentially add DIR to rpathdirs.
715
dnl The rpathdirs will be appended to $LIBNAME at the end.
717
for x in $rpathdirs; do
718
if test "X$x" = "X$dir"; then
723
if test -z "$haveit"; then
724
rpathdirs="$rpathdirs $dir"
726
dnl Potentially add DIR to ltrpathdirs.
727
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
729
for x in $ltrpathdirs; do
730
if test "X$x" = "X$dir"; then
735
if test -z "$haveit"; then
736
ltrpathdirs="$ltrpathdirs $dir"
741
dnl Handle this in the next round.
742
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
745
dnl Handle this in the next round. Throw away the .la's
746
dnl directory; it is already contained in a preceding -L
748
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
751
dnl Most likely an immediate library name.
752
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
753
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
759
dnl Didn't find the library; assume it is in the system directories
760
dnl known to the linker and runtime loader. (All the system
761
dnl directories known to the linker should also be known to the
762
dnl runtime loader, otherwise the system is severely misconfigured.)
763
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
764
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
770
if test "X$rpathdirs" != "X"; then
771
if test -n "$acl_hardcode_libdir_separator"; then
772
dnl Weird platform: only the last -rpath option counts, the user must
773
dnl pass all path elements in one option. We can arrange that for a
774
dnl single library, but not when more than one $LIBNAMEs are used.
776
for found_dir in $rpathdirs; do
777
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
779
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
780
acl_save_libdir="$libdir"
782
eval flag=\"$acl_hardcode_libdir_flag_spec\"
783
libdir="$acl_save_libdir"
784
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
786
dnl The -rpath options are cumulative.
787
for found_dir in $rpathdirs; do
788
acl_save_libdir="$libdir"
790
eval flag=\"$acl_hardcode_libdir_flag_spec\"
791
libdir="$acl_save_libdir"
792
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
796
if test "X$ltrpathdirs" != "X"; then
797
dnl When using libtool, the option that works for both libraries and
798
dnl executables is -R. The -R options are cumulative.
799
for found_dir in $ltrpathdirs; do
800
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
810
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
811
dnl unless already present in VAR.
812
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
813
dnl contains two or three consecutive elements that belong together.
814
AC_DEFUN([AC_LIB_APPENDTOVAR],
816
for element in [$2]; do
819
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
820
if test "X$x" = "X$element"; then
825
if test -z "$haveit"; then
826
[$1]="${[$1]}${[$1]:+ }$element"
831
dnl For those cases where a variable contains several -L and -l options
832
dnl referring to unknown libraries and directories, this macro determines the
833
dnl necessary additional linker options for the runtime path.
834
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
835
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
836
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
837
dnl otherwise linking without libtool is assumed.
838
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
840
AC_REQUIRE([AC_LIB_RPATH])
841
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
843
if test "$enable_rpath" != no; then
844
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
845
dnl Use an explicit option to hardcode directories into the resulting
850
if test -n "$next"; then
852
dnl No need to hardcode the standard /usr/lib.
853
if test "X$dir" != "X/usr/$acl_libdirstem" \
854
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
855
rpathdirs="$rpathdirs $dir"
861
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
862
dnl No need to hardcode the standard /usr/lib.
863
if test "X$dir" != "X/usr/$acl_libdirstem" \
864
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
865
rpathdirs="$rpathdirs $dir"
872
if test "X$rpathdirs" != "X"; then
873
if test -n ""$3""; then
874
dnl libtool is used for linking. Use -R options.
875
for dir in $rpathdirs; do
876
$1="${$1}${$1:+ }-R$dir"
879
dnl The linker is used for linking directly.
880
if test -n "$acl_hardcode_libdir_separator"; then
881
dnl Weird platform: only the last -rpath option counts, the user
882
dnl must pass all path elements in one option.
884
for dir in $rpathdirs; do
885
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
887
acl_save_libdir="$libdir"
889
eval flag=\"$acl_hardcode_libdir_flag_spec\"
890
libdir="$acl_save_libdir"
893
dnl The -rpath options are cumulative.
894
for dir in $rpathdirs; do
895
acl_save_libdir="$libdir"
897
eval flag=\"$acl_hardcode_libdir_flag_spec\"
898
libdir="$acl_save_libdir"
899
$1="${$1}${$1:+ }$flag"
909
# lib-prefix.m4 serial 7 (gettext-0.18)
910
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
911
dnl This file is free software; the Free Software Foundation
912
dnl gives unlimited permission to copy and/or distribute it,
913
dnl with or without modifications, as long as this notice is preserved.
915
dnl From Bruno Haible.
917
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
918
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
919
dnl require excessive bracketing.
920
ifdef([AC_HELP_STRING],
921
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
922
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
924
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
925
dnl to access previously installed libraries. The basic assumption is that
926
dnl a user will want packages to use other packages he previously installed
927
dnl with the same --prefix option.
928
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
929
dnl libraries, but is otherwise very convenient.
930
AC_DEFUN([AC_LIB_PREFIX],
932
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
933
AC_REQUIRE([AC_PROG_CC])
934
AC_REQUIRE([AC_CANONICAL_HOST])
935
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
936
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
937
dnl By default, look in $includedir and $libdir.
939
AC_LIB_WITH_FINAL_PREFIX([
940
eval additional_includedir=\"$includedir\"
941
eval additional_libdir=\"$libdir\"
943
AC_LIB_ARG_WITH([lib-prefix],
944
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
945
--without-lib-prefix don't search for libraries in includedir and libdir],
947
if test "X$withval" = "Xno"; then
950
if test "X$withval" = "X"; then
951
AC_LIB_WITH_FINAL_PREFIX([
952
eval additional_includedir=\"$includedir\"
953
eval additional_libdir=\"$libdir\"
956
additional_includedir="$withval/include"
957
additional_libdir="$withval/$acl_libdirstem"
961
if test $use_additional = yes; then
962
dnl Potentially add $additional_includedir to $CPPFLAGS.
964
dnl 1. if it's the standard /usr/include,
965
dnl 2. if it's already present in $CPPFLAGS,
966
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
967
dnl 4. if it doesn't exist as a directory.
968
if test "X$additional_includedir" != "X/usr/include"; then
970
for x in $CPPFLAGS; do
971
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
972
if test "X$x" = "X-I$additional_includedir"; then
977
if test -z "$haveit"; then
978
if test "X$additional_includedir" = "X/usr/local/include"; then
979
if test -n "$GCC"; then
981
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
985
if test -z "$haveit"; then
986
if test -d "$additional_includedir"; then
987
dnl Really add $additional_includedir to $CPPFLAGS.
988
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
993
dnl Potentially add $additional_libdir to $LDFLAGS.
995
dnl 1. if it's the standard /usr/lib,
996
dnl 2. if it's already present in $LDFLAGS,
997
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
998
dnl 4. if it doesn't exist as a directory.
999
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1001
for x in $LDFLAGS; do
1002
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1003
if test "X$x" = "X-L$additional_libdir"; then
1008
if test -z "$haveit"; then
1009
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1010
if test -n "$GCC"; then
1012
linux*) haveit=yes;;
1016
if test -z "$haveit"; then
1017
if test -d "$additional_libdir"; then
1018
dnl Really add $additional_libdir to $LDFLAGS.
1019
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1027
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1028
dnl acl_final_exec_prefix, containing the values to which $prefix and
1029
dnl $exec_prefix will expand at the end of the configure script.
1030
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1032
dnl Unfortunately, prefix and exec_prefix get only finally determined
1033
dnl at the end of configure.
1034
if test "X$prefix" = "XNONE"; then
1035
acl_final_prefix="$ac_default_prefix"
1037
acl_final_prefix="$prefix"
1039
if test "X$exec_prefix" = "XNONE"; then
1040
acl_final_exec_prefix='${prefix}'
1042
acl_final_exec_prefix="$exec_prefix"
1044
acl_save_prefix="$prefix"
1045
prefix="$acl_final_prefix"
1046
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1047
prefix="$acl_save_prefix"
1050
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1051
dnl variables prefix and exec_prefix bound to the values they will have
1052
dnl at the end of the configure script.
1053
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1055
acl_save_prefix="$prefix"
1056
prefix="$acl_final_prefix"
1057
acl_save_exec_prefix="$exec_prefix"
1058
exec_prefix="$acl_final_exec_prefix"
1060
exec_prefix="$acl_save_exec_prefix"
1061
prefix="$acl_save_prefix"
1064
dnl AC_LIB_PREPARE_MULTILIB creates
1065
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1066
dnl "lib" or "lib64" or "lib/64",
1067
dnl - a variable acl_libdirstem2, as a secondary possible value for
1068
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1070
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1072
dnl There is no formal standard regarding lib and lib64.
1073
dnl On glibc systems, the current practice is that on a system supporting
1074
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1075
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1076
dnl the compiler's default mode by looking at the compiler's library search
1077
dnl path. If at least one of its elements ends in /lib64 or points to a
1078
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1079
dnl Otherwise we use the default, namely "lib".
1080
dnl On Solaris systems, the current practice is that on a system supporting
1081
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1082
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1083
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1084
AC_REQUIRE([AC_CANONICAL_HOST])
1089
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1090
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1091
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1092
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1093
dnl symlink is missing, so we set acl_libdirstem2 too.
1094
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1095
[AC_EGREP_CPP([sixtyfour bits], [
1099
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1101
if test $gl_cv_solaris_64bit = yes; then
1102
acl_libdirstem=lib/64
1104
sparc*) acl_libdirstem2=lib/sparcv9 ;;
1105
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1110
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1111
if test -n "$searchpath"; then
1112
acl_save_IFS="${IFS= }"; IFS=":"
1113
for searchdir in $searchpath; do
1114
if test -d "$searchdir"; then
1115
case "$searchdir" in
1116
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1118
# Better ignore directories of this form. They are misleading.
1120
*) searchdir=`cd "$searchdir" && pwd`
1121
case "$searchdir" in
1122
*/lib64 ) acl_libdirstem=lib64 ;;
1131
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1134
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1135
# serial 1 (pkg-config-0.24)
1137
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1139
# This program is free software; you can redistribute it and/or modify
1140
# it under the terms of the GNU General Public License as published by
1141
# the Free Software Foundation; either version 2 of the License, or
1142
# (at your option) any later version.
1144
# This program is distributed in the hope that it will be useful, but
1145
# WITHOUT ANY WARRANTY; without even the implied warranty of
1146
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1147
# General Public License for more details.
1149
# You should have received a copy of the GNU General Public License
1150
# along with this program; if not, write to the Free Software
1151
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1153
# As a special exception to the GNU General Public License, if you
1154
# distribute this file as part of a program that contains a
1155
# configuration script generated by Autoconf, you may include it under
1156
# the same distribution terms that you use for the rest of that program.
1158
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1159
# ----------------------------------
1160
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1161
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1162
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1163
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1164
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1165
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1167
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1168
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1170
if test -n "$PKG_CONFIG"; then
1171
_pkg_min_version=m4_default([$1], [0.9.0])
1172
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1173
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1174
AC_MSG_RESULT([yes])
1180
])# PKG_PROG_PKG_CONFIG
1182
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1184
# Check to see whether a particular set of modules exists. Similar
1185
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1187
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1188
# only at the first occurence in configure.ac, so if the first place
1189
# it's called might be skipped (such as if it is within an "if", you
1190
# have to call PKG_CHECK_EXISTS manually
1191
# --------------------------------------------------------------
1192
AC_DEFUN([PKG_CHECK_EXISTS],
1193
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1194
if test -n "$PKG_CONFIG" && \
1195
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1196
m4_default([$2], [:])
1197
m4_ifvaln([$3], [else
1201
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1202
# ---------------------------------------------
1203
m4_define([_PKG_CONFIG],
1204
[if test -n "$$1"; then
1206
elif test -n "$PKG_CONFIG"; then
1207
PKG_CHECK_EXISTS([$3],
1208
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1215
# _PKG_SHORT_ERRORS_SUPPORTED
1216
# -----------------------------
1217
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1218
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1219
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1220
_pkg_short_errors_supported=yes
1222
_pkg_short_errors_supported=no
1224
])# _PKG_SHORT_ERRORS_SUPPORTED
1227
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1228
# [ACTION-IF-NOT-FOUND])
1231
# Note that if there is a possibility the first call to
1232
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1233
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1236
# --------------------------------------------------------------
1237
AC_DEFUN([PKG_CHECK_MODULES],
1238
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1239
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1240
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1243
AC_MSG_CHECKING([for $1])
1245
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1246
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1248
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1249
and $1[]_LIBS to avoid the need to call pkg-config.
1250
See the pkg-config man page for more details.])
1252
if test $pkg_failed = yes; then
1254
_PKG_SHORT_ERRORS_SUPPORTED
1255
if test $_pkg_short_errors_supported = yes; then
1256
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1258
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1260
# Put the nasty error message in config.log where it belongs
1261
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1263
m4_default([$4], [AC_MSG_ERROR(
1264
[Package requirements ($2) were not met:
1268
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1269
installed software in a non-standard prefix.
1273
elif test $pkg_failed = untried; then
1275
m4_default([$4], [AC_MSG_FAILURE(
1276
[The pkg-config script could not be found or is too old. Make sure it
1277
is in your PATH or set the PKG_CONFIG environment variable to the full
1282
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
1285
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1286
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1287
AC_MSG_RESULT([yes])
1290
])# PKG_CHECK_MODULES
1292
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
1295
# This file is free software; the Free Software Foundation
1296
# gives unlimited permission to copy and/or distribute it,
1297
# with or without modifications, as long as this notice is preserved.
1301
# AM_AUTOMAKE_VERSION(VERSION)
1302
# ----------------------------
1303
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1304
# generated from the m4 files accompanying Automake X.Y.
1305
# (This private macro should not be called outside this file.)
1306
AC_DEFUN([AM_AUTOMAKE_VERSION],
1307
[am__api_version='1.11'
1308
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1309
dnl require some minimum version. Point them to the right macro.
1310
m4_if([$1], [1.11.3], [],
1311
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1314
# _AM_AUTOCONF_VERSION(VERSION)
1315
# -----------------------------
1316
# aclocal traces this macro to find the Autoconf version.
1317
# This is a private macro too. Using m4_define simplifies
1318
# the logic in aclocal, which can simply ignore this definition.
1319
m4_define([_AM_AUTOCONF_VERSION], [])
1321
# AM_SET_CURRENT_AUTOMAKE_VERSION
1322
# -------------------------------
1323
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1324
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1325
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1326
[AM_AUTOMAKE_VERSION([1.11.3])dnl
1327
m4_ifndef([AC_AUTOCONF_VERSION],
1328
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1329
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1331
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
1333
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1335
# This file is free software; the Free Software Foundation
1336
# gives unlimited permission to copy and/or distribute it,
1337
# with or without modifications, as long as this notice is preserved.
1341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1342
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1345
# Of course, Automake must honor this variable whenever it calls a
1346
# tool from the auxiliary directory. The problem is that $srcdir (and
1347
# therefore $ac_aux_dir as well) can be either absolute or relative,
1348
# depending on how configure is run. This is pretty annoying, since
1349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1350
# source directory, any form will work fine, but in subdirectories a
1351
# relative path needs to be adjusted first.
1353
# $ac_aux_dir/missing
1354
# fails when called from a subdirectory if $ac_aux_dir is relative
1355
# $top_srcdir/$ac_aux_dir/missing
1356
# fails if $ac_aux_dir is absolute,
1357
# fails when called from a subdirectory in a VPATH build with
1358
# a relative $ac_aux_dir
1360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1361
# are both prefixed by $srcdir. In an in-source build this is usually
1362
# harmless because $srcdir is `.', but things will broke when you
1363
# start a VPATH build or use an absolute $srcdir.
1365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1366
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1367
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1368
# and then we would define $MISSING as
1369
# MISSING="\${SHELL} $am_aux_dir/missing"
1370
# This will work as long as MISSING is not called from configure, because
1371
# unfortunately $(top_srcdir) has no meaning in configure.
1372
# However there are other variables, like CC, which are often used in
1373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
1375
# Another solution, used here, is to always expand $ac_aux_dir to an
1376
# absolute PATH. The drawback is that using absolute paths prevent a
1377
# configured tree to be moved without reconfiguration.
1379
AC_DEFUN([AM_AUX_DIR_EXPAND],
1380
[dnl Rely on autoconf to set up CDPATH properly.
1381
AC_PREREQ([2.50])dnl
1382
# expand $ac_aux_dir to an absolute path
1383
am_aux_dir=`cd $ac_aux_dir && pwd`
1386
# AM_CONDITIONAL -*- Autoconf -*-
1388
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1389
# Free Software Foundation, Inc.
1391
# This file is free software; the Free Software Foundation
1392
# gives unlimited permission to copy and/or distribute it,
1393
# with or without modifications, as long as this notice is preserved.
1397
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1398
# -------------------------------------
1399
# Define a conditional.
1400
AC_DEFUN([AM_CONDITIONAL],
1402
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1403
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1404
AC_SUBST([$1_TRUE])dnl
1405
AC_SUBST([$1_FALSE])dnl
1406
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1407
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1408
m4_define([_AM_COND_VALUE_$1], [$2])dnl
1416
AC_CONFIG_COMMANDS_PRE(
1417
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1418
AC_MSG_ERROR([[conditional "$1" was never defined.
1419
Usually this means the macro was only invoked conditionally.]])
1422
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
1423
# 2010, 2011 Free Software Foundation, Inc.
1425
# This file is free software; the Free Software Foundation
1426
# gives unlimited permission to copy and/or distribute it,
1427
# with or without modifications, as long as this notice is preserved.
1431
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1432
# written in clear, in which case automake, when reading aclocal.m4,
1433
# will think it sees a *use*, and therefore will trigger all it's
1434
# C support machinery. Also note that it means that autoscan, seeing
1435
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1438
# _AM_DEPENDENCIES(NAME)
1439
# ----------------------
1440
# See how the compiler implements dependency checking.
1441
# NAME is "CC", "CXX", "GCJ", or "OBJC".
1442
# We try a few techniques and use that to set a single cache variable.
1444
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1445
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1446
# dependency, and given that the user is not expected to run this macro,
1447
# just rely on AC_PROG_CC.
1448
AC_DEFUN([_AM_DEPENDENCIES],
1449
[AC_REQUIRE([AM_SET_DEPDIR])dnl
1450
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1451
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1452
AC_REQUIRE([AM_DEP_TRACK])dnl
1454
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1455
[$1], CXX, [depcc="$CXX" am_compiler_list=],
1456
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1457
[$1], UPC, [depcc="$UPC" am_compiler_list=],
1458
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1459
[depcc="$$1" am_compiler_list=])
1461
AC_CACHE_CHECK([dependency style of $depcc],
1462
[am_cv_$1_dependencies_compiler_type],
1463
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1464
# We make a subdir and do the tests there. Otherwise we can end up
1465
# making bogus files that we don't know about and never remove. For
1466
# instance it was reported that on HP-UX the gcc test will end up
1467
# making a dummy file named `D' -- because `-MD' means `put the output
1471
# Copy depcomp to subdir because otherwise we won't find it if we're
1472
# using a relative directory.
1473
cp "$am_depcomp" conftest.dir
1475
# We will build objects and dependencies in a subdirectory because
1476
# it helps to detect inapplicable dependency modes. For instance
1477
# both Tru64's cc and ICC support -MD to output dependencies as a
1478
# side effect of compilation, but ICC will put the dependencies in
1479
# the current directory while Tru64 will put them in the object
1483
am_cv_$1_dependencies_compiler_type=none
1484
if test "$am_compiler_list" = ""; then
1485
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1489
[case " $depcc " in #(
1490
*\ -arch\ *\ -arch\ *) am__universal=true ;;
1493
[case " $depcc " in #(
1494
*\ -arch\ *\ -arch\ *) am__universal=true ;;
1497
for depmode in $am_compiler_list; do
1498
# Setup a source with many dependencies, because some compilers
1499
# like to wrap large dependency lists on column 80 (with \), and
1500
# we should not choose a depcomp mode which is confused by this.
1502
# We need to recreate these files for each test, as the compiler may
1503
# overwrite some of them when testing with obscure command lines.
1504
# This happens at least with the AIX C compiler.
1506
for i in 1 2 3 4 5 6; do
1507
echo '#include "conftst'$i'.h"' >> sub/conftest.c
1508
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1509
# Solaris 8's {/usr,}/bin/sh.
1510
touch sub/conftst$i.h
1512
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1514
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1515
# mode. It turns out that the SunPro C++ compiler does not properly
1516
# handle `-M -o', and we need to detect this. Also, some Intel
1517
# versions had trouble with output in subdirs
1518
am__obj=sub/conftest.${OBJEXT-o}
1519
am__minus_obj="-o $am__obj"
1522
# This depmode causes a compiler race in universal mode.
1523
test "$am__universal" = false || continue
1526
# after this tag, mechanisms are not by side-effect, so they'll
1527
# only be used when explicitly requested
1528
if test "x$enable_dependency_tracking" = xyes; then
1534
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1535
# This compiler won't grok `-c -o', but also, the minuso test has
1536
# not run yet. These depmodes are late enough in the game, and
1537
# so weak that their functioning should not be impacted.
1538
am__obj=conftest.${OBJEXT-o}
1543
if depmode=$depmode \
1544
source=sub/conftest.c object=$am__obj \
1545
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1546
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1547
>/dev/null 2>conftest.err &&
1548
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1549
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1550
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1551
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1552
# icc doesn't choke on unknown options, it will just issue warnings
1553
# or remarks (even with -Werror). So we grep stderr for any message
1554
# that says an option was ignored or not supported.
1555
# When given -MP, icc 7.0 and 7.1 complain thusly:
1556
# icc: Command line warning: ignoring option '-M'; no argument required
1557
# The diagnosis changed in icc 8.0:
1558
# icc: Command line remark: option '-MP' not supported
1559
if (grep 'ignoring option' conftest.err ||
1560
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1561
am_cv_$1_dependencies_compiler_type=$depmode
1570
am_cv_$1_dependencies_compiler_type=none
1573
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1574
AM_CONDITIONAL([am__fastdep$1], [
1575
test "x$enable_dependency_tracking" != xno \
1576
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1582
# Choose a directory name for dependency files.
1583
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1584
AC_DEFUN([AM_SET_DEPDIR],
1585
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1586
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1592
AC_DEFUN([AM_DEP_TRACK],
1593
[AC_ARG_ENABLE(dependency-tracking,
1594
[ --disable-dependency-tracking speeds up one-time build
1595
--enable-dependency-tracking do not reject slow dependency extractors])
1596
if test "x$enable_dependency_tracking" != xno; then
1597
am_depcomp="$ac_aux_dir/depcomp"
1601
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1602
AC_SUBST([AMDEPBACKSLASH])dnl
1603
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1604
AC_SUBST([am__nodep])dnl
1605
_AM_SUBST_NOTMAKE([am__nodep])dnl
1608
# Generate code to set up dependency tracking. -*- Autoconf -*-
1610
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1611
# Free Software Foundation, Inc.
1613
# This file is free software; the Free Software Foundation
1614
# gives unlimited permission to copy and/or distribute it,
1615
# with or without modifications, as long as this notice is preserved.
1619
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1620
# ------------------------------
1621
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1623
# Autoconf 2.62 quotes --file arguments for eval, but not when files
1624
# are listed without --file. Let's play safe and only enable the eval
1625
# if we detect the quoting.
1626
case $CONFIG_FILES in
1627
*\'*) eval set x "$CONFIG_FILES" ;;
1628
*) set x $CONFIG_FILES ;;
1633
# Strip MF so we end up with the name of the file.
1634
mf=`echo "$mf" | sed -e 's/:.*$//'`
1635
# Check whether this is an Automake generated Makefile or not.
1636
# We used to match only the files named `Makefile.in', but
1637
# some people rename them; so instead we look at the file content.
1638
# Grep'ing the first line is not enough: some people post-process
1639
# each Makefile.in and add a new line on top of each file to say so.
1640
# Grep'ing the whole file is not good either: AIX grep has a line
1641
# limit of 2048, but all sed's we know have understand at least 4000.
1642
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1643
dirpart=`AS_DIRNAME("$mf")`
1647
# Extract the definition of DEPDIR, am__include, and am__quote
1648
# from the Makefile without running `make'.
1649
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1650
test -z "$DEPDIR" && continue
1651
am__include=`sed -n 's/^am__include = //p' < "$mf"`
1652
test -z "am__include" && continue
1653
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1654
# When using ansi2knr, U may be empty or an underscore; expand it
1655
U=`sed -n 's/^U = //p' < "$mf"`
1656
# Find all dependency output files, they are included files with
1657
# $(DEPDIR) in their names. We invoke sed twice because it is the
1658
# simplest approach to changing $(DEPDIR) to its actual value in the
1660
for file in `sed -n "
1661
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1662
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1663
# Make sure the directory exists.
1664
test -f "$dirpart/$file" && continue
1665
fdir=`AS_DIRNAME(["$file"])`
1666
AS_MKDIR_P([$dirpart/$fdir])
1667
# echo "creating $dirpart/$file"
1668
echo '# dummy' > "$dirpart/$file"
1672
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1675
# AM_OUTPUT_DEPENDENCY_COMMANDS
1676
# -----------------------------
1677
# This macro should only be invoked once -- use via AC_REQUIRE.
1679
# This code is only required when automatic dependency tracking
1680
# is enabled. FIXME. This creates each `.P' file that we will
1681
# need in order to bootstrap the dependency handling code.
1682
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1683
[AC_CONFIG_COMMANDS([depfiles],
1684
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1685
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1688
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1689
# Free Software Foundation, Inc.
1691
# This file is free software; the Free Software Foundation
1692
# gives unlimited permission to copy and/or distribute it,
1693
# with or without modifications, as long as this notice is preserved.
1697
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1698
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1700
# Do all the work for Automake. -*- Autoconf -*-
1702
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1703
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1705
# This file is free software; the Free Software Foundation
1706
# gives unlimited permission to copy and/or distribute it,
1707
# with or without modifications, as long as this notice is preserved.
1711
# This macro actually does too much. Some checks are only needed if
1712
# your package does certain things. But this isn't really a big deal.
1714
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1715
# AM_INIT_AUTOMAKE([OPTIONS])
1716
# -----------------------------------------------
1717
# The call with PACKAGE and VERSION arguments is the old style
1718
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1719
# and VERSION should now be passed to AC_INIT and removed from
1720
# the call to AM_INIT_AUTOMAKE.
1721
# We support both call styles for the transition. After
1722
# the next Automake release, Autoconf can make the AC_INIT
1723
# arguments mandatory, and then we can depend on a new Autoconf
1724
# release and drop the old call support.
1725
AC_DEFUN([AM_INIT_AUTOMAKE],
1726
[AC_PREREQ([2.62])dnl
1727
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1728
dnl the ones we care about.
1729
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1730
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1731
AC_REQUIRE([AC_PROG_INSTALL])dnl
1732
if test "`cd $srcdir && pwd`" != "`pwd`"; then
1733
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1734
# is not polluted with repeated "-I."
1735
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1736
# test to see if srcdir already configured
1737
if test -f $srcdir/config.status; then
1738
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1742
# test whether we have cygpath
1743
if test -z "$CYGPATH_W"; then
1744
if (cygpath --version) >/dev/null 2>/dev/null; then
1745
CYGPATH_W='cygpath -w'
1750
AC_SUBST([CYGPATH_W])
1752
# Define the identity of the package.
1753
dnl Distinguish between old-style and new-style calls.
1755
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1756
AC_SUBST([PACKAGE], [$1])dnl
1757
AC_SUBST([VERSION], [$2])],
1758
[_AM_SET_OPTIONS([$1])dnl
1759
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1760
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1761
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1762
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1763
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1765
_AM_IF_OPTION([no-define],,
1766
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1767
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1769
# Some tools Automake needs.
1770
AC_REQUIRE([AM_SANITY_CHECK])dnl
1771
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1772
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1773
AM_MISSING_PROG(AUTOCONF, autoconf)
1774
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1775
AM_MISSING_PROG(AUTOHEADER, autoheader)
1776
AM_MISSING_PROG(MAKEINFO, makeinfo)
1777
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1778
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1779
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1780
# We need awk for the "check" target. The system "awk" is bad on
1782
AC_REQUIRE([AC_PROG_AWK])dnl
1783
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1784
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1785
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1786
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1787
[_AM_PROG_TAR([v7])])])
1788
_AM_IF_OPTION([no-dependencies],,
1789
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1790
[_AM_DEPENDENCIES(CC)],
1791
[define([AC_PROG_CC],
1792
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1793
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1794
[_AM_DEPENDENCIES(CXX)],
1795
[define([AC_PROG_CXX],
1796
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1797
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1798
[_AM_DEPENDENCIES(OBJC)],
1799
[define([AC_PROG_OBJC],
1800
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1802
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1803
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1804
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1805
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1806
AC_CONFIG_COMMANDS_PRE(dnl
1807
[m4_provide_if([_AM_COMPILER_EXEEXT],
1808
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1811
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1812
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1813
dnl mangled by Autoconf and run in a shell conditional statement.
1814
m4_define([_AC_COMPILER_EXEEXT],
1815
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1818
# When config.status generates a header, we must update the stamp-h file.
1819
# This file resides in the same directory as the config header
1820
# that is generated. The stamp files are numbered to have different names.
1822
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1823
# loop where config.status creates the headers, so we can generate
1824
# our stamp files there.
1825
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1826
[# Compute $1's index in $config_headers.
1829
for _am_header in $config_headers :; do
1831
$_am_arg | $_am_arg:* )
1834
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1837
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1839
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
1842
# This file is free software; the Free Software Foundation
1843
# gives unlimited permission to copy and/or distribute it,
1844
# with or without modifications, as long as this notice is preserved.
1848
# AM_PROG_INSTALL_SH
1849
# ------------------
1850
# Define $install_sh.
1851
AC_DEFUN([AM_PROG_INSTALL_SH],
1852
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1853
if test x"${install_sh}" != xset; then
1856
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1858
install_sh="\${SHELL} $am_aux_dir/install-sh"
1861
AC_SUBST(install_sh)])
1863
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1865
# This file is free software; the Free Software Foundation
1866
# gives unlimited permission to copy and/or distribute it,
1867
# with or without modifications, as long as this notice is preserved.
1871
# Check whether the underlying file-system supports filenames
1872
# with a leading dot. For instance MS-DOS doesn't.
1873
AC_DEFUN([AM_SET_LEADING_DOT],
1874
[rm -rf .tst 2>/dev/null
1875
mkdir .tst 2>/dev/null
1876
if test -d .tst; then
1881
rmdir .tst 2>/dev/null
1882
AC_SUBST([am__leading_dot])])
1884
# Check to see how 'make' treats includes. -*- Autoconf -*-
1886
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1888
# This file is free software; the Free Software Foundation
1889
# gives unlimited permission to copy and/or distribute it,
1890
# with or without modifications, as long as this notice is preserved.
1896
# Check to see how make treats includes.
1897
AC_DEFUN([AM_MAKE_INCLUDE],
1898
[am_make=${MAKE-make}
1899
cat > confinc << 'END'
1901
@echo this is the am__doit target
1904
# If we don't find an include directive, just comment out the code.
1905
AC_MSG_CHECKING([for style of include used by $am_make])
1909
# First try GNU make style include.
1910
echo "include confinc" > confmf
1911
# Ignore all kinds of additional output from `make'.
1912
case `$am_make -s -f confmf 2> /dev/null` in #(
1913
*the\ am__doit\ target*)
1919
# Now try BSD make style include.
1920
if test "$am__include" = "#"; then
1921
echo '.include "confinc"' > confmf
1922
case `$am_make -s -f confmf 2> /dev/null` in #(
1923
*the\ am__doit\ target*)
1924
am__include=.include
1930
AC_SUBST([am__include])
1931
AC_SUBST([am__quote])
1932
AC_MSG_RESULT([$_am_result])
1933
rm -f confinc confmf
1936
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1938
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1939
# Free Software Foundation, Inc.
1941
# This file is free software; the Free Software Foundation
1942
# gives unlimited permission to copy and/or distribute it,
1943
# with or without modifications, as long as this notice is preserved.
1947
# AM_MISSING_PROG(NAME, PROGRAM)
1948
# ------------------------------
1949
AC_DEFUN([AM_MISSING_PROG],
1950
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1951
$1=${$1-"${am_missing_run}$2"}
1955
# AM_MISSING_HAS_RUN
1956
# ------------------
1957
# Define MISSING if not defined so far and test if it supports --run.
1958
# If it does, set am_missing_run to use it, otherwise, to nothing.
1959
AC_DEFUN([AM_MISSING_HAS_RUN],
1960
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1961
AC_REQUIRE_AUX_FILE([missing])dnl
1962
if test x"${MISSING+set}" != xset; then
1965
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1967
MISSING="\${SHELL} $am_aux_dir/missing" ;;
1970
# Use eval to expand $SHELL
1971
if eval "$MISSING --run true"; then
1972
am_missing_run="$MISSING --run "
1975
AC_MSG_WARN([`missing' script is too old or missing])
1979
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
1982
# This file is free software; the Free Software Foundation
1983
# gives unlimited permission to copy and/or distribute it,
1984
# with or without modifications, as long as this notice is preserved.
1990
# Check for `mkdir -p'.
1991
AC_DEFUN([AM_PROG_MKDIR_P],
1992
[AC_PREREQ([2.60])dnl
1993
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1994
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1995
dnl while keeping a definition of mkdir_p for backward compatibility.
1996
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1997
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1998
dnl Makefile.ins that do not define MKDIR_P, so we do our own
1999
dnl adjustment using top_builddir (which is defined more often than
2001
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
2003
[[\\/$]]* | ?:[[\\/]]*) ;;
2004
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2008
# Helper functions for option handling. -*- Autoconf -*-
2010
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
2013
# This file is free software; the Free Software Foundation
2014
# gives unlimited permission to copy and/or distribute it,
2015
# with or without modifications, as long as this notice is preserved.
2019
# _AM_MANGLE_OPTION(NAME)
2020
# -----------------------
2021
AC_DEFUN([_AM_MANGLE_OPTION],
2022
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2024
# _AM_SET_OPTION(NAME)
2025
# --------------------
2026
# Set option NAME. Presently that only means defining a flag for this option.
2027
AC_DEFUN([_AM_SET_OPTION],
2028
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2030
# _AM_SET_OPTIONS(OPTIONS)
2031
# ------------------------
2032
# OPTIONS is a space-separated list of Automake options.
2033
AC_DEFUN([_AM_SET_OPTIONS],
2034
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2036
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2037
# -------------------------------------------
2038
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2039
AC_DEFUN([_AM_IF_OPTION],
2040
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2042
# Check to make sure that the build environment is sane. -*- Autoconf -*-
2044
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2045
# Free Software Foundation, Inc.
2047
# This file is free software; the Free Software Foundation
2048
# gives unlimited permission to copy and/or distribute it,
2049
# with or without modifications, as long as this notice is preserved.
2055
AC_DEFUN([AM_SANITY_CHECK],
2056
[AC_MSG_CHECKING([whether build environment is sane])
2059
echo timestamp > conftest.file
2060
# Reject unsafe characters in $srcdir or the absolute working directory
2061
# name. Accept space and tab only in the latter.
2065
*[[\\\"\#\$\&\'\`$am_lf]]*)
2066
AC_MSG_ERROR([unsafe absolute working directory name]);;
2069
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2070
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2073
# Do `set' in a subshell so we don't clobber the current shell's
2074
# arguments. Must try -L first in case configure is actually a
2075
# symlink; some systems play weird games with the mod time of symlinks
2076
# (eg FreeBSD returns the mod time of the symlink's containing
2079
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2080
if test "$[*]" = "X"; then
2082
set X `ls -t "$srcdir/configure" conftest.file`
2085
if test "$[*]" != "X $srcdir/configure conftest.file" \
2086
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
2088
# If neither matched, then we have a broken ls. This can happen
2089
# if, for instance, CONFIG_SHELL is bash and it inherits a
2090
# broken ls alias from the environment. This has actually
2091
# happened. Such a system could not be considered "sane".
2092
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2093
alias in your environment])
2096
test "$[2]" = conftest.file
2102
AC_MSG_ERROR([newly created file is older than distributed files!
2103
Check your system clock])
2105
AC_MSG_RESULT(yes)])
2107
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
2109
# This file is free software; the Free Software Foundation
2110
# gives unlimited permission to copy and/or distribute it,
2111
# with or without modifications, as long as this notice is preserved.
2115
# AM_PROG_INSTALL_STRIP
2116
# ---------------------
2117
# One issue with vendor `install' (even GNU) is that you can't
2118
# specify the program used to strip binaries. This is especially
2119
# annoying in cross-compiling environments, where the build's strip
2120
# is unlikely to handle the host's binaries.
2121
# Fortunately install-sh will honor a STRIPPROG variable, so we
2122
# always use install-sh in `make install-strip', and initialize
2123
# STRIPPROG with the value of the STRIP variable (set by the user).
2124
AC_DEFUN([AM_PROG_INSTALL_STRIP],
2125
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2126
# Installed binaries are usually stripped using `strip' when the user
2127
# run `make install-strip'. However `strip' might not be the right
2128
# tool to use in cross-compilation environments, therefore Automake
2129
# will honor the `STRIP' environment variable to overrule this program.
2130
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2131
if test "$cross_compiling" != no; then
2132
AC_CHECK_TOOL([STRIP], [strip], :)
2134
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2135
AC_SUBST([INSTALL_STRIP_PROGRAM])])
2137
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
2139
# This file is free software; the Free Software Foundation
2140
# gives unlimited permission to copy and/or distribute it,
2141
# with or without modifications, as long as this notice is preserved.
2145
# _AM_SUBST_NOTMAKE(VARIABLE)
2146
# ---------------------------
2147
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2148
# This macro is traced by Automake.
2149
AC_DEFUN([_AM_SUBST_NOTMAKE])
2151
# AM_SUBST_NOTMAKE(VARIABLE)
2152
# --------------------------
2153
# Public sister of _AM_SUBST_NOTMAKE.
2154
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2156
# Check how to create a tarball. -*- Autoconf -*-
2158
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
2160
# This file is free software; the Free Software Foundation
2161
# gives unlimited permission to copy and/or distribute it,
2162
# with or without modifications, as long as this notice is preserved.
2166
# _AM_PROG_TAR(FORMAT)
2167
# --------------------
2168
# Check how to create a tarball in format FORMAT.
2169
# FORMAT should be one of `v7', `ustar', or `pax'.
2171
# Substitute a variable $(am__tar) that is a command
2172
# writing to stdout a FORMAT-tarball containing the directory
2174
# tardir=directory && $(am__tar) > result.tar
2176
# Substitute a variable $(am__untar) that extract such
2177
# a tarball read from stdin.
2178
# $(am__untar) < result.tar
2179
AC_DEFUN([_AM_PROG_TAR],
2180
[# Always define AMTAR for backward compatibility. Yes, it's still used
2181
# in the wild :-( We should find a proper way to deprecate it ...
2182
AC_SUBST([AMTAR], ['$${TAR-tar}'])
2184
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2185
[m4_case([$1], [ustar],, [pax],,
2186
[m4_fatal([Unknown tar format])])
2187
AC_MSG_CHECKING([how to create a $1 tar archive])
2188
# Loop over all known methods to create a tar archive until one works.
2189
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2190
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
2191
# Do not fold the above two line into one, because Tru64 sh and
2192
# Solaris sh will not grok spaces in the rhs of `-'.
2193
for _am_tool in $_am_tools
2197
for _am_tar in tar gnutar gtar;
2199
AM_RUN_LOG([$_am_tar --version]) && break
2201
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2202
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2203
am__untar="$_am_tar -xf -"
2206
# Must skip GNU tar: if it does not support --format= it doesn't create
2207
# ustar tarball either.
2208
(tar --version) >/dev/null 2>&1 && continue
2209
am__tar='tar chf - "$$tardir"'
2210
am__tar_='tar chf - "$tardir"'
2211
am__untar='tar xf -'
2214
am__tar='pax -L -x $1 -w "$$tardir"'
2215
am__tar_='pax -L -x $1 -w "$tardir"'
2219
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2220
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2221
am__untar='cpio -i -H $1 -d'
2230
# If the value was cached, stop now. We just wanted to have am__tar
2231
# and am__untar set.
2232
test -n "${am_cv_prog_tar_$1}" && break
2234
# tar/untar a dummy directory, and stop if the command works
2237
echo GrepMe > conftest.dir/file
2238
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2240
if test -s conftest.tar; then
2241
AM_RUN_LOG([$am__untar <conftest.tar])
2242
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2247
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2248
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2250
AC_SUBST([am__untar])
2253
m4_include([m4/byteorder.m4])
2254
m4_include([m4/iconv.m4])
2255
m4_include([m4/libtool.m4])
2256
m4_include([m4/ltoptions.m4])
2257
m4_include([m4/ltsugar.m4])
2258
m4_include([m4/ltversion.m4])
2259
m4_include([m4/lt~obsolete.m4])
2260
m4_include([m4/stdint.m4])