1# generated automatically by aclocal 1.7.8 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4# Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14# Configure paths for SDL 15# Sam Lantinga 9/21/99 16# stolen from Manish Singh 17# stolen back from Frank Belew 18# stolen from Manish Singh 19# Shamelessly stolen from Owen Taylor 20 21dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 22dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS 23dnl 24AC_DEFUN(AM_PATH_SDL, 25[dnl 26dnl Get the cflags and libraries from the sdl-config script 27dnl 28AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], 29 sdl_prefix="$withval", sdl_prefix="") 30AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], 31 sdl_exec_prefix="$withval", sdl_exec_prefix="") 32AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], 33 , enable_sdltest=yes) 34 35 if test x$sdl_exec_prefix != x ; then 36 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" 37 if test x${SDL_CONFIG+set} != xset ; then 38 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config 39 fi 40 fi 41 if test x$sdl_prefix != x ; then 42 sdl_args="$sdl_args --prefix=$sdl_prefix" 43 if test x${SDL_CONFIG+set} != xset ; then 44 SDL_CONFIG=$sdl_prefix/bin/sdl-config 45 fi 46 fi 47 48 AC_PATH_PROG(SDL_CONFIG, sdl-config, no) 49 min_sdl_version=ifelse([$1], ,0.11.0,$1) 50 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) 51 no_sdl="" 52 if test "$SDL_CONFIG" = "no" ; then 53 no_sdl=yes 54 else 55 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` 56 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` 57 SDL_LIBS="$SDL_LIBS -lSDL_ttf" 58 59 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ 60 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 61 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ 62 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 63 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ 64 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 65 if test "x$enable_sdltest" = "xyes" ; then 66 ac_save_CFLAGS="$CFLAGS" 67 ac_save_LIBS="$LIBS" 68 CFLAGS="$CFLAGS $SDL_CFLAGS" 69 LIBS="$LIBS $SDL_LIBS" 70dnl 71dnl Now check if the installed SDL is sufficiently new. (Also sanity 72dnl checks the results of sdl-config to some extent 73dnl 74 rm -f conf.sdltest 75 AC_TRY_RUN([ 76#include <stdio.h> 77#include <stdlib.h> 78#include <string.h> 79#include <SDL.h> 80 81char* 82my_strdup (char *str) 83{ 84 char *new_str; 85 86 if (str) 87 { 88 new_str = malloc ((strlen (str) + 1) * sizeof(char)); 89 strcpy (new_str, str); 90 } 91 else 92 new_str = NULL; 93 94 return new_str; 95} 96 97int main (int argc, char *argv[]) 98{ 99 int major, minor, micro; 100 char *tmp_version; 101 102 /* This hangs on some systems (?) 103 system ("touch conf.sdltest"); 104 */ 105 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } 106 107 /* HP/UX 9 (%@#!) writes to sscanf strings */ 108 tmp_version = my_strdup("$min_sdl_version"); 109 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 110 printf("%s, bad version string\n", "$min_sdl_version"); 111 exit(1); 112 } 113 114 if (($sdl_major_version > major) || 115 (($sdl_major_version == major) && ($sdl_minor_version > minor)) || 116 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) 117 { 118 return 0; 119 } 120 else 121 { 122 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); 123 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); 124 printf("*** best to upgrade to the required version.\n"); 125 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); 126 printf("*** to point to the correct copy of sdl-config, and remove the file\n"); 127 printf("*** config.cache before re-running configure\n"); 128 return 1; 129 } 130} 131 132],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 133 CFLAGS="$ac_save_CFLAGS" 134 LIBS="$ac_save_LIBS" 135 fi 136 fi 137 if test "x$no_sdl" = x ; then 138 AC_MSG_RESULT(yes) 139 ifelse([$2], , :, [$2]) 140 else 141 AC_MSG_RESULT(no) 142 if test "$SDL_CONFIG" = "no" ; then 143 echo "*** The sdl-config script installed by SDL could not be found" 144 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" 145 echo "*** your path, or set the SDL_CONFIG environment variable to the" 146 echo "*** full path to sdl-config." 147 else 148 if test -f conf.sdltest ; then 149 : 150 else 151 echo "*** Could not run SDL test program, checking why..." 152 CFLAGS="$CFLAGS $SDL_CFLAGS" 153 LIBS="$LIBS $SDL_LIBS" 154 AC_TRY_LINK([ 155#include <stdio.h> 156#include <SDL/SDL.h> 157], [ return 0; ], 158 [ echo "*** The test program compiled, but did not run. This usually means" 159 echo "*** that the run-time linker is not finding SDL or finding the wrong" 160 echo "*** version of SDL. If it is not finding SDL, you'll need to set your" 161 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 162 echo "*** to the installed location Also, make sure you have run ldconfig if that" 163 echo "*** is required on your system" 164 echo "***" 165 echo "*** If you have an old version installed, it is best to remove it, although" 166 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], 167 [ echo "*** The test program failed to compile or link. See the file config.log for the" 168 echo "*** exact error that occured. This usually means SDL was incorrectly installed" 169 echo "*** or that you have moved SDL since it was installed. In the latter case, you" 170 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" 171 echo "*** Remember that you need both SDL_ttf and SDL. Try http://www.libsdl.org" ]) 172 CFLAGS="$ac_save_CFLAGS" 173 LIBS="$ac_save_LIBS" 174 fi 175 fi 176 SDL_CFLAGS="" 177 SDL_LIBS="" 178 ifelse([$3], , :, [$3]) 179 fi 180 AC_SUBST(SDL_CFLAGS) 181 AC_SUBST(SDL_LIBS) 182 rm -f conf.sdltest 183]) 184 185# Do all the work for Automake. -*- Autoconf -*- 186 187# This macro actually does too much some checks are only needed if 188# your package does certain things. But this isn't really a big deal. 189 190# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 191# Free Software Foundation, Inc. 192 193# This program is free software; you can redistribute it and/or modify 194# it under the terms of the GNU General Public License as published by 195# the Free Software Foundation; either version 2, or (at your option) 196# any later version. 197 198# This program is distributed in the hope that it will be useful, 199# but WITHOUT ANY WARRANTY; without even the implied warranty of 200# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 201# GNU General Public License for more details. 202 203# You should have received a copy of the GNU General Public License 204# along with this program; if not, write to the Free Software 205# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 206# 02111-1307, USA. 207 208# serial 10 209 210AC_PREREQ([2.54]) 211 212# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 213# the ones we care about. 214m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 215 216# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 217# AM_INIT_AUTOMAKE([OPTIONS]) 218# ----------------------------------------------- 219# The call with PACKAGE and VERSION arguments is the old style 220# call (pre autoconf-2.50), which is being phased out. PACKAGE 221# and VERSION should now be passed to AC_INIT and removed from 222# the call to AM_INIT_AUTOMAKE. 223# We support both call styles for the transition. After 224# the next Automake release, Autoconf can make the AC_INIT 225# arguments mandatory, and then we can depend on a new Autoconf 226# release and drop the old call support. 227AC_DEFUN([AM_INIT_AUTOMAKE], 228[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 229 AC_REQUIRE([AC_PROG_INSTALL])dnl 230# test to see if srcdir already configured 231if test "`cd $srcdir && pwd`" != "`pwd`" && 232 test -f $srcdir/config.status; then 233 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 234fi 235 236# test whether we have cygpath 237if test -z "$CYGPATH_W"; then 238 if (cygpath --version) >/dev/null 2>/dev/null; then 239 CYGPATH_W='cygpath -w' 240 else 241 CYGPATH_W=echo 242 fi 243fi 244AC_SUBST([CYGPATH_W]) 245 246# Define the identity of the package. 247dnl Distinguish between old-style and new-style calls. 248m4_ifval([$2], 249[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 250 AC_SUBST([PACKAGE], [$1])dnl 251 AC_SUBST([VERSION], [$2])], 252[_AM_SET_OPTIONS([$1])dnl 253 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 254 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 255 256_AM_IF_OPTION([no-define],, 257[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 258 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 259 260# Some tools Automake needs. 261AC_REQUIRE([AM_SANITY_CHECK])dnl 262AC_REQUIRE([AC_ARG_PROGRAM])dnl 263AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 264AM_MISSING_PROG(AUTOCONF, autoconf) 265AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 266AM_MISSING_PROG(AUTOHEADER, autoheader) 267AM_MISSING_PROG(MAKEINFO, makeinfo) 268AM_MISSING_PROG(AMTAR, tar) 269AM_PROG_INSTALL_SH 270AM_PROG_INSTALL_STRIP 271# We need awk for the "check" target. The system "awk" is bad on 272# some platforms. 273AC_REQUIRE([AC_PROG_AWK])dnl 274AC_REQUIRE([AC_PROG_MAKE_SET])dnl 275AC_REQUIRE([AM_SET_LEADING_DOT])dnl 276 277_AM_IF_OPTION([no-dependencies],, 278[AC_PROVIDE_IFELSE([AC_PROG_CC], 279 [_AM_DEPENDENCIES(CC)], 280 [define([AC_PROG_CC], 281 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 282AC_PROVIDE_IFELSE([AC_PROG_CXX], 283 [_AM_DEPENDENCIES(CXX)], 284 [define([AC_PROG_CXX], 285 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 286]) 287]) 288 289 290# When config.status generates a header, we must update the stamp-h file. 291# This file resides in the same directory as the config header 292# that is generated. The stamp files are numbered to have different names. 293 294# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 295# loop where config.status creates the headers, so we can generate 296# our stamp files there. 297AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 298[# Compute $1's index in $config_headers. 299_am_stamp_count=1 300for _am_header in $config_headers :; do 301 case $_am_header in 302 $1 | $1:* ) 303 break ;; 304 * ) 305 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 306 esac 307done 308echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 309 310# Copyright 2002 Free Software Foundation, Inc. 311 312# This program is free software; you can redistribute it and/or modify 313# it under the terms of the GNU General Public License as published by 314# the Free Software Foundation; either version 2, or (at your option) 315# any later version. 316 317# This program is distributed in the hope that it will be useful, 318# but WITHOUT ANY WARRANTY; without even the implied warranty of 319# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 320# GNU General Public License for more details. 321 322# You should have received a copy of the GNU General Public License 323# along with this program; if not, write to the Free Software 324# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 325 326# AM_AUTOMAKE_VERSION(VERSION) 327# ---------------------------- 328# Automake X.Y traces this macro to ensure aclocal.m4 has been 329# generated from the m4 files accompanying Automake X.Y. 330AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 331 332# AM_SET_CURRENT_AUTOMAKE_VERSION 333# ------------------------------- 334# Call AM_AUTOMAKE_VERSION so it can be traced. 335# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 336AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 337 [AM_AUTOMAKE_VERSION([1.7.8])]) 338 339# Helper functions for option handling. -*- Autoconf -*- 340 341# Copyright 2001, 2002 Free Software Foundation, Inc. 342 343# This program is free software; you can redistribute it and/or modify 344# it under the terms of the GNU General Public License as published by 345# the Free Software Foundation; either version 2, or (at your option) 346# any later version. 347 348# This program is distributed in the hope that it will be useful, 349# but WITHOUT ANY WARRANTY; without even the implied warranty of 350# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 351# GNU General Public License for more details. 352 353# You should have received a copy of the GNU General Public License 354# along with this program; if not, write to the Free Software 355# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 356# 02111-1307, USA. 357 358# serial 2 359 360# _AM_MANGLE_OPTION(NAME) 361# ----------------------- 362AC_DEFUN([_AM_MANGLE_OPTION], 363[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 364 365# _AM_SET_OPTION(NAME) 366# ------------------------------ 367# Set option NAME. Presently that only means defining a flag for this option. 368AC_DEFUN([_AM_SET_OPTION], 369[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 370 371# _AM_SET_OPTIONS(OPTIONS) 372# ---------------------------------- 373# OPTIONS is a space-separated list of Automake options. 374AC_DEFUN([_AM_SET_OPTIONS], 375[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 376 377# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 378# ------------------------------------------- 379# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 380AC_DEFUN([_AM_IF_OPTION], 381[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 382 383# 384# Check to make sure that the build environment is sane. 385# 386 387# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 388 389# This program is free software; you can redistribute it and/or modify 390# it under the terms of the GNU General Public License as published by 391# the Free Software Foundation; either version 2, or (at your option) 392# any later version. 393 394# This program is distributed in the hope that it will be useful, 395# but WITHOUT ANY WARRANTY; without even the implied warranty of 396# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 397# GNU General Public License for more details. 398 399# You should have received a copy of the GNU General Public License 400# along with this program; if not, write to the Free Software 401# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 402# 02111-1307, USA. 403 404# serial 3 405 406# AM_SANITY_CHECK 407# --------------- 408AC_DEFUN([AM_SANITY_CHECK], 409[AC_MSG_CHECKING([whether build environment is sane]) 410# Just in case 411sleep 1 412echo timestamp > conftest.file 413# Do `set' in a subshell so we don't clobber the current shell's 414# arguments. Must try -L first in case configure is actually a 415# symlink; some systems play weird games with the mod time of symlinks 416# (eg FreeBSD returns the mod time of the symlink's containing 417# directory). 418if ( 419 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 420 if test "$[*]" = "X"; then 421 # -L didn't work. 422 set X `ls -t $srcdir/configure conftest.file` 423 fi 424 rm -f conftest.file 425 if test "$[*]" != "X $srcdir/configure conftest.file" \ 426 && test "$[*]" != "X conftest.file $srcdir/configure"; then 427 428 # If neither matched, then we have a broken ls. This can happen 429 # if, for instance, CONFIG_SHELL is bash and it inherits a 430 # broken ls alias from the environment. This has actually 431 # happened. Such a system could not be considered "sane". 432 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 433alias in your environment]) 434 fi 435 436 test "$[2]" = conftest.file 437 ) 438then 439 # Ok. 440 : 441else 442 AC_MSG_ERROR([newly created file is older than distributed files! 443Check your system clock]) 444fi 445AC_MSG_RESULT(yes)]) 446 447# -*- Autoconf -*- 448 449 450# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 451 452# This program is free software; you can redistribute it and/or modify 453# it under the terms of the GNU General Public License as published by 454# the Free Software Foundation; either version 2, or (at your option) 455# any later version. 456 457# This program is distributed in the hope that it will be useful, 458# but WITHOUT ANY WARRANTY; without even the implied warranty of 459# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 460# GNU General Public License for more details. 461 462# You should have received a copy of the GNU General Public License 463# along with this program; if not, write to the Free Software 464# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 465# 02111-1307, USA. 466 467# serial 3 468 469# AM_MISSING_PROG(NAME, PROGRAM) 470# ------------------------------ 471AC_DEFUN([AM_MISSING_PROG], 472[AC_REQUIRE([AM_MISSING_HAS_RUN]) 473$1=${$1-"${am_missing_run}$2"} 474AC_SUBST($1)]) 475 476 477# AM_MISSING_HAS_RUN 478# ------------------ 479# Define MISSING if not defined so far and test if it supports --run. 480# If it does, set am_missing_run to use it, otherwise, to nothing. 481AC_DEFUN([AM_MISSING_HAS_RUN], 482[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 483test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 484# Use eval to expand $SHELL 485if eval "$MISSING --run true"; then 486 am_missing_run="$MISSING --run " 487else 488 am_missing_run= 489 AC_MSG_WARN([`missing' script is too old or missing]) 490fi 491]) 492 493# AM_AUX_DIR_EXPAND 494 495# Copyright 2001 Free Software Foundation, Inc. 496 497# This program is free software; you can redistribute it and/or modify 498# it under the terms of the GNU General Public License as published by 499# the Free Software Foundation; either version 2, or (at your option) 500# any later version. 501 502# This program is distributed in the hope that it will be useful, 503# but WITHOUT ANY WARRANTY; without even the implied warranty of 504# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 505# GNU General Public License for more details. 506 507# You should have received a copy of the GNU General Public License 508# along with this program; if not, write to the Free Software 509# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 510# 02111-1307, USA. 511 512# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 513# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 514# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 515# 516# Of course, Automake must honor this variable whenever it calls a 517# tool from the auxiliary directory. The problem is that $srcdir (and 518# therefore $ac_aux_dir as well) can be either absolute or relative, 519# depending on how configure is run. This is pretty annoying, since 520# it makes $ac_aux_dir quite unusable in subdirectories: in the top 521# source directory, any form will work fine, but in subdirectories a 522# relative path needs to be adjusted first. 523# 524# $ac_aux_dir/missing 525# fails when called from a subdirectory if $ac_aux_dir is relative 526# $top_srcdir/$ac_aux_dir/missing 527# fails if $ac_aux_dir is absolute, 528# fails when called from a subdirectory in a VPATH build with 529# a relative $ac_aux_dir 530# 531# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 532# are both prefixed by $srcdir. In an in-source build this is usually 533# harmless because $srcdir is `.', but things will broke when you 534# start a VPATH build or use an absolute $srcdir. 535# 536# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 537# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 538# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 539# and then we would define $MISSING as 540# MISSING="\${SHELL} $am_aux_dir/missing" 541# This will work as long as MISSING is not called from configure, because 542# unfortunately $(top_srcdir) has no meaning in configure. 543# However there are other variables, like CC, which are often used in 544# configure, and could therefore not use this "fixed" $ac_aux_dir. 545# 546# Another solution, used here, is to always expand $ac_aux_dir to an 547# absolute PATH. The drawback is that using absolute paths prevent a 548# configured tree to be moved without reconfiguration. 549 550# Rely on autoconf to set up CDPATH properly. 551AC_PREREQ([2.50]) 552 553AC_DEFUN([AM_AUX_DIR_EXPAND], [ 554# expand $ac_aux_dir to an absolute path 555am_aux_dir=`cd $ac_aux_dir && pwd` 556]) 557 558# AM_PROG_INSTALL_SH 559# ------------------ 560# Define $install_sh. 561 562# Copyright 2001 Free Software Foundation, Inc. 563 564# This program is free software; you can redistribute it and/or modify 565# it under the terms of the GNU General Public License as published by 566# the Free Software Foundation; either version 2, or (at your option) 567# any later version. 568 569# This program is distributed in the hope that it will be useful, 570# but WITHOUT ANY WARRANTY; without even the implied warranty of 571# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 572# GNU General Public License for more details. 573 574# You should have received a copy of the GNU General Public License 575# along with this program; if not, write to the Free Software 576# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 577# 02111-1307, USA. 578 579AC_DEFUN([AM_PROG_INSTALL_SH], 580[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 581install_sh=${install_sh-"$am_aux_dir/install-sh"} 582AC_SUBST(install_sh)]) 583 584# AM_PROG_INSTALL_STRIP 585 586# Copyright 2001 Free Software Foundation, Inc. 587 588# This program is free software; you can redistribute it and/or modify 589# it under the terms of the GNU General Public License as published by 590# the Free Software Foundation; either version 2, or (at your option) 591# any later version. 592 593# This program is distributed in the hope that it will be useful, 594# but WITHOUT ANY WARRANTY; without even the implied warranty of 595# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 596# GNU General Public License for more details. 597 598# You should have received a copy of the GNU General Public License 599# along with this program; if not, write to the Free Software 600# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 601# 02111-1307, USA. 602 603# One issue with vendor `install' (even GNU) is that you can't 604# specify the program used to strip binaries. This is especially 605# annoying in cross-compiling environments, where the build's strip 606# is unlikely to handle the host's binaries. 607# Fortunately install-sh will honor a STRIPPROG variable, so we 608# always use install-sh in `make install-strip', and initialize 609# STRIPPROG with the value of the STRIP variable (set by the user). 610AC_DEFUN([AM_PROG_INSTALL_STRIP], 611[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 612# Installed binaries are usually stripped using `strip' when the user 613# run `make install-strip'. However `strip' might not be the right 614# tool to use in cross-compilation environments, therefore Automake 615# will honor the `STRIP' environment variable to overrule this program. 616dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 617if test "$cross_compiling" != no; then 618 AC_CHECK_TOOL([STRIP], [strip], :) 619fi 620INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 621AC_SUBST([INSTALL_STRIP_PROGRAM])]) 622 623# -*- Autoconf -*- 624# Copyright (C) 2003 Free Software Foundation, Inc. 625 626# This program is free software; you can redistribute it and/or modify 627# it under the terms of the GNU General Public License as published by 628# the Free Software Foundation; either version 2, or (at your option) 629# any later version. 630 631# This program is distributed in the hope that it will be useful, 632# but WITHOUT ANY WARRANTY; without even the implied warranty of 633# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 634# GNU General Public License for more details. 635 636# You should have received a copy of the GNU General Public License 637# along with this program; if not, write to the Free Software 638# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 639# 02111-1307, USA. 640 641# serial 1 642 643# Check whether the underlying file-system supports filenames 644# with a leading dot. For instance MS-DOS doesn't. 645AC_DEFUN([AM_SET_LEADING_DOT], 646[rm -rf .tst 2>/dev/null 647mkdir .tst 2>/dev/null 648if test -d .tst; then 649 am__leading_dot=. 650else 651 am__leading_dot=_ 652fi 653rmdir .tst 2>/dev/null 654AC_SUBST([am__leading_dot])]) 655 656# serial 5 -*- Autoconf -*- 657 658# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 659 660# This program is free software; you can redistribute it and/or modify 661# it under the terms of the GNU General Public License as published by 662# the Free Software Foundation; either version 2, or (at your option) 663# any later version. 664 665# This program is distributed in the hope that it will be useful, 666# but WITHOUT ANY WARRANTY; without even the implied warranty of 667# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 668# GNU General Public License for more details. 669 670# You should have received a copy of the GNU General Public License 671# along with this program; if not, write to the Free Software 672# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 673# 02111-1307, USA. 674 675 676# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 677# written in clear, in which case automake, when reading aclocal.m4, 678# will think it sees a *use*, and therefore will trigger all it's 679# C support machinery. Also note that it means that autoscan, seeing 680# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 681 682 683 684# _AM_DEPENDENCIES(NAME) 685# ---------------------- 686# See how the compiler implements dependency checking. 687# NAME is "CC", "CXX", "GCJ", or "OBJC". 688# We try a few techniques and use that to set a single cache variable. 689# 690# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 691# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 692# dependency, and given that the user is not expected to run this macro, 693# just rely on AC_PROG_CC. 694AC_DEFUN([_AM_DEPENDENCIES], 695[AC_REQUIRE([AM_SET_DEPDIR])dnl 696AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 697AC_REQUIRE([AM_MAKE_INCLUDE])dnl 698AC_REQUIRE([AM_DEP_TRACK])dnl 699 700ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 701 [$1], CXX, [depcc="$CXX" am_compiler_list=], 702 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 703 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 704 [depcc="$$1" am_compiler_list=]) 705 706AC_CACHE_CHECK([dependency style of $depcc], 707 [am_cv_$1_dependencies_compiler_type], 708[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 709 # We make a subdir and do the tests there. Otherwise we can end up 710 # making bogus files that we don't know about and never remove. For 711 # instance it was reported that on HP-UX the gcc test will end up 712 # making a dummy file named `D' -- because `-MD' means `put the output 713 # in D'. 714 mkdir conftest.dir 715 # Copy depcomp to subdir because otherwise we won't find it if we're 716 # using a relative directory. 717 cp "$am_depcomp" conftest.dir 718 cd conftest.dir 719 # We will build objects and dependencies in a subdirectory because 720 # it helps to detect inapplicable dependency modes. For instance 721 # both Tru64's cc and ICC support -MD to output dependencies as a 722 # side effect of compilation, but ICC will put the dependencies in 723 # the current directory while Tru64 will put them in the object 724 # directory. 725 mkdir sub 726 727 am_cv_$1_dependencies_compiler_type=none 728 if test "$am_compiler_list" = ""; then 729 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 730 fi 731 for depmode in $am_compiler_list; do 732 # Setup a source with many dependencies, because some compilers 733 # like to wrap large dependency lists on column 80 (with \), and 734 # we should not choose a depcomp mode which is confused by this. 735 # 736 # We need to recreate these files for each test, as the compiler may 737 # overwrite some of them when testing with obscure command lines. 738 # This happens at least with the AIX C compiler. 739 : > sub/conftest.c 740 for i in 1 2 3 4 5 6; do 741 echo '#include "conftst'$i'.h"' >> sub/conftest.c 742 : > sub/conftst$i.h 743 done 744 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 745 746 case $depmode in 747 nosideeffect) 748 # after this tag, mechanisms are not by side-effect, so they'll 749 # only be used when explicitly requested 750 if test "x$enable_dependency_tracking" = xyes; then 751 continue 752 else 753 break 754 fi 755 ;; 756 none) break ;; 757 esac 758 # We check with `-c' and `-o' for the sake of the "dashmstdout" 759 # mode. It turns out that the SunPro C++ compiler does not properly 760 # handle `-M -o', and we need to detect this. 761 if depmode=$depmode \ 762 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 763 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 764 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 765 >/dev/null 2>conftest.err && 766 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 767 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 768 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 769 # icc doesn't choke on unknown options, it will just issue warnings 770 # (even with -Werror). So we grep stderr for any message 771 # that says an option was ignored. 772 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 773 am_cv_$1_dependencies_compiler_type=$depmode 774 break 775 fi 776 fi 777 done 778 779 cd .. 780 rm -rf conftest.dir 781else 782 am_cv_$1_dependencies_compiler_type=none 783fi 784]) 785AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 786AM_CONDITIONAL([am__fastdep$1], [ 787 test "x$enable_dependency_tracking" != xno \ 788 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 789]) 790 791 792# AM_SET_DEPDIR 793# ------------- 794# Choose a directory name for dependency files. 795# This macro is AC_REQUIREd in _AM_DEPENDENCIES 796AC_DEFUN([AM_SET_DEPDIR], 797[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 798AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 799]) 800 801 802# AM_DEP_TRACK 803# ------------ 804AC_DEFUN([AM_DEP_TRACK], 805[AC_ARG_ENABLE(dependency-tracking, 806[ --disable-dependency-tracking Speeds up one-time builds 807 --enable-dependency-tracking Do not reject slow dependency extractors]) 808if test "x$enable_dependency_tracking" != xno; then 809 am_depcomp="$ac_aux_dir/depcomp" 810 AMDEPBACKSLASH='\' 811fi 812AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 813AC_SUBST([AMDEPBACKSLASH]) 814]) 815 816# Generate code to set up dependency tracking. -*- Autoconf -*- 817 818# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 819 820# This program is free software; you can redistribute it and/or modify 821# it under the terms of the GNU General Public License as published by 822# the Free Software Foundation; either version 2, or (at your option) 823# any later version. 824 825# This program is distributed in the hope that it will be useful, 826# but WITHOUT ANY WARRANTY; without even the implied warranty of 827# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 828# GNU General Public License for more details. 829 830# You should have received a copy of the GNU General Public License 831# along with this program; if not, write to the Free Software 832# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 833# 02111-1307, USA. 834 835#serial 2 836 837# _AM_OUTPUT_DEPENDENCY_COMMANDS 838# ------------------------------ 839AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 840[for mf in $CONFIG_FILES; do 841 # Strip MF so we end up with the name of the file. 842 mf=`echo "$mf" | sed -e 's/:.*$//'` 843 # Check whether this is an Automake generated Makefile or not. 844 # We used to match only the files named `Makefile.in', but 845 # some people rename them; so instead we look at the file content. 846 # Grep'ing the first line is not enough: some people post-process 847 # each Makefile.in and add a new line on top of each file to say so. 848 # So let's grep whole file. 849 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 850 dirpart=`AS_DIRNAME("$mf")` 851 else 852 continue 853 fi 854 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 855 # Extract the definition of DEP_FILES from the Makefile without 856 # running `make'. 857 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 858 test -z "$DEPDIR" && continue 859 # When using ansi2knr, U may be empty or an underscore; expand it 860 U=`sed -n -e '/^U = / s///p' < "$mf"` 861 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 862 # We invoke sed twice because it is the simplest approach to 863 # changing $(DEPDIR) to its actual value in the expansion. 864 for file in `sed -n -e ' 865 /^DEP_FILES = .*\\\\$/ { 866 s/^DEP_FILES = // 867 :loop 868 s/\\\\$// 869 p 870 n 871 /\\\\$/ b loop 872 p 873 } 874 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 875 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 876 # Make sure the directory exists. 877 test -f "$dirpart/$file" && continue 878 fdir=`AS_DIRNAME(["$file"])` 879 AS_MKDIR_P([$dirpart/$fdir]) 880 # echo "creating $dirpart/$file" 881 echo '# dummy' > "$dirpart/$file" 882 done 883done 884])# _AM_OUTPUT_DEPENDENCY_COMMANDS 885 886 887# AM_OUTPUT_DEPENDENCY_COMMANDS 888# ----------------------------- 889# This macro should only be invoked once -- use via AC_REQUIRE. 890# 891# This code is only required when automatic dependency tracking 892# is enabled. FIXME. This creates each `.P' file that we will 893# need in order to bootstrap the dependency handling code. 894AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 895[AC_CONFIG_COMMANDS([depfiles], 896 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 897 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 898]) 899 900# Check to see how 'make' treats includes. -*- Autoconf -*- 901 902# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 903 904# This program is free software; you can redistribute it and/or modify 905# it under the terms of the GNU General Public License as published by 906# the Free Software Foundation; either version 2, or (at your option) 907# any later version. 908 909# This program is distributed in the hope that it will be useful, 910# but WITHOUT ANY WARRANTY; without even the implied warranty of 911# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 912# GNU General Public License for more details. 913 914# You should have received a copy of the GNU General Public License 915# along with this program; if not, write to the Free Software 916# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 917# 02111-1307, USA. 918 919# serial 2 920 921# AM_MAKE_INCLUDE() 922# ----------------- 923# Check to see how make treats includes. 924AC_DEFUN([AM_MAKE_INCLUDE], 925[am_make=${MAKE-make} 926cat > confinc << 'END' 927am__doit: 928 @echo done 929.PHONY: am__doit 930END 931# If we don't find an include directive, just comment out the code. 932AC_MSG_CHECKING([for style of include used by $am_make]) 933am__include="#" 934am__quote= 935_am_result=none 936# First try GNU make style include. 937echo "include confinc" > confmf 938# We grep out `Entering directory' and `Leaving directory' 939# messages which can occur if `w' ends up in MAKEFLAGS. 940# In particular we don't look at `^make:' because GNU make might 941# be invoked under some other name (usually "gmake"), in which 942# case it prints its new name instead of `make'. 943if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 944 am__include=include 945 am__quote= 946 _am_result=GNU 947fi 948# Now try BSD make style include. 949if test "$am__include" = "#"; then 950 echo '.include "confinc"' > confmf 951 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 952 am__include=.include 953 am__quote="\"" 954 _am_result=BSD 955 fi 956fi 957AC_SUBST([am__include]) 958AC_SUBST([am__quote]) 959AC_MSG_RESULT([$_am_result]) 960rm -f confinc confmf 961]) 962 963# AM_CONDITIONAL -*- Autoconf -*- 964 965# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 966 967# This program is free software; you can redistribute it and/or modify 968# it under the terms of the GNU General Public License as published by 969# the Free Software Foundation; either version 2, or (at your option) 970# any later version. 971 972# This program is distributed in the hope that it will be useful, 973# but WITHOUT ANY WARRANTY; without even the implied warranty of 974# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 975# GNU General Public License for more details. 976 977# You should have received a copy of the GNU General Public License 978# along with this program; if not, write to the Free Software 979# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 980# 02111-1307, USA. 981 982# serial 5 983 984AC_PREREQ(2.52) 985 986# AM_CONDITIONAL(NAME, SHELL-CONDITION) 987# ------------------------------------- 988# Define a conditional. 989AC_DEFUN([AM_CONDITIONAL], 990[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 991 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 992AC_SUBST([$1_TRUE]) 993AC_SUBST([$1_FALSE]) 994if $2; then 995 $1_TRUE= 996 $1_FALSE='#' 997else 998 $1_TRUE='#' 999 $1_FALSE= 1000fi 1001AC_CONFIG_COMMANDS_PRE( 1002[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1003 AC_MSG_ERROR([conditional "$1" was never defined. 1004Usually this means the macro was only invoked conditionally.]) 1005fi])]) 1006 1007# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 1008 1009# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 1010 1011# This program is free software; you can redistribute it and/or modify 1012# it under the terms of the GNU General Public License as published by 1013# the Free Software Foundation; either version 2, or (at your option) 1014# any later version. 1015 1016# This program is distributed in the hope that it will be useful, 1017# but WITHOUT ANY WARRANTY; without even the implied warranty of 1018# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1019# GNU General Public License for more details. 1020 1021# You should have received a copy of the GNU General Public License 1022# along with this program; if not, write to the Free Software 1023# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1024# 02111-1307, USA. 1025 1026AC_PREREQ([2.52]) 1027 1028# serial 6 1029 1030# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 1031AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 1032 1033