From d60e5f07bb4cddc1d71f080eb8c0392d1be77aac Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 14 Jan 2012 13:21:19 -0500 Subject: Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility. Make sure we don't clobber SDL_revision.h when building from Mercurial --HG-- rename : include/SDL_config.h.in => include/SDL_config_generated.h.in --- configure | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 9e39a2df..3717666f 100755 --- a/configure +++ b/configure @@ -2025,7 +2025,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_headers="$ac_config_headers include/SDL_config.h" +ac_config_headers="$ac_config_headers include/SDL_config_generated.h" cat >>confdefs.h <<\_ACEOF @@ -15525,12 +15525,17 @@ fi INCLUDE="-I$srcdir/include" if test x$srcdir != x.; then - # Remove SDL_config.h from the source directory, since it's the - # default one, and we want to include the one that we generate. - if test -f $srcdir/include/SDL_config.h; then - rm $srcdir/include/SDL_config.h - fi INCLUDE="-Iinclude $INCLUDE" +elif test -d .hg; then + { { echo "$as_me:$LINENO: error: +*** When building from Mercurial you should configure and build in a + separate directory so you don't clobber SDL_revision.h +" >&5 +echo "$as_me: error: +*** When building from Mercurial you should configure and build in a + separate directory so you don't clobber SDL_revision.h +" >&2;} + { (exit 1); exit 1; }; } fi case "$host" in *-*-cygwin*) @@ -15546,7 +15551,7 @@ esac # Uncomment the following line if you want to force SDL and applications # built with it to be compiled for a particular architecture. #AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]") -BUILD_CFLAGS="$CFLAGS $CPPFLAGS" +BUILD_CFLAGS="$CFLAGS $CPPFLAGS -DGENERATED_CONFIG_H" # The default optimization for SDL 1.3 is -O3 (Bug #31) if test x$orig_CFLAGS = x; then BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'` @@ -28805,7 +28810,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case $ac_config_target in - "include/SDL_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SDL_config.h" ;; + "include/SDL_config_generated.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SDL_config_generated.h" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;; "sdl-config") CONFIG_FILES="$CONFIG_FILES sdl-config" ;; -- cgit v1.2.3