Changeset 2984 in orxonox.OLD for orxonox/branches/osX/aclocal.m4
- Timestamp:
- Nov 25, 2004, 1:45:48 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/osX/aclocal.m4
r2983 r2984 1 # generated automatically by aclocal 1. 8.5-*- Autoconf -*-2 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 , 2003, 20041 # generated automatically by aclocal 1.7.6 -*- Autoconf -*- 2 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4 4 # Free Software Foundation, Inc. 5 5 # This file is free software; the Free Software Foundation … … 12 12 # PARTICULAR PURPOSE. 13 13 14 15 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 16 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page 17 dnl also defines GSTUFF_PKG_ERRORS on error 18 AC_DEFUN(PKG_CHECK_MODULES, [ 19 succeeded=no 20 21 if test -z "$PKG_CONFIG"; then 22 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 14 # Do all the work for Automake. -*- Autoconf -*- 15 16 # This macro actually does too much some checks are only needed if 17 # your package does certain things. But this isn't really a big deal. 18 19 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 20 # Free Software Foundation, Inc. 21 22 # This program is free software; you can redistribute it and/or modify 23 # it under the terms of the GNU General Public License as published by 24 # the Free Software Foundation; either version 2, or (at your option) 25 # any later version. 26 27 # This program is distributed in the hope that it will be useful, 28 # but WITHOUT ANY WARRANTY; without even the implied warranty of 29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 # GNU General Public License for more details. 31 32 # You should have received a copy of the GNU General Public License 33 # along with this program; if not, write to the Free Software 34 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 35 # 02111-1307, USA. 36 37 # serial 10 38 39 AC_PREREQ([2.54]) 40 41 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 42 # the ones we care about. 43 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44 45 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 46 # AM_INIT_AUTOMAKE([OPTIONS]) 47 # ----------------------------------------------- 48 # The call with PACKAGE and VERSION arguments is the old style 49 # call (pre autoconf-2.50), which is being phased out. PACKAGE 50 # and VERSION should now be passed to AC_INIT and removed from 51 # the call to AM_INIT_AUTOMAKE. 52 # We support both call styles for the transition. After 53 # the next Automake release, Autoconf can make the AC_INIT 54 # arguments mandatory, and then we can depend on a new Autoconf 55 # release and drop the old call support. 56 AC_DEFUN([AM_INIT_AUTOMAKE], 57 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 58 AC_REQUIRE([AC_PROG_INSTALL])dnl 59 # test to see if srcdir already configured 60 if test "`cd $srcdir && pwd`" != "`pwd`" && 61 test -f $srcdir/config.status; then 62 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 63 fi 64 65 # test whether we have cygpath 66 if test -z "$CYGPATH_W"; then 67 if (cygpath --version) >/dev/null 2>/dev/null; then 68 CYGPATH_W='cygpath -w' 69 else 70 CYGPATH_W=echo 23 71 fi 24 25 if test "$PKG_CONFIG" = "no" ; then 26 echo "*** The pkg-config script could not be found. Make sure it is" 27 echo "*** in your path, or set the PKG_CONFIG environment variable" 28 echo "*** to the full path to pkg-config." 29 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." 30 else 31 PKG_CONFIG_MIN_VERSION=0.9.0 32 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then 33 AC_MSG_CHECKING(for $2) 34 35 if $PKG_CONFIG --exists "$2" ; then 36 AC_MSG_RESULT(yes) 37 succeeded=yes 38 39 AC_MSG_CHECKING($1_CFLAGS) 40 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` 41 AC_MSG_RESULT($$1_CFLAGS) 42 43 AC_MSG_CHECKING($1_LIBS) 44 $1_LIBS=`$PKG_CONFIG --libs "$2"` 45 AC_MSG_RESULT($$1_LIBS) 46 else 47 $1_CFLAGS="" 48 $1_LIBS="" 49 ## If we have a custom action on failure, don't print errors, but 50 ## do set a variable so people can do so. 51 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 52 ifelse([$4], ,echo $$1_PKG_ERRORS,) 53 fi 54 55 AC_SUBST($1_CFLAGS) 56 AC_SUBST($1_LIBS) 57 else 58 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." 59 echo "*** See http://www.freedesktop.org/software/pkgconfig" 60 fi 61 fi 62 63 if test $succeeded = yes; then 64 ifelse([$3], , :, [$3]) 65 else 66 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) 67 fi 72 fi 73 AC_SUBST([CYGPATH_W]) 74 75 # Define the identity of the package. 76 dnl Distinguish between old-style and new-style calls. 77 m4_ifval([$2], 78 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 79 AC_SUBST([PACKAGE], [$1])dnl 80 AC_SUBST([VERSION], [$2])], 81 [_AM_SET_OPTIONS([$1])dnl 82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 84 85 _AM_IF_OPTION([no-define],, 86 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 88 89 # Some tools Automake needs. 90 AC_REQUIRE([AM_SANITY_CHECK])dnl 91 AC_REQUIRE([AC_ARG_PROGRAM])dnl 92 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 93 AM_MISSING_PROG(AUTOCONF, autoconf) 94 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 95 AM_MISSING_PROG(AUTOHEADER, autoheader) 96 AM_MISSING_PROG(MAKEINFO, makeinfo) 97 AM_MISSING_PROG(AMTAR, tar) 98 AM_PROG_INSTALL_SH 99 AM_PROG_INSTALL_STRIP 100 # We need awk for the "check" target. The system "awk" is bad on 101 # some platforms. 102 AC_REQUIRE([AC_PROG_AWK])dnl 103 AC_REQUIRE([AC_PROG_MAKE_SET])dnl 104 AC_REQUIRE([AM_SET_LEADING_DOT])dnl 105 106 _AM_IF_OPTION([no-dependencies],, 107 [AC_PROVIDE_IFELSE([AC_PROG_CC], 108 [_AM_DEPENDENCIES(CC)], 109 [define([AC_PROG_CC], 110 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 111 AC_PROVIDE_IFELSE([AC_PROG_CXX], 112 [_AM_DEPENDENCIES(CXX)], 113 [define([AC_PROG_CXX], 114 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 68 115 ]) 69 70 71 72 # Configure paths for SDL73 # Sam Lantinga 9/21/9974 # stolen from Manish Singh75 # stolen back from Frank Belew76 # stolen from Manish Singh77 # Shamelessly stolen from Owen Taylor78 79 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])80 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS81 dnl82 AC_DEFUN([AM_PATH_SDL],83 [dnl84 dnl Get the cflags and libraries from the sdl-config script85 dnl86 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],87 sdl_prefix="$withval", sdl_prefix="")88 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],89 sdl_exec_prefix="$withval", sdl_exec_prefix="")90 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],91 , enable_sdltest=yes)92 93 if test x$sdl_exec_prefix != x ; then94 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"95 if test x${SDL_CONFIG+set} != xset ; then96 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config97 fi98 fi99 if test x$sdl_prefix != x ; then100 sdl_args="$sdl_args --prefix=$sdl_prefix"101 if test x${SDL_CONFIG+set} != xset ; then102 SDL_CONFIG=$sdl_prefix/bin/sdl-config103 fi104 fi105 106 AC_REQUIRE([AC_CANONICAL_TARGET])107 PATH="$prefix/bin:$prefix/usr/bin:$PATH"108 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])109 min_sdl_version=ifelse([$1], ,0.11.0,$1)110 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)111 no_sdl=""112 if test "$SDL_CONFIG" = "no" ; then113 no_sdl=yes114 else115 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`116 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`117 118 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \119 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`120 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \121 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`122 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \123 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`124 if test "x$enable_sdltest" = "xyes" ; then125 ac_save_CFLAGS="$CFLAGS"126 ac_save_LIBS="$LIBS"127 CFLAGS="$CFLAGS $SDL_CFLAGS"128 LIBS="$LIBS $SDL_LIBS"129 dnl130 dnl Now check if the installed SDL is sufficiently new. (Also sanity131 dnl checks the results of sdl-config to some extent132 dnl133 rm -f conf.sdltest134 AC_TRY_RUN([135 #include <stdio.h>136 #include <stdlib.h>137 #include <string.h>138 #include "SDL.h"139 140 char*141 my_strdup (char *str)142 {143 char *new_str;144 145 if (str)146 {147 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));148 strcpy (new_str, str);149 }150 else151 new_str = NULL;152 153 return new_str;154 }155 156 int main (int argc, char *argv[])157 {158 int major, minor, micro;159 char *tmp_version;160 161 /* This hangs on some systems (?)162 system ("touch conf.sdltest");163 */164 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }165 166 /* HP/UX 9 (%@#!) writes to sscanf strings */167 tmp_version = my_strdup("$min_sdl_version");168 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {169 printf("%s, bad version string\n", "$min_sdl_version");170 exit(1);171 }172 173 if (($sdl_major_version > major) ||174 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||175 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))176 {177 return 0;178 }179 else180 {181 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);182 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);183 printf("*** best to upgrade to the required version.\n");184 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");185 printf("*** to point to the correct copy of sdl-config, and remove the file\n");186 printf("*** config.cache before re-running configure\n");187 return 1;188 }189 }190 191 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])192 CFLAGS="$ac_save_CFLAGS"193 LIBS="$ac_save_LIBS"194 fi195 fi196 if test "x$no_sdl" = x ; then197 AC_MSG_RESULT(yes)198 ifelse([$2], , :, [$2])199 else200 AC_MSG_RESULT(no)201 if test "$SDL_CONFIG" = "no" ; then202 echo "*** The sdl-config script installed by SDL could not be found"203 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"204 echo "*** your path, or set the SDL_CONFIG environment variable to the"205 echo "*** full path to sdl-config."206 else207 if test -f conf.sdltest ; then208 :209 else210 echo "*** Could not run SDL test program, checking why..."211 CFLAGS="$CFLAGS $SDL_CFLAGS"212 LIBS="$LIBS $SDL_LIBS"213 AC_TRY_LINK([214 #include <stdio.h>215 #include "SDL.h"216 217 int main(int argc, char *argv[])218 { return 0; }219 #undef main220 #define main K_and_R_C_main221 ], [ return 0; ],222 [ echo "*** The test program compiled, but did not run. This usually means"223 echo "*** that the run-time linker is not finding SDL or finding the wrong"224 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"225 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"226 echo "*** to the installed location Also, make sure you have run ldconfig if that"227 echo "*** is required on your system"228 echo "***"229 echo "*** If you have an old version installed, it is best to remove it, although"230 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],231 [ echo "*** The test program failed to compile or link. See the file config.log for the"232 echo "*** exact error that occured. This usually means SDL was incorrectly installed"233 echo "*** or that you have moved SDL since it was installed. In the latter case, you"234 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])235 CFLAGS="$ac_save_CFLAGS"236 LIBS="$ac_save_LIBS"237 fi238 fi239 SDL_CFLAGS=""240 SDL_LIBS=""241 ifelse([$3], , :, [$3])242 fi243 AC_SUBST(SDL_CFLAGS)244 AC_SUBST(SDL_LIBS)245 rm -f conf.sdltest246 116 ]) 247 117 248 # -*- Autoconf -*- 249 # Copyright (C) 2002, 2003 Free Software Foundation, Inc. 250 # Generated from amversion.in; do not edit by hand. 118 119 # When config.status generates a header, we must update the stamp-h file. 120 # This file resides in the same directory as the config header 121 # that is generated. The stamp files are numbered to have different names. 122 123 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 124 # loop where config.status creates the headers, so we can generate 125 # our stamp files there. 126 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 127 [# Compute $1's index in $config_headers. 128 _am_stamp_count=1 129 for _am_header in $config_headers :; do 130 case $_am_header in 131 $1 | $1:* ) 132 break ;; 133 * ) 134 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 135 esac 136 done 137 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 138 139 # Copyright 2002 Free Software Foundation, Inc. 251 140 252 141 # This program is free software; you can redistribute it and/or modify … … 268 157 # Automake X.Y traces this macro to ensure aclocal.m4 has been 269 158 # generated from the m4 files accompanying Automake X.Y. 270 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])159 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 271 160 272 161 # AM_SET_CURRENT_AUTOMAKE_VERSION … … 275 164 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 276 165 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 277 [AM_AUTOMAKE_VERSION([1.8.5])]) 166 [AM_AUTOMAKE_VERSION([1.7.6])]) 167 168 # Helper functions for option handling. -*- Autoconf -*- 169 170 # Copyright 2001, 2002 Free Software Foundation, Inc. 171 172 # This program is free software; you can redistribute it and/or modify 173 # it under the terms of the GNU General Public License as published by 174 # the Free Software Foundation; either version 2, or (at your option) 175 # any later version. 176 177 # This program is distributed in the hope that it will be useful, 178 # but WITHOUT ANY WARRANTY; without even the implied warranty of 179 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 180 # GNU General Public License for more details. 181 182 # You should have received a copy of the GNU General Public License 183 # along with this program; if not, write to the Free Software 184 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 185 # 02111-1307, USA. 186 187 # serial 2 188 189 # _AM_MANGLE_OPTION(NAME) 190 # ----------------------- 191 AC_DEFUN([_AM_MANGLE_OPTION], 192 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 193 194 # _AM_SET_OPTION(NAME) 195 # ------------------------------ 196 # Set option NAME. Presently that only means defining a flag for this option. 197 AC_DEFUN([_AM_SET_OPTION], 198 [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 199 200 # _AM_SET_OPTIONS(OPTIONS) 201 # ---------------------------------- 202 # OPTIONS is a space-separated list of Automake options. 203 AC_DEFUN([_AM_SET_OPTIONS], 204 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 205 206 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 207 # ------------------------------------------- 208 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 209 AC_DEFUN([_AM_IF_OPTION], 210 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 211 212 # 213 # Check to make sure that the build environment is sane. 214 # 215 216 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 217 218 # This program is free software; you can redistribute it and/or modify 219 # it under the terms of the GNU General Public License as published by 220 # the Free Software Foundation; either version 2, or (at your option) 221 # any later version. 222 223 # This program is distributed in the hope that it will be useful, 224 # but WITHOUT ANY WARRANTY; without even the implied warranty of 225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 226 # GNU General Public License for more details. 227 228 # You should have received a copy of the GNU General Public License 229 # along with this program; if not, write to the Free Software 230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 231 # 02111-1307, USA. 232 233 # serial 3 234 235 # AM_SANITY_CHECK 236 # --------------- 237 AC_DEFUN([AM_SANITY_CHECK], 238 [AC_MSG_CHECKING([whether build environment is sane]) 239 # Just in case 240 sleep 1 241 echo timestamp > conftest.file 242 # Do `set' in a subshell so we don't clobber the current shell's 243 # arguments. Must try -L first in case configure is actually a 244 # symlink; some systems play weird games with the mod time of symlinks 245 # (eg FreeBSD returns the mod time of the symlink's containing 246 # directory). 247 if ( 248 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 249 if test "$[*]" = "X"; then 250 # -L didn't work. 251 set X `ls -t $srcdir/configure conftest.file` 252 fi 253 rm -f conftest.file 254 if test "$[*]" != "X $srcdir/configure conftest.file" \ 255 && test "$[*]" != "X conftest.file $srcdir/configure"; then 256 257 # If neither matched, then we have a broken ls. This can happen 258 # if, for instance, CONFIG_SHELL is bash and it inherits a 259 # broken ls alias from the environment. This has actually 260 # happened. Such a system could not be considered "sane". 261 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 262 alias in your environment]) 263 fi 264 265 test "$[2]" = conftest.file 266 ) 267 then 268 # Ok. 269 : 270 else 271 AC_MSG_ERROR([newly created file is older than distributed files! 272 Check your system clock]) 273 fi 274 AC_MSG_RESULT(yes)]) 275 276 # -*- Autoconf -*- 277 278 279 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 280 281 # This program is free software; you can redistribute it and/or modify 282 # it under the terms of the GNU General Public License as published by 283 # the Free Software Foundation; either version 2, or (at your option) 284 # any later version. 285 286 # This program is distributed in the hope that it will be useful, 287 # but WITHOUT ANY WARRANTY; without even the implied warranty of 288 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 289 # GNU General Public License for more details. 290 291 # You should have received a copy of the GNU General Public License 292 # along with this program; if not, write to the Free Software 293 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 294 # 02111-1307, USA. 295 296 # serial 3 297 298 # AM_MISSING_PROG(NAME, PROGRAM) 299 # ------------------------------ 300 AC_DEFUN([AM_MISSING_PROG], 301 [AC_REQUIRE([AM_MISSING_HAS_RUN]) 302 $1=${$1-"${am_missing_run}$2"} 303 AC_SUBST($1)]) 304 305 306 # AM_MISSING_HAS_RUN 307 # ------------------ 308 # Define MISSING if not defined so far and test if it supports --run. 309 # If it does, set am_missing_run to use it, otherwise, to nothing. 310 AC_DEFUN([AM_MISSING_HAS_RUN], 311 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 312 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 313 # Use eval to expand $SHELL 314 if eval "$MISSING --run true"; then 315 am_missing_run="$MISSING --run " 316 else 317 am_missing_run= 318 AC_MSG_WARN([`missing' script is too old or missing]) 319 fi 320 ]) 278 321 279 322 # AM_AUX_DIR_EXPAND 280 323 281 # Copyright (C) 2001, 2003Free Software Foundation, Inc.324 # Copyright 2001 Free Software Foundation, Inc. 282 325 283 326 # This program is free software; you can redistribute it and/or modify … … 334 377 # configured tree to be moved without reconfiguration. 335 378 336 AC_DEFUN([AM_AUX_DIR_EXPAND], 337 [dnl Rely on autoconf to set up CDPATH properly. 338 AC_PREREQ([2.50])dnl 379 # Rely on autoconf to set up CDPATH properly. 380 AC_PREREQ([2.50]) 381 382 AC_DEFUN([AM_AUX_DIR_EXPAND], [ 339 383 # expand $ac_aux_dir to an absolute path 340 384 am_aux_dir=`cd $ac_aux_dir && pwd` 341 385 ]) 342 386 343 # AM_CONDITIONAL -*- Autoconf -*- 344 345 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 346 347 # This program is free software; you can redistribute it and/or modify 348 # it under the terms of the GNU General Public License as published by 349 # the Free Software Foundation; either version 2, or (at your option) 350 # any later version. 351 352 # This program is distributed in the hope that it will be useful, 353 # but WITHOUT ANY WARRANTY; without even the implied warranty of 354 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 355 # GNU General Public License for more details. 356 357 # You should have received a copy of the GNU General Public License 358 # along with this program; if not, write to the Free Software 359 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 360 # 02111-1307, USA. 361 362 # serial 6 363 364 # AM_CONDITIONAL(NAME, SHELL-CONDITION) 365 # ------------------------------------- 366 # Define a conditional. 367 AC_DEFUN([AM_CONDITIONAL], 368 [AC_PREREQ(2.52)dnl 369 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 370 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 371 AC_SUBST([$1_TRUE]) 372 AC_SUBST([$1_FALSE]) 373 if $2; then 374 $1_TRUE= 375 $1_FALSE='#' 387 # AM_PROG_INSTALL_SH 388 # ------------------ 389 # Define $install_sh. 390 391 # Copyright 2001 Free Software Foundation, Inc. 392 393 # This program is free software; you can redistribute it and/or modify 394 # it under the terms of the GNU General Public License as published by 395 # the Free Software Foundation; either version 2, or (at your option) 396 # any later version. 397 398 # This program is distributed in the hope that it will be useful, 399 # but WITHOUT ANY WARRANTY; without even the implied warranty of 400 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 401 # GNU General Public License for more details. 402 403 # You should have received a copy of the GNU General Public License 404 # along with this program; if not, write to the Free Software 405 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 406 # 02111-1307, USA. 407 408 AC_DEFUN([AM_PROG_INSTALL_SH], 409 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 410 install_sh=${install_sh-"$am_aux_dir/install-sh"} 411 AC_SUBST(install_sh)]) 412 413 # AM_PROG_INSTALL_STRIP 414 415 # Copyright 2001 Free Software Foundation, Inc. 416 417 # This program is free software; you can redistribute it and/or modify 418 # it under the terms of the GNU General Public License as published by 419 # the Free Software Foundation; either version 2, or (at your option) 420 # any later version. 421 422 # This program is distributed in the hope that it will be useful, 423 # but WITHOUT ANY WARRANTY; without even the implied warranty of 424 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 425 # GNU General Public License for more details. 426 427 # You should have received a copy of the GNU General Public License 428 # along with this program; if not, write to the Free Software 429 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 430 # 02111-1307, USA. 431 432 # One issue with vendor `install' (even GNU) is that you can't 433 # specify the program used to strip binaries. This is especially 434 # annoying in cross-compiling environments, where the build's strip 435 # is unlikely to handle the host's binaries. 436 # Fortunately install-sh will honor a STRIPPROG variable, so we 437 # always use install-sh in `make install-strip', and initialize 438 # STRIPPROG with the value of the STRIP variable (set by the user). 439 AC_DEFUN([AM_PROG_INSTALL_STRIP], 440 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 441 # Installed binaries are usually stripped using `strip' when the user 442 # run `make install-strip'. However `strip' might not be the right 443 # tool to use in cross-compilation environments, therefore Automake 444 # will honor the `STRIP' environment variable to overrule this program. 445 dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 446 if test "$cross_compiling" != no; then 447 AC_CHECK_TOOL([STRIP], [strip], :) 448 fi 449 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 450 AC_SUBST([INSTALL_STRIP_PROGRAM])]) 451 452 # -*- Autoconf -*- 453 # Copyright (C) 2003 Free Software Foundation, Inc. 454 455 # This program is free software; you can redistribute it and/or modify 456 # it under the terms of the GNU General Public License as published by 457 # the Free Software Foundation; either version 2, or (at your option) 458 # any later version. 459 460 # This program is distributed in the hope that it will be useful, 461 # but WITHOUT ANY WARRANTY; without even the implied warranty of 462 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 463 # GNU General Public License for more details. 464 465 # You should have received a copy of the GNU General Public License 466 # along with this program; if not, write to the Free Software 467 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 468 # 02111-1307, USA. 469 470 # serial 1 471 472 # Check whether the underlying file-system supports filenames 473 # with a leading dot. For instance MS-DOS doesn't. 474 AC_DEFUN([AM_SET_LEADING_DOT], 475 [rm -rf .tst 2>/dev/null 476 mkdir .tst 2>/dev/null 477 if test -d .tst; then 478 am__leading_dot=. 376 479 else 377 $1_TRUE='#' 378 $1_FALSE= 480 am__leading_dot=_ 379 481 fi 380 AC_CONFIG_COMMANDS_PRE( 381 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 382 AC_MSG_ERROR([conditional "$1" was never defined. 383 Usually this means the macro was only invoked conditionally.]) 384 fi])]) 385 386 # serial 7 -*- Autoconf -*- 387 388 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 389 # Free Software Foundation, Inc. 482 rmdir .tst 2>/dev/null 483 AC_SUBST([am__leading_dot])]) 484 485 # serial 5 -*- Autoconf -*- 486 487 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 390 488 391 489 # This program is free software; you can redistribute it and/or modify … … 471 569 for i in 1 2 3 4 5 6; do 472 570 echo '#include "conftst'$i'.h"' >> sub/conftest.c 473 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 474 # Solaris 8's {/usr,}/bin/sh. 475 touch sub/conftst$i.h 571 : > sub/conftst$i.h 476 572 done 477 573 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 501 597 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 502 598 # icc doesn't choke on unknown options, it will just issue warnings 503 # or remarks (even with -Werror). So we grep stderr for any message 504 # that says an option was ignored or not supported. 505 # When given -MP, icc 7.0 and 7.1 complain thusly: 506 # icc: Command line warning: ignoring option '-M'; no argument required 507 # The diagnosis changed in icc 8.0: 508 # icc: Command line remark: option '-MP' not supported 509 if (grep 'ignoring option' conftest.err || 510 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 599 # (even with -Werror). So we grep stderr for any message 600 # that says an option was ignored. 601 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 511 602 am_cv_$1_dependencies_compiler_type=$depmode 512 603 break … … 542 633 AC_DEFUN([AM_DEP_TRACK], 543 634 [AC_ARG_ENABLE(dependency-tracking, 544 [ --disable-dependency-tracking speeds up one-time build545 --enable-dependency-tracking do not reject slow dependency extractors])635 [ --disable-dependency-tracking Speeds up one-time builds 636 --enable-dependency-tracking Do not reject slow dependency extractors]) 546 637 if test "x$enable_dependency_tracking" != xno; then 547 638 am_depcomp="$ac_aux_dir/depcomp" … … 554 645 # Generate code to set up dependency tracking. -*- Autoconf -*- 555 646 556 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004Free Software Foundation, Inc.647 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 557 648 558 649 # This program is free software; you can redistribute it and/or modify … … 593 684 # Extract the definition of DEP_FILES from the Makefile without 594 685 # running `make'. 595 DEPDIR=`sed -n 's/^DEPDIR =//p' < "$mf"`686 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 596 687 test -z "$DEPDIR" && continue 597 688 # When using ansi2knr, U may be empty or an underscore; expand it 598 U=`sed -n 's/^U =//p' < "$mf"`689 U=`sed -n -e '/^U = / s///p' < "$mf"` 599 690 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 600 691 # We invoke sed twice because it is the simplest approach to 601 692 # changing $(DEPDIR) to its actual value in the expansion. 602 for file in `sed -n '693 for file in `sed -n -e ' 603 694 /^DEP_FILES = .*\\\\$/ { 604 695 s/^DEP_FILES = // … … 635 726 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 636 727 ]) 637 638 # Do all the work for Automake. -*- Autoconf -*-639 640 # This macro actually does too much some checks are only needed if641 # your package does certain things. But this isn't really a big deal.642 643 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003644 # Free Software Foundation, Inc.645 646 # This program is free software; you can redistribute it and/or modify647 # it under the terms of the GNU General Public License as published by648 # the Free Software Foundation; either version 2, or (at your option)649 # any later version.650 651 # This program is distributed in the hope that it will be useful,652 # but WITHOUT ANY WARRANTY; without even the implied warranty of653 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the654 # GNU General Public License for more details.655 656 # You should have received a copy of the GNU General Public License657 # along with this program; if not, write to the Free Software658 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA659 # 02111-1307, USA.660 661 # serial 11662 663 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])664 # AM_INIT_AUTOMAKE([OPTIONS])665 # -----------------------------------------------666 # The call with PACKAGE and VERSION arguments is the old style667 # call (pre autoconf-2.50), which is being phased out. PACKAGE668 # and VERSION should now be passed to AC_INIT and removed from669 # the call to AM_INIT_AUTOMAKE.670 # We support both call styles for the transition. After671 # the next Automake release, Autoconf can make the AC_INIT672 # arguments mandatory, and then we can depend on a new Autoconf673 # release and drop the old call support.674 AC_DEFUN([AM_INIT_AUTOMAKE],675 [AC_PREREQ([2.58])dnl676 dnl Autoconf wants to disallow AM_ names. We explicitly allow677 dnl the ones we care about.678 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl679 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl680 AC_REQUIRE([AC_PROG_INSTALL])dnl681 # test to see if srcdir already configured682 if test "`cd $srcdir && pwd`" != "`pwd`" &&683 test -f $srcdir/config.status; then684 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])685 fi686 687 # test whether we have cygpath688 if test -z "$CYGPATH_W"; then689 if (cygpath --version) >/dev/null 2>/dev/null; then690 CYGPATH_W='cygpath -w'691 else692 CYGPATH_W=echo693 fi694 fi695 AC_SUBST([CYGPATH_W])696 697 # Define the identity of the package.698 dnl Distinguish between old-style and new-style calls.699 m4_ifval([$2],700 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl701 AC_SUBST([PACKAGE], [$1])dnl702 AC_SUBST([VERSION], [$2])],703 [_AM_SET_OPTIONS([$1])dnl704 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl705 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl706 707 _AM_IF_OPTION([no-define],,708 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])709 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl710 711 # Some tools Automake needs.712 AC_REQUIRE([AM_SANITY_CHECK])dnl713 AC_REQUIRE([AC_ARG_PROGRAM])dnl714 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})715 AM_MISSING_PROG(AUTOCONF, autoconf)716 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})717 AM_MISSING_PROG(AUTOHEADER, autoheader)718 AM_MISSING_PROG(MAKEINFO, makeinfo)719 AM_MISSING_PROG(AMTAR, tar)720 AM_PROG_INSTALL_SH721 AM_PROG_INSTALL_STRIP722 AC_REQUIRE([AM_PROG_MKDIR_P])dnl723 # We need awk for the "check" target. The system "awk" is bad on724 # some platforms.725 AC_REQUIRE([AC_PROG_AWK])dnl726 AC_REQUIRE([AC_PROG_MAKE_SET])dnl727 AC_REQUIRE([AM_SET_LEADING_DOT])dnl728 729 _AM_IF_OPTION([no-dependencies],,730 [AC_PROVIDE_IFELSE([AC_PROG_CC],731 [_AM_DEPENDENCIES(CC)],732 [define([AC_PROG_CC],733 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl734 AC_PROVIDE_IFELSE([AC_PROG_CXX],735 [_AM_DEPENDENCIES(CXX)],736 [define([AC_PROG_CXX],737 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl738 ])739 ])740 741 742 # When config.status generates a header, we must update the stamp-h file.743 # This file resides in the same directory as the config header744 # that is generated. The stamp files are numbered to have different names.745 746 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the747 # loop where config.status creates the headers, so we can generate748 # our stamp files there.749 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],750 [# Compute $1's index in $config_headers.751 _am_stamp_count=1752 for _am_header in $config_headers :; do753 case $_am_header in754 $1 | $1:* )755 break ;;756 * )757 _am_stamp_count=`expr $_am_stamp_count + 1` ;;758 esac759 done760 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])761 762 # AM_PROG_INSTALL_SH763 # ------------------764 # Define $install_sh.765 766 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.767 768 # This program is free software; you can redistribute it and/or modify769 # it under the terms of the GNU General Public License as published by770 # the Free Software Foundation; either version 2, or (at your option)771 # any later version.772 773 # This program is distributed in the hope that it will be useful,774 # but WITHOUT ANY WARRANTY; without even the implied warranty of775 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the776 # GNU General Public License for more details.777 778 # You should have received a copy of the GNU General Public License779 # along with this program; if not, write to the Free Software780 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA781 # 02111-1307, USA.782 783 AC_DEFUN([AM_PROG_INSTALL_SH],784 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl785 install_sh=${install_sh-"$am_aux_dir/install-sh"}786 AC_SUBST(install_sh)])787 788 # -*- Autoconf -*-789 # Copyright (C) 2003 Free Software Foundation, Inc.790 791 # This program is free software; you can redistribute it and/or modify792 # it under the terms of the GNU General Public License as published by793 # the Free Software Foundation; either version 2, or (at your option)794 # any later version.795 796 # This program is distributed in the hope that it will be useful,797 # but WITHOUT ANY WARRANTY; without even the implied warranty of798 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the799 # GNU General Public License for more details.800 801 # You should have received a copy of the GNU General Public License802 # along with this program; if not, write to the Free Software803 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA804 # 02111-1307, USA.805 806 # serial 1807 808 # Check whether the underlying file-system supports filenames809 # with a leading dot. For instance MS-DOS doesn't.810 AC_DEFUN([AM_SET_LEADING_DOT],811 [rm -rf .tst 2>/dev/null812 mkdir .tst 2>/dev/null813 if test -d .tst; then814 am__leading_dot=.815 else816 am__leading_dot=_817 fi818 rmdir .tst 2>/dev/null819 AC_SUBST([am__leading_dot])])820 728 821 729 # Check to see how 'make' treats includes. -*- Autoconf -*- … … 882 790 ]) 883 791 884 # -*- Autoconf -*- 885 886 887 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. 888 889 # This program is free software; you can redistribute it and/or modify 890 # it under the terms of the GNU General Public License as published by 891 # the Free Software Foundation; either version 2, or (at your option) 892 # any later version. 893 894 # This program is distributed in the hope that it will be useful, 895 # but WITHOUT ANY WARRANTY; without even the implied warranty of 896 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 897 # GNU General Public License for more details. 898 899 # You should have received a copy of the GNU General Public License 900 # along with this program; if not, write to the Free Software 901 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 902 # 02111-1307, USA. 903 904 # serial 3 905 906 # AM_MISSING_PROG(NAME, PROGRAM) 907 # ------------------------------ 908 AC_DEFUN([AM_MISSING_PROG], 909 [AC_REQUIRE([AM_MISSING_HAS_RUN]) 910 $1=${$1-"${am_missing_run}$2"} 911 AC_SUBST($1)]) 912 913 914 # AM_MISSING_HAS_RUN 915 # ------------------ 916 # Define MISSING if not defined so far and test if it supports --run. 917 # If it does, set am_missing_run to use it, otherwise, to nothing. 918 AC_DEFUN([AM_MISSING_HAS_RUN], 919 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 920 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 921 # Use eval to expand $SHELL 922 if eval "$MISSING --run true"; then 923 am_missing_run="$MISSING --run " 792 # AM_CONDITIONAL -*- Autoconf -*- 793 794 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 795 796 # This program is free software; you can redistribute it and/or modify 797 # it under the terms of the GNU General Public License as published by 798 # the Free Software Foundation; either version 2, or (at your option) 799 # any later version. 800 801 # This program is distributed in the hope that it will be useful, 802 # but WITHOUT ANY WARRANTY; without even the implied warranty of 803 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 804 # GNU General Public License for more details. 805 806 # You should have received a copy of the GNU General Public License 807 # along with this program; if not, write to the Free Software 808 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 809 # 02111-1307, USA. 810 811 # serial 5 812 813 AC_PREREQ(2.52) 814 815 # AM_CONDITIONAL(NAME, SHELL-CONDITION) 816 # ------------------------------------- 817 # Define a conditional. 818 AC_DEFUN([AM_CONDITIONAL], 819 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 820 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 821 AC_SUBST([$1_TRUE]) 822 AC_SUBST([$1_FALSE]) 823 if $2; then 824 $1_TRUE= 825 $1_FALSE='#' 924 826 else 925 am_missing_run=926 AC_MSG_WARN([`missing' script is too old or missing])827 $1_TRUE='#' 828 $1_FALSE= 927 829 fi 830 AC_CONFIG_COMMANDS_PRE( 831 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 832 AC_MSG_ERROR([conditional "$1" was never defined. 833 Usually this means the macro was only invoked conditionally.]) 834 fi])]) 835 836 # Configure paths for SDL 837 # Sam Lantinga 9/21/99 838 # stolen from Manish Singh 839 # stolen back from Frank Belew 840 # stolen from Manish Singh 841 # Shamelessly stolen from Owen Taylor 842 843 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 844 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS 845 dnl 846 AC_DEFUN([AM_PATH_SDL], 847 [dnl 848 dnl Get the cflags and libraries from the sdl-config script 849 dnl 850 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], 851 sdl_prefix="$withval", sdl_prefix="") 852 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], 853 sdl_exec_prefix="$withval", sdl_exec_prefix="") 854 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], 855 , enable_sdltest=yes) 856 857 if test x$sdl_exec_prefix != x ; then 858 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" 859 if test x${SDL_CONFIG+set} != xset ; then 860 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config 861 fi 862 fi 863 if test x$sdl_prefix != x ; then 864 sdl_args="$sdl_args --prefix=$sdl_prefix" 865 if test x${SDL_CONFIG+set} != xset ; then 866 SDL_CONFIG=$sdl_prefix/bin/sdl-config 867 fi 868 fi 869 870 AC_REQUIRE([AC_CANONICAL_TARGET]) 871 PATH="$prefix/bin:$prefix/usr/bin:$PATH" 872 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) 873 min_sdl_version=ifelse([$1], ,0.11.0,$1) 874 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) 875 no_sdl="" 876 if test "$SDL_CONFIG" = "no" ; then 877 no_sdl=yes 878 else 879 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` 880 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` 881 882 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ 883 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 884 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ 885 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 886 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ 887 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 888 if test "x$enable_sdltest" = "xyes" ; then 889 ac_save_CFLAGS="$CFLAGS" 890 ac_save_LIBS="$LIBS" 891 CFLAGS="$CFLAGS $SDL_CFLAGS" 892 LIBS="$LIBS $SDL_LIBS" 893 dnl 894 dnl Now check if the installed SDL is sufficiently new. (Also sanity 895 dnl checks the results of sdl-config to some extent 896 dnl 897 rm -f conf.sdltest 898 AC_TRY_RUN([ 899 #include <stdio.h> 900 #include <stdlib.h> 901 #include <string.h> 902 #include "SDL.h" 903 904 char* 905 my_strdup (char *str) 906 { 907 char *new_str; 908 909 if (str) 910 { 911 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); 912 strcpy (new_str, str); 913 } 914 else 915 new_str = NULL; 916 917 return new_str; 918 } 919 920 int main (int argc, char *argv[]) 921 { 922 int major, minor, micro; 923 char *tmp_version; 924 925 /* This hangs on some systems (?) 926 system ("touch conf.sdltest"); 927 */ 928 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } 929 930 /* HP/UX 9 (%@#!) writes to sscanf strings */ 931 tmp_version = my_strdup("$min_sdl_version"); 932 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 933 printf("%s, bad version string\n", "$min_sdl_version"); 934 exit(1); 935 } 936 937 if (($sdl_major_version > major) || 938 (($sdl_major_version == major) && ($sdl_minor_version > minor)) || 939 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) 940 { 941 return 0; 942 } 943 else 944 { 945 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); 946 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); 947 printf("*** best to upgrade to the required version.\n"); 948 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); 949 printf("*** to point to the correct copy of sdl-config, and remove the file\n"); 950 printf("*** config.cache before re-running configure\n"); 951 return 1; 952 } 953 } 954 955 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 956 CFLAGS="$ac_save_CFLAGS" 957 LIBS="$ac_save_LIBS" 958 fi 959 fi 960 if test "x$no_sdl" = x ; then 961 AC_MSG_RESULT(yes) 962 ifelse([$2], , :, [$2]) 963 else 964 AC_MSG_RESULT(no) 965 if test "$SDL_CONFIG" = "no" ; then 966 echo "*** The sdl-config script installed by SDL could not be found" 967 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" 968 echo "*** your path, or set the SDL_CONFIG environment variable to the" 969 echo "*** full path to sdl-config." 970 else 971 if test -f conf.sdltest ; then 972 : 973 else 974 echo "*** Could not run SDL test program, checking why..." 975 CFLAGS="$CFLAGS $SDL_CFLAGS" 976 LIBS="$LIBS $SDL_LIBS" 977 AC_TRY_LINK([ 978 #include <stdio.h> 979 #include "SDL.h" 980 981 int main(int argc, char *argv[]) 982 { return 0; } 983 #undef main 984 #define main K_and_R_C_main 985 ], [ return 0; ], 986 [ echo "*** The test program compiled, but did not run. This usually means" 987 echo "*** that the run-time linker is not finding SDL or finding the wrong" 988 echo "*** version of SDL. If it is not finding SDL, you'll need to set your" 989 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 990 echo "*** to the installed location Also, make sure you have run ldconfig if that" 991 echo "*** is required on your system" 992 echo "***" 993 echo "*** If you have an old version installed, it is best to remove it, although" 994 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], 995 [ echo "*** The test program failed to compile or link. See the file config.log for the" 996 echo "*** exact error that occured. This usually means SDL was incorrectly installed" 997 echo "*** or that you have moved SDL since it was installed. In the latter case, you" 998 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) 999 CFLAGS="$ac_save_CFLAGS" 1000 LIBS="$ac_save_LIBS" 1001 fi 1002 fi 1003 SDL_CFLAGS="" 1004 SDL_LIBS="" 1005 ifelse([$3], , :, [$3]) 1006 fi 1007 AC_SUBST(SDL_CFLAGS) 1008 AC_SUBST(SDL_LIBS) 1009 rm -f conf.sdltest 928 1010 ]) 929 1011 930 # AM_PROG_MKDIR_P931 # ---------------932 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.933 934 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.935 936 # This program is free software; you can redistribute it and/or modify937 # it under the terms of the GNU General Public License as published by938 # the Free Software Foundation; either version 2, or (at your option)939 # any later version.940 941 # This program is distributed in the hope that it will be useful,942 # but WITHOUT ANY WARRANTY; without even the implied warranty of943 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the944 # GNU General Public License for more details.945 946 # You should have received a copy of the GNU General Public License947 # along with this program; if not, write to the Free Software948 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA949 # 02111-1307, USA.950 951 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories952 # created by `make install' are always world readable, even if the953 # installer happens to have an overly restrictive umask (e.g. 077).954 # This was a mistake. There are at least two reasons why we must not955 # use `-m 0755':956 # - it causes special bits like SGID to be ignored,957 # - it may be too restrictive (some setups expect 775 directories).958 #959 # Do not use -m 0755 and let people choose whatever they expect by960 # setting umask.961 #962 # We cannot accept any implementation of `mkdir' that recognizes `-p'.963 # Some implementations (such as Solaris 8's) are not thread-safe: if a964 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'965 # concurrently, both version can detect that a/ is missing, but only966 # one can create it and the other will error out. Consequently we967 # restrict ourselves to GNU make (using the --version option ensures968 # this.)969 AC_DEFUN([AM_PROG_MKDIR_P],970 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then971 # Keeping the `.' argument allows $(mkdir_p) to be used without972 # argument. Indeed, we sometimes output rules like973 # $(mkdir_p) $(somedir)974 # where $(somedir) is conditionally defined.975 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more976 # expensive solution, as it forces Make to start a sub-shell.)977 mkdir_p='mkdir -p -- .'978 else979 # On NextStep and OpenStep, the `mkdir' command does not980 # recognize any option. It will interpret all options as981 # directories to create, and then abort because `.' already982 # exists.983 for d in ./-p ./--version;984 do985 test -d $d && rmdir $d986 done987 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.988 if test -f "$ac_aux_dir/mkinstalldirs"; then989 mkdir_p='$(mkinstalldirs)'990 else991 mkdir_p='$(install_sh) -d'992 fi993 fi994 AC_SUBST([mkdir_p])])995 996 # Helper functions for option handling. -*- Autoconf -*-997 998 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.999 1000 # This program is free software; you can redistribute it and/or modify1001 # it under the terms of the GNU General Public License as published by1002 # the Free Software Foundation; either version 2, or (at your option)1003 # any later version.1004 1005 # This program is distributed in the hope that it will be useful,1006 # but WITHOUT ANY WARRANTY; without even the implied warranty of1007 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1008 # GNU General Public License for more details.1009 1010 # You should have received a copy of the GNU General Public License1011 # along with this program; if not, write to the Free Software1012 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA1013 # 02111-1307, USA.1014 1015 # serial 21016 1017 # _AM_MANGLE_OPTION(NAME)1018 # -----------------------1019 AC_DEFUN([_AM_MANGLE_OPTION],1020 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])1021 1022 # _AM_SET_OPTION(NAME)1023 # ------------------------------1024 # Set option NAME. Presently that only means defining a flag for this option.1025 AC_DEFUN([_AM_SET_OPTION],1026 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])1027 1028 # _AM_SET_OPTIONS(OPTIONS)1029 # ----------------------------------1030 # OPTIONS is a space-separated list of Automake options.1031 AC_DEFUN([_AM_SET_OPTIONS],1032 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])1033 1034 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])1035 # -------------------------------------------1036 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.1037 AC_DEFUN([_AM_IF_OPTION],1038 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])1039 1040 #1041 # Check to make sure that the build environment is sane.1042 #1043 1044 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.1045 1046 # This program is free software; you can redistribute it and/or modify1047 # it under the terms of the GNU General Public License as published by1048 # the Free Software Foundation; either version 2, or (at your option)1049 # any later version.1050 1051 # This program is distributed in the hope that it will be useful,1052 # but WITHOUT ANY WARRANTY; without even the implied warranty of1053 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1054 # GNU General Public License for more details.1055 1056 # You should have received a copy of the GNU General Public License1057 # along with this program; if not, write to the Free Software1058 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA1059 # 02111-1307, USA.1060 1061 # serial 31062 1063 # AM_SANITY_CHECK1064 # ---------------1065 AC_DEFUN([AM_SANITY_CHECK],1066 [AC_MSG_CHECKING([whether build environment is sane])1067 # Just in case1068 sleep 11069 echo timestamp > conftest.file1070 # Do `set' in a subshell so we don't clobber the current shell's1071 # arguments. Must try -L first in case configure is actually a1072 # symlink; some systems play weird games with the mod time of symlinks1073 # (eg FreeBSD returns the mod time of the symlink's containing1074 # directory).1075 if (1076 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`1077 if test "$[*]" = "X"; then1078 # -L didn't work.1079 set X `ls -t $srcdir/configure conftest.file`1080 fi1081 rm -f conftest.file1082 if test "$[*]" != "X $srcdir/configure conftest.file" \1083 && test "$[*]" != "X conftest.file $srcdir/configure"; then1084 1085 # If neither matched, then we have a broken ls. This can happen1086 # if, for instance, CONFIG_SHELL is bash and it inherits a1087 # broken ls alias from the environment. This has actually1088 # happened. Such a system could not be considered "sane".1089 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken1090 alias in your environment])1091 fi1092 1093 test "$[2]" = conftest.file1094 )1095 then1096 # Ok.1097 :1098 else1099 AC_MSG_ERROR([newly created file is older than distributed files!1100 Check your system clock])1101 fi1102 AC_MSG_RESULT(yes)])1103 1104 # AM_PROG_INSTALL_STRIP1105 1106 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.1107 1108 # This program is free software; you can redistribute it and/or modify1109 # it under the terms of the GNU General Public License as published by1110 # the Free Software Foundation; either version 2, or (at your option)1111 # any later version.1112 1113 # This program is distributed in the hope that it will be useful,1114 # but WITHOUT ANY WARRANTY; without even the implied warranty of1115 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1116 # GNU General Public License for more details.1117 1118 # You should have received a copy of the GNU General Public License1119 # along with this program; if not, write to the Free Software1120 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA1121 # 02111-1307, USA.1122 1123 # One issue with vendor `install' (even GNU) is that you can't1124 # specify the program used to strip binaries. This is especially1125 # annoying in cross-compiling environments, where the build's strip1126 # is unlikely to handle the host's binaries.1127 # Fortunately install-sh will honor a STRIPPROG variable, so we1128 # always use install-sh in `make install-strip', and initialize1129 # STRIPPROG with the value of the STRIP variable (set by the user).1130 AC_DEFUN([AM_PROG_INSTALL_STRIP],1131 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl1132 # Installed binaries are usually stripped using `strip' when the user1133 # run `make install-strip'. However `strip' might not be the right1134 # tool to use in cross-compilation environments, therefore Automake1135 # will honor the `STRIP' environment variable to overrule this program.1136 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.1137 if test "$cross_compiling" != no; then1138 AC_CHECK_TOOL([STRIP], [strip], :)1139 fi1140 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"1141 AC_SUBST([INSTALL_STRIP_PROGRAM])])1142
Note: See TracChangeset
for help on using the changeset viewer.