Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM
authorSam Lantinga <slouken@libsdl.org>
Sun, 19 Mar 2006 05:35:17 +0000
changeset 289e893c155075b
parent 288 80c7a00d7d79
child 290 3a364410bf8f
Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM
acinclude.m4
configure.in
     1.1 --- a/acinclude.m4	Thu Feb 02 06:26:39 2006 +0000
     1.2 +++ b/acinclude.m4	Sun Mar 19 05:35:17 2006 +0000
     1.3 @@ -32,7 +32,6 @@
     1.4       fi
     1.5    fi
     1.6  
     1.7 -  AC_REQUIRE([AC_CANONICAL_TARGET])
     1.8    PATH="$prefix/bin:$prefix/usr/bin:$PATH"
     1.9    AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
    1.10    min_sdl_version=ifelse([$1], ,0.11.0,$1)
    1.11 @@ -52,8 +51,10 @@
    1.12             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    1.13      if test "x$enable_sdltest" = "xyes" ; then
    1.14        ac_save_CFLAGS="$CFLAGS"
    1.15 +      ac_save_CXXFLAGS="$CXXFLAGS"
    1.16        ac_save_LIBS="$LIBS"
    1.17        CFLAGS="$CFLAGS $SDL_CFLAGS"
    1.18 +      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    1.19        LIBS="$LIBS $SDL_LIBS"
    1.20  dnl
    1.21  dnl Now check if the installed SDL is sufficiently new. (Also sanity
    1.22 @@ -119,6 +120,7 @@
    1.23  
    1.24  ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
    1.25         CFLAGS="$ac_save_CFLAGS"
    1.26 +       CXXFLAGS="$ac_save_CXXFLAGS"
    1.27         LIBS="$ac_save_LIBS"
    1.28       fi
    1.29    fi
    1.30 @@ -138,6 +140,7 @@
    1.31         else
    1.32            echo "*** Could not run SDL test program, checking why..."
    1.33            CFLAGS="$CFLAGS $SDL_CFLAGS"
    1.34 +          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    1.35            LIBS="$LIBS $SDL_LIBS"
    1.36            AC_TRY_LINK([
    1.37  #include <stdio.h>
    1.38 @@ -162,6 +165,7 @@
    1.39            echo "*** or that you have moved SDL since it was installed. In the latter case, you"
    1.40            echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
    1.41            CFLAGS="$ac_save_CFLAGS"
    1.42 +          CXXFLAGS="$ac_save_CXXFLAGS"
    1.43            LIBS="$ac_save_LIBS"
    1.44         fi
    1.45       fi
     2.1 --- a/configure.in	Thu Feb 02 06:26:39 2006 +0000
     2.2 +++ b/configure.in	Sun Mar 19 05:35:17 2006 +0000
     2.3 @@ -36,8 +36,8 @@
     2.4  AC_SUBST(LT_REVISION)
     2.5  AC_SUBST(LT_AGE)
     2.6  
     2.7 -dnl Detect the canonical host and target build environment
     2.8 -AC_CANONICAL_SYSTEM
     2.9 +dnl Detect the canonical build and host environments
    2.10 +AC_CANONICAL_HOST
    2.11  
    2.12  dnl Setup for automake
    2.13  AM_INIT_AUTOMAKE(SDL_mixer, $VERSION)
    2.14 @@ -51,7 +51,7 @@
    2.15  AC_PROG_INSTALL
    2.16  
    2.17  dnl The alpha architecture needs special flags for binary portability
    2.18 -case "$target" in
    2.19 +case "$host" in
    2.20      alpha*-*-linux*)
    2.21          CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
    2.22          ;;
    2.23 @@ -59,7 +59,7 @@
    2.24          ac_default_prefix=/boot/develop/tools/gnupro
    2.25          ;;
    2.26      *-*-cygwin* | *-*-mingw32*)
    2.27 -        if test "$build" != "$target"; then # cross-compiling
    2.28 +        if test "$build" != "$host"; then # cross-compiling
    2.29              # Default cross-compile location
    2.30              ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
    2.31          else
    2.32 @@ -160,7 +160,7 @@
    2.33                    , enable_music_native_midi=yes)
    2.34      if test x$enable_music_native_midi = xyes; then
    2.35          use_music_native_midi=no
    2.36 -        case "$target" in
    2.37 +        case "$host" in
    2.38              *-*-cygwin* | *-*-mingw32*)
    2.39                  use_music_native_midi=yes
    2.40                  SYSTEM_LIBS="$SYSTEM_LIBS -lwinmm"
    2.41 @@ -180,7 +180,7 @@
    2.42                    , enable_music_native_midi_gpl=no)
    2.43      if test x$enable_music_native_midi_gpl = xyes; then
    2.44          use_music_native_midi_gpl=no
    2.45 -        case "$target" in
    2.46 +        case "$host" in
    2.47              *-*-linux* | *-*-freebsd*)
    2.48                  use_music_native_midi_gpl=yes
    2.49                  ;;