1dnl aclocal.m4 generated automatically by aclocal 1.4-p6 2 3dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 4dnl This file is free software; the Free Software Foundation 5dnl gives unlimited permission to copy and/or distribute it, 6dnl with or without modifications, as long as this notice is preserved. 7 8dnl This program is distributed in the hope that it will be useful, 9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11dnl PARTICULAR PURPOSE. 12 13# Configure paths for SDL 14# Sam Lantinga 9/21/99 15# stolen from Manish Singh 16# stolen back from Frank Belew 17# stolen from Manish Singh 18# Shamelessly stolen from Owen Taylor 19 20dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 21dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS 22dnl 23AC_DEFUN(AM_PATH_SDL, 24[dnl 25dnl Get the cflags and libraries from the sdl-config script 26dnl 27AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], 28 sdl_prefix="$withval", sdl_prefix="") 29AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], 30 sdl_exec_prefix="$withval", sdl_exec_prefix="") 31AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], 32 , enable_sdltest=yes) 33 34 if test x$sdl_exec_prefix != x ; then 35 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" 36 if test x${SDL_CONFIG+set} != xset ; then 37 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config 38 fi 39 fi 40 if test x$sdl_prefix != x ; then 41 sdl_args="$sdl_args --prefix=$sdl_prefix" 42 if test x${SDL_CONFIG+set} != xset ; then 43 SDL_CONFIG=$sdl_prefix/bin/sdl-config 44 fi 45 fi 46 47 AC_PATH_PROG(SDL_CONFIG, sdl-config, no) 48 min_sdl_version=ifelse([$1], ,0.11.0,$1) 49 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) 50 no_sdl="" 51 if test "$SDL_CONFIG" = "no" ; then 52 no_sdl=yes 53 else 54 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` 55 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` 56 57 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ 58 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 59 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ 60 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 61 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ 62 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 63 if test "x$enable_sdltest" = "xyes" ; then 64 ac_save_CFLAGS="$CFLAGS" 65 ac_save_LIBS="$LIBS" 66 CFLAGS="$CFLAGS $SDL_CFLAGS" 67 LIBS="$LIBS $SDL_LIBS" 68dnl 69dnl Now check if the installed SDL is sufficiently new. (Also sanity 70dnl checks the results of sdl-config to some extent 71dnl 72 rm -f conf.sdltest 73 AC_TRY_RUN([ 74#include <stdio.h> 75#include <stdlib.h> 76#include <string.h> 77#include "SDL.h" 78 79char* 80my_strdup (char *str) 81{ 82 char *new_str; 83 84 if (str) 85 { 86 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); 87 strcpy (new_str, str); 88 } 89 else 90 new_str = NULL; 91 92 return new_str; 93} 94 95int main (int argc, char *argv[]) 96{ 97 int major, minor, micro; 98 char *tmp_version; 99 100 /* This hangs on some systems (?) 101 system ("touch conf.sdltest"); 102 */ 103 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } 104 105 /* HP/UX 9 (%@#!) writes to sscanf strings */ 106 tmp_version = my_strdup("$min_sdl_version"); 107 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 108 printf("%s, bad version string\n", "$min_sdl_version"); 109 exit(1); 110 } 111 112 if (($sdl_major_version > major) || 113 (($sdl_major_version == major) && ($sdl_minor_version > minor)) || 114 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) 115 { 116 return 0; 117 } 118 else 119 { 120 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); 121 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); 122 printf("*** best to upgrade to the required version.\n"); 123 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); 124 printf("*** to point to the correct copy of sdl-config, and remove the file\n"); 125 printf("*** config.cache before re-running configure\n"); 126 return 1; 127 } 128} 129 130],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 131 CFLAGS="$ac_save_CFLAGS" 132 LIBS="$ac_save_LIBS" 133 fi 134 fi 135 if test "x$no_sdl" = x ; then 136 AC_MSG_RESULT(yes) 137 ifelse([$2], , :, [$2]) 138 else 139 AC_MSG_RESULT(no) 140 if test "$SDL_CONFIG" = "no" ; then 141 echo "*** The sdl-config script installed by SDL could not be found" 142 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" 143 echo "*** your path, or set the SDL_CONFIG environment variable to the" 144 echo "*** full path to sdl-config." 145 else 146 if test -f conf.sdltest ; then 147 : 148 else 149 echo "*** Could not run SDL test program, checking why..." 150 CFLAGS="$CFLAGS $SDL_CFLAGS" 151 LIBS="$LIBS $SDL_LIBS" 152 AC_TRY_LINK([ 153#include <stdio.h> 154#include "SDL.h" 155], [ return 0; ], 156 [ echo "*** The test program compiled, but did not run. This usually means" 157 echo "*** that the run-time linker is not finding SDL or finding the wrong" 158 echo "*** version of SDL. If it is not finding SDL, you'll need to set your" 159 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 160 echo "*** to the installed location Also, make sure you have run ldconfig if that" 161 echo "*** is required on your system" 162 echo "***" 163 echo "*** If you have an old version installed, it is best to remove it, although" 164 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], 165 [ echo "*** The test program failed to compile or link. See the file config.log for the" 166 echo "*** exact error that occured. This usually means SDL was incorrectly installed" 167 echo "*** or that you have moved SDL since it was installed. In the latter case, you" 168 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) 169 CFLAGS="$ac_save_CFLAGS" 170 LIBS="$ac_save_LIBS" 171 fi 172 fi 173 SDL_CFLAGS="" 174 SDL_LIBS="" 175 ifelse([$3], , :, [$3]) 176 fi 177 AC_SUBST(SDL_CFLAGS) 178 AC_SUBST(SDL_LIBS) 179 rm -f conf.sdltest 180]) 181 182# lib-prefix.m4 serial 3 (gettext-0.13) 183dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. 184dnl This file is free software, distributed under the terms of the GNU 185dnl General Public License. As a special exception to the GNU General 186dnl Public License, this file may be distributed as part of a program 187dnl that contains a configuration script generated by Autoconf, under 188dnl the same distribution terms as the rest of that program. 189 190dnl From Bruno Haible. 191 192dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 193dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 194dnl require excessive bracketing. 195ifdef([AC_HELP_STRING], 196[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 197[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 198 199dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 200dnl to access previously installed libraries. The basic assumption is that 201dnl a user will want packages to use other packages he previously installed 202dnl with the same --prefix option. 203dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 204dnl libraries, but is otherwise very convenient. 205AC_DEFUN([AC_LIB_PREFIX], 206[ 207 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 208 AC_REQUIRE([AC_PROG_CC]) 209 AC_REQUIRE([AC_CANONICAL_HOST]) 210 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 211 dnl By default, look in $includedir and $libdir. 212 use_additional=yes 213 AC_LIB_WITH_FINAL_PREFIX([ 214 eval additional_includedir=\"$includedir\" 215 eval additional_libdir=\"$libdir\" 216 ]) 217 AC_LIB_ARG_WITH([lib-prefix], 218[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 219 --without-lib-prefix don't search for libraries in includedir and libdir], 220[ 221 if test "X$withval" = "Xno"; then 222 use_additional=no 223 else 224 if test "X$withval" = "X"; then 225 AC_LIB_WITH_FINAL_PREFIX([ 226 eval additional_includedir=\"$includedir\" 227 eval additional_libdir=\"$libdir\" 228 ]) 229 else 230 additional_includedir="$withval/include" 231 additional_libdir="$withval/lib" 232 fi 233 fi 234]) 235 if test $use_additional = yes; then 236 dnl Potentially add $additional_includedir to $CPPFLAGS. 237 dnl But don't add it 238 dnl 1. if it's the standard /usr/include, 239 dnl 2. if it's already present in $CPPFLAGS, 240 dnl 3. if it's /usr/local/include and we are using GCC on Linux, 241 dnl 4. if it doesn't exist as a directory. 242 if test "X$additional_includedir" != "X/usr/include"; then 243 haveit= 244 for x in $CPPFLAGS; do 245 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 246 if test "X$x" = "X-I$additional_includedir"; then 247 haveit=yes 248 break 249 fi 250 done 251 if test -z "$haveit"; then 252 if test "X$additional_includedir" = "X/usr/local/include"; then 253 if test -n "$GCC"; then 254 case $host_os in 255 linux*) haveit=yes;; 256 esac 257 fi 258 fi 259 if test -z "$haveit"; then 260 if test -d "$additional_includedir"; then 261 dnl Really add $additional_includedir to $CPPFLAGS. 262 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 263 fi 264 fi 265 fi 266 fi 267 dnl Potentially add $additional_libdir to $LDFLAGS. 268 dnl But don't add it 269 dnl 1. if it's the standard /usr/lib, 270 dnl 2. if it's already present in $LDFLAGS, 271 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 272 dnl 4. if it doesn't exist as a directory. 273 if test "X$additional_libdir" != "X/usr/lib"; then 274 haveit= 275 for x in $LDFLAGS; do 276 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 277 if test "X$x" = "X-L$additional_libdir"; then 278 haveit=yes 279 break 280 fi 281 done 282 if test -z "$haveit"; then 283 if test "X$additional_libdir" = "X/usr/local/lib"; then 284 if test -n "$GCC"; then 285 case $host_os in 286 linux*) haveit=yes;; 287 esac 288 fi 289 fi 290 if test -z "$haveit"; then 291 if test -d "$additional_libdir"; then 292 dnl Really add $additional_libdir to $LDFLAGS. 293 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 294 fi 295 fi 296 fi 297 fi 298 fi 299]) 300 301dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 302dnl acl_final_exec_prefix, containing the values to which $prefix and 303dnl $exec_prefix will expand at the end of the configure script. 304AC_DEFUN([AC_LIB_PREPARE_PREFIX], 305[ 306 dnl Unfortunately, prefix and exec_prefix get only finally determined 307 dnl at the end of configure. 308 if test "X$prefix" = "XNONE"; then 309 acl_final_prefix="$ac_default_prefix" 310 else 311 acl_final_prefix="$prefix" 312 fi 313 if test "X$exec_prefix" = "XNONE"; then 314 acl_final_exec_prefix='${prefix}' 315 else 316 acl_final_exec_prefix="$exec_prefix" 317 fi 318 acl_save_prefix="$prefix" 319 prefix="$acl_final_prefix" 320 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 321 prefix="$acl_save_prefix" 322]) 323 324dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 325dnl variables prefix and exec_prefix bound to the values they will have 326dnl at the end of the configure script. 327AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 328[ 329 acl_save_prefix="$prefix" 330 prefix="$acl_final_prefix" 331 acl_save_exec_prefix="$exec_prefix" 332 exec_prefix="$acl_final_exec_prefix" 333 $1 334 exec_prefix="$acl_save_exec_prefix" 335 prefix="$acl_save_prefix" 336]) 337 338# lib-link.m4 serial 4 (gettext-0.12) 339dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. 340dnl This file is free software, distributed under the terms of the GNU 341dnl General Public License. As a special exception to the GNU General 342dnl Public License, this file may be distributed as part of a program 343dnl that contains a configuration script generated by Autoconf, under 344dnl the same distribution terms as the rest of that program. 345 346dnl From Bruno Haible. 347 348dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 349dnl the libraries corresponding to explicit and implicit dependencies. 350dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 351dnl augments the CPPFLAGS variable. 352AC_DEFUN([AC_LIB_LINKFLAGS], 353[ 354 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 355 AC_REQUIRE([AC_LIB_RPATH]) 356 define([Name],[translit([$1],[./-], [___])]) 357 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 358 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 359 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 360 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 361 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 362 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 363 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 364 ]) 365 LIB[]NAME="$ac_cv_lib[]Name[]_libs" 366 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 367 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 368 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 369 AC_SUBST([LIB]NAME) 370 AC_SUBST([LTLIB]NAME) 371 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 372 dnl results of this search when this library appears as a dependency. 373 HAVE_LIB[]NAME=yes 374 undefine([Name]) 375 undefine([NAME]) 376]) 377 378dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 379dnl searches for libname and the libraries corresponding to explicit and 380dnl implicit dependencies, together with the specified include files and 381dnl the ability to compile and link the specified testcode. If found, it 382dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 383dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 384dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 385dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 386AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 387[ 388 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 389 AC_REQUIRE([AC_LIB_RPATH]) 390 define([Name],[translit([$1],[./-], [___])]) 391 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 392 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 393 394 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 395 dnl accordingly. 396 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 397 398 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 399 dnl because if the user has installed lib[]Name and not disabled its use 400 dnl via --without-lib[]Name-prefix, he wants to use it. 401 ac_save_CPPFLAGS="$CPPFLAGS" 402 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 403 404 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 405 ac_save_LIBS="$LIBS" 406 LIBS="$LIBS $LIB[]NAME" 407 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 408 LIBS="$ac_save_LIBS" 409 ]) 410 if test "$ac_cv_lib[]Name" = yes; then 411 HAVE_LIB[]NAME=yes 412 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 413 AC_MSG_CHECKING([how to link with lib[]$1]) 414 AC_MSG_RESULT([$LIB[]NAME]) 415 else 416 HAVE_LIB[]NAME=no 417 dnl If $LIB[]NAME didn't lead to a usable library, we don't need 418 dnl $INC[]NAME either. 419 CPPFLAGS="$ac_save_CPPFLAGS" 420 LIB[]NAME= 421 LTLIB[]NAME= 422 fi 423 AC_SUBST([HAVE_LIB]NAME) 424 AC_SUBST([LIB]NAME) 425 AC_SUBST([LTLIB]NAME) 426 undefine([Name]) 427 undefine([NAME]) 428]) 429 430dnl Determine the platform dependent parameters needed to use rpath: 431dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 432dnl hardcode_direct, hardcode_minus_L. 433AC_DEFUN([AC_LIB_RPATH], 434[ 435 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 436 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 437 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 438 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 439 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 440 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 441 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 442 . ./conftest.sh 443 rm -f ./conftest.sh 444 acl_cv_rpath=done 445 ]) 446 wl="$acl_cv_wl" 447 libext="$acl_cv_libext" 448 shlibext="$acl_cv_shlibext" 449 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 450 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 451 hardcode_direct="$acl_cv_hardcode_direct" 452 hardcode_minus_L="$acl_cv_hardcode_minus_L" 453 dnl Determine whether the user wants rpath handling at all. 454 AC_ARG_ENABLE(rpath, 455 [ --disable-rpath do not hardcode runtime library paths], 456 :, enable_rpath=yes) 457]) 458 459dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 460dnl the libraries corresponding to explicit and implicit dependencies. 461dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 462AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 463[ 464 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 465 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 466 dnl By default, look in $includedir and $libdir. 467 use_additional=yes 468 AC_LIB_WITH_FINAL_PREFIX([ 469 eval additional_includedir=\"$includedir\" 470 eval additional_libdir=\"$libdir\" 471 ]) 472 AC_LIB_ARG_WITH([lib$1-prefix], 473[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 474 --without-lib$1-prefix don't search for lib$1 in includedir and libdir], 475[ 476 if test "X$withval" = "Xno"; then 477 use_additional=no 478 else 479 if test "X$withval" = "X"; then 480 AC_LIB_WITH_FINAL_PREFIX([ 481 eval additional_includedir=\"$includedir\" 482 eval additional_libdir=\"$libdir\" 483 ]) 484 else 485 additional_includedir="$withval/include" 486 additional_libdir="$withval/lib" 487 fi 488 fi 489]) 490 dnl Search the library and its dependencies in $additional_libdir and 491 dnl $LDFLAGS. Using breadth-first-seach. 492 LIB[]NAME= 493 LTLIB[]NAME= 494 INC[]NAME= 495 rpathdirs= 496 ltrpathdirs= 497 names_already_handled= 498 names_next_round='$1 $2' 499 while test -n "$names_next_round"; do 500 names_this_round="$names_next_round" 501 names_next_round= 502 for name in $names_this_round; do 503 already_handled= 504 for n in $names_already_handled; do 505 if test "$n" = "$name"; then 506 already_handled=yes 507 break 508 fi 509 done 510 if test -z "$already_handled"; then 511 names_already_handled="$names_already_handled $name" 512 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 513 dnl or AC_LIB_HAVE_LINKFLAGS call. 514 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 515 eval value=\"\$HAVE_LIB$uppername\" 516 if test -n "$value"; then 517 if test "$value" = yes; then 518 eval value=\"\$LIB$uppername\" 519 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 520 eval value=\"\$LTLIB$uppername\" 521 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 522 else 523 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 524 dnl that this library doesn't exist. So just drop it. 525 : 526 fi 527 else 528 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 529 dnl and the already constructed $LIBNAME/$LTLIBNAME. 530 found_dir= 531 found_la= 532 found_so= 533 found_a= 534 if test $use_additional = yes; then 535 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then 536 found_dir="$additional_libdir" 537 found_so="$additional_libdir/lib$name.$shlibext" 538 if test -f "$additional_libdir/lib$name.la"; then 539 found_la="$additional_libdir/lib$name.la" 540 fi 541 else 542 if test -f "$additional_libdir/lib$name.$libext"; then 543 found_dir="$additional_libdir" 544 found_a="$additional_libdir/lib$name.$libext" 545 if test -f "$additional_libdir/lib$name.la"; then 546 found_la="$additional_libdir/lib$name.la" 547 fi 548 fi 549 fi 550 fi 551 if test "X$found_dir" = "X"; then 552 for x in $LDFLAGS $LTLIB[]NAME; do 553 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 554 case "$x" in 555 -L*) 556 dir=`echo "X$x" | sed -e 's/^X-L//'` 557 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then 558 found_dir="$dir" 559 found_so="$dir/lib$name.$shlibext" 560 if test -f "$dir/lib$name.la"; then 561 found_la="$dir/lib$name.la" 562 fi 563 else 564 if test -f "$dir/lib$name.$libext"; then 565 found_dir="$dir" 566 found_a="$dir/lib$name.$libext" 567 if test -f "$dir/lib$name.la"; then 568 found_la="$dir/lib$name.la" 569 fi 570 fi 571 fi 572 ;; 573 esac 574 if test "X$found_dir" != "X"; then 575 break 576 fi 577 done 578 fi 579 if test "X$found_dir" != "X"; then 580 dnl Found the library. 581 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 582 if test "X$found_so" != "X"; then 583 dnl Linking with a shared library. We attempt to hardcode its 584 dnl directory into the executable's runpath, unless it's the 585 dnl standard /usr/lib. 586 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 587 dnl No hardcoding is needed. 588 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 589 else 590 dnl Use an explicit option to hardcode DIR into the resulting 591 dnl binary. 592 dnl Potentially add DIR to ltrpathdirs. 593 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 594 haveit= 595 for x in $ltrpathdirs; do 596 if test "X$x" = "X$found_dir"; then 597 haveit=yes 598 break 599 fi 600 done 601 if test -z "$haveit"; then 602 ltrpathdirs="$ltrpathdirs $found_dir" 603 fi 604 dnl The hardcoding into $LIBNAME is system dependent. 605 if test "$hardcode_direct" = yes; then 606 dnl Using DIR/libNAME.so during linking hardcodes DIR into the 607 dnl resulting binary. 608 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 609 else 610 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 611 dnl Use an explicit option to hardcode DIR into the resulting 612 dnl binary. 613 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 614 dnl Potentially add DIR to rpathdirs. 615 dnl The rpathdirs will be appended to $LIBNAME at the end. 616 haveit= 617 for x in $rpathdirs; do 618 if test "X$x" = "X$found_dir"; then 619 haveit=yes 620 break 621 fi 622 done 623 if test -z "$haveit"; then 624 rpathdirs="$rpathdirs $found_dir" 625 fi 626 else 627 dnl Rely on "-L$found_dir". 628 dnl But don't add it if it's already contained in the LDFLAGS 629 dnl or the already constructed $LIBNAME 630 haveit= 631 for x in $LDFLAGS $LIB[]NAME; do 632 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 633 if test "X$x" = "X-L$found_dir"; then 634 haveit=yes 635 break 636 fi 637 done 638 if test -z "$haveit"; then 639 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 640 fi 641 if test "$hardcode_minus_L" != no; then 642 dnl FIXME: Not sure whether we should use 643 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 644 dnl here. 645 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 646 else 647 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH 648 dnl here, because this doesn't fit in flags passed to the 649 dnl compiler. So give up. No hardcoding. This affects only 650 dnl very old systems. 651 dnl FIXME: Not sure whether we should use 652 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 653 dnl here. 654 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 655 fi 656 fi 657 fi 658 fi 659 else 660 if test "X$found_a" != "X"; then 661 dnl Linking with a static library. 662 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 663 else 664 dnl We shouldn't come here, but anyway it's good to have a 665 dnl fallback. 666 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 667 fi 668 fi 669 dnl Assume the include files are nearby. 670 additional_includedir= 671 case "$found_dir" in 672 */lib | */lib/) 673 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 674 additional_includedir="$basedir/include" 675 ;; 676 esac 677 if test "X$additional_includedir" != "X"; then 678 dnl Potentially add $additional_includedir to $INCNAME. 679 dnl But don't add it 680 dnl 1. if it's the standard /usr/include, 681 dnl 2. if it's /usr/local/include and we are using GCC on Linux, 682 dnl 3. if it's already present in $CPPFLAGS or the already 683 dnl constructed $INCNAME, 684 dnl 4. if it doesn't exist as a directory. 685 if test "X$additional_includedir" != "X/usr/include"; then 686 haveit= 687 if test "X$additional_includedir" = "X/usr/local/include"; then 688 if test -n "$GCC"; then 689 case $host_os in 690 linux*) haveit=yes;; 691 esac 692 fi 693 fi 694 if test -z "$haveit"; then 695 for x in $CPPFLAGS $INC[]NAME; do 696 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 697 if test "X$x" = "X-I$additional_includedir"; then 698 haveit=yes 699 break 700 fi 701 done 702 if test -z "$haveit"; then 703 if test -d "$additional_includedir"; then 704 dnl Really add $additional_includedir to $INCNAME. 705 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 706 fi 707 fi 708 fi 709 fi 710 fi 711 dnl Look for dependencies. 712 if test -n "$found_la"; then 713 dnl Read the .la file. It defines the variables 714 dnl dlname, library_names, old_library, dependency_libs, current, 715 dnl age, revision, installed, dlopen, dlpreopen, libdir. 716 save_libdir="$libdir" 717 case "$found_la" in 718 */* | *\\*) . "$found_la" ;; 719 *) . "./$found_la" ;; 720 esac 721 libdir="$save_libdir" 722 dnl We use only dependency_libs. 723 for dep in $dependency_libs; do 724 case "$dep" in 725 -L*) 726 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 727 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 728 dnl But don't add it 729 dnl 1. if it's the standard /usr/lib, 730 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 731 dnl 3. if it's already present in $LDFLAGS or the already 732 dnl constructed $LIBNAME, 733 dnl 4. if it doesn't exist as a directory. 734 if test "X$additional_libdir" != "X/usr/lib"; then 735 haveit= 736 if test "X$additional_libdir" = "X/usr/local/lib"; then 737 if test -n "$GCC"; then 738 case $host_os in 739 linux*) haveit=yes;; 740 esac 741 fi 742 fi 743 if test -z "$haveit"; then 744 haveit= 745 for x in $LDFLAGS $LIB[]NAME; do 746 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 747 if test "X$x" = "X-L$additional_libdir"; then 748 haveit=yes 749 break 750 fi 751 done 752 if test -z "$haveit"; then 753 if test -d "$additional_libdir"; then 754 dnl Really add $additional_libdir to $LIBNAME. 755 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 756 fi 757 fi 758 haveit= 759 for x in $LDFLAGS $LTLIB[]NAME; do 760 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 761 if test "X$x" = "X-L$additional_libdir"; then 762 haveit=yes 763 break 764 fi 765 done 766 if test -z "$haveit"; then 767 if test -d "$additional_libdir"; then 768 dnl Really add $additional_libdir to $LTLIBNAME. 769 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 770 fi 771 fi 772 fi 773 fi 774 ;; 775 -R*) 776 dir=`echo "X$dep" | sed -e 's/^X-R//'` 777 if test "$enable_rpath" != no; then 778 dnl Potentially add DIR to rpathdirs. 779 dnl The rpathdirs will be appended to $LIBNAME at the end. 780 haveit= 781 for x in $rpathdirs; do 782 if test "X$x" = "X$dir"; then 783 haveit=yes 784 break 785 fi 786 done 787 if test -z "$haveit"; then 788 rpathdirs="$rpathdirs $dir" 789 fi 790 dnl Potentially add DIR to ltrpathdirs. 791 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 792 haveit= 793 for x in $ltrpathdirs; do 794 if test "X$x" = "X$dir"; then 795 haveit=yes 796 break 797 fi 798 done 799 if test -z "$haveit"; then 800 ltrpathdirs="$ltrpathdirs $dir" 801 fi 802 fi 803 ;; 804 -l*) 805 dnl Handle this in the next round. 806 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 807 ;; 808 *.la) 809 dnl Handle this in the next round. Throw away the .la's 810 dnl directory; it is already contained in a preceding -L 811 dnl option. 812 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 813 ;; 814 *) 815 dnl Most likely an immediate library name. 816 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 817 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 818 ;; 819 esac 820 done 821 fi 822 else 823 dnl Didn't find the library; assume it is in the system directories 824 dnl known to the linker and runtime loader. (All the system 825 dnl directories known to the linker should also be known to the 826 dnl runtime loader, otherwise the system is severely misconfigured.) 827 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 828 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 829 fi 830 fi 831 fi 832 done 833 done 834 if test "X$rpathdirs" != "X"; then 835 if test -n "$hardcode_libdir_separator"; then 836 dnl Weird platform: only the last -rpath option counts, the user must 837 dnl pass all path elements in one option. We can arrange that for a 838 dnl single library, but not when more than one $LIBNAMEs are used. 839 alldirs= 840 for found_dir in $rpathdirs; do 841 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" 842 done 843 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. 844 acl_save_libdir="$libdir" 845 libdir="$alldirs" 846 eval flag=\"$hardcode_libdir_flag_spec\" 847 libdir="$acl_save_libdir" 848 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 849 else 850 dnl The -rpath options are cumulative. 851 for found_dir in $rpathdirs; do 852 acl_save_libdir="$libdir" 853 libdir="$found_dir" 854 eval flag=\"$hardcode_libdir_flag_spec\" 855 libdir="$acl_save_libdir" 856 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 857 done 858 fi 859 fi 860 if test "X$ltrpathdirs" != "X"; then 861 dnl When using libtool, the option that works for both libraries and 862 dnl executables is -R. The -R options are cumulative. 863 for found_dir in $ltrpathdirs; do 864 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 865 done 866 fi 867]) 868 869dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 870dnl unless already present in VAR. 871dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 872dnl contains two or three consecutive elements that belong together. 873AC_DEFUN([AC_LIB_APPENDTOVAR], 874[ 875 for element in [$2]; do 876 haveit= 877 for x in $[$1]; do 878 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 879 if test "X$x" = "X$element"; then 880 haveit=yes 881 break 882 fi 883 done 884 if test -z "$haveit"; then 885 [$1]="${[$1]}${[$1]:+ }$element" 886 fi 887 done 888]) 889 890# lib-ld.m4 serial 3 (gettext-0.13) 891dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 892dnl This file is free software, distributed under the terms of the GNU 893dnl General Public License. As a special exception to the GNU General 894dnl Public License, this file may be distributed as part of a program 895dnl that contains a configuration script generated by Autoconf, under 896dnl the same distribution terms as the rest of that program. 897 898dnl Subroutines of libtool.m4, 899dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 900dnl with libtool.m4. 901 902dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 903AC_DEFUN([AC_LIB_PROG_LD_GNU], 904[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 905[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 906case `$LD -v 2>&1 </dev/null` in 907*GNU* | *'with BFD'*) 908 acl_cv_prog_gnu_ld=yes ;; 909*) 910 acl_cv_prog_gnu_ld=no ;; 911esac]) 912with_gnu_ld=$acl_cv_prog_gnu_ld 913]) 914 915dnl From libtool-1.4. Sets the variable LD. 916AC_DEFUN([AC_LIB_PROG_LD], 917[AC_ARG_WITH(gnu-ld, 918[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 919test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 920AC_REQUIRE([AC_PROG_CC])dnl 921AC_REQUIRE([AC_CANONICAL_HOST])dnl 922# Prepare PATH_SEPARATOR. 923# The user is always right. 924if test "${PATH_SEPARATOR+set}" != set; then 925 echo "#! /bin/sh" >conf$$.sh 926 echo "exit 0" >>conf$$.sh 927 chmod +x conf$$.sh 928 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 929 PATH_SEPARATOR=';' 930 else 931 PATH_SEPARATOR=: 932 fi 933 rm -f conf$$.sh 934fi 935ac_prog=ld 936if test "$GCC" = yes; then 937 # Check if gcc -print-prog-name=ld gives a path. 938 AC_MSG_CHECKING([for ld used by GCC]) 939 case $host in 940 *-*-mingw*) 941 # gcc leaves a trailing carriage return which upsets mingw 942 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 943 *) 944 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 945 esac 946 case $ac_prog in 947 # Accept absolute paths. 948 [[\\/]* | [A-Za-z]:[\\/]*)] 949 [re_direlt='/[^/][^/]*/\.\./'] 950 # Canonicalize the path of ld 951 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 952 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 953 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 954 done 955 test -z "$LD" && LD="$ac_prog" 956 ;; 957 "") 958 # If it fails, then pretend we aren't using GCC. 959 ac_prog=ld 960 ;; 961 *) 962 # If it is relative, then search for the first ld in PATH. 963 with_gnu_ld=unknown 964 ;; 965 esac 966elif test "$with_gnu_ld" = yes; then 967 AC_MSG_CHECKING([for GNU ld]) 968else 969 AC_MSG_CHECKING([for non-GNU ld]) 970fi 971AC_CACHE_VAL(acl_cv_path_LD, 972[if test -z "$LD"; then 973 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 974 for ac_dir in $PATH; do 975 test -z "$ac_dir" && ac_dir=. 976 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 977 acl_cv_path_LD="$ac_dir/$ac_prog" 978 # Check to see if the program is GNU ld. I'd rather use --version, 979 # but apparently some GNU ld's only accept -v. 980 # Break only if it was the GNU/non-GNU ld that we prefer. 981 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 982 *GNU* | *'with BFD'*) 983 test "$with_gnu_ld" != no && break ;; 984 *) 985 test "$with_gnu_ld" != yes && break ;; 986 esac 987 fi 988 done 989 IFS="$ac_save_ifs" 990else 991 acl_cv_path_LD="$LD" # Let the user override the test with a path. 992fi]) 993LD="$acl_cv_path_LD" 994if test -n "$LD"; then 995 AC_MSG_RESULT($LD) 996else 997 AC_MSG_RESULT(no) 998fi 999test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 1000AC_LIB_PROG_LD_GNU 1001]) 1002 1003# Do all the work for Automake. This macro actually does too much -- 1004# some checks are only needed if your package does certain things. 1005# But this isn't really a big deal. 1006 1007# serial 1 1008 1009dnl Usage: 1010dnl AM_INIT_AUTOMAKE(package,version, [no-define]) 1011 1012AC_DEFUN([AM_INIT_AUTOMAKE], 1013[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1014AC_REQUIRE([AC_PROG_INSTALL]) 1015PACKAGE=[$1] 1016AC_SUBST(PACKAGE) 1017VERSION=[$2] 1018AC_SUBST(VERSION) 1019dnl test to see if srcdir already configured 1020if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 1021 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1022fi 1023ifelse([$3],, 1024AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1025AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 1026AC_REQUIRE([AM_SANITY_CHECK]) 1027AC_REQUIRE([AC_ARG_PROGRAM]) 1028dnl FIXME This is truly gross. 1029missing_dir=`cd $ac_aux_dir && pwd` 1030AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) 1031AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 1032AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) 1033AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 1034AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 1035AC_REQUIRE([AC_PROG_MAKE_SET])]) 1036 1037# Copyright 2002 Free Software Foundation, Inc. 1038 1039# This program is free software; you can redistribute it and/or modify 1040# it under the terms of the GNU General Public License as published by 1041# the Free Software Foundation; either version 2, or (at your option) 1042# any later version. 1043 1044# This program is distributed in the hope that it will be useful, 1045# but WITHOUT ANY WARRANTY; without even the implied warranty of 1046# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1047# GNU General Public License for more details. 1048 1049# You should have received a copy of the GNU General Public License 1050# along with this program; if not, write to the Free Software 1051# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1052 1053# AM_AUTOMAKE_VERSION(VERSION) 1054# ---------------------------- 1055# Automake X.Y traces this macro to ensure aclocal.m4 has been 1056# generated from the m4 files accompanying Automake X.Y. 1057AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) 1058 1059# AM_SET_CURRENT_AUTOMAKE_VERSION 1060# ------------------------------- 1061# Call AM_AUTOMAKE_VERSION so it can be traced. 1062# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 1063AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1064 [AM_AUTOMAKE_VERSION([1.4-p6])]) 1065 1066# 1067# Check to make sure that the build environment is sane. 1068# 1069 1070AC_DEFUN([AM_SANITY_CHECK], 1071[AC_MSG_CHECKING([whether build environment is sane]) 1072# Just in case 1073sleep 1 1074echo timestamp > conftestfile 1075# Do `set' in a subshell so we don't clobber the current shell's 1076# arguments. Must try -L first in case configure is actually a 1077# symlink; some systems play weird games with the mod time of symlinks 1078# (eg FreeBSD returns the mod time of the symlink's containing 1079# directory). 1080if ( 1081 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 1082 if test "[$]*" = "X"; then 1083 # -L didn't work. 1084 set X `ls -t $srcdir/configure conftestfile` 1085 fi 1086 if test "[$]*" != "X $srcdir/configure conftestfile" \ 1087 && test "[$]*" != "X conftestfile $srcdir/configure"; then 1088 1089 # If neither matched, then we have a broken ls. This can happen 1090 # if, for instance, CONFIG_SHELL is bash and it inherits a 1091 # broken ls alias from the environment. This has actually 1092 # happened. Such a system could not be considered "sane". 1093 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1094alias in your environment]) 1095 fi 1096 1097 test "[$]2" = conftestfile 1098 ) 1099then 1100 # Ok. 1101 : 1102else 1103 AC_MSG_ERROR([newly created file is older than distributed files! 1104Check your system clock]) 1105fi 1106rm -f conftest* 1107AC_MSG_RESULT(yes)]) 1108 1109dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 1110dnl The program must properly implement --version. 1111AC_DEFUN([AM_MISSING_PROG], 1112[AC_MSG_CHECKING(for working $2) 1113# Run test in a subshell; some versions of sh will print an error if 1114# an executable is not found, even if stderr is redirected. 1115# Redirect stdin to placate older versions of autoconf. Sigh. 1116if ($2 --version) < /dev/null > /dev/null 2>&1; then 1117 $1=$2 1118 AC_MSG_RESULT(found) 1119else 1120 $1="$3/missing $2" 1121 AC_MSG_RESULT(missing) 1122fi 1123AC_SUBST($1)]) 1124 1125# Like AC_CONFIG_HEADER, but automatically create stamp file. 1126 1127AC_DEFUN([AM_CONFIG_HEADER], 1128[AC_PREREQ([2.12]) 1129AC_CONFIG_HEADER([$1]) 1130dnl When config.status generates a header, we must update the stamp-h file. 1131dnl This file resides in the same directory as the config header 1132dnl that is generated. We must strip everything past the first ":", 1133dnl and everything past the last "/". 1134AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 1135ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 1136<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 1137<<am_indx=1 1138for am_file in <<$1>>; do 1139 case " <<$>>CONFIG_HEADERS " in 1140 *" <<$>>am_file "*<<)>> 1141 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 1142 ;; 1143 esac 1144 am_indx=`expr "<<$>>am_indx" + 1` 1145done<<>>dnl>>) 1146changequote([,]))]) 1147 1148