1# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 2 3# Copyright (C) 1996-2013 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 SDL 24# Sam Lantinga 9/21/99 25# stolen from Manish Singh 26# stolen back from Frank Belew 27# stolen from Manish Singh 28# Shamelessly stolen from Owen Taylor 29 30# serial 1 31 32dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 33dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS 34dnl 35AC_DEFUN([AM_PATH_SDL], 36[dnl 37dnl Get the cflags and libraries from the sdl-config script 38dnl 39AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], 40 sdl_prefix="$withval", sdl_prefix="") 41AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], 42 sdl_exec_prefix="$withval", sdl_exec_prefix="") 43AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], 44 , enable_sdltest=yes) 45 46 if test x$sdl_exec_prefix != x ; then 47 sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" 48 if test x${SDL_CONFIG+set} != xset ; then 49 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config 50 fi 51 fi 52 if test x$sdl_prefix != x ; then 53 sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" 54 if test x${SDL_CONFIG+set} != xset ; then 55 SDL_CONFIG=$sdl_prefix/bin/sdl-config 56 fi 57 fi 58 59 as_save_PATH="$PATH" 60 if test "x$prefix" != xNONE; then 61 PATH="$prefix/bin:$prefix/usr/bin:$PATH" 62 fi 63 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) 64 PATH="$as_save_PATH" 65 min_sdl_version=ifelse([$1], ,0.11.0,$1) 66 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) 67 no_sdl="" 68 if test "$SDL_CONFIG" = "no" ; then 69 no_sdl=yes 70 else 71 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` 72 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` 73 74 sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ 75 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 76 sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ 77 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 78 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ 79 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 80 if test "x$enable_sdltest" = "xyes" ; then 81 ac_save_CFLAGS="$CFLAGS" 82 ac_save_CXXFLAGS="$CXXFLAGS" 83 ac_save_LIBS="$LIBS" 84 CFLAGS="$CFLAGS $SDL_CFLAGS" 85 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 86 LIBS="$LIBS $SDL_LIBS" 87dnl 88dnl Now check if the installed SDL is sufficiently new. (Also sanity 89dnl checks the results of sdl-config to some extent 90dnl 91 rm -f conf.sdltest 92 AC_TRY_RUN([ 93#include <stdio.h> 94#include <stdlib.h> 95#include <string.h> 96#include "SDL.h" 97 98char* 99my_strdup (char *str) 100{ 101 char *new_str; 102 103 if (str) 104 { 105 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); 106 strcpy (new_str, str); 107 } 108 else 109 new_str = NULL; 110 111 return new_str; 112} 113 114int main (int argc, char *argv[]) 115{ 116 int major, minor, micro; 117 char *tmp_version; 118 119 /* This hangs on some systems (?) 120 system ("touch conf.sdltest"); 121 */ 122 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } 123 124 /* HP/UX 9 (%@#!) writes to sscanf strings */ 125 tmp_version = my_strdup("$min_sdl_version"); 126 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 127 printf("%s, bad version string\n", "$min_sdl_version"); 128 exit(1); 129 } 130 131 if (($sdl_major_version > major) || 132 (($sdl_major_version == major) && ($sdl_minor_version > minor)) || 133 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) 134 { 135 return 0; 136 } 137 else 138 { 139 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); 140 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); 141 printf("*** best to upgrade to the required version.\n"); 142 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); 143 printf("*** to point to the correct copy of sdl-config, and remove the file\n"); 144 printf("*** config.cache before re-running configure\n"); 145 return 1; 146 } 147} 148 149],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 150 CFLAGS="$ac_save_CFLAGS" 151 CXXFLAGS="$ac_save_CXXFLAGS" 152 LIBS="$ac_save_LIBS" 153 fi 154 fi 155 if test "x$no_sdl" = x ; then 156 AC_MSG_RESULT(yes) 157 ifelse([$2], , :, [$2]) 158 else 159 AC_MSG_RESULT(no) 160 if test "$SDL_CONFIG" = "no" ; then 161 echo "*** The sdl-config script installed by SDL could not be found" 162 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" 163 echo "*** your path, or set the SDL_CONFIG environment variable to the" 164 echo "*** full path to sdl-config." 165 else 166 if test -f conf.sdltest ; then 167 : 168 else 169 echo "*** Could not run SDL test program, checking why..." 170 CFLAGS="$CFLAGS $SDL_CFLAGS" 171 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 172 LIBS="$LIBS $SDL_LIBS" 173 AC_TRY_LINK([ 174#include <stdio.h> 175#include "SDL.h" 176 177int main(int argc, char *argv[]) 178{ return 0; } 179#undef main 180#define main K_and_R_C_main 181], [ return 0; ], 182 [ echo "*** The test program compiled, but did not run. This usually means" 183 echo "*** that the run-time linker is not finding SDL or finding the wrong" 184 echo "*** version of SDL. If it is not finding SDL, you'll need to set your" 185 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 186 echo "*** to the installed location Also, make sure you have run ldconfig if that" 187 echo "*** is required on your system" 188 echo "***" 189 echo "*** If you have an old version installed, it is best to remove it, although" 190 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], 191 [ echo "*** The test program failed to compile or link. See the file config.log for the" 192 echo "*** exact error that occured. This usually means SDL was incorrectly installed" 193 echo "*** or that you have moved SDL since it was installed. In the latter case, you" 194 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) 195 CFLAGS="$ac_save_CFLAGS" 196 CXXFLAGS="$ac_save_CXXFLAGS" 197 LIBS="$ac_save_LIBS" 198 fi 199 fi 200 SDL_CFLAGS="" 201 SDL_LIBS="" 202 ifelse([$3], , :, [$3]) 203 fi 204 AC_SUBST(SDL_CFLAGS) 205 AC_SUBST(SDL_LIBS) 206 rm -f conf.sdltest 207]) 208 209# Copyright (C) 2002-2013 Free Software Foundation, Inc. 210# 211# This file is free software; the Free Software Foundation 212# gives unlimited permission to copy and/or distribute it, 213# with or without modifications, as long as this notice is preserved. 214 215# AM_AUTOMAKE_VERSION(VERSION) 216# ---------------------------- 217# Automake X.Y traces this macro to ensure aclocal.m4 has been 218# generated from the m4 files accompanying Automake X.Y. 219# (This private macro should not be called outside this file.) 220AC_DEFUN([AM_AUTOMAKE_VERSION], 221[am__api_version='1.14' 222dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 223dnl require some minimum version. Point them to the right macro. 224m4_if([$1], [1.14.1], [], 225 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 226]) 227 228# _AM_AUTOCONF_VERSION(VERSION) 229# ----------------------------- 230# aclocal traces this macro to find the Autoconf version. 231# This is a private macro too. Using m4_define simplifies 232# the logic in aclocal, which can simply ignore this definition. 233m4_define([_AM_AUTOCONF_VERSION], []) 234 235# AM_SET_CURRENT_AUTOMAKE_VERSION 236# ------------------------------- 237# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 238# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 239AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 240[AM_AUTOMAKE_VERSION([1.14.1])dnl 241m4_ifndef([AC_AUTOCONF_VERSION], 242 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 243_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 244 245# Copyright (C) 2011-2013 Free Software Foundation, Inc. 246# 247# This file is free software; the Free Software Foundation 248# gives unlimited permission to copy and/or distribute it, 249# with or without modifications, as long as this notice is preserved. 250 251# AM_PROG_AR([ACT-IF-FAIL]) 252# ------------------------- 253# Try to determine the archiver interface, and trigger the ar-lib wrapper 254# if it is needed. If the detection of archiver interface fails, run 255# ACT-IF-FAIL (default is to abort configure with a proper error message). 256AC_DEFUN([AM_PROG_AR], 257[AC_BEFORE([$0], [LT_INIT])dnl 258AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl 259AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 260AC_REQUIRE_AUX_FILE([ar-lib])dnl 261AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) 262: ${AR=ar} 263 264AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], 265 [AC_LANG_PUSH([C]) 266 am_cv_ar_interface=ar 267 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], 268 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 269 AC_TRY_EVAL([am_ar_try]) 270 if test "$ac_status" -eq 0; then 271 am_cv_ar_interface=ar 272 else 273 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 274 AC_TRY_EVAL([am_ar_try]) 275 if test "$ac_status" -eq 0; then 276 am_cv_ar_interface=lib 277 else 278 am_cv_ar_interface=unknown 279 fi 280 fi 281 rm -f conftest.lib libconftest.a 282 ]) 283 AC_LANG_POP([C])]) 284 285case $am_cv_ar_interface in 286ar) 287 ;; 288lib) 289 # Microsoft lib, so override with the ar-lib wrapper script. 290 # FIXME: It is wrong to rewrite AR. 291 # But if we don't then we get into trouble of one sort or another. 292 # A longer-term fix would be to have automake use am__AR in this case, 293 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something 294 # similar. 295 AR="$am_aux_dir/ar-lib $AR" 296 ;; 297unknown) 298 m4_default([$1], 299 [AC_MSG_ERROR([could not determine $AR interface])]) 300 ;; 301esac 302AC_SUBST([AR])dnl 303]) 304 305# AM_AUX_DIR_EXPAND -*- Autoconf -*- 306 307# Copyright (C) 2001-2013 Free Software Foundation, Inc. 308# 309# This file is free software; the Free Software Foundation 310# gives unlimited permission to copy and/or distribute it, 311# with or without modifications, as long as this notice is preserved. 312 313# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 314# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 315# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 316# 317# Of course, Automake must honor this variable whenever it calls a 318# tool from the auxiliary directory. The problem is that $srcdir (and 319# therefore $ac_aux_dir as well) can be either absolute or relative, 320# depending on how configure is run. This is pretty annoying, since 321# it makes $ac_aux_dir quite unusable in subdirectories: in the top 322# source directory, any form will work fine, but in subdirectories a 323# relative path needs to be adjusted first. 324# 325# $ac_aux_dir/missing 326# fails when called from a subdirectory if $ac_aux_dir is relative 327# $top_srcdir/$ac_aux_dir/missing 328# fails if $ac_aux_dir is absolute, 329# fails when called from a subdirectory in a VPATH build with 330# a relative $ac_aux_dir 331# 332# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 333# are both prefixed by $srcdir. In an in-source build this is usually 334# harmless because $srcdir is '.', but things will broke when you 335# start a VPATH build or use an absolute $srcdir. 336# 337# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 338# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 339# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 340# and then we would define $MISSING as 341# MISSING="\${SHELL} $am_aux_dir/missing" 342# This will work as long as MISSING is not called from configure, because 343# unfortunately $(top_srcdir) has no meaning in configure. 344# However there are other variables, like CC, which are often used in 345# configure, and could therefore not use this "fixed" $ac_aux_dir. 346# 347# Another solution, used here, is to always expand $ac_aux_dir to an 348# absolute PATH. The drawback is that using absolute paths prevent a 349# configured tree to be moved without reconfiguration. 350 351AC_DEFUN([AM_AUX_DIR_EXPAND], 352[dnl Rely on autoconf to set up CDPATH properly. 353AC_PREREQ([2.50])dnl 354# expand $ac_aux_dir to an absolute path 355am_aux_dir=`cd $ac_aux_dir && pwd` 356]) 357 358# AM_CONDITIONAL -*- Autoconf -*- 359 360# Copyright (C) 1997-2013 Free Software Foundation, Inc. 361# 362# This file is free software; the Free Software Foundation 363# gives unlimited permission to copy and/or distribute it, 364# with or without modifications, as long as this notice is preserved. 365 366# AM_CONDITIONAL(NAME, SHELL-CONDITION) 367# ------------------------------------- 368# Define a conditional. 369AC_DEFUN([AM_CONDITIONAL], 370[AC_PREREQ([2.52])dnl 371 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 372 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 373AC_SUBST([$1_TRUE])dnl 374AC_SUBST([$1_FALSE])dnl 375_AM_SUBST_NOTMAKE([$1_TRUE])dnl 376_AM_SUBST_NOTMAKE([$1_FALSE])dnl 377m4_define([_AM_COND_VALUE_$1], [$2])dnl 378if $2; then 379 $1_TRUE= 380 $1_FALSE='#' 381else 382 $1_TRUE='#' 383 $1_FALSE= 384fi 385AC_CONFIG_COMMANDS_PRE( 386[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 387 AC_MSG_ERROR([[conditional "$1" was never defined. 388Usually this means the macro was only invoked conditionally.]]) 389fi])]) 390 391# Copyright (C) 1999-2013 Free Software Foundation, Inc. 392# 393# This file is free software; the Free Software Foundation 394# gives unlimited permission to copy and/or distribute it, 395# with or without modifications, as long as this notice is preserved. 396 397 398# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 399# written in clear, in which case automake, when reading aclocal.m4, 400# will think it sees a *use*, and therefore will trigger all it's 401# C support machinery. Also note that it means that autoscan, seeing 402# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 403 404 405# _AM_DEPENDENCIES(NAME) 406# ---------------------- 407# See how the compiler implements dependency checking. 408# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 409# We try a few techniques and use that to set a single cache variable. 410# 411# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 412# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 413# dependency, and given that the user is not expected to run this macro, 414# just rely on AC_PROG_CC. 415AC_DEFUN([_AM_DEPENDENCIES], 416[AC_REQUIRE([AM_SET_DEPDIR])dnl 417AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 418AC_REQUIRE([AM_MAKE_INCLUDE])dnl 419AC_REQUIRE([AM_DEP_TRACK])dnl 420 421m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 422 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 423 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 424 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 425 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 426 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 427 [depcc="$$1" am_compiler_list=]) 428 429AC_CACHE_CHECK([dependency style of $depcc], 430 [am_cv_$1_dependencies_compiler_type], 431[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 432 # We make a subdir and do the tests there. Otherwise we can end up 433 # making bogus files that we don't know about and never remove. For 434 # instance it was reported that on HP-UX the gcc test will end up 435 # making a dummy file named 'D' -- because '-MD' means "put the output 436 # in D". 437 rm -rf conftest.dir 438 mkdir conftest.dir 439 # Copy depcomp to subdir because otherwise we won't find it if we're 440 # using a relative directory. 441 cp "$am_depcomp" conftest.dir 442 cd conftest.dir 443 # We will build objects and dependencies in a subdirectory because 444 # it helps to detect inapplicable dependency modes. For instance 445 # both Tru64's cc and ICC support -MD to output dependencies as a 446 # side effect of compilation, but ICC will put the dependencies in 447 # the current directory while Tru64 will put them in the object 448 # directory. 449 mkdir sub 450 451 am_cv_$1_dependencies_compiler_type=none 452 if test "$am_compiler_list" = ""; then 453 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 454 fi 455 am__universal=false 456 m4_case([$1], [CC], 457 [case " $depcc " in #( 458 *\ -arch\ *\ -arch\ *) am__universal=true ;; 459 esac], 460 [CXX], 461 [case " $depcc " in #( 462 *\ -arch\ *\ -arch\ *) am__universal=true ;; 463 esac]) 464 465 for depmode in $am_compiler_list; do 466 # Setup a source with many dependencies, because some compilers 467 # like to wrap large dependency lists on column 80 (with \), and 468 # we should not choose a depcomp mode which is confused by this. 469 # 470 # We need to recreate these files for each test, as the compiler may 471 # overwrite some of them when testing with obscure command lines. 472 # This happens at least with the AIX C compiler. 473 : > sub/conftest.c 474 for i in 1 2 3 4 5 6; do 475 echo '#include "conftst'$i'.h"' >> sub/conftest.c 476 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 477 # Solaris 10 /bin/sh. 478 echo '/* dummy */' > sub/conftst$i.h 479 done 480 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 481 482 # We check with '-c' and '-o' for the sake of the "dashmstdout" 483 # mode. It turns out that the SunPro C++ compiler does not properly 484 # handle '-M -o', and we need to detect this. Also, some Intel 485 # versions had trouble with output in subdirs. 486 am__obj=sub/conftest.${OBJEXT-o} 487 am__minus_obj="-o $am__obj" 488 case $depmode in 489 gcc) 490 # This depmode causes a compiler race in universal mode. 491 test "$am__universal" = false || continue 492 ;; 493 nosideeffect) 494 # After this tag, mechanisms are not by side-effect, so they'll 495 # only be used when explicitly requested. 496 if test "x$enable_dependency_tracking" = xyes; then 497 continue 498 else 499 break 500 fi 501 ;; 502 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 503 # This compiler won't grok '-c -o', but also, the minuso test has 504 # not run yet. These depmodes are late enough in the game, and 505 # so weak that their functioning should not be impacted. 506 am__obj=conftest.${OBJEXT-o} 507 am__minus_obj= 508 ;; 509 none) break ;; 510 esac 511 if depmode=$depmode \ 512 source=sub/conftest.c object=$am__obj \ 513 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 514 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 515 >/dev/null 2>conftest.err && 516 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 517 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 518 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 519 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 520 # icc doesn't choke on unknown options, it will just issue warnings 521 # or remarks (even with -Werror). So we grep stderr for any message 522 # that says an option was ignored or not supported. 523 # When given -MP, icc 7.0 and 7.1 complain thusly: 524 # icc: Command line warning: ignoring option '-M'; no argument required 525 # The diagnosis changed in icc 8.0: 526 # icc: Command line remark: option '-MP' not supported 527 if (grep 'ignoring option' conftest.err || 528 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 529 am_cv_$1_dependencies_compiler_type=$depmode 530 break 531 fi 532 fi 533 done 534 535 cd .. 536 rm -rf conftest.dir 537else 538 am_cv_$1_dependencies_compiler_type=none 539fi 540]) 541AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 542AM_CONDITIONAL([am__fastdep$1], [ 543 test "x$enable_dependency_tracking" != xno \ 544 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 545]) 546 547 548# AM_SET_DEPDIR 549# ------------- 550# Choose a directory name for dependency files. 551# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 552AC_DEFUN([AM_SET_DEPDIR], 553[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 554AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 555]) 556 557 558# AM_DEP_TRACK 559# ------------ 560AC_DEFUN([AM_DEP_TRACK], 561[AC_ARG_ENABLE([dependency-tracking], [dnl 562AS_HELP_STRING( 563 [--enable-dependency-tracking], 564 [do not reject slow dependency extractors]) 565AS_HELP_STRING( 566 [--disable-dependency-tracking], 567 [speeds up one-time build])]) 568if test "x$enable_dependency_tracking" != xno; then 569 am_depcomp="$ac_aux_dir/depcomp" 570 AMDEPBACKSLASH='\' 571 am__nodep='_no' 572fi 573AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 574AC_SUBST([AMDEPBACKSLASH])dnl 575_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 576AC_SUBST([am__nodep])dnl 577_AM_SUBST_NOTMAKE([am__nodep])dnl 578]) 579 580# Generate code to set up dependency tracking. -*- Autoconf -*- 581 582# Copyright (C) 1999-2013 Free Software Foundation, Inc. 583# 584# This file is free software; the Free Software Foundation 585# gives unlimited permission to copy and/or distribute it, 586# with or without modifications, as long as this notice is preserved. 587 588 589# _AM_OUTPUT_DEPENDENCY_COMMANDS 590# ------------------------------ 591AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 592[{ 593 # Older Autoconf quotes --file arguments for eval, but not when files 594 # are listed without --file. Let's play safe and only enable the eval 595 # if we detect the quoting. 596 case $CONFIG_FILES in 597 *\'*) eval set x "$CONFIG_FILES" ;; 598 *) set x $CONFIG_FILES ;; 599 esac 600 shift 601 for mf 602 do 603 # Strip MF so we end up with the name of the file. 604 mf=`echo "$mf" | sed -e 's/:.*$//'` 605 # Check whether this is an Automake generated Makefile or not. 606 # We used to match only the files named 'Makefile.in', but 607 # some people rename them; so instead we look at the file content. 608 # Grep'ing the first line is not enough: some people post-process 609 # each Makefile.in and add a new line on top of each file to say so. 610 # Grep'ing the whole file is not good either: AIX grep has a line 611 # limit of 2048, but all sed's we know have understand at least 4000. 612 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 613 dirpart=`AS_DIRNAME("$mf")` 614 else 615 continue 616 fi 617 # Extract the definition of DEPDIR, am__include, and am__quote 618 # from the Makefile without running 'make'. 619 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 620 test -z "$DEPDIR" && continue 621 am__include=`sed -n 's/^am__include = //p' < "$mf"` 622 test -z "$am__include" && continue 623 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 624 # Find all dependency output files, they are included files with 625 # $(DEPDIR) in their names. We invoke sed twice because it is the 626 # simplest approach to changing $(DEPDIR) to its actual value in the 627 # expansion. 628 for file in `sed -n " 629 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 630 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 631 # Make sure the directory exists. 632 test -f "$dirpart/$file" && continue 633 fdir=`AS_DIRNAME(["$file"])` 634 AS_MKDIR_P([$dirpart/$fdir]) 635 # echo "creating $dirpart/$file" 636 echo '# dummy' > "$dirpart/$file" 637 done 638 done 639} 640])# _AM_OUTPUT_DEPENDENCY_COMMANDS 641 642 643# AM_OUTPUT_DEPENDENCY_COMMANDS 644# ----------------------------- 645# This macro should only be invoked once -- use via AC_REQUIRE. 646# 647# This code is only required when automatic dependency tracking 648# is enabled. FIXME. This creates each '.P' file that we will 649# need in order to bootstrap the dependency handling code. 650AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 651[AC_CONFIG_COMMANDS([depfiles], 652 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 653 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 654]) 655 656# Do all the work for Automake. -*- Autoconf -*- 657 658# Copyright (C) 1996-2013 Free Software Foundation, Inc. 659# 660# This file is free software; the Free Software Foundation 661# gives unlimited permission to copy and/or distribute it, 662# with or without modifications, as long as this notice is preserved. 663 664# This macro actually does too much. Some checks are only needed if 665# your package does certain things. But this isn't really a big deal. 666 667dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 668m4_define([AC_PROG_CC], 669m4_defn([AC_PROG_CC]) 670[_AM_PROG_CC_C_O 671]) 672 673# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 674# AM_INIT_AUTOMAKE([OPTIONS]) 675# ----------------------------------------------- 676# The call with PACKAGE and VERSION arguments is the old style 677# call (pre autoconf-2.50), which is being phased out. PACKAGE 678# and VERSION should now be passed to AC_INIT and removed from 679# the call to AM_INIT_AUTOMAKE. 680# We support both call styles for the transition. After 681# the next Automake release, Autoconf can make the AC_INIT 682# arguments mandatory, and then we can depend on a new Autoconf 683# release and drop the old call support. 684AC_DEFUN([AM_INIT_AUTOMAKE], 685[AC_PREREQ([2.65])dnl 686dnl Autoconf wants to disallow AM_ names. We explicitly allow 687dnl the ones we care about. 688m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 689AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 690AC_REQUIRE([AC_PROG_INSTALL])dnl 691if test "`cd $srcdir && pwd`" != "`pwd`"; then 692 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 693 # is not polluted with repeated "-I." 694 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 695 # test to see if srcdir already configured 696 if test -f $srcdir/config.status; then 697 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 698 fi 699fi 700 701# test whether we have cygpath 702if test -z "$CYGPATH_W"; then 703 if (cygpath --version) >/dev/null 2>/dev/null; then 704 CYGPATH_W='cygpath -w' 705 else 706 CYGPATH_W=echo 707 fi 708fi 709AC_SUBST([CYGPATH_W]) 710 711# Define the identity of the package. 712dnl Distinguish between old-style and new-style calls. 713m4_ifval([$2], 714[AC_DIAGNOSE([obsolete], 715 [$0: two- and three-arguments forms are deprecated.]) 716m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 717 AC_SUBST([PACKAGE], [$1])dnl 718 AC_SUBST([VERSION], [$2])], 719[_AM_SET_OPTIONS([$1])dnl 720dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 721m4_if( 722 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 723 [ok:ok],, 724 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 725 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 726 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 727 728_AM_IF_OPTION([no-define],, 729[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 730 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 731 732# Some tools Automake needs. 733AC_REQUIRE([AM_SANITY_CHECK])dnl 734AC_REQUIRE([AC_ARG_PROGRAM])dnl 735AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 736AM_MISSING_PROG([AUTOCONF], [autoconf]) 737AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 738AM_MISSING_PROG([AUTOHEADER], [autoheader]) 739AM_MISSING_PROG([MAKEINFO], [makeinfo]) 740AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 741AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 742AC_REQUIRE([AC_PROG_MKDIR_P])dnl 743# For better backward compatibility. To be removed once Automake 1.9.x 744# dies out for good. For more background, see: 745# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 746# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 747AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 748# We need awk for the "check" target. The system "awk" is bad on 749# some platforms. 750AC_REQUIRE([AC_PROG_AWK])dnl 751AC_REQUIRE([AC_PROG_MAKE_SET])dnl 752AC_REQUIRE([AM_SET_LEADING_DOT])dnl 753_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 754 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 755 [_AM_PROG_TAR([v7])])]) 756_AM_IF_OPTION([no-dependencies],, 757[AC_PROVIDE_IFELSE([AC_PROG_CC], 758 [_AM_DEPENDENCIES([CC])], 759 [m4_define([AC_PROG_CC], 760 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 761AC_PROVIDE_IFELSE([AC_PROG_CXX], 762 [_AM_DEPENDENCIES([CXX])], 763 [m4_define([AC_PROG_CXX], 764 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 765AC_PROVIDE_IFELSE([AC_PROG_OBJC], 766 [_AM_DEPENDENCIES([OBJC])], 767 [m4_define([AC_PROG_OBJC], 768 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 769AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 770 [_AM_DEPENDENCIES([OBJCXX])], 771 [m4_define([AC_PROG_OBJCXX], 772 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 773]) 774AC_REQUIRE([AM_SILENT_RULES])dnl 775dnl The testsuite driver may need to know about EXEEXT, so add the 776dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 777dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 778AC_CONFIG_COMMANDS_PRE(dnl 779[m4_provide_if([_AM_COMPILER_EXEEXT], 780 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 781 782# POSIX will say in a future version that running "rm -f" with no argument 783# is OK; and we want to be able to make that assumption in our Makefile 784# recipes. So use an aggressive probe to check that the usage we want is 785# actually supported "in the wild" to an acceptable degree. 786# See automake bug#10828. 787# To make any issue more visible, cause the running configure to be aborted 788# by default if the 'rm' program in use doesn't match our expectations; the 789# user can still override this though. 790if rm -f && rm -fr && rm -rf; then : OK; else 791 cat >&2 <<'END' 792Oops! 793 794Your 'rm' program seems unable to run without file operands specified 795on the command line, even when the '-f' option is present. This is contrary 796to the behaviour of most rm programs out there, and not conforming with 797the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 798 799Please tell bug-automake@gnu.org about your system, including the value 800of your $PATH and any error possibly output before this message. This 801can help us improve future automake versions. 802 803END 804 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 805 echo 'Configuration will proceed anyway, since you have set the' >&2 806 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 807 echo >&2 808 else 809 cat >&2 <<'END' 810Aborting the configuration process, to ensure you take notice of the issue. 811 812You can download and install GNU coreutils to get an 'rm' implementation 813that behaves properly: <http://www.gnu.org/software/coreutils/>. 814 815If you want to complete the configuration process using your problematic 816'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 817to "yes", and re-run configure. 818 819END 820 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 821 fi 822fi]) 823 824dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 825dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 826dnl mangled by Autoconf and run in a shell conditional statement. 827m4_define([_AC_COMPILER_EXEEXT], 828m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 829 830# When config.status generates a header, we must update the stamp-h file. 831# This file resides in the same directory as the config header 832# that is generated. The stamp files are numbered to have different names. 833 834# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 835# loop where config.status creates the headers, so we can generate 836# our stamp files there. 837AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 838[# Compute $1's index in $config_headers. 839_am_arg=$1 840_am_stamp_count=1 841for _am_header in $config_headers :; do 842 case $_am_header in 843 $_am_arg | $_am_arg:* ) 844 break ;; 845 * ) 846 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 847 esac 848done 849echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 850 851# Copyright (C) 2001-2013 Free Software Foundation, Inc. 852# 853# This file is free software; the Free Software Foundation 854# gives unlimited permission to copy and/or distribute it, 855# with or without modifications, as long as this notice is preserved. 856 857# AM_PROG_INSTALL_SH 858# ------------------ 859# Define $install_sh. 860AC_DEFUN([AM_PROG_INSTALL_SH], 861[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 862if test x"${install_sh}" != xset; then 863 case $am_aux_dir in 864 *\ * | *\ *) 865 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 866 *) 867 install_sh="\${SHELL} $am_aux_dir/install-sh" 868 esac 869fi 870AC_SUBST([install_sh])]) 871 872# Copyright (C) 2003-2013 Free Software Foundation, Inc. 873# 874# This file is free software; the Free Software Foundation 875# gives unlimited permission to copy and/or distribute it, 876# with or without modifications, as long as this notice is preserved. 877 878# Check whether the underlying file-system supports filenames 879# with a leading dot. For instance MS-DOS doesn't. 880AC_DEFUN([AM_SET_LEADING_DOT], 881[rm -rf .tst 2>/dev/null 882mkdir .tst 2>/dev/null 883if test -d .tst; then 884 am__leading_dot=. 885else 886 am__leading_dot=_ 887fi 888rmdir .tst 2>/dev/null 889AC_SUBST([am__leading_dot])]) 890 891# Check to see how 'make' treats includes. -*- Autoconf -*- 892 893# Copyright (C) 2001-2013 Free Software Foundation, Inc. 894# 895# This file is free software; the Free Software Foundation 896# gives unlimited permission to copy and/or distribute it, 897# with or without modifications, as long as this notice is preserved. 898 899# AM_MAKE_INCLUDE() 900# ----------------- 901# Check to see how make treats includes. 902AC_DEFUN([AM_MAKE_INCLUDE], 903[am_make=${MAKE-make} 904cat > confinc << 'END' 905am__doit: 906 @echo this is the am__doit target 907.PHONY: am__doit 908END 909# If we don't find an include directive, just comment out the code. 910AC_MSG_CHECKING([for style of include used by $am_make]) 911am__include="#" 912am__quote= 913_am_result=none 914# First try GNU make style include. 915echo "include confinc" > confmf 916# Ignore all kinds of additional output from 'make'. 917case `$am_make -s -f confmf 2> /dev/null` in #( 918*the\ am__doit\ target*) 919 am__include=include 920 am__quote= 921 _am_result=GNU 922 ;; 923esac 924# Now try BSD make style include. 925if test "$am__include" = "#"; then 926 echo '.include "confinc"' > confmf 927 case `$am_make -s -f confmf 2> /dev/null` in #( 928 *the\ am__doit\ target*) 929 am__include=.include 930 am__quote="\"" 931 _am_result=BSD 932 ;; 933 esac 934fi 935AC_SUBST([am__include]) 936AC_SUBST([am__quote]) 937AC_MSG_RESULT([$_am_result]) 938rm -f confinc confmf 939]) 940 941# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 942 943# Copyright (C) 1997-2013 Free Software Foundation, Inc. 944# 945# This file is free software; the Free Software Foundation 946# gives unlimited permission to copy and/or distribute it, 947# with or without modifications, as long as this notice is preserved. 948 949# AM_MISSING_PROG(NAME, PROGRAM) 950# ------------------------------ 951AC_DEFUN([AM_MISSING_PROG], 952[AC_REQUIRE([AM_MISSING_HAS_RUN]) 953$1=${$1-"${am_missing_run}$2"} 954AC_SUBST($1)]) 955 956# AM_MISSING_HAS_RUN 957# ------------------ 958# Define MISSING if not defined so far and test if it is modern enough. 959# If it is, set am_missing_run to use it, otherwise, to nothing. 960AC_DEFUN([AM_MISSING_HAS_RUN], 961[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 962AC_REQUIRE_AUX_FILE([missing])dnl 963if test x"${MISSING+set}" != xset; then 964 case $am_aux_dir in 965 *\ * | *\ *) 966 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 967 *) 968 MISSING="\${SHELL} $am_aux_dir/missing" ;; 969 esac 970fi 971# Use eval to expand $SHELL 972if eval "$MISSING --is-lightweight"; then 973 am_missing_run="$MISSING " 974else 975 am_missing_run= 976 AC_MSG_WARN(['missing' script is too old or missing]) 977fi 978]) 979 980# Helper functions for option handling. -*- Autoconf -*- 981 982# Copyright (C) 2001-2013 Free Software Foundation, Inc. 983# 984# This file is free software; the Free Software Foundation 985# gives unlimited permission to copy and/or distribute it, 986# with or without modifications, as long as this notice is preserved. 987 988# _AM_MANGLE_OPTION(NAME) 989# ----------------------- 990AC_DEFUN([_AM_MANGLE_OPTION], 991[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 992 993# _AM_SET_OPTION(NAME) 994# -------------------- 995# Set option NAME. Presently that only means defining a flag for this option. 996AC_DEFUN([_AM_SET_OPTION], 997[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 998 999# _AM_SET_OPTIONS(OPTIONS) 1000# ------------------------ 1001# OPTIONS is a space-separated list of Automake options. 1002AC_DEFUN([_AM_SET_OPTIONS], 1003[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1004 1005# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1006# ------------------------------------------- 1007# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1008AC_DEFUN([_AM_IF_OPTION], 1009[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1010 1011# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1012# 1013# This file is free software; the Free Software Foundation 1014# gives unlimited permission to copy and/or distribute it, 1015# with or without modifications, as long as this notice is preserved. 1016 1017# _AM_PROG_CC_C_O 1018# --------------- 1019# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1020# to automatically call this. 1021AC_DEFUN([_AM_PROG_CC_C_O], 1022[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1023AC_REQUIRE_AUX_FILE([compile])dnl 1024AC_LANG_PUSH([C])dnl 1025AC_CACHE_CHECK( 1026 [whether $CC understands -c and -o together], 1027 [am_cv_prog_cc_c_o], 1028 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1029 # Make sure it works both with $CC and with simple cc. 1030 # Following AC_PROG_CC_C_O, we do the test twice because some 1031 # compilers refuse to overwrite an existing .o file with -o, 1032 # though they will create one. 1033 am_cv_prog_cc_c_o=yes 1034 for am_i in 1 2; do 1035 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1036 && test -f conftest2.$ac_objext; then 1037 : OK 1038 else 1039 am_cv_prog_cc_c_o=no 1040 break 1041 fi 1042 done 1043 rm -f core conftest* 1044 unset am_i]) 1045if test "$am_cv_prog_cc_c_o" != yes; then 1046 # Losing compiler, so override with the script. 1047 # FIXME: It is wrong to rewrite CC. 1048 # But if we don't then we get into trouble of one sort or another. 1049 # A longer-term fix would be to have automake use am__CC in this case, 1050 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1051 CC="$am_aux_dir/compile $CC" 1052fi 1053AC_LANG_POP([C])]) 1054 1055# For backward compatibility. 1056AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1057 1058# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1059# 1060# This file is free software; the Free Software Foundation 1061# gives unlimited permission to copy and/or distribute it, 1062# with or without modifications, as long as this notice is preserved. 1063 1064# AM_RUN_LOG(COMMAND) 1065# ------------------- 1066# Run COMMAND, save the exit status in ac_status, and log it. 1067# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1068AC_DEFUN([AM_RUN_LOG], 1069[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1070 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1071 ac_status=$? 1072 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1073 (exit $ac_status); }]) 1074 1075# Check to make sure that the build environment is sane. -*- Autoconf -*- 1076 1077# Copyright (C) 1996-2013 Free Software Foundation, Inc. 1078# 1079# This file is free software; the Free Software Foundation 1080# gives unlimited permission to copy and/or distribute it, 1081# with or without modifications, as long as this notice is preserved. 1082 1083# AM_SANITY_CHECK 1084# --------------- 1085AC_DEFUN([AM_SANITY_CHECK], 1086[AC_MSG_CHECKING([whether build environment is sane]) 1087# Reject unsafe characters in $srcdir or the absolute working directory 1088# name. Accept space and tab only in the latter. 1089am_lf=' 1090' 1091case `pwd` in 1092 *[[\\\"\#\$\&\'\`$am_lf]]*) 1093 AC_MSG_ERROR([unsafe absolute working directory name]);; 1094esac 1095case $srcdir in 1096 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1097 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1098esac 1099 1100# Do 'set' in a subshell so we don't clobber the current shell's 1101# arguments. Must try -L first in case configure is actually a 1102# symlink; some systems play weird games with the mod time of symlinks 1103# (eg FreeBSD returns the mod time of the symlink's containing 1104# directory). 1105if ( 1106 am_has_slept=no 1107 for am_try in 1 2; do 1108 echo "timestamp, slept: $am_has_slept" > conftest.file 1109 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1110 if test "$[*]" = "X"; then 1111 # -L didn't work. 1112 set X `ls -t "$srcdir/configure" conftest.file` 1113 fi 1114 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1115 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1116 1117 # If neither matched, then we have a broken ls. This can happen 1118 # if, for instance, CONFIG_SHELL is bash and it inherits a 1119 # broken ls alias from the environment. This has actually 1120 # happened. Such a system could not be considered "sane". 1121 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1122 alias in your environment]) 1123 fi 1124 if test "$[2]" = conftest.file || test $am_try -eq 2; then 1125 break 1126 fi 1127 # Just in case. 1128 sleep 1 1129 am_has_slept=yes 1130 done 1131 test "$[2]" = conftest.file 1132 ) 1133then 1134 # Ok. 1135 : 1136else 1137 AC_MSG_ERROR([newly created file is older than distributed files! 1138Check your system clock]) 1139fi 1140AC_MSG_RESULT([yes]) 1141# If we didn't sleep, we still need to ensure time stamps of config.status and 1142# generated files are strictly newer. 1143am_sleep_pid= 1144if grep 'slept: no' conftest.file >/dev/null 2>&1; then 1145 ( sleep 1 ) & 1146 am_sleep_pid=$! 1147fi 1148AC_CONFIG_COMMANDS_PRE( 1149 [AC_MSG_CHECKING([that generated files are newer than configure]) 1150 if test -n "$am_sleep_pid"; then 1151 # Hide warnings about reused PIDs. 1152 wait $am_sleep_pid 2>/dev/null 1153 fi 1154 AC_MSG_RESULT([done])]) 1155rm -f conftest.file 1156]) 1157 1158# Copyright (C) 2009-2013 Free Software Foundation, Inc. 1159# 1160# This file is free software; the Free Software Foundation 1161# gives unlimited permission to copy and/or distribute it, 1162# with or without modifications, as long as this notice is preserved. 1163 1164# AM_SILENT_RULES([DEFAULT]) 1165# -------------------------- 1166# Enable less verbose build rules; with the default set to DEFAULT 1167# ("yes" being less verbose, "no" or empty being verbose). 1168AC_DEFUN([AM_SILENT_RULES], 1169[AC_ARG_ENABLE([silent-rules], [dnl 1170AS_HELP_STRING( 1171 [--enable-silent-rules], 1172 [less verbose build output (undo: "make V=1")]) 1173AS_HELP_STRING( 1174 [--disable-silent-rules], 1175 [verbose build output (undo: "make V=0")])dnl 1176]) 1177case $enable_silent_rules in @%:@ ((( 1178 yes) AM_DEFAULT_VERBOSITY=0;; 1179 no) AM_DEFAULT_VERBOSITY=1;; 1180 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1181esac 1182dnl 1183dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1184dnl do not support nested variable expansions. 1185dnl See automake bug#9928 and bug#10237. 1186am_make=${MAKE-make} 1187AC_CACHE_CHECK([whether $am_make supports nested variables], 1188 [am_cv_make_support_nested_variables], 1189 [if AS_ECHO([['TRUE=$(BAR$(V)) 1190BAR0=false 1191BAR1=true 1192V=1 1193am__doit: 1194 @$(TRUE) 1195.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1196 am_cv_make_support_nested_variables=yes 1197else 1198 am_cv_make_support_nested_variables=no 1199fi]) 1200if test $am_cv_make_support_nested_variables = yes; then 1201 dnl Using '$V' instead of '$(V)' breaks IRIX make. 1202 AM_V='$(V)' 1203 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1204else 1205 AM_V=$AM_DEFAULT_VERBOSITY 1206 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1207fi 1208AC_SUBST([AM_V])dnl 1209AM_SUBST_NOTMAKE([AM_V])dnl 1210AC_SUBST([AM_DEFAULT_V])dnl 1211AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1212AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1213AM_BACKSLASH='\' 1214AC_SUBST([AM_BACKSLASH])dnl 1215_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1216]) 1217 1218# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1219# 1220# This file is free software; the Free Software Foundation 1221# gives unlimited permission to copy and/or distribute it, 1222# with or without modifications, as long as this notice is preserved. 1223 1224# AM_PROG_INSTALL_STRIP 1225# --------------------- 1226# One issue with vendor 'install' (even GNU) is that you can't 1227# specify the program used to strip binaries. This is especially 1228# annoying in cross-compiling environments, where the build's strip 1229# is unlikely to handle the host's binaries. 1230# Fortunately install-sh will honor a STRIPPROG variable, so we 1231# always use install-sh in "make install-strip", and initialize 1232# STRIPPROG with the value of the STRIP variable (set by the user). 1233AC_DEFUN([AM_PROG_INSTALL_STRIP], 1234[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1235# Installed binaries are usually stripped using 'strip' when the user 1236# run "make install-strip". However 'strip' might not be the right 1237# tool to use in cross-compilation environments, therefore Automake 1238# will honor the 'STRIP' environment variable to overrule this program. 1239dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1240if test "$cross_compiling" != no; then 1241 AC_CHECK_TOOL([STRIP], [strip], :) 1242fi 1243INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1244AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1245 1246# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1247# 1248# This file is free software; the Free Software Foundation 1249# gives unlimited permission to copy and/or distribute it, 1250# with or without modifications, as long as this notice is preserved. 1251 1252# _AM_SUBST_NOTMAKE(VARIABLE) 1253# --------------------------- 1254# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1255# This macro is traced by Automake. 1256AC_DEFUN([_AM_SUBST_NOTMAKE]) 1257 1258# AM_SUBST_NOTMAKE(VARIABLE) 1259# -------------------------- 1260# Public sister of _AM_SUBST_NOTMAKE. 1261AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1262 1263# Check how to create a tarball. -*- Autoconf -*- 1264 1265# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1266# 1267# This file is free software; the Free Software Foundation 1268# gives unlimited permission to copy and/or distribute it, 1269# with or without modifications, as long as this notice is preserved. 1270 1271# _AM_PROG_TAR(FORMAT) 1272# -------------------- 1273# Check how to create a tarball in format FORMAT. 1274# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1275# 1276# Substitute a variable $(am__tar) that is a command 1277# writing to stdout a FORMAT-tarball containing the directory 1278# $tardir. 1279# tardir=directory && $(am__tar) > result.tar 1280# 1281# Substitute a variable $(am__untar) that extract such 1282# a tarball read from stdin. 1283# $(am__untar) < result.tar 1284# 1285AC_DEFUN([_AM_PROG_TAR], 1286[# Always define AMTAR for backward compatibility. Yes, it's still used 1287# in the wild :-( We should find a proper way to deprecate it ... 1288AC_SUBST([AMTAR], ['$${TAR-tar}']) 1289 1290# We'll loop over all known methods to create a tar archive until one works. 1291_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1292 1293m4_if([$1], [v7], 1294 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1295 1296 [m4_case([$1], 1297 [ustar], 1298 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1299 # There is notably a 21 bits limit for the UID and the GID. In fact, 1300 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1301 # and bug#13588). 1302 am_max_uid=2097151 # 2^21 - 1 1303 am_max_gid=$am_max_uid 1304 # The $UID and $GID variables are not portable, so we need to resort 1305 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1306 # below are definitely unexpected, so allow the users to see them 1307 # (that is, avoid stderr redirection). 1308 am_uid=`id -u || echo unknown` 1309 am_gid=`id -g || echo unknown` 1310 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1311 if test $am_uid -le $am_max_uid; then 1312 AC_MSG_RESULT([yes]) 1313 else 1314 AC_MSG_RESULT([no]) 1315 _am_tools=none 1316 fi 1317 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1318 if test $am_gid -le $am_max_gid; then 1319 AC_MSG_RESULT([yes]) 1320 else 1321 AC_MSG_RESULT([no]) 1322 _am_tools=none 1323 fi], 1324 1325 [pax], 1326 [], 1327 1328 [m4_fatal([Unknown tar format])]) 1329 1330 AC_MSG_CHECKING([how to create a $1 tar archive]) 1331 1332 # Go ahead even if we have the value already cached. We do so because we 1333 # need to set the values for the 'am__tar' and 'am__untar' variables. 1334 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1335 1336 for _am_tool in $_am_tools; do 1337 case $_am_tool in 1338 gnutar) 1339 for _am_tar in tar gnutar gtar; do 1340 AM_RUN_LOG([$_am_tar --version]) && break 1341 done 1342 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1343 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1344 am__untar="$_am_tar -xf -" 1345 ;; 1346 plaintar) 1347 # Must skip GNU tar: if it does not support --format= it doesn't create 1348 # ustar tarball either. 1349 (tar --version) >/dev/null 2>&1 && continue 1350 am__tar='tar chf - "$$tardir"' 1351 am__tar_='tar chf - "$tardir"' 1352 am__untar='tar xf -' 1353 ;; 1354 pax) 1355 am__tar='pax -L -x $1 -w "$$tardir"' 1356 am__tar_='pax -L -x $1 -w "$tardir"' 1357 am__untar='pax -r' 1358 ;; 1359 cpio) 1360 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1361 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1362 am__untar='cpio -i -H $1 -d' 1363 ;; 1364 none) 1365 am__tar=false 1366 am__tar_=false 1367 am__untar=false 1368 ;; 1369 esac 1370 1371 # If the value was cached, stop now. We just wanted to have am__tar 1372 # and am__untar set. 1373 test -n "${am_cv_prog_tar_$1}" && break 1374 1375 # tar/untar a dummy directory, and stop if the command works. 1376 rm -rf conftest.dir 1377 mkdir conftest.dir 1378 echo GrepMe > conftest.dir/file 1379 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1380 rm -rf conftest.dir 1381 if test -s conftest.tar; then 1382 AM_RUN_LOG([$am__untar <conftest.tar]) 1383 AM_RUN_LOG([cat conftest.dir/file]) 1384 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1385 fi 1386 done 1387 rm -rf conftest.dir 1388 1389 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1390 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1391 1392AC_SUBST([am__tar]) 1393AC_SUBST([am__untar]) 1394]) # _AM_PROG_TAR 1395 1396m4_include([m4/libtool.m4]) 1397m4_include([m4/ltoptions.m4]) 1398m4_include([m4/ltsugar.m4]) 1399m4_include([m4/ltversion.m4]) 1400m4_include([m4/lt~obsolete.m4]) 1401m4_include([acinclude.m4]) 1402