diff options
author | Max Kellermann <max@duempel.org> | 2015-05-05 00:32:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-05-05 00:46:29 +0200 |
commit | 8baf0dac4dfd0a180eac752d0eefa5302a7bb164 (patch) | |
tree | 3b2a3bd8659b948d91aa8316c56045e40bb13c10 /configure.ac | |
parent | e8f32954f21841f7a62b1ec103bc83fcbee1ac5a (diff) |
configure.ac: do Darwin specific check only on Darwin
Reduces overhead on Linux and suppresses the error message when "file"
is not installed.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index cf1821216d..cb7524f4fc 100644 --- a/configure.ac +++ b/configure.ac @@ -725,12 +725,16 @@ case $host in esac AC_SUBST([ARCH]) -check_sdl_arch=[`file $NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`] -if test "x$check_sdl_arch" = "xi386" ; then - DARWIN_NATIVE_ARCH=-m32 -elif test "x$check_sdl_arch" = "xx86_64" ; then - DARWIN_NATIVE_ARCH=-m64 -fi +case $host in + *-apple-darwin*) + check_sdl_arch=[`file $NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`] + if test "x$check_sdl_arch" = "xi386" ; then + DARWIN_NATIVE_ARCH=-m32 + elif test "x$check_sdl_arch" = "xx86_64" ; then + DARWIN_NATIVE_ARCH=-m64 + fi + ;; +esac AC_SUBST([DARWIN_NATIVE_ARCH]) if test "$target_platform" = "target_android" ; then |