Mercurial > sdl-ios-xcode
comparison sdl.m4 @ 1550:31c2b8e4885e
Fixed bug #166
From the autoconf obsolete macros documentation:
Macro: AC_CANONICAL_SYSTEM
Determine the system type and set output variables to the names of the canonical system types. See section Getting the Canonical System Type, for details about the variables this macro sets.
The user is encouraged to use either AC_CANONICAL_BUILD, or AC_CANONICAL_HOST, or AC_CANONICAL_TARGET, depending on the needs. Using AC_CANONICAL_TARGET is enough to run the two other macros.
From the documentation for the canonical environments:
case $target in
i386-*-mach* | i386-*-gnu*)
obj_format=aout emulation=mach bfd_gas=yes ;;
i960-*-bout) obj_format=bout ;;
esac
Note that the above example uses $target because it's taken from a tool which can be built on some architecture ($build), run on another ($host), but yet handle data for a third architecture ($target). Such tools are usually part of a compiler suite, they generate code for a specific $target.
However $target should be meaningless for most packages. If you want to base a decision on the system where your program will be run, make sure you use the $host variable.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 19 Mar 2006 05:27:22 +0000 |
parents | 65f4b2dd46b7 |
children | 14717b52abc0 |
comparison
equal
deleted
inserted
replaced
1549:066236f0cbf0 | 1550:31c2b8e4885e |
---|---|
30 if test x${SDL_CONFIG+set} != xset ; then | 30 if test x${SDL_CONFIG+set} != xset ; then |
31 SDL_CONFIG=$sdl_prefix/bin/sdl-config | 31 SDL_CONFIG=$sdl_prefix/bin/sdl-config |
32 fi | 32 fi |
33 fi | 33 fi |
34 | 34 |
35 AC_REQUIRE([AC_CANONICAL_TARGET]) | |
36 PATH="$prefix/bin:$prefix/usr/bin:$PATH" | 35 PATH="$prefix/bin:$prefix/usr/bin:$PATH" |
37 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) | 36 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) |
38 min_sdl_version=ifelse([$1], ,0.11.0,$1) | 37 min_sdl_version=ifelse([$1], ,0.11.0,$1) |
39 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) | 38 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) |
40 no_sdl="" | 39 no_sdl="" |
119 } | 118 } |
120 } | 119 } |
121 | 120 |
122 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | 121 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
123 CFLAGS="$ac_save_CFLAGS" | 122 CFLAGS="$ac_save_CFLAGS" |
123 CXXFLAGS="$ac_save_CXXFLAGS" | |
124 LIBS="$ac_save_LIBS" | 124 LIBS="$ac_save_LIBS" |
125 fi | 125 fi |
126 fi | 126 fi |
127 if test "x$no_sdl" = x ; then | 127 if test "x$no_sdl" = x ; then |
128 AC_MSG_RESULT(yes) | 128 AC_MSG_RESULT(yes) |
168 CXXFLAGS="$ac_save_CXXFLAGS" | 168 CXXFLAGS="$ac_save_CXXFLAGS" |
169 LIBS="$ac_save_LIBS" | 169 LIBS="$ac_save_LIBS" |
170 fi | 170 fi |
171 fi | 171 fi |
172 SDL_CFLAGS="" | 172 SDL_CFLAGS="" |
173 SDL_CXXFLAGS="" | |
174 SDL_LIBS="" | 173 SDL_LIBS="" |
175 ifelse([$3], , :, [$3]) | 174 ifelse([$3], , :, [$3]) |
176 fi | 175 fi |
177 AC_SUBST(SDL_CFLAGS) | 176 AC_SUBST(SDL_CFLAGS) |
178 AC_SUBST(SDL_LIBS) | 177 AC_SUBST(SDL_LIBS) |