From ba8c24b127c3622b851e44dd3fd3fa874202aa53 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 Mar 2006 05:35:17 +0000 Subject: [PATCH] Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM --- acinclude.m4 | 6 +++++- configure.in | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 8268366f..b9d48112 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -32,7 +32,6 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run fi fi - AC_REQUIRE([AC_CANONICAL_TARGET]) PATH="$prefix/bin:$prefix/usr/bin:$PATH" AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) min_sdl_version=ifelse([$1], ,0.11.0,$1) @@ -52,8 +51,10 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity @@ -119,6 +120,7 @@ int main (int argc, char *argv[]) ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi @@ -138,6 +140,7 @@ int main (int argc, char *argv[]) else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include @@ -162,6 +165,7 @@ int main(int argc, char *argv[]) echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi diff --git a/configure.in b/configure.in index c395cdf4..4507ee3a 100644 --- a/configure.in +++ b/configure.in @@ -36,8 +36,8 @@ AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) -dnl Detect the canonical host and target build environment -AC_CANONICAL_SYSTEM +dnl Detect the canonical build and host environments +AC_CANONICAL_HOST dnl Setup for automake AM_INIT_AUTOMAKE(SDL_mixer, $VERSION) @@ -51,7 +51,7 @@ AM_PROG_LIBTOOL AC_PROG_INSTALL dnl The alpha architecture needs special flags for binary portability -case "$target" in +case "$host" in alpha*-*-linux*) CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" ;; @@ -59,7 +59,7 @@ case "$target" in ac_default_prefix=/boot/develop/tools/gnupro ;; *-*-cygwin* | *-*-mingw32*) - if test "$build" != "$target"; then # cross-compiling + if test "$build" != "$host"; then # cross-compiling # Default cross-compile location ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc else @@ -160,7 +160,7 @@ if test x$enable_music_midi = xyes; then , enable_music_native_midi=yes) if test x$enable_music_native_midi = xyes; then use_music_native_midi=no - case "$target" in + case "$host" in *-*-cygwin* | *-*-mingw32*) use_music_native_midi=yes SYSTEM_LIBS="$SYSTEM_LIBS -lwinmm" @@ -180,7 +180,7 @@ if test x$enable_music_midi = xyes; then , enable_music_native_midi_gpl=no) if test x$enable_music_native_midi_gpl = xyes; then use_music_native_midi_gpl=no - case "$target" in + case "$host" in *-*-linux* | *-*-freebsd*) use_music_native_midi_gpl=yes ;;