Skip to content

Commit

Permalink
Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 19, 2006
1 parent 135ffae commit 297ed08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion acinclude.m4
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 <stdio.h>
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions configure.in
Expand Up @@ -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_image, $VERSION)
Expand All @@ -53,15 +53,15 @@ AC_C_INLINE
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"
;;
*-*-beos*)
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
Expand Down

0 comments on commit 297ed08

Please sign in to comment.