On OpenBSD, pkg-config sdl --cflags forgets to add -I/usr/local/include
which is needed for iconv.h (included from SDL.h). This makes SDL
detection fail.

Try sdl-config first, only if it fails try pkg-config.

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 configure |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 0a84b0e..aee1f2c 100755
--- a/configure
+++ b/configure
@@ -1036,12 +1036,12 @@ fi
 ##########################################
 # SDL probe

-if $pkgconfig sdl --modversion >/dev/null 2>&1; then
-  sdlconfig="$pkgconfig sdl"
-  _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
-elif has sdl-config; then
+if has sdl-config; then
   sdlconfig='sdl-config'
   _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
+elif $pkgconfig sdl --modversion >/dev/null 2>&1; then
+  sdlconfig="$pkgconfig sdl"
+  _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
 else
   if test "$sdl" = "yes" ; then
     feature_not_found "sdl"
-- 
1.6.2.4


Reply via email to