configure.in
changeset 6217 6952b11b7f46
parent 6188 e82023802002
child 6219 8e94af244f2c
     1.1 --- a/configure.in	Sat Jan 14 13:17:01 2012 -0500
     1.2 +++ b/configure.in	Sat Jan 14 13:21:19 2012 -0500
     1.3 @@ -1,6 +1,6 @@
     1.4  dnl Process this file with autoconf to produce a configure script.
     1.5  AC_INIT(README)
     1.6 -AC_CONFIG_HEADER(include/SDL_config.h)
     1.7 +AC_CONFIG_HEADER(include/SDL_config_generated.h)
     1.8  AC_GNU_SOURCE
     1.9  AC_CONFIG_AUX_DIR(build-scripts)
    1.10  AC_CONFIG_MACRO_DIR([acinclude])
    1.11 @@ -61,12 +61,12 @@
    1.12  dnl Set up the compiler and linker flags
    1.13  INCLUDE="-I$srcdir/include"
    1.14  if test x$srcdir != x.; then
    1.15 -    # Remove SDL_config.h from the source directory, since it's the
    1.16 -    # default one, and we want to include the one that we generate.
    1.17 -    if test -f $srcdir/include/SDL_config.h; then
    1.18 -        rm $srcdir/include/SDL_config.h
    1.19 -    fi
    1.20      INCLUDE="-Iinclude $INCLUDE"
    1.21 +elif test -d .hg; then
    1.22 +    AC_MSG_ERROR([
    1.23 +*** When building from Mercurial you should configure and build in a
    1.24 +    separate directory so you don't clobber SDL_revision.h
    1.25 +])
    1.26  fi
    1.27  case "$host" in
    1.28      *-*-cygwin*)
    1.29 @@ -82,7 +82,7 @@
    1.30  # Uncomment the following line if you want to force SDL and applications
    1.31  # built with it to be compiled for a particular architecture.
    1.32  #AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
    1.33 -BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
    1.34 +BUILD_CFLAGS="$CFLAGS $CPPFLAGS -DGENERATED_CONFIG_H"
    1.35  # The default optimization for SDL 1.3 is -O3 (Bug #31)
    1.36  if test x$orig_CFLAGS = x; then
    1.37      BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`