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 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# Configure paths for GTK+ 24# Owen Taylor 1997-2001 25 26# Version number used by aclocal, see `info automake Serials`. 27# Increment on every change. 28#serial 1 29 30dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) 31dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 32dnl pass to pkg-config 33dnl 34AC_DEFUN([AM_PATH_GTK_2_0], 35[dnl 36dnl Get the cflags and libraries from pkg-config 37dnl 38AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], 39 , enable_gtktest=yes) 40 41 pkg_config_args=gtk+-2.0 42 for module in . $4 43 do 44 case "$module" in 45 gthread) 46 pkg_config_args="$pkg_config_args gthread-2.0" 47 ;; 48 esac 49 done 50 51 no_gtk="" 52 53 AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 54 PKG_PROG_PKG_CONFIG([0.7]) 55 56 min_gtk_version=ifelse([$1], ,2.0.0,$1) 57 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) 58 59 if test x$PKG_CONFIG != xno ; then 60 ## don't try to run the test against uninstalled libtool libs 61 if $PKG_CONFIG --uninstalled $pkg_config_args; then 62 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" 63 enable_gtktest=no 64 fi 65 66 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then 67 : 68 else 69 no_gtk=yes 70 fi 71 fi 72 73 if test x"$no_gtk" = x ; then 74 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` 75 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` 76 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ 77 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 78 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ 79 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 80 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ 81 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 82 if test "x$enable_gtktest" = "xyes" ; then 83 ac_save_CFLAGS="$CFLAGS" 84 ac_save_LIBS="$LIBS" 85 CFLAGS="$CFLAGS $GTK_CFLAGS" 86 LIBS="$GTK_LIBS $LIBS" 87dnl 88dnl Now check if the installed GTK+ is sufficiently new. (Also sanity 89dnl checks the results of pkg-config to some extent) 90dnl 91 rm -f conf.gtktest 92 AC_TRY_RUN([ 93#include <gtk/gtk.h> 94#include <stdio.h> 95#include <stdlib.h> 96 97int 98main () 99{ 100 int major, minor, micro; 101 char *tmp_version; 102 103 fclose (fopen ("conf.gtktest", "w")); 104 105 /* HP/UX 9 (%@#!) writes to sscanf strings */ 106 tmp_version = g_strdup("$min_gtk_version"); 107 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 108 printf("%s, bad version string\n", "$min_gtk_version"); 109 exit(1); 110 } 111 112 if ((gtk_major_version != $gtk_config_major_version) || 113 (gtk_minor_version != $gtk_config_minor_version) || 114 (gtk_micro_version != $gtk_config_micro_version)) 115 { 116 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 117 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, 118 gtk_major_version, gtk_minor_version, gtk_micro_version); 119 printf ("*** was found! If pkg-config was correct, then it is best\n"); 120 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); 121 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); 122 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); 123 printf("*** required on your system.\n"); 124 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); 125 printf("*** to point to the correct configuration files\n"); 126 } 127 else if ((gtk_major_version != GTK_MAJOR_VERSION) || 128 (gtk_minor_version != GTK_MINOR_VERSION) || 129 (gtk_micro_version != GTK_MICRO_VERSION)) 130 { 131 printf("*** GTK+ header files (version %d.%d.%d) do not match\n", 132 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); 133 printf("*** library (version %d.%d.%d)\n", 134 gtk_major_version, gtk_minor_version, gtk_micro_version); 135 } 136 else 137 { 138 if ((gtk_major_version > major) || 139 ((gtk_major_version == major) && (gtk_minor_version > minor)) || 140 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) 141 { 142 return 0; 143 } 144 else 145 { 146 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", 147 gtk_major_version, gtk_minor_version, gtk_micro_version); 148 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", 149 major, minor, micro); 150 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); 151 printf("***\n"); 152 printf("*** If you have already installed a sufficiently new version, this error\n"); 153 printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); 154 printf("*** being found. The easiest way to fix this is to remove the old version\n"); 155 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); 156 printf("*** correct copy of pkg-config. (In this case, you will have to\n"); 157 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); 158 printf("*** so that the correct libraries are found at run-time))\n"); 159 } 160 } 161 return 1; 162} 163],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 164 CFLAGS="$ac_save_CFLAGS" 165 LIBS="$ac_save_LIBS" 166 fi 167 fi 168 if test "x$no_gtk" = x ; then 169 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) 170 ifelse([$2], , :, [$2]) 171 else 172 AC_MSG_RESULT(no) 173 if test "$PKG_CONFIG" = "no" ; then 174 echo "*** A new enough version of pkg-config was not found." 175 echo "*** See http://pkgconfig.sourceforge.net" 176 else 177 if test -f conf.gtktest ; then 178 : 179 else 180 echo "*** Could not run GTK+ test program, checking why..." 181 ac_save_CFLAGS="$CFLAGS" 182 ac_save_LIBS="$LIBS" 183 CFLAGS="$CFLAGS $GTK_CFLAGS" 184 LIBS="$LIBS $GTK_LIBS" 185 AC_TRY_LINK([ 186#include <gtk/gtk.h> 187#include <stdio.h> 188], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], 189 [ echo "*** The test program compiled, but did not run. This usually means" 190 echo "*** that the run-time linker is not finding GTK+ or finding the wrong" 191 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" 192 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 193 echo "*** to the installed location Also, make sure you have run ldconfig if that" 194 echo "*** is required on your system" 195 echo "***" 196 echo "*** If you have an old version installed, it is best to remove it, although" 197 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], 198 [ echo "*** The test program failed to compile or link. See the file config.log for the" 199 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) 200 CFLAGS="$ac_save_CFLAGS" 201 LIBS="$ac_save_LIBS" 202 fi 203 fi 204 GTK_CFLAGS="" 205 GTK_LIBS="" 206 ifelse([$3], , :, [$3]) 207 fi 208 AC_SUBST(GTK_CFLAGS) 209 AC_SUBST(GTK_LIBS) 210 rm -f conf.gtktest 211]) 212 213# Configure paths for GTK+ 214# Owen Taylor 1997-2001 215 216# Version number used by aclocal, see `info automake Serials`. 217# Increment on every change. 218#serial 1 219 220dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) 221dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 222dnl pass to pkg-config 223dnl 224AC_DEFUN([AM_PATH_GTK_3_0], 225[m4_warn([obsolete], [AM_PATH_GTK_3_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-3.0]) instead]) 226dnl Get the cflags and libraries from pkg-config 227dnl 228AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], 229 , enable_gtktest=yes) 230 min_gtk_version=ifelse([$1], [], [3.0.0], [$1]) 231 232 pkg_config_args="gtk+-3.0 >= $min_gtk_version" 233 for module in . $4 234 do 235 case "$module" in 236 gthread) 237 pkg_config_args="$pkg_config_args gthread-2.0" 238 ;; 239 esac 240 done 241 242 no_gtk="" 243 244 PKG_PROG_PKG_CONFIG([0.16]) 245 246 if test -z "$PKG_CONFIG"; then 247 no_gtk=yes 248 fi 249 250 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) 251 252 if test -n "$PKG_CONFIG"; then 253 ## don't try to run the test against uninstalled libtool libs 254 if $PKG_CONFIG --uninstalled $pkg_config_args; then 255 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" 256 enable_gtktest=no 257 fi 258 259 if $PKG_CONFIG $pkg_config_args; then 260 : 261 else 262 no_gtk=yes 263 fi 264 fi 265 266 if test x"$no_gtk" = x ; then 267 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` 268 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` 269 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \ 270 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 271 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \ 272 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 273 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \ 274 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 275 if test "x$enable_gtktest" = "xyes" ; then 276 ac_save_CFLAGS="$CFLAGS" 277 ac_save_LIBS="$LIBS" 278 CFLAGS="$CFLAGS $GTK_CFLAGS" 279 LIBS="$GTK_LIBS $LIBS" 280dnl 281dnl Now check if the installed GTK+ is sufficiently new. (Also sanity 282dnl checks the results of pkg-config to some extent) 283dnl 284 rm -f conf.gtktest 285 AC_TRY_RUN([ 286#include <gtk/gtk.h> 287#include <stdio.h> 288#include <stdlib.h> 289 290int 291main () 292{ 293 unsigned int major, minor, micro; 294 295 fclose (fopen ("conf.gtktest", "w")); 296 297 if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, µ) != 3) { 298 printf("%s, bad version string\n", "$min_gtk_version"); 299 exit(1); 300 } 301 302 if ((gtk_major_version != $gtk_config_major_version) || 303 (gtk_minor_version != $gtk_config_minor_version) || 304 (gtk_micro_version != $gtk_config_micro_version)) 305 { 306 printf("\n*** 'pkg-config --modversion gtk+-3.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 307 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, 308 gtk_major_version, gtk_minor_version, gtk_micro_version); 309 printf ("*** was found! If pkg-config was correct, then it is best\n"); 310 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); 311 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); 312 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); 313 printf("*** required on your system.\n"); 314 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); 315 printf("*** to point to the correct configuration files\n"); 316 } 317 else if ((gtk_major_version != GTK_MAJOR_VERSION) || 318 (gtk_minor_version != GTK_MINOR_VERSION) || 319 (gtk_micro_version != GTK_MICRO_VERSION)) 320 { 321 printf("*** GTK+ header files (version %d.%d.%d) do not match\n", 322 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); 323 printf("*** library (version %d.%d.%d)\n", 324 gtk_major_version, gtk_minor_version, gtk_micro_version); 325 } 326 else 327 { 328 if ((gtk_major_version > major) || 329 ((gtk_major_version == major) && (gtk_minor_version > minor)) || 330 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) 331 { 332 return 0; 333 } 334 else 335 { 336 printf("\n*** An old version of GTK+ (%u.%u.%u) was found.\n", 337 gtk_major_version, gtk_minor_version, gtk_micro_version); 338 printf("*** You need a version of GTK+ newer than %u.%u.%u. The latest version of\n", 339 major, minor, micro); 340 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); 341 printf("***\n"); 342 printf("*** If you have already installed a sufficiently new version, this error\n"); 343 printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); 344 printf("*** being found. The easiest way to fix this is to remove the old version\n"); 345 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); 346 printf("*** correct copy of pkg-config. (In this case, you will have to\n"); 347 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); 348 printf("*** so that the correct libraries are found at run-time))\n"); 349 } 350 } 351 return 1; 352} 353],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 354 CFLAGS="$ac_save_CFLAGS" 355 LIBS="$ac_save_LIBS" 356 fi 357 fi 358 if test "x$no_gtk" = x ; then 359 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) 360 ifelse([$2], , :, [$2]) 361 else 362 AC_MSG_RESULT(no) 363 if test -z "$PKG_CONFIG"; then 364 echo "*** A new enough version of pkg-config was not found." 365 echo "*** See http://pkgconfig.sourceforge.net" 366 else 367 if test -f conf.gtktest ; then 368 : 369 else 370 echo "*** Could not run GTK+ test program, checking why..." 371 ac_save_CFLAGS="$CFLAGS" 372 ac_save_LIBS="$LIBS" 373 CFLAGS="$CFLAGS $GTK_CFLAGS" 374 LIBS="$LIBS $GTK_LIBS" 375 AC_TRY_LINK([ 376#include <gtk/gtk.h> 377#include <stdio.h> 378], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], 379 [ echo "*** The test program compiled, but did not run. This usually means" 380 echo "*** that the run-time linker is not finding GTK+ or finding the wrong" 381 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" 382 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 383 echo "*** to the installed location Also, make sure you have run ldconfig if that" 384 echo "*** is required on your system" 385 echo "***" 386 echo "*** If you have an old version installed, it is best to remove it, although" 387 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], 388 [ echo "*** The test program failed to compile or link. See the file config.log for the" 389 echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."]) 390 CFLAGS="$ac_save_CFLAGS" 391 LIBS="$ac_save_LIBS" 392 fi 393 fi 394 GTK_CFLAGS="" 395 GTK_LIBS="" 396 ifelse([$3], , :, [$3]) 397 fi 398 AC_SUBST(GTK_CFLAGS) 399 AC_SUBST(GTK_LIBS) 400 rm -f conf.gtktest 401]) 402 403dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 404dnl Tests for BACKEND-NAME in the GTK targets list 405dnl 406AC_DEFUN([GTK_CHECK_BACKEND], 407[m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0]) or similar instead]) 408 pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0) 409 min_gtk_version=ifelse([$2],,3.0.0,$2) 410 pkg_config_args="$pkg_config_args >= $min_gtk_version" 411 412 PKG_PROG_PKG_CONFIG([0.16]) 413 AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])]) 414 415 if $PKG_CONFIG $pkg_config_args ; then 416 target_found=yes 417 else 418 target_found=no 419 fi 420 421 if test "x$target_found" = "xno"; then 422 ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4]) 423 else 424 ifelse([$3],,[:],[$3]) 425 fi 426]) 427 428dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 429dnl serial 11 (pkg-config-0.29.1) 430dnl 431dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 432dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 433dnl 434dnl This program is free software; you can redistribute it and/or modify 435dnl it under the terms of the GNU General Public License as published by 436dnl the Free Software Foundation; either version 2 of the License, or 437dnl (at your option) any later version. 438dnl 439dnl This program is distributed in the hope that it will be useful, but 440dnl WITHOUT ANY WARRANTY; without even the implied warranty of 441dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 442dnl General Public License for more details. 443dnl 444dnl You should have received a copy of the GNU General Public License 445dnl along with this program; if not, write to the Free Software 446dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 447dnl 02111-1307, USA. 448dnl 449dnl As a special exception to the GNU General Public License, if you 450dnl distribute this file as part of a program that contains a 451dnl configuration script generated by Autoconf, you may include it under 452dnl the same distribution terms that you use for the rest of that 453dnl program. 454 455dnl PKG_PREREQ(MIN-VERSION) 456dnl ----------------------- 457dnl Since: 0.29 458dnl 459dnl Verify that the version of the pkg-config macros are at least 460dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 461dnl installed version of pkg-config, this checks the developer's version 462dnl of pkg.m4 when generating configure. 463dnl 464dnl To ensure that this macro is defined, also add: 465dnl m4_ifndef([PKG_PREREQ], 466dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 467dnl 468dnl See the "Since" comment for each macro you use to see what version 469dnl of the macros you require. 470m4_defun([PKG_PREREQ], 471[m4_define([PKG_MACROS_VERSION], [0.29.1]) 472m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 473 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 474])dnl PKG_PREREQ 475 476dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 477dnl ---------------------------------- 478dnl Since: 0.16 479dnl 480dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 481dnl first found in the path. Checks that the version of pkg-config found 482dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 483dnl used since that's the first version where most current features of 484dnl pkg-config existed. 485AC_DEFUN([PKG_PROG_PKG_CONFIG], 486[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 487m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 488m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 489AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 490AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 491AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 492 493if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 494 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 495fi 496if test -n "$PKG_CONFIG"; then 497 _pkg_min_version=m4_default([$1], [0.9.0]) 498 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 499 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 500 AC_MSG_RESULT([yes]) 501 else 502 AC_MSG_RESULT([no]) 503 PKG_CONFIG="" 504 fi 505fi[]dnl 506])dnl PKG_PROG_PKG_CONFIG 507 508dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 509dnl ------------------------------------------------------------------- 510dnl Since: 0.18 511dnl 512dnl Check to see whether a particular set of modules exists. Similar to 513dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 514dnl 515dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 516dnl only at the first occurence in configure.ac, so if the first place 517dnl it's called might be skipped (such as if it is within an "if", you 518dnl have to call PKG_CHECK_EXISTS manually 519AC_DEFUN([PKG_CHECK_EXISTS], 520[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 521if test -n "$PKG_CONFIG" && \ 522 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 523 m4_default([$2], [:]) 524m4_ifvaln([$3], [else 525 $3])dnl 526fi]) 527 528dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 529dnl --------------------------------------------- 530dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 531dnl pkg_failed based on the result. 532m4_define([_PKG_CONFIG], 533[if test -n "$$1"; then 534 pkg_cv_[]$1="$$1" 535 elif test -n "$PKG_CONFIG"; then 536 PKG_CHECK_EXISTS([$3], 537 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 538 test "x$?" != "x0" && pkg_failed=yes ], 539 [pkg_failed=yes]) 540 else 541 pkg_failed=untried 542fi[]dnl 543])dnl _PKG_CONFIG 544 545dnl _PKG_SHORT_ERRORS_SUPPORTED 546dnl --------------------------- 547dnl Internal check to see if pkg-config supports short errors. 548AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 549[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 550if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 551 _pkg_short_errors_supported=yes 552else 553 _pkg_short_errors_supported=no 554fi[]dnl 555])dnl _PKG_SHORT_ERRORS_SUPPORTED 556 557 558dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 559dnl [ACTION-IF-NOT-FOUND]) 560dnl -------------------------------------------------------------- 561dnl Since: 0.4.0 562dnl 563dnl Note that if there is a possibility the first call to 564dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 565dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 566AC_DEFUN([PKG_CHECK_MODULES], 567[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 568AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 569AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 570 571pkg_failed=no 572AC_MSG_CHECKING([for $1]) 573 574_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 575_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 576 577m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 578and $1[]_LIBS to avoid the need to call pkg-config. 579See the pkg-config man page for more details.]) 580 581if test $pkg_failed = yes; then 582 AC_MSG_RESULT([no]) 583 _PKG_SHORT_ERRORS_SUPPORTED 584 if test $_pkg_short_errors_supported = yes; then 585 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 586 else 587 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 588 fi 589 # Put the nasty error message in config.log where it belongs 590 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 591 592 m4_default([$4], [AC_MSG_ERROR( 593[Package requirements ($2) were not met: 594 595$$1_PKG_ERRORS 596 597Consider adjusting the PKG_CONFIG_PATH environment variable if you 598installed software in a non-standard prefix. 599 600_PKG_TEXT])[]dnl 601 ]) 602elif test $pkg_failed = untried; then 603 AC_MSG_RESULT([no]) 604 m4_default([$4], [AC_MSG_FAILURE( 605[The pkg-config script could not be found or is too old. Make sure it 606is in your PATH or set the PKG_CONFIG environment variable to the full 607path to pkg-config. 608 609_PKG_TEXT 610 611To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 612 ]) 613else 614 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 615 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 616 AC_MSG_RESULT([yes]) 617 $3 618fi[]dnl 619])dnl PKG_CHECK_MODULES 620 621 622dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 623dnl [ACTION-IF-NOT-FOUND]) 624dnl --------------------------------------------------------------------- 625dnl Since: 0.29 626dnl 627dnl Checks for existence of MODULES and gathers its build flags with 628dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 629dnl and VARIABLE-PREFIX_LIBS from --libs. 630dnl 631dnl Note that if there is a possibility the first call to 632dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 633dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 634dnl configure.ac. 635AC_DEFUN([PKG_CHECK_MODULES_STATIC], 636[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 637_save_PKG_CONFIG=$PKG_CONFIG 638PKG_CONFIG="$PKG_CONFIG --static" 639PKG_CHECK_MODULES($@) 640PKG_CONFIG=$_save_PKG_CONFIG[]dnl 641])dnl PKG_CHECK_MODULES_STATIC 642 643 644dnl PKG_INSTALLDIR([DIRECTORY]) 645dnl ------------------------- 646dnl Since: 0.27 647dnl 648dnl Substitutes the variable pkgconfigdir as the location where a module 649dnl should install pkg-config .pc files. By default the directory is 650dnl $libdir/pkgconfig, but the default can be changed by passing 651dnl DIRECTORY. The user can override through the --with-pkgconfigdir 652dnl parameter. 653AC_DEFUN([PKG_INSTALLDIR], 654[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 655m4_pushdef([pkg_description], 656 [pkg-config installation directory @<:@]pkg_default[@:>@]) 657AC_ARG_WITH([pkgconfigdir], 658 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 659 [with_pkgconfigdir=]pkg_default) 660AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 661m4_popdef([pkg_default]) 662m4_popdef([pkg_description]) 663])dnl PKG_INSTALLDIR 664 665 666dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 667dnl -------------------------------- 668dnl Since: 0.27 669dnl 670dnl Substitutes the variable noarch_pkgconfigdir as the location where a 671dnl module should install arch-independent pkg-config .pc files. By 672dnl default the directory is $datadir/pkgconfig, but the default can be 673dnl changed by passing DIRECTORY. The user can override through the 674dnl --with-noarch-pkgconfigdir parameter. 675AC_DEFUN([PKG_NOARCH_INSTALLDIR], 676[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 677m4_pushdef([pkg_description], 678 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 679AC_ARG_WITH([noarch-pkgconfigdir], 680 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 681 [with_noarch_pkgconfigdir=]pkg_default) 682AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 683m4_popdef([pkg_default]) 684m4_popdef([pkg_description]) 685])dnl PKG_NOARCH_INSTALLDIR 686 687 688dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 689dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 690dnl ------------------------------------------- 691dnl Since: 0.28 692dnl 693dnl Retrieves the value of the pkg-config variable for the given module. 694AC_DEFUN([PKG_CHECK_VAR], 695[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 696AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 697 698_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 699AS_VAR_COPY([$1], [pkg_cv_][$1]) 700 701AS_VAR_IF([$1], [""], [$5], [$4])dnl 702])dnl PKG_CHECK_VAR 703 704# Copyright (C) 2002-2018 Free Software Foundation, Inc. 705# 706# This file is free software; the Free Software Foundation 707# gives unlimited permission to copy and/or distribute it, 708# with or without modifications, as long as this notice is preserved. 709 710# AM_AUTOMAKE_VERSION(VERSION) 711# ---------------------------- 712# Automake X.Y traces this macro to ensure aclocal.m4 has been 713# generated from the m4 files accompanying Automake X.Y. 714# (This private macro should not be called outside this file.) 715AC_DEFUN([AM_AUTOMAKE_VERSION], 716[am__api_version='1.16' 717dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 718dnl require some minimum version. Point them to the right macro. 719m4_if([$1], [1.16.1], [], 720 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 721]) 722 723# _AM_AUTOCONF_VERSION(VERSION) 724# ----------------------------- 725# aclocal traces this macro to find the Autoconf version. 726# This is a private macro too. Using m4_define simplifies 727# the logic in aclocal, which can simply ignore this definition. 728m4_define([_AM_AUTOCONF_VERSION], []) 729 730# AM_SET_CURRENT_AUTOMAKE_VERSION 731# ------------------------------- 732# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 733# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 734AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 735[AM_AUTOMAKE_VERSION([1.16.1])dnl 736m4_ifndef([AC_AUTOCONF_VERSION], 737 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 738_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 739 740# Copyright (C) 2011-2018 Free Software Foundation, Inc. 741# 742# This file is free software; the Free Software Foundation 743# gives unlimited permission to copy and/or distribute it, 744# with or without modifications, as long as this notice is preserved. 745 746# AM_PROG_AR([ACT-IF-FAIL]) 747# ------------------------- 748# Try to determine the archiver interface, and trigger the ar-lib wrapper 749# if it is needed. If the detection of archiver interface fails, run 750# ACT-IF-FAIL (default is to abort configure with a proper error message). 751AC_DEFUN([AM_PROG_AR], 752[AC_BEFORE([$0], [LT_INIT])dnl 753AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl 754AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 755AC_REQUIRE_AUX_FILE([ar-lib])dnl 756AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) 757: ${AR=ar} 758 759AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], 760 [AC_LANG_PUSH([C]) 761 am_cv_ar_interface=ar 762 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], 763 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 764 AC_TRY_EVAL([am_ar_try]) 765 if test "$ac_status" -eq 0; then 766 am_cv_ar_interface=ar 767 else 768 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 769 AC_TRY_EVAL([am_ar_try]) 770 if test "$ac_status" -eq 0; then 771 am_cv_ar_interface=lib 772 else 773 am_cv_ar_interface=unknown 774 fi 775 fi 776 rm -f conftest.lib libconftest.a 777 ]) 778 AC_LANG_POP([C])]) 779 780case $am_cv_ar_interface in 781ar) 782 ;; 783lib) 784 # Microsoft lib, so override with the ar-lib wrapper script. 785 # FIXME: It is wrong to rewrite AR. 786 # But if we don't then we get into trouble of one sort or another. 787 # A longer-term fix would be to have automake use am__AR in this case, 788 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something 789 # similar. 790 AR="$am_aux_dir/ar-lib $AR" 791 ;; 792unknown) 793 m4_default([$1], 794 [AC_MSG_ERROR([could not determine $AR interface])]) 795 ;; 796esac 797AC_SUBST([AR])dnl 798]) 799 800# AM_AUX_DIR_EXPAND -*- Autoconf -*- 801 802# Copyright (C) 2001-2018 Free Software Foundation, Inc. 803# 804# This file is free software; the Free Software Foundation 805# gives unlimited permission to copy and/or distribute it, 806# with or without modifications, as long as this notice is preserved. 807 808# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 809# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 810# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 811# 812# Of course, Automake must honor this variable whenever it calls a 813# tool from the auxiliary directory. The problem is that $srcdir (and 814# therefore $ac_aux_dir as well) can be either absolute or relative, 815# depending on how configure is run. This is pretty annoying, since 816# it makes $ac_aux_dir quite unusable in subdirectories: in the top 817# source directory, any form will work fine, but in subdirectories a 818# relative path needs to be adjusted first. 819# 820# $ac_aux_dir/missing 821# fails when called from a subdirectory if $ac_aux_dir is relative 822# $top_srcdir/$ac_aux_dir/missing 823# fails if $ac_aux_dir is absolute, 824# fails when called from a subdirectory in a VPATH build with 825# a relative $ac_aux_dir 826# 827# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 828# are both prefixed by $srcdir. In an in-source build this is usually 829# harmless because $srcdir is '.', but things will broke when you 830# start a VPATH build or use an absolute $srcdir. 831# 832# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 833# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 834# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 835# and then we would define $MISSING as 836# MISSING="\${SHELL} $am_aux_dir/missing" 837# This will work as long as MISSING is not called from configure, because 838# unfortunately $(top_srcdir) has no meaning in configure. 839# However there are other variables, like CC, which are often used in 840# configure, and could therefore not use this "fixed" $ac_aux_dir. 841# 842# Another solution, used here, is to always expand $ac_aux_dir to an 843# absolute PATH. The drawback is that using absolute paths prevent a 844# configured tree to be moved without reconfiguration. 845 846AC_DEFUN([AM_AUX_DIR_EXPAND], 847[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 848# Expand $ac_aux_dir to an absolute path. 849am_aux_dir=`cd "$ac_aux_dir" && pwd` 850]) 851 852# AM_CONDITIONAL -*- Autoconf -*- 853 854# Copyright (C) 1997-2018 Free Software Foundation, Inc. 855# 856# This file is free software; the Free Software Foundation 857# gives unlimited permission to copy and/or distribute it, 858# with or without modifications, as long as this notice is preserved. 859 860# AM_CONDITIONAL(NAME, SHELL-CONDITION) 861# ------------------------------------- 862# Define a conditional. 863AC_DEFUN([AM_CONDITIONAL], 864[AC_PREREQ([2.52])dnl 865 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 866 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 867AC_SUBST([$1_TRUE])dnl 868AC_SUBST([$1_FALSE])dnl 869_AM_SUBST_NOTMAKE([$1_TRUE])dnl 870_AM_SUBST_NOTMAKE([$1_FALSE])dnl 871m4_define([_AM_COND_VALUE_$1], [$2])dnl 872if $2; then 873 $1_TRUE= 874 $1_FALSE='#' 875else 876 $1_TRUE='#' 877 $1_FALSE= 878fi 879AC_CONFIG_COMMANDS_PRE( 880[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 881 AC_MSG_ERROR([[conditional "$1" was never defined. 882Usually this means the macro was only invoked conditionally.]]) 883fi])]) 884 885# Copyright (C) 1999-2018 Free Software Foundation, Inc. 886# 887# This file is free software; the Free Software Foundation 888# gives unlimited permission to copy and/or distribute it, 889# with or without modifications, as long as this notice is preserved. 890 891 892# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 893# written in clear, in which case automake, when reading aclocal.m4, 894# will think it sees a *use*, and therefore will trigger all it's 895# C support machinery. Also note that it means that autoscan, seeing 896# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 897 898 899# _AM_DEPENDENCIES(NAME) 900# ---------------------- 901# See how the compiler implements dependency checking. 902# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 903# We try a few techniques and use that to set a single cache variable. 904# 905# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 906# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 907# dependency, and given that the user is not expected to run this macro, 908# just rely on AC_PROG_CC. 909AC_DEFUN([_AM_DEPENDENCIES], 910[AC_REQUIRE([AM_SET_DEPDIR])dnl 911AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 912AC_REQUIRE([AM_MAKE_INCLUDE])dnl 913AC_REQUIRE([AM_DEP_TRACK])dnl 914 915m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 916 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 917 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 918 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 919 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 920 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 921 [depcc="$$1" am_compiler_list=]) 922 923AC_CACHE_CHECK([dependency style of $depcc], 924 [am_cv_$1_dependencies_compiler_type], 925[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 926 # We make a subdir and do the tests there. Otherwise we can end up 927 # making bogus files that we don't know about and never remove. For 928 # instance it was reported that on HP-UX the gcc test will end up 929 # making a dummy file named 'D' -- because '-MD' means "put the output 930 # in D". 931 rm -rf conftest.dir 932 mkdir conftest.dir 933 # Copy depcomp to subdir because otherwise we won't find it if we're 934 # using a relative directory. 935 cp "$am_depcomp" conftest.dir 936 cd conftest.dir 937 # We will build objects and dependencies in a subdirectory because 938 # it helps to detect inapplicable dependency modes. For instance 939 # both Tru64's cc and ICC support -MD to output dependencies as a 940 # side effect of compilation, but ICC will put the dependencies in 941 # the current directory while Tru64 will put them in the object 942 # directory. 943 mkdir sub 944 945 am_cv_$1_dependencies_compiler_type=none 946 if test "$am_compiler_list" = ""; then 947 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 948 fi 949 am__universal=false 950 m4_case([$1], [CC], 951 [case " $depcc " in #( 952 *\ -arch\ *\ -arch\ *) am__universal=true ;; 953 esac], 954 [CXX], 955 [case " $depcc " in #( 956 *\ -arch\ *\ -arch\ *) am__universal=true ;; 957 esac]) 958 959 for depmode in $am_compiler_list; do 960 # Setup a source with many dependencies, because some compilers 961 # like to wrap large dependency lists on column 80 (with \), and 962 # we should not choose a depcomp mode which is confused by this. 963 # 964 # We need to recreate these files for each test, as the compiler may 965 # overwrite some of them when testing with obscure command lines. 966 # This happens at least with the AIX C compiler. 967 : > sub/conftest.c 968 for i in 1 2 3 4 5 6; do 969 echo '#include "conftst'$i'.h"' >> sub/conftest.c 970 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 971 # Solaris 10 /bin/sh. 972 echo '/* dummy */' > sub/conftst$i.h 973 done 974 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 975 976 # We check with '-c' and '-o' for the sake of the "dashmstdout" 977 # mode. It turns out that the SunPro C++ compiler does not properly 978 # handle '-M -o', and we need to detect this. Also, some Intel 979 # versions had trouble with output in subdirs. 980 am__obj=sub/conftest.${OBJEXT-o} 981 am__minus_obj="-o $am__obj" 982 case $depmode in 983 gcc) 984 # This depmode causes a compiler race in universal mode. 985 test "$am__universal" = false || continue 986 ;; 987 nosideeffect) 988 # After this tag, mechanisms are not by side-effect, so they'll 989 # only be used when explicitly requested. 990 if test "x$enable_dependency_tracking" = xyes; then 991 continue 992 else 993 break 994 fi 995 ;; 996 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 997 # This compiler won't grok '-c -o', but also, the minuso test has 998 # not run yet. These depmodes are late enough in the game, and 999 # so weak that their functioning should not be impacted. 1000 am__obj=conftest.${OBJEXT-o} 1001 am__minus_obj= 1002 ;; 1003 none) break ;; 1004 esac 1005 if depmode=$depmode \ 1006 source=sub/conftest.c object=$am__obj \ 1007 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1008 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1009 >/dev/null 2>conftest.err && 1010 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1011 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1012 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1013 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1014 # icc doesn't choke on unknown options, it will just issue warnings 1015 # or remarks (even with -Werror). So we grep stderr for any message 1016 # that says an option was ignored or not supported. 1017 # When given -MP, icc 7.0 and 7.1 complain thusly: 1018 # icc: Command line warning: ignoring option '-M'; no argument required 1019 # The diagnosis changed in icc 8.0: 1020 # icc: Command line remark: option '-MP' not supported 1021 if (grep 'ignoring option' conftest.err || 1022 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1023 am_cv_$1_dependencies_compiler_type=$depmode 1024 break 1025 fi 1026 fi 1027 done 1028 1029 cd .. 1030 rm -rf conftest.dir 1031else 1032 am_cv_$1_dependencies_compiler_type=none 1033fi 1034]) 1035AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1036AM_CONDITIONAL([am__fastdep$1], [ 1037 test "x$enable_dependency_tracking" != xno \ 1038 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1039]) 1040 1041 1042# AM_SET_DEPDIR 1043# ------------- 1044# Choose a directory name for dependency files. 1045# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1046AC_DEFUN([AM_SET_DEPDIR], 1047[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1048AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1049]) 1050 1051 1052# AM_DEP_TRACK 1053# ------------ 1054AC_DEFUN([AM_DEP_TRACK], 1055[AC_ARG_ENABLE([dependency-tracking], [dnl 1056AS_HELP_STRING( 1057 [--enable-dependency-tracking], 1058 [do not reject slow dependency extractors]) 1059AS_HELP_STRING( 1060 [--disable-dependency-tracking], 1061 [speeds up one-time build])]) 1062if test "x$enable_dependency_tracking" != xno; then 1063 am_depcomp="$ac_aux_dir/depcomp" 1064 AMDEPBACKSLASH='\' 1065 am__nodep='_no' 1066fi 1067AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1068AC_SUBST([AMDEPBACKSLASH])dnl 1069_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1070AC_SUBST([am__nodep])dnl 1071_AM_SUBST_NOTMAKE([am__nodep])dnl 1072]) 1073 1074# Generate code to set up dependency tracking. -*- Autoconf -*- 1075 1076# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1077# 1078# This file is free software; the Free Software Foundation 1079# gives unlimited permission to copy and/or distribute it, 1080# with or without modifications, as long as this notice is preserved. 1081 1082# _AM_OUTPUT_DEPENDENCY_COMMANDS 1083# ------------------------------ 1084AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1085[{ 1086 # Older Autoconf quotes --file arguments for eval, but not when files 1087 # are listed without --file. Let's play safe and only enable the eval 1088 # if we detect the quoting. 1089 # TODO: see whether this extra hack can be removed once we start 1090 # requiring Autoconf 2.70 or later. 1091 AS_CASE([$CONFIG_FILES], 1092 [*\'*], [eval set x "$CONFIG_FILES"], 1093 [*], [set x $CONFIG_FILES]) 1094 shift 1095 # Used to flag and report bootstrapping failures. 1096 am_rc=0 1097 for am_mf 1098 do 1099 # Strip MF so we end up with the name of the file. 1100 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 1101 # Check whether this is an Automake generated Makefile which includes 1102 # dependency-tracking related rules and includes. 1103 # Grep'ing the whole file directly is not great: AIX grep has a line 1104 # limit of 2048, but all sed's we know have understand at least 4000. 1105 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 1106 || continue 1107 am_dirpart=`AS_DIRNAME(["$am_mf"])` 1108 am_filepart=`AS_BASENAME(["$am_mf"])` 1109 AM_RUN_LOG([cd "$am_dirpart" \ 1110 && sed -e '/# am--include-marker/d' "$am_filepart" \ 1111 | $MAKE -f - am--depfiles]) || am_rc=$? 1112 done 1113 if test $am_rc -ne 0; then 1114 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 1115 for automatic dependency tracking. Try re-running configure with the 1116 '--disable-dependency-tracking' option to at least be able to build 1117 the package (albeit without support for automatic dependency tracking).]) 1118 fi 1119 AS_UNSET([am_dirpart]) 1120 AS_UNSET([am_filepart]) 1121 AS_UNSET([am_mf]) 1122 AS_UNSET([am_rc]) 1123 rm -f conftest-deps.mk 1124} 1125])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1126 1127 1128# AM_OUTPUT_DEPENDENCY_COMMANDS 1129# ----------------------------- 1130# This macro should only be invoked once -- use via AC_REQUIRE. 1131# 1132# This code is only required when automatic dependency tracking is enabled. 1133# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 1134# order to bootstrap the dependency handling code. 1135AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1136[AC_CONFIG_COMMANDS([depfiles], 1137 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1138 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 1139 1140# Do all the work for Automake. -*- Autoconf -*- 1141 1142# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1143# 1144# This file is free software; the Free Software Foundation 1145# gives unlimited permission to copy and/or distribute it, 1146# with or without modifications, as long as this notice is preserved. 1147 1148# This macro actually does too much. Some checks are only needed if 1149# your package does certain things. But this isn't really a big deal. 1150 1151dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1152m4_define([AC_PROG_CC], 1153m4_defn([AC_PROG_CC]) 1154[_AM_PROG_CC_C_O 1155]) 1156 1157# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1158# AM_INIT_AUTOMAKE([OPTIONS]) 1159# ----------------------------------------------- 1160# The call with PACKAGE and VERSION arguments is the old style 1161# call (pre autoconf-2.50), which is being phased out. PACKAGE 1162# and VERSION should now be passed to AC_INIT and removed from 1163# the call to AM_INIT_AUTOMAKE. 1164# We support both call styles for the transition. After 1165# the next Automake release, Autoconf can make the AC_INIT 1166# arguments mandatory, and then we can depend on a new Autoconf 1167# release and drop the old call support. 1168AC_DEFUN([AM_INIT_AUTOMAKE], 1169[AC_PREREQ([2.65])dnl 1170dnl Autoconf wants to disallow AM_ names. We explicitly allow 1171dnl the ones we care about. 1172m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1173AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1174AC_REQUIRE([AC_PROG_INSTALL])dnl 1175if test "`cd $srcdir && pwd`" != "`pwd`"; then 1176 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1177 # is not polluted with repeated "-I." 1178 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1179 # test to see if srcdir already configured 1180 if test -f $srcdir/config.status; then 1181 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1182 fi 1183fi 1184 1185# test whether we have cygpath 1186if test -z "$CYGPATH_W"; then 1187 if (cygpath --version) >/dev/null 2>/dev/null; then 1188 CYGPATH_W='cygpath -w' 1189 else 1190 CYGPATH_W=echo 1191 fi 1192fi 1193AC_SUBST([CYGPATH_W]) 1194 1195# Define the identity of the package. 1196dnl Distinguish between old-style and new-style calls. 1197m4_ifval([$2], 1198[AC_DIAGNOSE([obsolete], 1199 [$0: two- and three-arguments forms are deprecated.]) 1200m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1201 AC_SUBST([PACKAGE], [$1])dnl 1202 AC_SUBST([VERSION], [$2])], 1203[_AM_SET_OPTIONS([$1])dnl 1204dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1205m4_if( 1206 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1207 [ok:ok],, 1208 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1209 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1210 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1211 1212_AM_IF_OPTION([no-define],, 1213[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1214 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1215 1216# Some tools Automake needs. 1217AC_REQUIRE([AM_SANITY_CHECK])dnl 1218AC_REQUIRE([AC_ARG_PROGRAM])dnl 1219AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1220AM_MISSING_PROG([AUTOCONF], [autoconf]) 1221AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1222AM_MISSING_PROG([AUTOHEADER], [autoheader]) 1223AM_MISSING_PROG([MAKEINFO], [makeinfo]) 1224AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1225AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1226AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1227# For better backward compatibility. To be removed once Automake 1.9.x 1228# dies out for good. For more background, see: 1229# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1230# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1231AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1232# We need awk for the "check" target (and possibly the TAP driver). The 1233# system "awk" is bad on some platforms. 1234AC_REQUIRE([AC_PROG_AWK])dnl 1235AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1236AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1237_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1238 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1239 [_AM_PROG_TAR([v7])])]) 1240_AM_IF_OPTION([no-dependencies],, 1241[AC_PROVIDE_IFELSE([AC_PROG_CC], 1242 [_AM_DEPENDENCIES([CC])], 1243 [m4_define([AC_PROG_CC], 1244 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1245AC_PROVIDE_IFELSE([AC_PROG_CXX], 1246 [_AM_DEPENDENCIES([CXX])], 1247 [m4_define([AC_PROG_CXX], 1248 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1249AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1250 [_AM_DEPENDENCIES([OBJC])], 1251 [m4_define([AC_PROG_OBJC], 1252 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1253AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1254 [_AM_DEPENDENCIES([OBJCXX])], 1255 [m4_define([AC_PROG_OBJCXX], 1256 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1257]) 1258AC_REQUIRE([AM_SILENT_RULES])dnl 1259dnl The testsuite driver may need to know about EXEEXT, so add the 1260dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1261dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1262AC_CONFIG_COMMANDS_PRE(dnl 1263[m4_provide_if([_AM_COMPILER_EXEEXT], 1264 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1265 1266# POSIX will say in a future version that running "rm -f" with no argument 1267# is OK; and we want to be able to make that assumption in our Makefile 1268# recipes. So use an aggressive probe to check that the usage we want is 1269# actually supported "in the wild" to an acceptable degree. 1270# See automake bug#10828. 1271# To make any issue more visible, cause the running configure to be aborted 1272# by default if the 'rm' program in use doesn't match our expectations; the 1273# user can still override this though. 1274if rm -f && rm -fr && rm -rf; then : OK; else 1275 cat >&2 <<'END' 1276Oops! 1277 1278Your 'rm' program seems unable to run without file operands specified 1279on the command line, even when the '-f' option is present. This is contrary 1280to the behaviour of most rm programs out there, and not conforming with 1281the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1282 1283Please tell bug-automake@gnu.org about your system, including the value 1284of your $PATH and any error possibly output before this message. This 1285can help us improve future automake versions. 1286 1287END 1288 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1289 echo 'Configuration will proceed anyway, since you have set the' >&2 1290 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1291 echo >&2 1292 else 1293 cat >&2 <<'END' 1294Aborting the configuration process, to ensure you take notice of the issue. 1295 1296You can download and install GNU coreutils to get an 'rm' implementation 1297that behaves properly: <https://www.gnu.org/software/coreutils/>. 1298 1299If you want to complete the configuration process using your problematic 1300'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1301to "yes", and re-run configure. 1302 1303END 1304 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1305 fi 1306fi 1307dnl The trailing newline in this macro's definition is deliberate, for 1308dnl backward compatibility and to allow trailing 'dnl'-style comments 1309dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1310]) 1311 1312dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1313dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1314dnl mangled by Autoconf and run in a shell conditional statement. 1315m4_define([_AC_COMPILER_EXEEXT], 1316m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1317 1318# When config.status generates a header, we must update the stamp-h file. 1319# This file resides in the same directory as the config header 1320# that is generated. The stamp files are numbered to have different names. 1321 1322# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1323# loop where config.status creates the headers, so we can generate 1324# our stamp files there. 1325AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1326[# Compute $1's index in $config_headers. 1327_am_arg=$1 1328_am_stamp_count=1 1329for _am_header in $config_headers :; do 1330 case $_am_header in 1331 $_am_arg | $_am_arg:* ) 1332 break ;; 1333 * ) 1334 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1335 esac 1336done 1337echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1338 1339# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1340# 1341# This file is free software; the Free Software Foundation 1342# gives unlimited permission to copy and/or distribute it, 1343# with or without modifications, as long as this notice is preserved. 1344 1345# AM_PROG_INSTALL_SH 1346# ------------------ 1347# Define $install_sh. 1348AC_DEFUN([AM_PROG_INSTALL_SH], 1349[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1350if test x"${install_sh+set}" != xset; then 1351 case $am_aux_dir in 1352 *\ * | *\ *) 1353 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1354 *) 1355 install_sh="\${SHELL} $am_aux_dir/install-sh" 1356 esac 1357fi 1358AC_SUBST([install_sh])]) 1359 1360# Copyright (C) 2003-2018 Free Software Foundation, Inc. 1361# 1362# This file is free software; the Free Software Foundation 1363# gives unlimited permission to copy and/or distribute it, 1364# with or without modifications, as long as this notice is preserved. 1365 1366# Check whether the underlying file-system supports filenames 1367# with a leading dot. For instance MS-DOS doesn't. 1368AC_DEFUN([AM_SET_LEADING_DOT], 1369[rm -rf .tst 2>/dev/null 1370mkdir .tst 2>/dev/null 1371if test -d .tst; then 1372 am__leading_dot=. 1373else 1374 am__leading_dot=_ 1375fi 1376rmdir .tst 2>/dev/null 1377AC_SUBST([am__leading_dot])]) 1378 1379# Check to see how 'make' treats includes. -*- Autoconf -*- 1380 1381# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1382# 1383# This file is free software; the Free Software Foundation 1384# gives unlimited permission to copy and/or distribute it, 1385# with or without modifications, as long as this notice is preserved. 1386 1387# AM_MAKE_INCLUDE() 1388# ----------------- 1389# Check whether make has an 'include' directive that can support all 1390# the idioms we need for our automatic dependency tracking code. 1391AC_DEFUN([AM_MAKE_INCLUDE], 1392[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 1393cat > confinc.mk << 'END' 1394am__doit: 1395 @echo this is the am__doit target >confinc.out 1396.PHONY: am__doit 1397END 1398am__include="#" 1399am__quote= 1400# BSD make does it like this. 1401echo '.include "confinc.mk" # ignored' > confmf.BSD 1402# Other make implementations (GNU, Solaris 10, AIX) do it like this. 1403echo 'include confinc.mk # ignored' > confmf.GNU 1404_am_result=no 1405for s in GNU BSD; do 1406 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 1407 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 1408 ['0:this is the am__doit target'], 1409 [AS_CASE([$s], 1410 [BSD], [am__include='.include' am__quote='"'], 1411 [am__include='include' am__quote=''])]) 1412 if test "$am__include" != "#"; then 1413 _am_result="yes ($s style)" 1414 break 1415 fi 1416done 1417rm -f confinc.* confmf.* 1418AC_MSG_RESULT([${_am_result}]) 1419AC_SUBST([am__include])]) 1420AC_SUBST([am__quote])]) 1421 1422# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1423 1424# Copyright (C) 1997-2018 Free Software Foundation, Inc. 1425# 1426# This file is free software; the Free Software Foundation 1427# gives unlimited permission to copy and/or distribute it, 1428# with or without modifications, as long as this notice is preserved. 1429 1430# AM_MISSING_PROG(NAME, PROGRAM) 1431# ------------------------------ 1432AC_DEFUN([AM_MISSING_PROG], 1433[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1434$1=${$1-"${am_missing_run}$2"} 1435AC_SUBST($1)]) 1436 1437# AM_MISSING_HAS_RUN 1438# ------------------ 1439# Define MISSING if not defined so far and test if it is modern enough. 1440# If it is, set am_missing_run to use it, otherwise, to nothing. 1441AC_DEFUN([AM_MISSING_HAS_RUN], 1442[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1443AC_REQUIRE_AUX_FILE([missing])dnl 1444if test x"${MISSING+set}" != xset; then 1445 case $am_aux_dir in 1446 *\ * | *\ *) 1447 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1448 *) 1449 MISSING="\${SHELL} $am_aux_dir/missing" ;; 1450 esac 1451fi 1452# Use eval to expand $SHELL 1453if eval "$MISSING --is-lightweight"; then 1454 am_missing_run="$MISSING " 1455else 1456 am_missing_run= 1457 AC_MSG_WARN(['missing' script is too old or missing]) 1458fi 1459]) 1460 1461# Helper functions for option handling. -*- Autoconf -*- 1462 1463# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1464# 1465# This file is free software; the Free Software Foundation 1466# gives unlimited permission to copy and/or distribute it, 1467# with or without modifications, as long as this notice is preserved. 1468 1469# _AM_MANGLE_OPTION(NAME) 1470# ----------------------- 1471AC_DEFUN([_AM_MANGLE_OPTION], 1472[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1473 1474# _AM_SET_OPTION(NAME) 1475# -------------------- 1476# Set option NAME. Presently that only means defining a flag for this option. 1477AC_DEFUN([_AM_SET_OPTION], 1478[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1479 1480# _AM_SET_OPTIONS(OPTIONS) 1481# ------------------------ 1482# OPTIONS is a space-separated list of Automake options. 1483AC_DEFUN([_AM_SET_OPTIONS], 1484[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1485 1486# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1487# ------------------------------------------- 1488# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1489AC_DEFUN([_AM_IF_OPTION], 1490[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1491 1492# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1493# 1494# This file is free software; the Free Software Foundation 1495# gives unlimited permission to copy and/or distribute it, 1496# with or without modifications, as long as this notice is preserved. 1497 1498# _AM_PROG_CC_C_O 1499# --------------- 1500# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1501# to automatically call this. 1502AC_DEFUN([_AM_PROG_CC_C_O], 1503[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1504AC_REQUIRE_AUX_FILE([compile])dnl 1505AC_LANG_PUSH([C])dnl 1506AC_CACHE_CHECK( 1507 [whether $CC understands -c and -o together], 1508 [am_cv_prog_cc_c_o], 1509 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1510 # Make sure it works both with $CC and with simple cc. 1511 # Following AC_PROG_CC_C_O, we do the test twice because some 1512 # compilers refuse to overwrite an existing .o file with -o, 1513 # though they will create one. 1514 am_cv_prog_cc_c_o=yes 1515 for am_i in 1 2; do 1516 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1517 && test -f conftest2.$ac_objext; then 1518 : OK 1519 else 1520 am_cv_prog_cc_c_o=no 1521 break 1522 fi 1523 done 1524 rm -f core conftest* 1525 unset am_i]) 1526if test "$am_cv_prog_cc_c_o" != yes; then 1527 # Losing compiler, so override with the script. 1528 # FIXME: It is wrong to rewrite CC. 1529 # But if we don't then we get into trouble of one sort or another. 1530 # A longer-term fix would be to have automake use am__CC in this case, 1531 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1532 CC="$am_aux_dir/compile $CC" 1533fi 1534AC_LANG_POP([C])]) 1535 1536# For backward compatibility. 1537AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1538 1539# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1540# 1541# This file is free software; the Free Software Foundation 1542# gives unlimited permission to copy and/or distribute it, 1543# with or without modifications, as long as this notice is preserved. 1544 1545# AM_RUN_LOG(COMMAND) 1546# ------------------- 1547# Run COMMAND, save the exit status in ac_status, and log it. 1548# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1549AC_DEFUN([AM_RUN_LOG], 1550[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1551 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1552 ac_status=$? 1553 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1554 (exit $ac_status); }]) 1555 1556# Check to make sure that the build environment is sane. -*- Autoconf -*- 1557 1558# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1559# 1560# This file is free software; the Free Software Foundation 1561# gives unlimited permission to copy and/or distribute it, 1562# with or without modifications, as long as this notice is preserved. 1563 1564# AM_SANITY_CHECK 1565# --------------- 1566AC_DEFUN([AM_SANITY_CHECK], 1567[AC_MSG_CHECKING([whether build environment is sane]) 1568# Reject unsafe characters in $srcdir or the absolute working directory 1569# name. Accept space and tab only in the latter. 1570am_lf=' 1571' 1572case `pwd` in 1573 *[[\\\"\#\$\&\'\`$am_lf]]*) 1574 AC_MSG_ERROR([unsafe absolute working directory name]);; 1575esac 1576case $srcdir in 1577 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1578 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1579esac 1580 1581# Do 'set' in a subshell so we don't clobber the current shell's 1582# arguments. Must try -L first in case configure is actually a 1583# symlink; some systems play weird games with the mod time of symlinks 1584# (eg FreeBSD returns the mod time of the symlink's containing 1585# directory). 1586if ( 1587 am_has_slept=no 1588 for am_try in 1 2; do 1589 echo "timestamp, slept: $am_has_slept" > conftest.file 1590 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1591 if test "$[*]" = "X"; then 1592 # -L didn't work. 1593 set X `ls -t "$srcdir/configure" conftest.file` 1594 fi 1595 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1596 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1597 1598 # If neither matched, then we have a broken ls. This can happen 1599 # if, for instance, CONFIG_SHELL is bash and it inherits a 1600 # broken ls alias from the environment. This has actually 1601 # happened. Such a system could not be considered "sane". 1602 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1603 alias in your environment]) 1604 fi 1605 if test "$[2]" = conftest.file || test $am_try -eq 2; then 1606 break 1607 fi 1608 # Just in case. 1609 sleep 1 1610 am_has_slept=yes 1611 done 1612 test "$[2]" = conftest.file 1613 ) 1614then 1615 # Ok. 1616 : 1617else 1618 AC_MSG_ERROR([newly created file is older than distributed files! 1619Check your system clock]) 1620fi 1621AC_MSG_RESULT([yes]) 1622# If we didn't sleep, we still need to ensure time stamps of config.status and 1623# generated files are strictly newer. 1624am_sleep_pid= 1625if grep 'slept: no' conftest.file >/dev/null 2>&1; then 1626 ( sleep 1 ) & 1627 am_sleep_pid=$! 1628fi 1629AC_CONFIG_COMMANDS_PRE( 1630 [AC_MSG_CHECKING([that generated files are newer than configure]) 1631 if test -n "$am_sleep_pid"; then 1632 # Hide warnings about reused PIDs. 1633 wait $am_sleep_pid 2>/dev/null 1634 fi 1635 AC_MSG_RESULT([done])]) 1636rm -f conftest.file 1637]) 1638 1639# Copyright (C) 2009-2018 Free Software Foundation, Inc. 1640# 1641# This file is free software; the Free Software Foundation 1642# gives unlimited permission to copy and/or distribute it, 1643# with or without modifications, as long as this notice is preserved. 1644 1645# AM_SILENT_RULES([DEFAULT]) 1646# -------------------------- 1647# Enable less verbose build rules; with the default set to DEFAULT 1648# ("yes" being less verbose, "no" or empty being verbose). 1649AC_DEFUN([AM_SILENT_RULES], 1650[AC_ARG_ENABLE([silent-rules], [dnl 1651AS_HELP_STRING( 1652 [--enable-silent-rules], 1653 [less verbose build output (undo: "make V=1")]) 1654AS_HELP_STRING( 1655 [--disable-silent-rules], 1656 [verbose build output (undo: "make V=0")])dnl 1657]) 1658case $enable_silent_rules in @%:@ ((( 1659 yes) AM_DEFAULT_VERBOSITY=0;; 1660 no) AM_DEFAULT_VERBOSITY=1;; 1661 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1662esac 1663dnl 1664dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1665dnl do not support nested variable expansions. 1666dnl See automake bug#9928 and bug#10237. 1667am_make=${MAKE-make} 1668AC_CACHE_CHECK([whether $am_make supports nested variables], 1669 [am_cv_make_support_nested_variables], 1670 [if AS_ECHO([['TRUE=$(BAR$(V)) 1671BAR0=false 1672BAR1=true 1673V=1 1674am__doit: 1675 @$(TRUE) 1676.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1677 am_cv_make_support_nested_variables=yes 1678else 1679 am_cv_make_support_nested_variables=no 1680fi]) 1681if test $am_cv_make_support_nested_variables = yes; then 1682 dnl Using '$V' instead of '$(V)' breaks IRIX make. 1683 AM_V='$(V)' 1684 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1685else 1686 AM_V=$AM_DEFAULT_VERBOSITY 1687 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1688fi 1689AC_SUBST([AM_V])dnl 1690AM_SUBST_NOTMAKE([AM_V])dnl 1691AC_SUBST([AM_DEFAULT_V])dnl 1692AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1693AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1694AM_BACKSLASH='\' 1695AC_SUBST([AM_BACKSLASH])dnl 1696_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1697]) 1698 1699# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1700# 1701# This file is free software; the Free Software Foundation 1702# gives unlimited permission to copy and/or distribute it, 1703# with or without modifications, as long as this notice is preserved. 1704 1705# AM_PROG_INSTALL_STRIP 1706# --------------------- 1707# One issue with vendor 'install' (even GNU) is that you can't 1708# specify the program used to strip binaries. This is especially 1709# annoying in cross-compiling environments, where the build's strip 1710# is unlikely to handle the host's binaries. 1711# Fortunately install-sh will honor a STRIPPROG variable, so we 1712# always use install-sh in "make install-strip", and initialize 1713# STRIPPROG with the value of the STRIP variable (set by the user). 1714AC_DEFUN([AM_PROG_INSTALL_STRIP], 1715[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1716# Installed binaries are usually stripped using 'strip' when the user 1717# run "make install-strip". However 'strip' might not be the right 1718# tool to use in cross-compilation environments, therefore Automake 1719# will honor the 'STRIP' environment variable to overrule this program. 1720dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1721if test "$cross_compiling" != no; then 1722 AC_CHECK_TOOL([STRIP], [strip], :) 1723fi 1724INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1725AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1726 1727# Copyright (C) 2006-2018 Free Software Foundation, Inc. 1728# 1729# This file is free software; the Free Software Foundation 1730# gives unlimited permission to copy and/or distribute it, 1731# with or without modifications, as long as this notice is preserved. 1732 1733# _AM_SUBST_NOTMAKE(VARIABLE) 1734# --------------------------- 1735# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1736# This macro is traced by Automake. 1737AC_DEFUN([_AM_SUBST_NOTMAKE]) 1738 1739# AM_SUBST_NOTMAKE(VARIABLE) 1740# -------------------------- 1741# Public sister of _AM_SUBST_NOTMAKE. 1742AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1743 1744# Check how to create a tarball. -*- Autoconf -*- 1745 1746# Copyright (C) 2004-2018 Free Software Foundation, Inc. 1747# 1748# This file is free software; the Free Software Foundation 1749# gives unlimited permission to copy and/or distribute it, 1750# with or without modifications, as long as this notice is preserved. 1751 1752# _AM_PROG_TAR(FORMAT) 1753# -------------------- 1754# Check how to create a tarball in format FORMAT. 1755# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1756# 1757# Substitute a variable $(am__tar) that is a command 1758# writing to stdout a FORMAT-tarball containing the directory 1759# $tardir. 1760# tardir=directory && $(am__tar) > result.tar 1761# 1762# Substitute a variable $(am__untar) that extract such 1763# a tarball read from stdin. 1764# $(am__untar) < result.tar 1765# 1766AC_DEFUN([_AM_PROG_TAR], 1767[# Always define AMTAR for backward compatibility. Yes, it's still used 1768# in the wild :-( We should find a proper way to deprecate it ... 1769AC_SUBST([AMTAR], ['$${TAR-tar}']) 1770 1771# We'll loop over all known methods to create a tar archive until one works. 1772_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1773 1774m4_if([$1], [v7], 1775 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1776 1777 [m4_case([$1], 1778 [ustar], 1779 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1780 # There is notably a 21 bits limit for the UID and the GID. In fact, 1781 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1782 # and bug#13588). 1783 am_max_uid=2097151 # 2^21 - 1 1784 am_max_gid=$am_max_uid 1785 # The $UID and $GID variables are not portable, so we need to resort 1786 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1787 # below are definitely unexpected, so allow the users to see them 1788 # (that is, avoid stderr redirection). 1789 am_uid=`id -u || echo unknown` 1790 am_gid=`id -g || echo unknown` 1791 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1792 if test $am_uid -le $am_max_uid; then 1793 AC_MSG_RESULT([yes]) 1794 else 1795 AC_MSG_RESULT([no]) 1796 _am_tools=none 1797 fi 1798 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1799 if test $am_gid -le $am_max_gid; then 1800 AC_MSG_RESULT([yes]) 1801 else 1802 AC_MSG_RESULT([no]) 1803 _am_tools=none 1804 fi], 1805 1806 [pax], 1807 [], 1808 1809 [m4_fatal([Unknown tar format])]) 1810 1811 AC_MSG_CHECKING([how to create a $1 tar archive]) 1812 1813 # Go ahead even if we have the value already cached. We do so because we 1814 # need to set the values for the 'am__tar' and 'am__untar' variables. 1815 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1816 1817 for _am_tool in $_am_tools; do 1818 case $_am_tool in 1819 gnutar) 1820 for _am_tar in tar gnutar gtar; do 1821 AM_RUN_LOG([$_am_tar --version]) && break 1822 done 1823 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1824 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1825 am__untar="$_am_tar -xf -" 1826 ;; 1827 plaintar) 1828 # Must skip GNU tar: if it does not support --format= it doesn't create 1829 # ustar tarball either. 1830 (tar --version) >/dev/null 2>&1 && continue 1831 am__tar='tar chf - "$$tardir"' 1832 am__tar_='tar chf - "$tardir"' 1833 am__untar='tar xf -' 1834 ;; 1835 pax) 1836 am__tar='pax -L -x $1 -w "$$tardir"' 1837 am__tar_='pax -L -x $1 -w "$tardir"' 1838 am__untar='pax -r' 1839 ;; 1840 cpio) 1841 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1842 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1843 am__untar='cpio -i -H $1 -d' 1844 ;; 1845 none) 1846 am__tar=false 1847 am__tar_=false 1848 am__untar=false 1849 ;; 1850 esac 1851 1852 # If the value was cached, stop now. We just wanted to have am__tar 1853 # and am__untar set. 1854 test -n "${am_cv_prog_tar_$1}" && break 1855 1856 # tar/untar a dummy directory, and stop if the command works. 1857 rm -rf conftest.dir 1858 mkdir conftest.dir 1859 echo GrepMe > conftest.dir/file 1860 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1861 rm -rf conftest.dir 1862 if test -s conftest.tar; then 1863 AM_RUN_LOG([$am__untar <conftest.tar]) 1864 AM_RUN_LOG([cat conftest.dir/file]) 1865 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1866 fi 1867 done 1868 rm -rf conftest.dir 1869 1870 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1871 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1872 1873AC_SUBST([am__tar]) 1874AC_SUBST([am__untar]) 1875]) # _AM_PROG_TAR 1876 1877