Debian Codegraph @

aclocal.m4

raw
1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
4
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.
8
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
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
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.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
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'.])])
22
23 # iconv.m4 serial 19 (gettext-0.18.2)
24 dnl Copyright (C) 2000-2002, 2007-2014, 2016 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.
28
29 dnl From Bruno Haible.
30
31 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
32 [
33 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
34 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
35 AC_REQUIRE([AC_LIB_RPATH])
36
37 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
38 dnl accordingly.
39 AC_LIB_LINKFLAGS_BODY([iconv])
40 ])
41
42 AC_DEFUN([AM_ICONV_LINK],
43 [
44 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
45 dnl those with the standalone portable GNU libiconv installed).
46 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
47
48 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
49 dnl accordingly.
50 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
51
52 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
53 dnl because if the user has installed libiconv and not disabled its use
54 dnl via --without-libiconv-prefix, he wants to use it. The first
55 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
56 am_save_CPPFLAGS="$CPPFLAGS"
57 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
58
59 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
60 am_cv_func_iconv="no, consider installing GNU libiconv"
61 am_cv_lib_iconv=no
62 AC_LINK_IFELSE(
63 [AC_LANG_PROGRAM(
64 [[
65 #include <stdlib.h>
66 #include <iconv.h>
67 ]],
68 [[iconv_t cd = iconv_open("","");
69 iconv(cd,NULL,NULL,NULL,NULL);
70 iconv_close(cd);]])],
71 [am_cv_func_iconv=yes])
72 if test "$am_cv_func_iconv" != yes; then
73 am_save_LIBS="$LIBS"
74 LIBS="$LIBS $LIBICONV"
75 AC_LINK_IFELSE(
76 [AC_LANG_PROGRAM(
77 [[
78 #include <stdlib.h>
79 #include <iconv.h>
80 ]],
81 [[iconv_t cd = iconv_open("","");
82 iconv(cd,NULL,NULL,NULL,NULL);
83 iconv_close(cd);]])],
84 [am_cv_lib_iconv=yes]
85 [am_cv_func_iconv=yes])
86 LIBS="$am_save_LIBS"
87 fi
88 ])
89 if test "$am_cv_func_iconv" = yes; then
90 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
91 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
92 dnl Solaris 10.
93 am_save_LIBS="$LIBS"
94 if test $am_cv_lib_iconv = yes; then
95 LIBS="$LIBS $LIBICONV"
96 fi
97 am_cv_func_iconv_works=no
98 for ac_iconv_const in '' 'const'; do
99 AC_RUN_IFELSE(
100 [AC_LANG_PROGRAM(
101 [[
102 #include <iconv.h>
103 #include <string.h>
104
105 #ifndef ICONV_CONST
106 # define ICONV_CONST $ac_iconv_const
107 #endif
108 ]],
109 [[int result = 0;
110 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
111 returns. */
112 {
113 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
114 if (cd_utf8_to_88591 != (iconv_t)(-1))
115 {
116 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
117 char buf[10];
118 ICONV_CONST char *inptr = input;
119 size_t inbytesleft = strlen (input);
120 char *outptr = buf;
121 size_t outbytesleft = sizeof (buf);
122 size_t res = iconv (cd_utf8_to_88591,
123 &inptr, &inbytesleft,
124 &outptr, &outbytesleft);
125 if (res == 0)
126 result |= 1;
127 iconv_close (cd_utf8_to_88591);
128 }
129 }
130 /* Test against Solaris 10 bug: Failures are not distinguishable from
131 successful returns. */
132 {
133 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
134 if (cd_ascii_to_88591 != (iconv_t)(-1))
135 {
136 static ICONV_CONST char input[] = "\263";
137 char buf[10];
138 ICONV_CONST char *inptr = input;
139 size_t inbytesleft = strlen (input);
140 char *outptr = buf;
141 size_t outbytesleft = sizeof (buf);
142 size_t res = iconv (cd_ascii_to_88591,
143 &inptr, &inbytesleft,
144 &outptr, &outbytesleft);
145 if (res == 0)
146 result |= 2;
147 iconv_close (cd_ascii_to_88591);
148 }
149 }
150 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
151 {
152 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
153 if (cd_88591_to_utf8 != (iconv_t)(-1))
154 {
155 static ICONV_CONST char input[] = "\304";
156 static char buf[2] = { (char)0xDE, (char)0xAD };
157 ICONV_CONST char *inptr = input;
158 size_t inbytesleft = 1;
159 char *outptr = buf;
160 size_t outbytesleft = 1;
161 size_t res = iconv (cd_88591_to_utf8,
162 &inptr, &inbytesleft,
163 &outptr, &outbytesleft);
164 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
165 result |= 4;
166 iconv_close (cd_88591_to_utf8);
167 }
168 }
169 #if 0 /* This bug could be worked around by the caller. */
170 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
171 {
172 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
173 if (cd_88591_to_utf8 != (iconv_t)(-1))
174 {
175 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
176 char buf[50];
177 ICONV_CONST char *inptr = input;
178 size_t inbytesleft = strlen (input);
179 char *outptr = buf;
180 size_t outbytesleft = sizeof (buf);
181 size_t res = iconv (cd_88591_to_utf8,
182 &inptr, &inbytesleft,
183 &outptr, &outbytesleft);
184 if ((int)res > 0)
185 result |= 8;
186 iconv_close (cd_88591_to_utf8);
187 }
188 }
189 #endif
190 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
191 provided. */
192 if (/* Try standardized names. */
193 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
194 /* Try IRIX, OSF/1 names. */
195 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
196 /* Try AIX names. */
197 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
198 /* Try HP-UX names. */
199 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
200 result |= 16;
201 return result;
202 ]])],
203 [am_cv_func_iconv_works=yes], ,
204 [case "$host_os" in
205 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
206 *) am_cv_func_iconv_works="guessing yes" ;;
207 esac])
208 test "$am_cv_func_iconv_works" = no || break
209 done
210 LIBS="$am_save_LIBS"
211 ])
212 case "$am_cv_func_iconv_works" in
213 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
214 *) am_func_iconv=yes ;;
215 esac
216 else
217 am_func_iconv=no am_cv_lib_iconv=no
218 fi
219 if test "$am_func_iconv" = yes; then
220 AC_DEFINE([HAVE_ICONV], [1],
221 [Define if you have the iconv() function and it works.])
222 fi
223 if test "$am_cv_lib_iconv" = yes; then
224 AC_MSG_CHECKING([how to link with libiconv])
225 AC_MSG_RESULT([$LIBICONV])
226 else
227 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
228 dnl either.
229 CPPFLAGS="$am_save_CPPFLAGS"
230 LIBICONV=
231 LTLIBICONV=
232 fi
233 AC_SUBST([LIBICONV])
234 AC_SUBST([LTLIBICONV])
235 ])
236
237 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
238 dnl avoid warnings like
239 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
240 dnl This is tricky because of the way 'aclocal' is implemented:
241 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
242 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
243 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
244 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
245 dnl warnings.
246 m4_define([gl_iconv_AC_DEFUN],
247 m4_version_prereq([2.64],
248 [[AC_DEFUN_ONCE(
249 [$1], [$2])]],
250 [m4_ifdef([gl_00GNULIB],
251 [[AC_DEFUN_ONCE(
252 [$1], [$2])]],
253 [[AC_DEFUN(
254 [$1], [$2])]])]))
255 gl_iconv_AC_DEFUN([AM_ICONV],
256 [
257 AM_ICONV_LINK
258 if test "$am_cv_func_iconv" = yes; then
259 AC_MSG_CHECKING([for iconv declaration])
260 AC_CACHE_VAL([am_cv_proto_iconv], [
261 AC_COMPILE_IFELSE(
262 [AC_LANG_PROGRAM(
263 [[
264 #include <stdlib.h>
265 #include <iconv.h>
266 extern
267 #ifdef __cplusplus
268 "C"
269 #endif
270 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
271 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
272 #else
273 size_t iconv();
274 #endif
275 ]],
276 [[]])],
277 [am_cv_proto_iconv_arg1=""],
278 [am_cv_proto_iconv_arg1="const"])
279 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
280 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
281 AC_MSG_RESULT([
282 $am_cv_proto_iconv])
283 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
284 [Define as const if the declaration of iconv() needs const.])
285 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
286 m4_ifdef([gl_ICONV_H_DEFAULTS],
287 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
288 if test -n "$am_cv_proto_iconv_arg1"; then
289 ICONV_CONST="const"
290 fi
291 ])
292 fi
293 ])
294
295 # lib-ld.m4 serial 6
296 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
297 dnl This file is free software; the Free Software Foundation
298 dnl gives unlimited permission to copy and/or distribute it,
299 dnl with or without modifications, as long as this notice is preserved.
300
301 dnl Subroutines of libtool.m4,
302 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
303 dnl collision with libtool.m4.
304
305 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
306 AC_DEFUN([AC_LIB_PROG_LD_GNU],
307 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
308 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
309 case `$LD -v 2>&1 </dev/null` in
310 *GNU* | *'with BFD'*)
311 acl_cv_prog_gnu_ld=yes
312 ;;
313 *)
314 acl_cv_prog_gnu_ld=no
315 ;;
316 esac])
317 with_gnu_ld=$acl_cv_prog_gnu_ld
318 ])
319
320 dnl From libtool-2.4. Sets the variable LD.
321 AC_DEFUN([AC_LIB_PROG_LD],
322 [AC_REQUIRE([AC_PROG_CC])dnl
323 AC_REQUIRE([AC_CANONICAL_HOST])dnl
324
325 AC_ARG_WITH([gnu-ld],
326 [AS_HELP_STRING([--with-gnu-ld],
327 [assume the C compiler uses GNU ld [default=no]])],
328 [test "$withval" = no || with_gnu_ld=yes],
329 [with_gnu_ld=no])dnl
330
331 # Prepare PATH_SEPARATOR.
332 # The user is always right.
333 if test "${PATH_SEPARATOR+set}" != set; then
334 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
335 # contains only /bin. Note that ksh looks also at the FPATH variable,
336 # so we have to set that as well for the test.
337 PATH_SEPARATOR=:
338 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
339 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
340 || PATH_SEPARATOR=';'
341 }
342 fi
343
344 ac_prog=ld
345 if test "$GCC" = yes; then
346 # Check if gcc -print-prog-name=ld gives a path.
347 AC_MSG_CHECKING([for ld used by $CC])
348 case $host in
349 *-*-mingw*)
350 # gcc leaves a trailing carriage return which upsets mingw
351 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
352 *)
353 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
354 esac
355 case $ac_prog in
356 # Accept absolute paths.
357 [[\\/]]* | ?:[[\\/]]*)
358 re_direlt='/[[^/]][[^/]]*/\.\./'
359 # Canonicalize the pathname of ld
360 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
361 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
362 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
363 done
364 test -z "$LD" && LD="$ac_prog"
365 ;;
366 "")
367 # If it fails, then pretend we aren't using GCC.
368 ac_prog=ld
369 ;;
370 *)
371 # If it is relative, then search for the first ld in PATH.
372 with_gnu_ld=unknown
373 ;;
374 esac
375 elif test "$with_gnu_ld" = yes; then
376 AC_MSG_CHECKING([for GNU ld])
377 else
378 AC_MSG_CHECKING([for non-GNU ld])
379 fi
380 AC_CACHE_VAL([acl_cv_path_LD],
381 [if test -z "$LD"; then
382 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
383 for ac_dir in $PATH; do
384 IFS="$acl_save_ifs"
385 test -z "$ac_dir" && ac_dir=.
386 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
387 acl_cv_path_LD="$ac_dir/$ac_prog"
388 # Check to see if the program is GNU ld. I'd rather use --version,
389 # but apparently some variants of GNU ld only accept -v.
390 # Break only if it was the GNU/non-GNU ld that we prefer.
391 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
392 *GNU* | *'with BFD'*)
393 test "$with_gnu_ld" != no && break
394 ;;
395 *)
396 test "$with_gnu_ld" != yes && break
397 ;;
398 esac
399 fi
400 done
401 IFS="$acl_save_ifs"
402 else
403 acl_cv_path_LD="$LD" # Let the user override the test with a path.
404 fi])
405 LD="$acl_cv_path_LD"
406 if test -n "$LD"; then
407 AC_MSG_RESULT([$LD])
408 else
409 AC_MSG_RESULT([no])
410 fi
411 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
412 AC_LIB_PROG_LD_GNU
413 ])
414
415 # lib-link.m4 serial 26 (gettext-0.18.2)
416 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
417 dnl This file is free software; the Free Software Foundation
418 dnl gives unlimited permission to copy and/or distribute it,
419 dnl with or without modifications, as long as this notice is preserved.
420
421 dnl From Bruno Haible.
422
423 AC_PREREQ([2.54])
424
425 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
426 dnl the libraries corresponding to explicit and implicit dependencies.
427 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
428 dnl augments the CPPFLAGS variable.
429 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
430 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
431 AC_DEFUN([AC_LIB_LINKFLAGS],
432 [
433 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
434 AC_REQUIRE([AC_LIB_RPATH])
435 pushdef([Name],[m4_translit([$1],[./+-], [____])])
436 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
437 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
438 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
439 AC_LIB_LINKFLAGS_BODY([$1], [$2])
440 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
441 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
442 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
443 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
444 ])
445 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
446 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
447 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
448 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
449 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
450 AC_SUBST([LIB]NAME)
451 AC_SUBST([LTLIB]NAME)
452 AC_SUBST([LIB]NAME[_PREFIX])
453 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
454 dnl results of this search when this library appears as a dependency.
455 HAVE_LIB[]NAME=yes
456 popdef([NAME])
457 popdef([Name])
458 ])
459
460 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
461 dnl searches for libname and the libraries corresponding to explicit and
462 dnl implicit dependencies, together with the specified include files and
463 dnl the ability to compile and link the specified testcode. The missing-message
464 dnl defaults to 'no' and may contain additional hints for the user.
465 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
466 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
467 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
468 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
469 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
470 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
471 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
472 [
473 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
474 AC_REQUIRE([AC_LIB_RPATH])
475 pushdef([Name],[m4_translit([$1],[./+-], [____])])
476 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
477 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
478
479 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
480 dnl accordingly.
481 AC_LIB_LINKFLAGS_BODY([$1], [$2])
482
483 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
484 dnl because if the user has installed lib[]Name and not disabled its use
485 dnl via --without-lib[]Name-prefix, he wants to use it.
486 ac_save_CPPFLAGS="$CPPFLAGS"
487 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
488
489 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
490 ac_save_LIBS="$LIBS"
491 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
492 dnl because these -l options might require -L options that are present in
493 dnl LIBS. -l options benefit only from the -L options listed before it.
494 dnl Otherwise, add it to the front of LIBS, because it may be a static
495 dnl library that depends on another static library that is present in LIBS.
496 dnl Static libraries benefit only from the static libraries listed after
497 dnl it.
498 case " $LIB[]NAME" in
499 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
500 *) LIBS="$LIB[]NAME $LIBS" ;;
501 esac
502 AC_LINK_IFELSE(
503 [AC_LANG_PROGRAM([[$3]], [[$4]])],
504 [ac_cv_lib[]Name=yes],
505 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
506 LIBS="$ac_save_LIBS"
507 ])
508 if test "$ac_cv_lib[]Name" = yes; then
509 HAVE_LIB[]NAME=yes
510 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
511 AC_MSG_CHECKING([how to link with lib[]$1])
512 AC_MSG_RESULT([$LIB[]NAME])
513 else
514 HAVE_LIB[]NAME=no
515 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
516 dnl $INC[]NAME either.
517 CPPFLAGS="$ac_save_CPPFLAGS"
518 LIB[]NAME=
519 LTLIB[]NAME=
520 LIB[]NAME[]_PREFIX=
521 fi
522 AC_SUBST([HAVE_LIB]NAME)
523 AC_SUBST([LIB]NAME)
524 AC_SUBST([LTLIB]NAME)
525 AC_SUBST([LIB]NAME[_PREFIX])
526 popdef([NAME])
527 popdef([Name])
528 ])
529
530 dnl Determine the platform dependent parameters needed to use rpath:
531 dnl acl_libext,
532 dnl acl_shlibext,
533 dnl acl_libname_spec,
534 dnl acl_library_names_spec,
535 dnl acl_hardcode_libdir_flag_spec,
536 dnl acl_hardcode_libdir_separator,
537 dnl acl_hardcode_direct,
538 dnl acl_hardcode_minus_L.
539 AC_DEFUN([AC_LIB_RPATH],
540 [
541 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
542 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
543 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
544 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
545 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
546 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
547 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
548 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
549 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
550 . ./conftest.sh
551 rm -f ./conftest.sh
552 acl_cv_rpath=done
553 ])
554 wl="$acl_cv_wl"
555 acl_libext="$acl_cv_libext"
556 acl_shlibext="$acl_cv_shlibext"
557 acl_libname_spec="$acl_cv_libname_spec"
558 acl_library_names_spec="$acl_cv_library_names_spec"
559 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
560 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
561 acl_hardcode_direct="$acl_cv_hardcode_direct"
562 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
563 dnl Determine whether the user wants rpath handling at all.
564 AC_ARG_ENABLE([rpath],
565 [ --disable-rpath do not hardcode runtime library paths],
566 :, enable_rpath=yes)
567 ])
568
569 dnl AC_LIB_FROMPACKAGE(name, package)
570 dnl declares that libname comes from the given package. The configure file
571 dnl will then not have a --with-libname-prefix option but a
572 dnl --with-package-prefix option. Several libraries can come from the same
573 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
574 dnl macro call that searches for libname.
575 AC_DEFUN([AC_LIB_FROMPACKAGE],
576 [
577 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
578 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
579 define([acl_frompackage_]NAME, [$2])
580 popdef([NAME])
581 pushdef([PACK],[$2])
582 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
583 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
584 define([acl_libsinpackage_]PACKUP,
585 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
586 popdef([PACKUP])
587 popdef([PACK])
588 ])
589
590 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
591 dnl the libraries corresponding to explicit and implicit dependencies.
592 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
593 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
594 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
595 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
596 [
597 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
598 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
599 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
600 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
601 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
602 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
603 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
604 dnl Autoconf >= 2.61 supports dots in --with options.
605 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
606 dnl By default, look in $includedir and $libdir.
607 use_additional=yes
608 AC_LIB_WITH_FINAL_PREFIX([
609 eval additional_includedir=\"$includedir\"
610 eval additional_libdir=\"$libdir\"
611 ])
612 AC_ARG_WITH(P_A_C_K[-prefix],
613 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
614 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
615 [
616 if test "X$withval" = "Xno"; then
617 use_additional=no
618 else
619 if test "X$withval" = "X"; then
620 AC_LIB_WITH_FINAL_PREFIX([
621 eval additional_includedir=\"$includedir\"
622 eval additional_libdir=\"$libdir\"
623 ])
624 else
625 additional_includedir="$withval/include"
626 additional_libdir="$withval/$acl_libdirstem"
627 if test "$acl_libdirstem2" != "$acl_libdirstem" \
628 && ! test -d "$withval/$acl_libdirstem"; then
629 additional_libdir="$withval/$acl_libdirstem2"
630 fi
631 fi
632 fi
633 ])
634 dnl Search the library and its dependencies in $additional_libdir and
635 dnl $LDFLAGS. Using breadth-first-seach.
636 LIB[]NAME=
637 LTLIB[]NAME=
638 INC[]NAME=
639 LIB[]NAME[]_PREFIX=
640 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
641 dnl computed. So it has to be reset here.
642 HAVE_LIB[]NAME=
643 rpathdirs=
644 ltrpathdirs=
645 names_already_handled=
646 names_next_round='$1 $2'
647 while test -n "$names_next_round"; do
648 names_this_round="$names_next_round"
649 names_next_round=
650 for name in $names_this_round; do
651 already_handled=
652 for n in $names_already_handled; do
653 if test "$n" = "$name"; then
654 already_handled=yes
655 break
656 fi
657 done
658 if test -z "$already_handled"; then
659 names_already_handled="$names_already_handled $name"
660 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
661 dnl or AC_LIB_HAVE_LINKFLAGS call.
662 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
663 eval value=\"\$HAVE_LIB$uppername\"
664 if test -n "$value"; then
665 if test "$value" = yes; then
666 eval value=\"\$LIB$uppername\"
667 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
668 eval value=\"\$LTLIB$uppername\"
669 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
670 else
671 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
672 dnl that this library doesn't exist. So just drop it.
673 :
674 fi
675 else
676 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
677 dnl and the already constructed $LIBNAME/$LTLIBNAME.
678 found_dir=
679 found_la=
680 found_so=
681 found_a=
682 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
683 if test -n "$acl_shlibext"; then
684 shrext=".$acl_shlibext" # typically: shrext=.so
685 else
686 shrext=
687 fi
688 if test $use_additional = yes; then
689 dir="$additional_libdir"
690 dnl The same code as in the loop below:
691 dnl First look for a shared library.
692 if test -n "$acl_shlibext"; then
693 if test -f "$dir/$libname$shrext"; then
694 found_dir="$dir"
695 found_so="$dir/$libname$shrext"
696 else
697 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
698 ver=`(cd "$dir" && \
699 for f in "$libname$shrext".*; do echo "$f"; done \
700 | sed -e "s,^$libname$shrext\\\\.,," \
701 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
702 | sed 1q ) 2>/dev/null`
703 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
704 found_dir="$dir"
705 found_so="$dir/$libname$shrext.$ver"
706 fi
707 else
708 eval library_names=\"$acl_library_names_spec\"
709 for f in $library_names; do
710 if test -f "$dir/$f"; then
711 found_dir="$dir"
712 found_so="$dir/$f"
713 break
714 fi
715 done
716 fi
717 fi
718 fi
719 dnl Then look for a static library.
720 if test "X$found_dir" = "X"; then
721 if test -f "$dir/$libname.$acl_libext"; then
722 found_dir="$dir"
723 found_a="$dir/$libname.$acl_libext"
724 fi
725 fi
726 if test "X$found_dir" != "X"; then
727 if test -f "$dir/$libname.la"; then
728 found_la="$dir/$libname.la"
729 fi
730 fi
731 fi
732 if test "X$found_dir" = "X"; then
733 for x in $LDFLAGS $LTLIB[]NAME; do
734 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
735 case "$x" in
736 -L*)
737 dir=`echo "X$x" | sed -e 's/^X-L//'`
738 dnl First look for a shared library.
739 if test -n "$acl_shlibext"; then
740 if test -f "$dir/$libname$shrext"; then
741 found_dir="$dir"
742 found_so="$dir/$libname$shrext"
743 else
744 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
745 ver=`(cd "$dir" && \
746 for f in "$libname$shrext".*; do echo "$f"; done \
747 | sed -e "s,^$libname$shrext\\\\.,," \
748 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
749 | sed 1q ) 2>/dev/null`
750 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
751 found_dir="$dir"
752 found_so="$dir/$libname$shrext.$ver"
753 fi
754 else
755 eval library_names=\"$acl_library_names_spec\"
756 for f in $library_names; do
757 if test -f "$dir/$f"; then
758 found_dir="$dir"
759 found_so="$dir/$f"
760 break
761 fi
762 done
763 fi
764 fi
765 fi
766 dnl Then look for a static library.
767 if test "X$found_dir" = "X"; then
768 if test -f "$dir/$libname.$acl_libext"; then
769 found_dir="$dir"
770 found_a="$dir/$libname.$acl_libext"
771 fi
772 fi
773 if test "X$found_dir" != "X"; then
774 if test -f "$dir/$libname.la"; then
775 found_la="$dir/$libname.la"
776 fi
777 fi
778 ;;
779 esac
780 if test "X$found_dir" != "X"; then
781 break
782 fi
783 done
784 fi
785 if test "X$found_dir" != "X"; then
786 dnl Found the library.
787 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
788 if test "X$found_so" != "X"; then
789 dnl Linking with a shared library. We attempt to hardcode its
790 dnl directory into the executable's runpath, unless it's the
791 dnl standard /usr/lib.
792 if test "$enable_rpath" = no \
793 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
794 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
795 dnl No hardcoding is needed.
796 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
797 else
798 dnl Use an explicit option to hardcode DIR into the resulting
799 dnl binary.
800 dnl Potentially add DIR to ltrpathdirs.
801 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
802 haveit=
803 for x in $ltrpathdirs; do
804 if test "X$x" = "X$found_dir"; then
805 haveit=yes
806 break
807 fi
808 done
809 if test -z "$haveit"; then
810 ltrpathdirs="$ltrpathdirs $found_dir"
811 fi
812 dnl The hardcoding into $LIBNAME is system dependent.
813 if test "$acl_hardcode_direct" = yes; then
814 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
815 dnl resulting binary.
816 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
817 else
818 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
819 dnl Use an explicit option to hardcode DIR into the resulting
820 dnl binary.
821 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
822 dnl Potentially add DIR to rpathdirs.
823 dnl The rpathdirs will be appended to $LIBNAME at the end.
824 haveit=
825 for x in $rpathdirs; do
826 if test "X$x" = "X$found_dir"; then
827 haveit=yes
828 break
829 fi
830 done
831 if test -z "$haveit"; then
832 rpathdirs="$rpathdirs $found_dir"
833 fi
834 else
835 dnl Rely on "-L$found_dir".
836 dnl But don't add it if it's already contained in the LDFLAGS
837 dnl or the already constructed $LIBNAME
838 haveit=
839 for x in $LDFLAGS $LIB[]NAME; do
840 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
841 if test "X$x" = "X-L$found_dir"; then
842 haveit=yes
843 break
844 fi
845 done
846 if test -z "$haveit"; then
847 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
848 fi
849 if test "$acl_hardcode_minus_L" != no; then
850 dnl FIXME: Not sure whether we should use
851 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
852 dnl here.
853 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
854 else
855 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
856 dnl here, because this doesn't fit in flags passed to the
857 dnl compiler. So give up. No hardcoding. This affects only
858 dnl very old systems.
859 dnl FIXME: Not sure whether we should use
860 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
861 dnl here.
862 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
863 fi
864 fi
865 fi
866 fi
867 else
868 if test "X$found_a" != "X"; then
869 dnl Linking with a static library.
870 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
871 else
872 dnl We shouldn't come here, but anyway it's good to have a
873 dnl fallback.
874 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
875 fi
876 fi
877 dnl Assume the include files are nearby.
878 additional_includedir=
879 case "$found_dir" in
880 */$acl_libdirstem | */$acl_libdirstem/)
881 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
882 if test "$name" = '$1'; then
883 LIB[]NAME[]_PREFIX="$basedir"
884 fi
885 additional_includedir="$basedir/include"
886 ;;
887 */$acl_libdirstem2 | */$acl_libdirstem2/)
888 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
889 if test "$name" = '$1'; then
890 LIB[]NAME[]_PREFIX="$basedir"
891 fi
892 additional_includedir="$basedir/include"
893 ;;
894 esac
895 if test "X$additional_includedir" != "X"; then
896 dnl Potentially add $additional_includedir to $INCNAME.
897 dnl But don't add it
898 dnl 1. if it's the standard /usr/include,
899 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
900 dnl 3. if it's already present in $CPPFLAGS or the already
901 dnl constructed $INCNAME,
902 dnl 4. if it doesn't exist as a directory.
903 if test "X$additional_includedir" != "X/usr/include"; then
904 haveit=
905 if test "X$additional_includedir" = "X/usr/local/include"; then
906 if test -n "$GCC"; then
907 case $host_os in
908 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
909 esac
910 fi
911 fi
912 if test -z "$haveit"; then
913 for x in $CPPFLAGS $INC[]NAME; do
914 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
915 if test "X$x" = "X-I$additional_includedir"; then
916 haveit=yes
917 break
918 fi
919 done
920 if test -z "$haveit"; then
921 if test -d "$additional_includedir"; then
922 dnl Really add $additional_includedir to $INCNAME.
923 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
924 fi
925 fi
926 fi
927 fi
928 fi
929 dnl Look for dependencies.
930 if test -n "$found_la"; then
931 dnl Read the .la file. It defines the variables
932 dnl dlname, library_names, old_library, dependency_libs, current,
933 dnl age, revision, installed, dlopen, dlpreopen, libdir.
934 save_libdir="$libdir"
935 case "$found_la" in
936 */* | *\\*) . "$found_la" ;;
937 *) . "./$found_la" ;;
938 esac
939 libdir="$save_libdir"
940 dnl We use only dependency_libs.
941 for dep in $dependency_libs; do
942 case "$dep" in
943 -L*)
944 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
945 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
946 dnl But don't add it
947 dnl 1. if it's the standard /usr/lib,
948 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
949 dnl 3. if it's already present in $LDFLAGS or the already
950 dnl constructed $LIBNAME,
951 dnl 4. if it doesn't exist as a directory.
952 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
953 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
954 haveit=
955 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
956 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
957 if test -n "$GCC"; then
958 case $host_os in
959 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
960 esac
961 fi
962 fi
963 if test -z "$haveit"; then
964 haveit=
965 for x in $LDFLAGS $LIB[]NAME; do
966 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
967 if test "X$x" = "X-L$additional_libdir"; then
968 haveit=yes
969 break
970 fi
971 done
972 if test -z "$haveit"; then
973 if test -d "$additional_libdir"; then
974 dnl Really add $additional_libdir to $LIBNAME.
975 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
976 fi
977 fi
978 haveit=
979 for x in $LDFLAGS $LTLIB[]NAME; do
980 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
981 if test "X$x" = "X-L$additional_libdir"; then
982 haveit=yes
983 break
984 fi
985 done
986 if test -z "$haveit"; then
987 if test -d "$additional_libdir"; then
988 dnl Really add $additional_libdir to $LTLIBNAME.
989 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
990 fi
991 fi
992 fi
993 fi
994 ;;
995 -R*)
996 dir=`echo "X$dep" | sed -e 's/^X-R//'`
997 if test "$enable_rpath" != no; then
998 dnl Potentially add DIR to rpathdirs.
999 dnl The rpathdirs will be appended to $LIBNAME at the end.
1000 haveit=
1001 for x in $rpathdirs; do
1002 if test "X$x" = "X$dir"; then
1003 haveit=yes
1004 break
1005 fi
1006 done
1007 if test -z "$haveit"; then
1008 rpathdirs="$rpathdirs $dir"
1009 fi
1010 dnl Potentially add DIR to ltrpathdirs.
1011 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1012 haveit=
1013 for x in $ltrpathdirs; do
1014 if test "X$x" = "X$dir"; then
1015 haveit=yes
1016 break
1017 fi
1018 done
1019 if test -z "$haveit"; then
1020 ltrpathdirs="$ltrpathdirs $dir"
1021 fi
1022 fi
1023 ;;
1024 -l*)
1025 dnl Handle this in the next round.
1026 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1027 ;;
1028 *.la)
1029 dnl Handle this in the next round. Throw away the .la's
1030 dnl directory; it is already contained in a preceding -L
1031 dnl option.
1032 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1033 ;;
1034 *)
1035 dnl Most likely an immediate library name.
1036 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1037 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1038 ;;
1039 esac
1040 done
1041 fi
1042 else
1043 dnl Didn't find the library; assume it is in the system directories
1044 dnl known to the linker and runtime loader. (All the system
1045 dnl directories known to the linker should also be known to the
1046 dnl runtime loader, otherwise the system is severely misconfigured.)
1047 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1048 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1049 fi
1050 fi
1051 fi
1052 done
1053 done
1054 if test "X$rpathdirs" != "X"; then
1055 if test -n "$acl_hardcode_libdir_separator"; then
1056 dnl Weird platform: only the last -rpath option counts, the user must
1057 dnl pass all path elements in one option. We can arrange that for a
1058 dnl single library, but not when more than one $LIBNAMEs are used.
1059 alldirs=
1060 for found_dir in $rpathdirs; do
1061 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1062 done
1063 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1064 acl_save_libdir="$libdir"
1065 libdir="$alldirs"
1066 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1067 libdir="$acl_save_libdir"
1068 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1069 else
1070 dnl The -rpath options are cumulative.
1071 for found_dir in $rpathdirs; do
1072 acl_save_libdir="$libdir"
1073 libdir="$found_dir"
1074 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1075 libdir="$acl_save_libdir"
1076 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1077 done
1078 fi
1079 fi
1080 if test "X$ltrpathdirs" != "X"; then
1081 dnl When using libtool, the option that works for both libraries and
1082 dnl executables is -R. The -R options are cumulative.
1083 for found_dir in $ltrpathdirs; do
1084 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1085 done
1086 fi
1087 popdef([P_A_C_K])
1088 popdef([PACKLIBS])
1089 popdef([PACKUP])
1090 popdef([PACK])
1091 popdef([NAME])
1092 ])
1093
1094 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1095 dnl unless already present in VAR.
1096 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1097 dnl contains two or three consecutive elements that belong together.
1098 AC_DEFUN([AC_LIB_APPENDTOVAR],
1099 [
1100 for element in [$2]; do
1101 haveit=
1102 for x in $[$1]; do
1103 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1104 if test "X$x" = "X$element"; then
1105 haveit=yes
1106 break
1107 fi
1108 done
1109 if test -z "$haveit"; then
1110 [$1]="${[$1]}${[$1]:+ }$element"
1111 fi
1112 done
1113 ])
1114
1115 dnl For those cases where a variable contains several -L and -l options
1116 dnl referring to unknown libraries and directories, this macro determines the
1117 dnl necessary additional linker options for the runtime path.
1118 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1119 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1120 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1121 dnl otherwise linking without libtool is assumed.
1122 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1123 [
1124 AC_REQUIRE([AC_LIB_RPATH])
1125 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1126 $1=
1127 if test "$enable_rpath" != no; then
1128 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1129 dnl Use an explicit option to hardcode directories into the resulting
1130 dnl binary.
1131 rpathdirs=
1132 next=
1133 for opt in $2; do
1134 if test -n "$next"; then
1135 dir="$next"
1136 dnl No need to hardcode the standard /usr/lib.
1137 if test "X$dir" != "X/usr/$acl_libdirstem" \
1138 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1139 rpathdirs="$rpathdirs $dir"
1140 fi
1141 next=
1142 else
1143 case $opt in
1144 -L) next=yes ;;
1145 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1146 dnl No need to hardcode the standard /usr/lib.
1147 if test "X$dir" != "X/usr/$acl_libdirstem" \
1148 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1149 rpathdirs="$rpathdirs $dir"
1150 fi
1151 next= ;;
1152 *) next= ;;
1153 esac
1154 fi
1155 done
1156 if test "X$rpathdirs" != "X"; then
1157 if test -n ""$3""; then
1158 dnl libtool is used for linking. Use -R options.
1159 for dir in $rpathdirs; do
1160 $1="${$1}${$1:+ }-R$dir"
1161 done
1162 else
1163 dnl The linker is used for linking directly.
1164 if test -n "$acl_hardcode_libdir_separator"; then
1165 dnl Weird platform: only the last -rpath option counts, the user
1166 dnl must pass all path elements in one option.
1167 alldirs=
1168 for dir in $rpathdirs; do
1169 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1170 done
1171 acl_save_libdir="$libdir"
1172 libdir="$alldirs"
1173 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1174 libdir="$acl_save_libdir"
1175 $1="$flag"
1176 else
1177 dnl The -rpath options are cumulative.
1178 for dir in $rpathdirs; do
1179 acl_save_libdir="$libdir"
1180 libdir="$dir"
1181 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1182 libdir="$acl_save_libdir"
1183 $1="${$1}${$1:+ }$flag"
1184 done
1185 fi
1186 fi
1187 fi
1188 fi
1189 fi
1190 AC_SUBST([$1])
1191 ])
1192
1193 # lib-prefix.m4 serial 7 (gettext-0.18)
1194 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
1195 dnl This file is free software; the Free Software Foundation
1196 dnl gives unlimited permission to copy and/or distribute it,
1197 dnl with or without modifications, as long as this notice is preserved.
1198
1199 dnl From Bruno Haible.
1200
1201 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1202 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1203 dnl require excessive bracketing.
1204 ifdef([AC_HELP_STRING],
1205 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1206 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1207
1208 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1209 dnl to access previously installed libraries. The basic assumption is that
1210 dnl a user will want packages to use other packages he previously installed
1211 dnl with the same --prefix option.
1212 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1213 dnl libraries, but is otherwise very convenient.
1214 AC_DEFUN([AC_LIB_PREFIX],
1215 [
1216 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1217 AC_REQUIRE([AC_PROG_CC])
1218 AC_REQUIRE([AC_CANONICAL_HOST])
1219 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1220 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1221 dnl By default, look in $includedir and $libdir.
1222 use_additional=yes
1223 AC_LIB_WITH_FINAL_PREFIX([
1224 eval additional_includedir=\"$includedir\"
1225 eval additional_libdir=\"$libdir\"
1226 ])
1227 AC_LIB_ARG_WITH([lib-prefix],
1228 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1229 --without-lib-prefix don't search for libraries in includedir and libdir],
1230 [
1231 if test "X$withval" = "Xno"; then
1232 use_additional=no
1233 else
1234 if test "X$withval" = "X"; then
1235 AC_LIB_WITH_FINAL_PREFIX([
1236 eval additional_includedir=\"$includedir\"
1237 eval additional_libdir=\"$libdir\"
1238 ])
1239 else
1240 additional_includedir="$withval/include"
1241 additional_libdir="$withval/$acl_libdirstem"
1242 fi
1243 fi
1244 ])
1245 if test $use_additional = yes; then
1246 dnl Potentially add $additional_includedir to $CPPFLAGS.
1247 dnl But don't add it
1248 dnl 1. if it's the standard /usr/include,
1249 dnl 2. if it's already present in $CPPFLAGS,
1250 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1251 dnl 4. if it doesn't exist as a directory.
1252 if test "X$additional_includedir" != "X/usr/include"; then
1253 haveit=
1254 for x in $CPPFLAGS; do
1255 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1256 if test "X$x" = "X-I$additional_includedir"; then
1257 haveit=yes
1258 break
1259 fi
1260 done
1261 if test -z "$haveit"; then
1262 if test "X$additional_includedir" = "X/usr/local/include"; then
1263 if test -n "$GCC"; then
1264 case $host_os in
1265 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1266 esac
1267 fi
1268 fi
1269 if test -z "$haveit"; then
1270 if test -d "$additional_includedir"; then
1271 dnl Really add $additional_includedir to $CPPFLAGS.
1272 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1273 fi
1274 fi
1275 fi
1276 fi
1277 dnl Potentially add $additional_libdir to $LDFLAGS.
1278 dnl But don't add it
1279 dnl 1. if it's the standard /usr/lib,
1280 dnl 2. if it's already present in $LDFLAGS,
1281 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1282 dnl 4. if it doesn't exist as a directory.
1283 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1284 haveit=
1285 for x in $LDFLAGS; do
1286 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1287 if test "X$x" = "X-L$additional_libdir"; then
1288 haveit=yes
1289 break
1290 fi
1291 done
1292 if test -z "$haveit"; then
1293 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1294 if test -n "$GCC"; then
1295 case $host_os in
1296 linux*) haveit=yes;;
1297 esac
1298 fi
1299 fi
1300 if test -z "$haveit"; then
1301 if test -d "$additional_libdir"; then
1302 dnl Really add $additional_libdir to $LDFLAGS.
1303 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1304 fi
1305 fi
1306 fi
1307 fi
1308 fi
1309 ])
1310
1311 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1312 dnl acl_final_exec_prefix, containing the values to which $prefix and
1313 dnl $exec_prefix will expand at the end of the configure script.
1314 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1315 [
1316 dnl Unfortunately, prefix and exec_prefix get only finally determined
1317 dnl at the end of configure.
1318 if test "X$prefix" = "XNONE"; then
1319 acl_final_prefix="$ac_default_prefix"
1320 else
1321 acl_final_prefix="$prefix"
1322 fi
1323 if test "X$exec_prefix" = "XNONE"; then
1324 acl_final_exec_prefix='${prefix}'
1325 else
1326 acl_final_exec_prefix="$exec_prefix"
1327 fi
1328 acl_save_prefix="$prefix"
1329 prefix="$acl_final_prefix"
1330 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1331 prefix="$acl_save_prefix"
1332 ])
1333
1334 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1335 dnl variables prefix and exec_prefix bound to the values they will have
1336 dnl at the end of the configure script.
1337 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1338 [
1339 acl_save_prefix="$prefix"
1340 prefix="$acl_final_prefix"
1341 acl_save_exec_prefix="$exec_prefix"
1342 exec_prefix="$acl_final_exec_prefix"
1343 $1
1344 exec_prefix="$acl_save_exec_prefix"
1345 prefix="$acl_save_prefix"
1346 ])
1347
1348 dnl AC_LIB_PREPARE_MULTILIB creates
1349 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1350 dnl "lib" or "lib64" or "lib/64",
1351 dnl - a variable acl_libdirstem2, as a secondary possible value for
1352 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1353 dnl "lib/amd64".
1354 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1355 [
1356 dnl There is no formal standard regarding lib and lib64.
1357 dnl On glibc systems, the current practice is that on a system supporting
1358 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1359 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1360 dnl the compiler's default mode by looking at the compiler's library search
1361 dnl path. If at least one of its elements ends in /lib64 or points to a
1362 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1363 dnl Otherwise we use the default, namely "lib".
1364 dnl On Solaris systems, the current practice is that on a system supporting
1365 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1366 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1367 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1368 AC_REQUIRE([AC_CANONICAL_HOST])
1369 acl_libdirstem=lib
1370 acl_libdirstem2=
1371 case "$host_os" in
1372 solaris*)
1373 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1374 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1375 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1376 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1377 dnl symlink is missing, so we set acl_libdirstem2 too.
1378 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1379 [AC_EGREP_CPP([sixtyfour bits], [
1380 #ifdef _LP64
1381 sixtyfour bits
1382 #endif
1383 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1384 ])
1385 if test $gl_cv_solaris_64bit = yes; then
1386 acl_libdirstem=lib/64
1387 case "$host_cpu" in
1388 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1389 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1390 esac
1391 fi
1392 ;;
1393 *)
1394 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1395 if test -n "$searchpath"; then
1396 acl_save_IFS="${IFS= }"; IFS=":"
1397 for searchdir in $searchpath; do
1398 if test -d "$searchdir"; then
1399 case "$searchdir" in
1400 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1401 */../ | */.. )
1402 # Better ignore directories of this form. They are misleading.
1403 ;;
1404 *) searchdir=`cd "$searchdir" && pwd`
1405 case "$searchdir" in
1406 */lib64 ) acl_libdirstem=lib64 ;;
1407 esac ;;
1408 esac
1409 fi
1410 done
1411 IFS="$acl_save_IFS"
1412 fi
1413 ;;
1414 esac
1415 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1416 ])
1417
1418 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1419 dnl serial 11 (pkg-config-0.29.1)
1420 dnl
1421 dnl Copyright © 2004 Scott James Remnant <[email protected]>.
1422 dnl Copyright © 2012-2015 Dan Nicholson <[email protected]>
1423 dnl
1424 dnl This program is free software; you can redistribute it and/or modify
1425 dnl it under the terms of the GNU General Public License as published by
1426 dnl the Free Software Foundation; either version 2 of the License, or
1427 dnl (at your option) any later version.
1428 dnl
1429 dnl This program is distributed in the hope that it will be useful, but
1430 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
1431 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1432 dnl General Public License for more details.
1433 dnl
1434 dnl You should have received a copy of the GNU General Public License
1435 dnl along with this program; if not, write to the Free Software
1436 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1437 dnl 02111-1307, USA.
1438 dnl
1439 dnl As a special exception to the GNU General Public License, if you
1440 dnl distribute this file as part of a program that contains a
1441 dnl configuration script generated by Autoconf, you may include it under
1442 dnl the same distribution terms that you use for the rest of that
1443 dnl program.
1444
1445 dnl PKG_PREREQ(MIN-VERSION)
1446 dnl -----------------------
1447 dnl Since: 0.29
1448 dnl
1449 dnl Verify that the version of the pkg-config macros are at least
1450 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
1451 dnl installed version of pkg-config, this checks the developer's version
1452 dnl of pkg.m4 when generating configure.
1453 dnl
1454 dnl To ensure that this macro is defined, also add:
1455 dnl m4_ifndef([PKG_PREREQ],
1456 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
1457 dnl
1458 dnl See the "Since" comment for each macro you use to see what version
1459 dnl of the macros you require.
1460 m4_defun([PKG_PREREQ],
1461 [m4_define([PKG_MACROS_VERSION], [0.29.1])
1462 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
1463 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
1464 ])dnl PKG_PREREQ
1465
1466 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
1467 dnl ----------------------------------
1468 dnl Since: 0.16
1469 dnl
1470 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
1471 dnl first found in the path. Checks that the version of pkg-config found
1472 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
1473 dnl used since that's the first version where most current features of
1474 dnl pkg-config existed.
1475 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1476 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1477 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1478 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1479 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1480 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1481 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1482
1483 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1484 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1485 fi
1486 if test -n "$PKG_CONFIG"; then
1487 _pkg_min_version=m4_default([$1], [0.9.0])
1488 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1489 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1490 AC_MSG_RESULT([yes])
1491 else
1492 AC_MSG_RESULT([no])
1493 PKG_CONFIG=""
1494 fi
1495 fi[]dnl
1496 ])dnl PKG_PROG_PKG_CONFIG
1497
1498 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1499 dnl -------------------------------------------------------------------
1500 dnl Since: 0.18
1501 dnl
1502 dnl Check to see whether a particular set of modules exists. Similar to
1503 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
1504 dnl
1505 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1506 dnl only at the first occurence in configure.ac, so if the first place
1507 dnl it's called might be skipped (such as if it is within an "if", you
1508 dnl have to call PKG_CHECK_EXISTS manually
1509 AC_DEFUN([PKG_CHECK_EXISTS],
1510 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1511 if test -n "$PKG_CONFIG" && \
1512 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1513 m4_default([$2], [:])
1514 m4_ifvaln([$3], [else
1515 $3])dnl
1516 fi])
1517
1518 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1519 dnl ---------------------------------------------
1520 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
1521 dnl pkg_failed based on the result.
1522 m4_define([_PKG_CONFIG],
1523 [if test -n "$$1"; then
1524 pkg_cv_[]$1="$$1"
1525 elif test -n "$PKG_CONFIG"; then
1526 PKG_CHECK_EXISTS([$3],
1527 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1528 test "x$?" != "x0" && pkg_failed=yes ],
1529 [pkg_failed=yes])
1530 else
1531 pkg_failed=untried
1532 fi[]dnl
1533 ])dnl _PKG_CONFIG
1534
1535 dnl _PKG_SHORT_ERRORS_SUPPORTED
1536 dnl ---------------------------
1537 dnl Internal check to see if pkg-config supports short errors.
1538 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1539 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1540 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1541 _pkg_short_errors_supported=yes
1542 else
1543 _pkg_short_errors_supported=no
1544 fi[]dnl
1545 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
1546
1547
1548 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1549 dnl [ACTION-IF-NOT-FOUND])
1550 dnl --------------------------------------------------------------
1551 dnl Since: 0.4.0
1552 dnl
1553 dnl Note that if there is a possibility the first call to
1554 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
1555 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1556 AC_DEFUN([PKG_CHECK_MODULES],
1557 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1558 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1559 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1560
1561 pkg_failed=no
1562 AC_MSG_CHECKING([for $1])
1563
1564 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1565 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1566
1567 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1568 and $1[]_LIBS to avoid the need to call pkg-config.
1569 See the pkg-config man page for more details.])
1570
1571 if test $pkg_failed = yes; then
1572 AC_MSG_RESULT([no])
1573 _PKG_SHORT_ERRORS_SUPPORTED
1574 if test $_pkg_short_errors_supported = yes; then
1575 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1576 else
1577 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1578 fi
1579 # Put the nasty error message in config.log where it belongs
1580 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1581
1582 m4_default([$4], [AC_MSG_ERROR(
1583 [Package requirements ($2) were not met:
1584
1585 $$1_PKG_ERRORS
1586
1587 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1588 installed software in a non-standard prefix.
1589
1590 _PKG_TEXT])[]dnl
1591 ])
1592 elif test $pkg_failed = untried; then
1593 AC_MSG_RESULT([no])
1594 m4_default([$4], [AC_MSG_FAILURE(
1595 [The pkg-config script could not be found or is too old. Make sure it
1596 is in your PATH or set the PKG_CONFIG environment variable to the full
1597 path to pkg-config.
1598
1599 _PKG_TEXT
1600
1601 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1602 ])
1603 else
1604 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1605 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1606 AC_MSG_RESULT([yes])
1607 $3
1608 fi[]dnl
1609 ])dnl PKG_CHECK_MODULES
1610
1611
1612 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1613 dnl [ACTION-IF-NOT-FOUND])
1614 dnl ---------------------------------------------------------------------
1615 dnl Since: 0.29
1616 dnl
1617 dnl Checks for existence of MODULES and gathers its build flags with
1618 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
1619 dnl and VARIABLE-PREFIX_LIBS from --libs.
1620 dnl
1621 dnl Note that if there is a possibility the first call to
1622 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
1623 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
1624 dnl configure.ac.
1625 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
1626 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1627 _save_PKG_CONFIG=$PKG_CONFIG
1628 PKG_CONFIG="$PKG_CONFIG --static"
1629 PKG_CHECK_MODULES($@)
1630 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
1631 ])dnl PKG_CHECK_MODULES_STATIC
1632
1633
1634 dnl PKG_INSTALLDIR([DIRECTORY])
1635 dnl -------------------------
1636 dnl Since: 0.27
1637 dnl
1638 dnl Substitutes the variable pkgconfigdir as the location where a module
1639 dnl should install pkg-config .pc files. By default the directory is
1640 dnl $libdir/pkgconfig, but the default can be changed by passing
1641 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
1642 dnl parameter.
1643 AC_DEFUN([PKG_INSTALLDIR],
1644 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1645 m4_pushdef([pkg_description],
1646 [pkg-config installation directory @<:@]pkg_default[@:>@])
1647 AC_ARG_WITH([pkgconfigdir],
1648 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1649 [with_pkgconfigdir=]pkg_default)
1650 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1651 m4_popdef([pkg_default])
1652 m4_popdef([pkg_description])
1653 ])dnl PKG_INSTALLDIR
1654
1655
1656 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
1657 dnl --------------------------------
1658 dnl Since: 0.27
1659 dnl
1660 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
1661 dnl module should install arch-independent pkg-config .pc files. By
1662 dnl default the directory is $datadir/pkgconfig, but the default can be
1663 dnl changed by passing DIRECTORY. The user can override through the
1664 dnl --with-noarch-pkgconfigdir parameter.
1665 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1666 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1667 m4_pushdef([pkg_description],
1668 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1669 AC_ARG_WITH([noarch-pkgconfigdir],
1670 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1671 [with_noarch_pkgconfigdir=]pkg_default)
1672 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1673 m4_popdef([pkg_default])
1674 m4_popdef([pkg_description])
1675 ])dnl PKG_NOARCH_INSTALLDIR
1676
1677
1678 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1679 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1680 dnl -------------------------------------------
1681 dnl Since: 0.28
1682 dnl
1683 dnl Retrieves the value of the pkg-config variable for the given module.
1684 AC_DEFUN([PKG_CHECK_VAR],
1685 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1686 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1687
1688 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
1689 AS_VAR_COPY([$1], [pkg_cv_][$1])
1690
1691 AS_VAR_IF([$1], [""], [$5], [$4])dnl
1692 ])dnl PKG_CHECK_VAR
1693
1694 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
1695 #
1696 # This file is free software; the Free Software Foundation
1697 # gives unlimited permission to copy and/or distribute it,
1698 # with or without modifications, as long as this notice is preserved.
1699
1700 # AM_AUTOMAKE_VERSION(VERSION)
1701 # ----------------------------
1702 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1703 # generated from the m4 files accompanying Automake X.Y.
1704 # (This private macro should not be called outside this file.)
1705 AC_DEFUN([AM_AUTOMAKE_VERSION],
1706 [am__api_version='1.16'
1707 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1708 dnl require some minimum version. Point them to the right macro.
1709 m4_if([$1], [1.16.1], [],
1710 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1711 ])
1712
1713 # _AM_AUTOCONF_VERSION(VERSION)
1714 # -----------------------------
1715 # aclocal traces this macro to find the Autoconf version.
1716 # This is a private macro too. Using m4_define simplifies
1717 # the logic in aclocal, which can simply ignore this definition.
1718 m4_define([_AM_AUTOCONF_VERSION], [])
1719
1720 # AM_SET_CURRENT_AUTOMAKE_VERSION
1721 # -------------------------------
1722 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1723 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1724 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1725 [AM_AUTOMAKE_VERSION([1.16.1])dnl
1726 m4_ifndef([AC_AUTOCONF_VERSION],
1727 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1728 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1729
1730 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1731
1732 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1733 #
1734 # This file is free software; the Free Software Foundation
1735 # gives unlimited permission to copy and/or distribute it,
1736 # with or without modifications, as long as this notice is preserved.
1737
1738 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1739 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1740 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1741 #
1742 # Of course, Automake must honor this variable whenever it calls a
1743 # tool from the auxiliary directory. The problem is that $srcdir (and
1744 # therefore $ac_aux_dir as well) can be either absolute or relative,
1745 # depending on how configure is run. This is pretty annoying, since
1746 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1747 # source directory, any form will work fine, but in subdirectories a
1748 # relative path needs to be adjusted first.
1749 #
1750 # $ac_aux_dir/missing
1751 # fails when called from a subdirectory if $ac_aux_dir is relative
1752 # $top_srcdir/$ac_aux_dir/missing
1753 # fails if $ac_aux_dir is absolute,
1754 # fails when called from a subdirectory in a VPATH build with
1755 # a relative $ac_aux_dir
1756 #
1757 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1758 # are both prefixed by $srcdir. In an in-source build this is usually
1759 # harmless because $srcdir is '.', but things will broke when you
1760 # start a VPATH build or use an absolute $srcdir.
1761 #
1762 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1763 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1764 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1765 # and then we would define $MISSING as
1766 # MISSING="\${SHELL} $am_aux_dir/missing"
1767 # This will work as long as MISSING is not called from configure, because
1768 # unfortunately $(top_srcdir) has no meaning in configure.
1769 # However there are other variables, like CC, which are often used in
1770 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1771 #
1772 # Another solution, used here, is to always expand $ac_aux_dir to an
1773 # absolute PATH. The drawback is that using absolute paths prevent a
1774 # configured tree to be moved without reconfiguration.
1775
1776 AC_DEFUN([AM_AUX_DIR_EXPAND],
1777 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1778 # Expand $ac_aux_dir to an absolute path.
1779 am_aux_dir=`cd "$ac_aux_dir" && pwd`
1780 ])
1781
1782 # AM_CONDITIONAL -*- Autoconf -*-
1783
1784 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
1785 #
1786 # This file is free software; the Free Software Foundation
1787 # gives unlimited permission to copy and/or distribute it,
1788 # with or without modifications, as long as this notice is preserved.
1789
1790 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1791 # -------------------------------------
1792 # Define a conditional.
1793 AC_DEFUN([AM_CONDITIONAL],
1794 [AC_PREREQ([2.52])dnl
1795 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1796 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1797 AC_SUBST([$1_TRUE])dnl
1798 AC_SUBST([$1_FALSE])dnl
1799 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1800 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1801 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1802 if $2; then
1803 $1_TRUE=
1804 $1_FALSE='#'
1805 else
1806 $1_TRUE='#'
1807 $1_FALSE=
1808 fi
1809 AC_CONFIG_COMMANDS_PRE(
1810 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1811 AC_MSG_ERROR([[conditional "$1" was never defined.
1812 Usually this means the macro was only invoked conditionally.]])
1813 fi])])
1814
1815 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
1816 #
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.
1820
1821
1822 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1823 # written in clear, in which case automake, when reading aclocal.m4,
1824 # will think it sees a *use*, and therefore will trigger all it's
1825 # C support machinery. Also note that it means that autoscan, seeing
1826 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1827
1828
1829 # _AM_DEPENDENCIES(NAME)
1830 # ----------------------
1831 # See how the compiler implements dependency checking.
1832 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1833 # We try a few techniques and use that to set a single cache variable.
1834 #
1835 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1836 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1837 # dependency, and given that the user is not expected to run this macro,
1838 # just rely on AC_PROG_CC.
1839 AC_DEFUN([_AM_DEPENDENCIES],
1840 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1841 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1842 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1843 AC_REQUIRE([AM_DEP_TRACK])dnl
1844
1845 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1846 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1847 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1848 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1849 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1850 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1851 [depcc="$$1" am_compiler_list=])
1852
1853 AC_CACHE_CHECK([dependency style of $depcc],
1854 [am_cv_$1_dependencies_compiler_type],
1855 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1856 # We make a subdir and do the tests there. Otherwise we can end up
1857 # making bogus files that we don't know about and never remove. For
1858 # instance it was reported that on HP-UX the gcc test will end up
1859 # making a dummy file named 'D' -- because '-MD' means "put the output
1860 # in D".
1861 rm -rf conftest.dir
1862 mkdir conftest.dir
1863 # Copy depcomp to subdir because otherwise we won't find it if we're
1864 # using a relative directory.
1865 cp "$am_depcomp" conftest.dir
1866 cd conftest.dir
1867 # We will build objects and dependencies in a subdirectory because
1868 # it helps to detect inapplicable dependency modes. For instance
1869 # both Tru64's cc and ICC support -MD to output dependencies as a
1870 # side effect of compilation, but ICC will put the dependencies in
1871 # the current directory while Tru64 will put them in the object
1872 # directory.
1873 mkdir sub
1874
1875 am_cv_$1_dependencies_compiler_type=none
1876 if test "$am_compiler_list" = ""; then
1877 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1878 fi
1879 am__universal=false
1880 m4_case([$1], [CC],
1881 [case " $depcc " in #(
1882 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1883 esac],
1884 [CXX],
1885 [case " $depcc " in #(
1886 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1887 esac])
1888
1889 for depmode in $am_compiler_list; do
1890 # Setup a source with many dependencies, because some compilers
1891 # like to wrap large dependency lists on column 80 (with \), and
1892 # we should not choose a depcomp mode which is confused by this.
1893 #
1894 # We need to recreate these files for each test, as the compiler may
1895 # overwrite some of them when testing with obscure command lines.
1896 # This happens at least with the AIX C compiler.
1897 : > sub/conftest.c
1898 for i in 1 2 3 4 5 6; do
1899 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1900 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1901 # Solaris 10 /bin/sh.
1902 echo '/* dummy */' > sub/conftst$i.h
1903 done
1904 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1905
1906 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1907 # mode. It turns out that the SunPro C++ compiler does not properly
1908 # handle '-M -o', and we need to detect this. Also, some Intel
1909 # versions had trouble with output in subdirs.
1910 am__obj=sub/conftest.${OBJEXT-o}
1911 am__minus_obj="-o $am__obj"
1912 case $depmode in
1913 gcc)
1914 # This depmode causes a compiler race in universal mode.
1915 test "$am__universal" = false || continue
1916 ;;
1917 nosideeffect)
1918 # After this tag, mechanisms are not by side-effect, so they'll
1919 # only be used when explicitly requested.
1920 if test "x$enable_dependency_tracking" = xyes; then
1921 continue
1922 else
1923 break
1924 fi
1925 ;;
1926 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1927 # This compiler won't grok '-c -o', but also, the minuso test has
1928 # not run yet. These depmodes are late enough in the game, and
1929 # so weak that their functioning should not be impacted.
1930 am__obj=conftest.${OBJEXT-o}
1931 am__minus_obj=
1932 ;;
1933 none) break ;;
1934 esac
1935 if depmode=$depmode \
1936 source=sub/conftest.c object=$am__obj \
1937 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1938 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1939 >/dev/null 2>conftest.err &&
1940 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1941 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1942 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1943 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1944 # icc doesn't choke on unknown options, it will just issue warnings
1945 # or remarks (even with -Werror). So we grep stderr for any message
1946 # that says an option was ignored or not supported.
1947 # When given -MP, icc 7.0 and 7.1 complain thusly:
1948 # icc: Command line warning: ignoring option '-M'; no argument required
1949 # The diagnosis changed in icc 8.0:
1950 # icc: Command line remark: option '-MP' not supported
1951 if (grep 'ignoring option' conftest.err ||
1952 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1953 am_cv_$1_dependencies_compiler_type=$depmode
1954 break
1955 fi
1956 fi
1957 done
1958
1959 cd ..
1960 rm -rf conftest.dir
1961 else
1962 am_cv_$1_dependencies_compiler_type=none
1963 fi
1964 ])
1965 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1966 AM_CONDITIONAL([am__fastdep$1], [
1967 test "x$enable_dependency_tracking" != xno \
1968 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1969 ])
1970
1971
1972 # AM_SET_DEPDIR
1973 # -------------
1974 # Choose a directory name for dependency files.
1975 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1976 AC_DEFUN([AM_SET_DEPDIR],
1977 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1978 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1979 ])
1980
1981
1982 # AM_DEP_TRACK
1983 # ------------
1984 AC_DEFUN([AM_DEP_TRACK],
1985 [AC_ARG_ENABLE([dependency-tracking], [dnl
1986 AS_HELP_STRING(
1987 [--enable-dependency-tracking],
1988 [do not reject slow dependency extractors])
1989 AS_HELP_STRING(
1990 [--disable-dependency-tracking],
1991 [speeds up one-time build])])
1992 if test "x$enable_dependency_tracking" != xno; then
1993 am_depcomp="$ac_aux_dir/depcomp"
1994 AMDEPBACKSLASH='\'
1995 am__nodep='_no'
1996 fi
1997 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1998 AC_SUBST([AMDEPBACKSLASH])dnl
1999 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
2000 AC_SUBST([am__nodep])dnl
2001 _AM_SUBST_NOTMAKE([am__nodep])dnl
2002 ])
2003
2004 # Generate code to set up dependency tracking. -*- Autoconf -*-
2005
2006 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
2007 #
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.
2011
2012 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2013 # ------------------------------
2014 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2015 [{
2016 # Older Autoconf quotes --file arguments for eval, but not when files
2017 # are listed without --file. Let's play safe and only enable the eval
2018 # if we detect the quoting.
2019 # TODO: see whether this extra hack can be removed once we start
2020 # requiring Autoconf 2.70 or later.
2021 AS_CASE([$CONFIG_FILES],
2022 [*\'*], [eval set x "$CONFIG_FILES"],
2023 [*], [set x $CONFIG_FILES])
2024 shift
2025 # Used to flag and report bootstrapping failures.
2026 am_rc=0
2027 for am_mf
2028 do
2029 # Strip MF so we end up with the name of the file.
2030 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
2031 # Check whether this is an Automake generated Makefile which includes
2032 # dependency-tracking related rules and includes.
2033 # Grep'ing the whole file directly is not great: AIX grep has a line
2034 # limit of 2048, but all sed's we know have understand at least 4000.
2035 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
2036 || continue
2037 am_dirpart=`AS_DIRNAME(["$am_mf"])`
2038 am_filepart=`AS_BASENAME(["$am_mf"])`
2039 AM_RUN_LOG([cd "$am_dirpart" \
2040 && sed -e '/# am--include-marker/d' "$am_filepart" \
2041 | $MAKE -f - am--depfiles]) || am_rc=$?
2042 done
2043 if test $am_rc -ne 0; then
2044 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
2045 for automatic dependency tracking. Try re-running configure with the
2046 '--disable-dependency-tracking' option to at least be able to build
2047 the package (albeit without support for automatic dependency tracking).])
2048 fi
2049 AS_UNSET([am_dirpart])
2050 AS_UNSET([am_filepart])
2051 AS_UNSET([am_mf])
2052 AS_UNSET([am_rc])
2053 rm -f conftest-deps.mk
2054 }
2055 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2056
2057
2058 # AM_OUTPUT_DEPENDENCY_COMMANDS
2059 # -----------------------------
2060 # This macro should only be invoked once -- use via AC_REQUIRE.
2061 #
2062 # This code is only required when automatic dependency tracking is enabled.
2063 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
2064 # order to bootstrap the dependency handling code.
2065 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2066 [AC_CONFIG_COMMANDS([depfiles],
2067 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2068 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
2069
2070 # Do all the work for Automake. -*- Autoconf -*-
2071
2072 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2073 #
2074 # This file is free software; the Free Software Foundation
2075 # gives unlimited permission to copy and/or distribute it,
2076 # with or without modifications, as long as this notice is preserved.
2077
2078 # This macro actually does too much. Some checks are only needed if
2079 # your package does certain things. But this isn't really a big deal.
2080
2081 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
2082 m4_define([AC_PROG_CC],
2083 m4_defn([AC_PROG_CC])
2084 [_AM_PROG_CC_C_O
2085 ])
2086
2087 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2088 # AM_INIT_AUTOMAKE([OPTIONS])
2089 # -----------------------------------------------
2090 # The call with PACKAGE and VERSION arguments is the old style
2091 # call (pre autoconf-2.50), which is being phased out. PACKAGE
2092 # and VERSION should now be passed to AC_INIT and removed from
2093 # the call to AM_INIT_AUTOMAKE.
2094 # We support both call styles for the transition. After
2095 # the next Automake release, Autoconf can make the AC_INIT
2096 # arguments mandatory, and then we can depend on a new Autoconf
2097 # release and drop the old call support.
2098 AC_DEFUN([AM_INIT_AUTOMAKE],
2099 [AC_PREREQ([2.65])dnl
2100 dnl Autoconf wants to disallow AM_ names. We explicitly allow
2101 dnl the ones we care about.
2102 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2103 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2104 AC_REQUIRE([AC_PROG_INSTALL])dnl
2105 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2106 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2107 # is not polluted with repeated "-I."
2108 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
2109 # test to see if srcdir already configured
2110 if test -f $srcdir/config.status; then
2111 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2112 fi
2113 fi
2114
2115 # test whether we have cygpath
2116 if test -z "$CYGPATH_W"; then
2117 if (cygpath --version) >/dev/null 2>/dev/null; then
2118 CYGPATH_W='cygpath -w'
2119 else
2120 CYGPATH_W=echo
2121 fi
2122 fi
2123 AC_SUBST([CYGPATH_W])
2124
2125 # Define the identity of the package.
2126 dnl Distinguish between old-style and new-style calls.
2127 m4_ifval([$2],
2128 [AC_DIAGNOSE([obsolete],
2129 [$0: two- and three-arguments forms are deprecated.])
2130 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2131 AC_SUBST([PACKAGE], [$1])dnl
2132 AC_SUBST([VERSION], [$2])],
2133 [_AM_SET_OPTIONS([$1])dnl
2134 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
2135 m4_if(
2136 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
2137 [ok:ok],,
2138 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
2139 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2140 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2141
2142 _AM_IF_OPTION([no-define],,
2143 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
2144 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
2145
2146 # Some tools Automake needs.
2147 AC_REQUIRE([AM_SANITY_CHECK])dnl
2148 AC_REQUIRE([AC_ARG_PROGRAM])dnl
2149 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
2150 AM_MISSING_PROG([AUTOCONF], [autoconf])
2151 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
2152 AM_MISSING_PROG([AUTOHEADER], [autoheader])
2153 AM_MISSING_PROG([MAKEINFO], [makeinfo])
2154 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2155 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
2156 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2157 # For better backward compatibility. To be removed once Automake 1.9.x
2158 # dies out for good. For more background, see:
2159 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2160 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2161 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
2162 # We need awk for the "check" target (and possibly the TAP driver). The
2163 # system "awk" is bad on some platforms.
2164 AC_REQUIRE([AC_PROG_AWK])dnl
2165 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2166 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2167 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2168 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
2169 [_AM_PROG_TAR([v7])])])
2170 _AM_IF_OPTION([no-dependencies],,
2171 [AC_PROVIDE_IFELSE([AC_PROG_CC],
2172 [_AM_DEPENDENCIES([CC])],
2173 [m4_define([AC_PROG_CC],
2174 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
2175 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2176 [_AM_DEPENDENCIES([CXX])],
2177 [m4_define([AC_PROG_CXX],
2178 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
2179 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
2180 [_AM_DEPENDENCIES([OBJC])],
2181 [m4_define([AC_PROG_OBJC],
2182 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
2183 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
2184 [_AM_DEPENDENCIES([OBJCXX])],
2185 [m4_define([AC_PROG_OBJCXX],
2186 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
2187 ])
2188 AC_REQUIRE([AM_SILENT_RULES])dnl
2189 dnl The testsuite driver may need to know about EXEEXT, so add the
2190 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
2191 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
2192 AC_CONFIG_COMMANDS_PRE(dnl
2193 [m4_provide_if([_AM_COMPILER_EXEEXT],
2194 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
2195
2196 # POSIX will say in a future version that running "rm -f" with no argument
2197 # is OK; and we want to be able to make that assumption in our Makefile
2198 # recipes. So use an aggressive probe to check that the usage we want is
2199 # actually supported "in the wild" to an acceptable degree.
2200 # See automake bug#10828.
2201 # To make any issue more visible, cause the running configure to be aborted
2202 # by default if the 'rm' program in use doesn't match our expectations; the
2203 # user can still override this though.
2204 if rm -f && rm -fr && rm -rf; then : OK; else
2205 cat >&2 <<'END'
2206 Oops!
2207
2208 Your 'rm' program seems unable to run without file operands specified
2209 on the command line, even when the '-f' option is present. This is contrary
2210 to the behaviour of most rm programs out there, and not conforming with
2211 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
2212
2213 Please tell [email protected] about your system, including the value
2214 of your $PATH and any error possibly output before this message. This
2215 can help us improve future automake versions.
2216
2217 END
2218 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
2219 echo 'Configuration will proceed anyway, since you have set the' >&2
2220 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
2221 echo >&2
2222 else
2223 cat >&2 <<'END'
2224 Aborting the configuration process, to ensure you take notice of the issue.
2225
2226 You can download and install GNU coreutils to get an 'rm' implementation
2227 that behaves properly: <https://www.gnu.org/software/coreutils/>.
2228
2229 If you want to complete the configuration process using your problematic
2230 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
2231 to "yes", and re-run configure.
2232
2233 END
2234 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
2235 fi
2236 fi
2237 dnl The trailing newline in this macro's definition is deliberate, for
2238 dnl backward compatibility and to allow trailing 'dnl'-style comments
2239 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
2240 ])
2241
2242 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2243 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
2244 dnl mangled by Autoconf and run in a shell conditional statement.
2245 m4_define([_AC_COMPILER_EXEEXT],
2246 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
2247
2248 # When config.status generates a header, we must update the stamp-h file.
2249 # This file resides in the same directory as the config header
2250 # that is generated. The stamp files are numbered to have different names.
2251
2252 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2253 # loop where config.status creates the headers, so we can generate
2254 # our stamp files there.
2255 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2256 [# Compute $1's index in $config_headers.
2257 _am_arg=$1
2258 _am_stamp_count=1
2259 for _am_header in $config_headers :; do
2260 case $_am_header in
2261 $_am_arg | $_am_arg:* )
2262 break ;;
2263 * )
2264 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2265 esac
2266 done
2267 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2268
2269 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2270 #
2271 # This file is free software; the Free Software Foundation
2272 # gives unlimited permission to copy and/or distribute it,
2273 # with or without modifications, as long as this notice is preserved.
2274
2275 # AM_PROG_INSTALL_SH
2276 # ------------------
2277 # Define $install_sh.
2278 AC_DEFUN([AM_PROG_INSTALL_SH],
2279 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2280 if test x"${install_sh+set}" != xset; then
2281 case $am_aux_dir in
2282 *\ * | *\ *)
2283 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2284 *)
2285 install_sh="\${SHELL} $am_aux_dir/install-sh"
2286 esac
2287 fi
2288 AC_SUBST([install_sh])])
2289
2290 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
2291 #
2292 # This file is free software; the Free Software Foundation
2293 # gives unlimited permission to copy and/or distribute it,
2294 # with or without modifications, as long as this notice is preserved.
2295
2296 # Check whether the underlying file-system supports filenames
2297 # with a leading dot. For instance MS-DOS doesn't.
2298 AC_DEFUN([AM_SET_LEADING_DOT],
2299 [rm -rf .tst 2>/dev/null
2300 mkdir .tst 2>/dev/null
2301 if test -d .tst; then
2302 am__leading_dot=.
2303 else
2304 am__leading_dot=_
2305 fi
2306 rmdir .tst 2>/dev/null
2307 AC_SUBST([am__leading_dot])])
2308
2309 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
2310 # From Jim Meyering
2311
2312 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2313 #
2314 # This file is free software; the Free Software Foundation
2315 # gives unlimited permission to copy and/or distribute it,
2316 # with or without modifications, as long as this notice is preserved.
2317
2318 # AM_MAINTAINER_MODE([DEFAULT-MODE])
2319 # ----------------------------------
2320 # Control maintainer-specific portions of Makefiles.
2321 # Default is to disable them, unless 'enable' is passed literally.
2322 # For symmetry, 'disable' may be passed as well. Anyway, the user
2323 # can override the default with the --enable/--disable switch.
2324 AC_DEFUN([AM_MAINTAINER_MODE],
2325 [m4_case(m4_default([$1], [disable]),
2326 [enable], [m4_define([am_maintainer_other], [disable])],
2327 [disable], [m4_define([am_maintainer_other], [enable])],
2328 [m4_define([am_maintainer_other], [enable])
2329 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2330 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2331 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2332 AC_ARG_ENABLE([maintainer-mode],
2333 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
2334 am_maintainer_other[ make rules and dependencies not useful
2335 (and sometimes confusing) to the casual installer])],
2336 [USE_MAINTAINER_MODE=$enableval],
2337 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
2338 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2339 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
2340 MAINT=$MAINTAINER_MODE_TRUE
2341 AC_SUBST([MAINT])dnl
2342 ]
2343 )
2344
2345 # Check to see how 'make' treats includes. -*- Autoconf -*-
2346
2347 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2348 #
2349 # This file is free software; the Free Software Foundation
2350 # gives unlimited permission to copy and/or distribute it,
2351 # with or without modifications, as long as this notice is preserved.
2352
2353 # AM_MAKE_INCLUDE()
2354 # -----------------
2355 # Check whether make has an 'include' directive that can support all
2356 # the idioms we need for our automatic dependency tracking code.
2357 AC_DEFUN([AM_MAKE_INCLUDE],
2358 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
2359 cat > confinc.mk << 'END'
2360 am__doit:
2361 @echo this is the am__doit target >confinc.out
2362 .PHONY: am__doit
2363 END
2364 am__include="#"
2365 am__quote=
2366 # BSD make does it like this.
2367 echo '.include "confinc.mk" # ignored' > confmf.BSD
2368 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
2369 echo 'include confinc.mk # ignored' > confmf.GNU
2370 _am_result=no
2371 for s in GNU BSD; do
2372 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
2373 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
2374 ['0:this is the am__doit target'],
2375 [AS_CASE([$s],
2376 [BSD], [am__include='.include' am__quote='"'],
2377 [am__include='include' am__quote=''])])
2378 if test "$am__include" != "#"; then
2379 _am_result="yes ($s style)"
2380 break
2381 fi
2382 done
2383 rm -f confinc.* confmf.*
2384 AC_MSG_RESULT([${_am_result}])
2385 AC_SUBST([am__include])])
2386 AC_SUBST([am__quote])])
2387
2388 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2389
2390 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
2391 #
2392 # This file is free software; the Free Software Foundation
2393 # gives unlimited permission to copy and/or distribute it,
2394 # with or without modifications, as long as this notice is preserved.
2395
2396 # AM_MISSING_PROG(NAME, PROGRAM)
2397 # ------------------------------
2398 AC_DEFUN([AM_MISSING_PROG],
2399 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2400 $1=${$1-"${am_missing_run}$2"}
2401 AC_SUBST($1)])
2402
2403 # AM_MISSING_HAS_RUN
2404 # ------------------
2405 # Define MISSING if not defined so far and test if it is modern enough.
2406 # If it is, set am_missing_run to use it, otherwise, to nothing.
2407 AC_DEFUN([AM_MISSING_HAS_RUN],
2408 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2409 AC_REQUIRE_AUX_FILE([missing])dnl
2410 if test x"${MISSING+set}" != xset; then
2411 case $am_aux_dir in
2412 *\ * | *\ *)
2413 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2414 *)
2415 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2416 esac
2417 fi
2418 # Use eval to expand $SHELL
2419 if eval "$MISSING --is-lightweight"; then
2420 am_missing_run="$MISSING "
2421 else
2422 am_missing_run=
2423 AC_MSG_WARN(['missing' script is too old or missing])
2424 fi
2425 ])
2426
2427 # Helper functions for option handling. -*- Autoconf -*-
2428
2429 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2430 #
2431 # This file is free software; the Free Software Foundation
2432 # gives unlimited permission to copy and/or distribute it,
2433 # with or without modifications, as long as this notice is preserved.
2434
2435 # _AM_MANGLE_OPTION(NAME)
2436 # -----------------------
2437 AC_DEFUN([_AM_MANGLE_OPTION],
2438 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2439
2440 # _AM_SET_OPTION(NAME)
2441 # --------------------
2442 # Set option NAME. Presently that only means defining a flag for this option.
2443 AC_DEFUN([_AM_SET_OPTION],
2444 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2445
2446 # _AM_SET_OPTIONS(OPTIONS)
2447 # ------------------------
2448 # OPTIONS is a space-separated list of Automake options.
2449 AC_DEFUN([_AM_SET_OPTIONS],
2450 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2451
2452 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2453 # -------------------------------------------
2454 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2455 AC_DEFUN([_AM_IF_OPTION],
2456 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2457
2458 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
2459 #
2460 # This file is free software; the Free Software Foundation
2461 # gives unlimited permission to copy and/or distribute it,
2462 # with or without modifications, as long as this notice is preserved.
2463
2464 # _AM_PROG_CC_C_O
2465 # ---------------
2466 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
2467 # to automatically call this.
2468 AC_DEFUN([_AM_PROG_CC_C_O],
2469 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2470 AC_REQUIRE_AUX_FILE([compile])dnl
2471 AC_LANG_PUSH([C])dnl
2472 AC_CACHE_CHECK(
2473 [whether $CC understands -c and -o together],
2474 [am_cv_prog_cc_c_o],
2475 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
2476 # Make sure it works both with $CC and with simple cc.
2477 # Following AC_PROG_CC_C_O, we do the test twice because some
2478 # compilers refuse to overwrite an existing .o file with -o,
2479 # though they will create one.
2480 am_cv_prog_cc_c_o=yes
2481 for am_i in 1 2; do
2482 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
2483 && test -f conftest2.$ac_objext; then
2484 : OK
2485 else
2486 am_cv_prog_cc_c_o=no
2487 break
2488 fi
2489 done
2490 rm -f core conftest*
2491 unset am_i])
2492 if test "$am_cv_prog_cc_c_o" != yes; then
2493 # Losing compiler, so override with the script.
2494 # FIXME: It is wrong to rewrite CC.
2495 # But if we don't then we get into trouble of one sort or another.
2496 # A longer-term fix would be to have automake use am__CC in this case,
2497 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2498 CC="$am_aux_dir/compile $CC"
2499 fi
2500 AC_LANG_POP([C])])
2501
2502 # For backward compatibility.
2503 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
2504
2505 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2506 #
2507 # This file is free software; the Free Software Foundation
2508 # gives unlimited permission to copy and/or distribute it,
2509 # with or without modifications, as long as this notice is preserved.
2510
2511 # AM_RUN_LOG(COMMAND)
2512 # -------------------
2513 # Run COMMAND, save the exit status in ac_status, and log it.
2514 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
2515 AC_DEFUN([AM_RUN_LOG],
2516 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
2517 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
2518 ac_status=$?
2519 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2520 (exit $ac_status); }])
2521
2522 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2523
2524 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
2525 #
2526 # This file is free software; the Free Software Foundation
2527 # gives unlimited permission to copy and/or distribute it,
2528 # with or without modifications, as long as this notice is preserved.
2529
2530 # AM_SANITY_CHECK
2531 # ---------------
2532 AC_DEFUN([AM_SANITY_CHECK],
2533 [AC_MSG_CHECKING([whether build environment is sane])
2534 # Reject unsafe characters in $srcdir or the absolute working directory
2535 # name. Accept space and tab only in the latter.
2536 am_lf='
2537 '
2538 case `pwd` in
2539 *[[\\\"\#\$\&\'\`$am_lf]]*)
2540 AC_MSG_ERROR([unsafe absolute working directory name]);;
2541 esac
2542 case $srcdir in
2543 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2544 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2545 esac
2546
2547 # Do 'set' in a subshell so we don't clobber the current shell's
2548 # arguments. Must try -L first in case configure is actually a
2549 # symlink; some systems play weird games with the mod time of symlinks
2550 # (eg FreeBSD returns the mod time of the symlink's containing
2551 # directory).
2552 if (
2553 am_has_slept=no
2554 for am_try in 1 2; do
2555 echo "timestamp, slept: $am_has_slept" > conftest.file
2556 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2557 if test "$[*]" = "X"; then
2558 # -L didn't work.
2559 set X `ls -t "$srcdir/configure" conftest.file`
2560 fi
2561 if test "$[*]" != "X $srcdir/configure conftest.file" \
2562 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2563
2564 # If neither matched, then we have a broken ls. This can happen
2565 # if, for instance, CONFIG_SHELL is bash and it inherits a
2566 # broken ls alias from the environment. This has actually
2567 # happened. Such a system could not be considered "sane".
2568 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2569 alias in your environment])
2570 fi
2571 if test "$[2]" = conftest.file || test $am_try -eq 2; then
2572 break
2573 fi
2574 # Just in case.
2575 sleep 1
2576 am_has_slept=yes
2577 done
2578 test "$[2]" = conftest.file
2579 )
2580 then
2581 # Ok.
2582 :
2583 else
2584 AC_MSG_ERROR([newly created file is older than distributed files!
2585 Check your system clock])
2586 fi
2587 AC_MSG_RESULT([yes])
2588 # If we didn't sleep, we still need to ensure time stamps of config.status and
2589 # generated files are strictly newer.
2590 am_sleep_pid=
2591 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2592 ( sleep 1 ) &
2593 am_sleep_pid=$!
2594 fi
2595 AC_CONFIG_COMMANDS_PRE(
2596 [AC_MSG_CHECKING([that generated files are newer than configure])
2597 if test -n "$am_sleep_pid"; then
2598 # Hide warnings about reused PIDs.
2599 wait $am_sleep_pid 2>/dev/null
2600 fi
2601 AC_MSG_RESULT([done])])
2602 rm -f conftest.file
2603 ])
2604
2605 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
2606 #
2607 # This file is free software; the Free Software Foundation
2608 # gives unlimited permission to copy and/or distribute it,
2609 # with or without modifications, as long as this notice is preserved.
2610
2611 # AM_SILENT_RULES([DEFAULT])
2612 # --------------------------
2613 # Enable less verbose build rules; with the default set to DEFAULT
2614 # ("yes" being less verbose, "no" or empty being verbose).
2615 AC_DEFUN([AM_SILENT_RULES],
2616 [AC_ARG_ENABLE([silent-rules], [dnl
2617 AS_HELP_STRING(
2618 [--enable-silent-rules],
2619 [less verbose build output (undo: "make V=1")])
2620 AS_HELP_STRING(
2621 [--disable-silent-rules],
2622 [verbose build output (undo: "make V=0")])dnl
2623 ])
2624 case $enable_silent_rules in @%:@ (((
2625 yes) AM_DEFAULT_VERBOSITY=0;;
2626 no) AM_DEFAULT_VERBOSITY=1;;
2627 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2628 esac
2629 dnl
2630 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2631 dnl do not support nested variable expansions.
2632 dnl See automake bug#9928 and bug#10237.
2633 am_make=${MAKE-make}
2634 AC_CACHE_CHECK([whether $am_make supports nested variables],
2635 [am_cv_make_support_nested_variables],
2636 [if AS_ECHO([['TRUE=$(BAR$(V))
2637 BAR0=false
2638 BAR1=true
2639 V=1
2640 am__doit:
2641 @$(TRUE)
2642 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2643 am_cv_make_support_nested_variables=yes
2644 else
2645 am_cv_make_support_nested_variables=no
2646 fi])
2647 if test $am_cv_make_support_nested_variables = yes; then
2648 dnl Using '$V' instead of '$(V)' breaks IRIX make.
2649 AM_V='$(V)'
2650 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2651 else
2652 AM_V=$AM_DEFAULT_VERBOSITY
2653 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2654 fi
2655 AC_SUBST([AM_V])dnl
2656 AM_SUBST_NOTMAKE([AM_V])dnl
2657 AC_SUBST([AM_DEFAULT_V])dnl
2658 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2659 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2660 AM_BACKSLASH='\'
2661 AC_SUBST([AM_BACKSLASH])dnl
2662 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2663 ])
2664
2665 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
2666 #
2667 # This file is free software; the Free Software Foundation
2668 # gives unlimited permission to copy and/or distribute it,
2669 # with or without modifications, as long as this notice is preserved.
2670
2671 # AM_PROG_INSTALL_STRIP
2672 # ---------------------
2673 # One issue with vendor 'install' (even GNU) is that you can't
2674 # specify the program used to strip binaries. This is especially
2675 # annoying in cross-compiling environments, where the build's strip
2676 # is unlikely to handle the host's binaries.
2677 # Fortunately install-sh will honor a STRIPPROG variable, so we
2678 # always use install-sh in "make install-strip", and initialize
2679 # STRIPPROG with the value of the STRIP variable (set by the user).
2680 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2681 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2682 # Installed binaries are usually stripped using 'strip' when the user
2683 # run "make install-strip". However 'strip' might not be the right
2684 # tool to use in cross-compilation environments, therefore Automake
2685 # will honor the 'STRIP' environment variable to overrule this program.
2686 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2687 if test "$cross_compiling" != no; then
2688 AC_CHECK_TOOL([STRIP], [strip], :)
2689 fi
2690 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2691 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2692
2693 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
2694 #
2695 # This file is free software; the Free Software Foundation
2696 # gives unlimited permission to copy and/or distribute it,
2697 # with or without modifications, as long as this notice is preserved.
2698
2699 # _AM_SUBST_NOTMAKE(VARIABLE)
2700 # ---------------------------
2701 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2702 # This macro is traced by Automake.
2703 AC_DEFUN([_AM_SUBST_NOTMAKE])
2704
2705 # AM_SUBST_NOTMAKE(VARIABLE)
2706 # --------------------------
2707 # Public sister of _AM_SUBST_NOTMAKE.
2708 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2709
2710 # Check how to create a tarball. -*- Autoconf -*-
2711
2712 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
2713 #
2714 # This file is free software; the Free Software Foundation
2715 # gives unlimited permission to copy and/or distribute it,
2716 # with or without modifications, as long as this notice is preserved.
2717
2718 # _AM_PROG_TAR(FORMAT)
2719 # --------------------
2720 # Check how to create a tarball in format FORMAT.
2721 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2722 #
2723 # Substitute a variable $(am__tar) that is a command
2724 # writing to stdout a FORMAT-tarball containing the directory
2725 # $tardir.
2726 # tardir=directory && $(am__tar) > result.tar
2727 #
2728 # Substitute a variable $(am__untar) that extract such
2729 # a tarball read from stdin.
2730 # $(am__untar) < result.tar
2731 #
2732 AC_DEFUN([_AM_PROG_TAR],
2733 [# Always define AMTAR for backward compatibility. Yes, it's still used
2734 # in the wild :-( We should find a proper way to deprecate it ...
2735 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2736
2737 # We'll loop over all known methods to create a tar archive until one works.
2738 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2739
2740 m4_if([$1], [v7],
2741 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2742
2743 [m4_case([$1],
2744 [ustar],
2745 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2746 # There is notably a 21 bits limit for the UID and the GID. In fact,
2747 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2748 # and bug#13588).
2749 am_max_uid=2097151 # 2^21 - 1
2750 am_max_gid=$am_max_uid
2751 # The $UID and $GID variables are not portable, so we need to resort
2752 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2753 # below are definitely unexpected, so allow the users to see them
2754 # (that is, avoid stderr redirection).
2755 am_uid=`id -u || echo unknown`
2756 am_gid=`id -g || echo unknown`
2757 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2758 if test $am_uid -le $am_max_uid; then
2759 AC_MSG_RESULT([yes])
2760 else
2761 AC_MSG_RESULT([no])
2762 _am_tools=none
2763 fi
2764 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2765 if test $am_gid -le $am_max_gid; then
2766 AC_MSG_RESULT([yes])
2767 else
2768 AC_MSG_RESULT([no])
2769 _am_tools=none
2770 fi],
2771
2772 [pax],
2773 [],
2774
2775 [m4_fatal([Unknown tar format])])
2776
2777 AC_MSG_CHECKING([how to create a $1 tar archive])
2778
2779 # Go ahead even if we have the value already cached. We do so because we
2780 # need to set the values for the 'am__tar' and 'am__untar' variables.
2781 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2782
2783 for _am_tool in $_am_tools; do
2784 case $_am_tool in
2785 gnutar)
2786 for _am_tar in tar gnutar gtar; do
2787 AM_RUN_LOG([$_am_tar --version]) && break
2788 done
2789 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2790 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2791 am__untar="$_am_tar -xf -"
2792 ;;
2793 plaintar)
2794 # Must skip GNU tar: if it does not support --format= it doesn't create
2795 # ustar tarball either.
2796 (tar --version) >/dev/null 2>&1 && continue
2797 am__tar='tar chf - "$$tardir"'
2798 am__tar_='tar chf - "$tardir"'
2799 am__untar='tar xf -'
2800 ;;
2801 pax)
2802 am__tar='pax -L -x $1 -w "$$tardir"'
2803 am__tar_='pax -L -x $1 -w "$tardir"'
2804 am__untar='pax -r'
2805 ;;
2806 cpio)
2807 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2808 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2809 am__untar='cpio -i -H $1 -d'
2810 ;;
2811 none)
2812 am__tar=false
2813 am__tar_=false
2814 am__untar=false
2815 ;;
2816 esac
2817
2818 # If the value was cached, stop now. We just wanted to have am__tar
2819 # and am__untar set.
2820 test -n "${am_cv_prog_tar_$1}" && break
2821
2822 # tar/untar a dummy directory, and stop if the command works.
2823 rm -rf conftest.dir
2824 mkdir conftest.dir
2825 echo GrepMe > conftest.dir/file
2826 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2827 rm -rf conftest.dir
2828 if test -s conftest.tar; then
2829 AM_RUN_LOG([$am__untar <conftest.tar])
2830 AM_RUN_LOG([cat conftest.dir/file])
2831 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2832 fi
2833 done
2834 rm -rf conftest.dir
2835
2836 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2837 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2838
2839 AC_SUBST([am__tar])
2840 AC_SUBST([am__untar])
2841 ]) # _AM_PROG_TAR
2842
2843 m4_include([m4/attribute.m4])
2844 m4_include([m4/ccflags.m4])
2845 m4_include([m4/libshout.m4])
2846 m4_include([m4/libtool.m4])
2847 m4_include([m4/libxml2.m4])
2848 m4_include([m4/ltoptions.m4])
2849 m4_include([m4/ltsugar.m4])
2850 m4_include([m4/ltversion.m4])
2851 m4_include([m4/lt~obsolete.m4])
2852 m4_include([m4/progname.m4])
2853 m4_include([m4/taglib.m4])
2854 m4_include([m4/vars.m4])