diff configure.in @ 1571:0160eb7cccee

Add /usr/local to the build paths by default
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Mar 2006 10:38:41 +0000
parents 50d9888d201d
children 2422ca15ba42
line wrap: on
line diff
--- a/configure.in	Tue Mar 21 10:20:44 2006 +0000
+++ b/configure.in	Tue Mar 21 10:38:41 2006 +0000
@@ -50,14 +50,10 @@
 fi
 
 dnl Set up the compiler and linker flags
-SDL_INCLUDE="-I$srcdir/include $SDL_INCLUDE"
+INCLUDE="-I$srcdir/include"
 if test x$srcdir != x.; then
-    SDL_INCLUDE="-Iinclude $SDL_INCLUDE"
+    INCLUDE="-Iinclude $INCLUDE"
 fi
-if test -d /usr/local/include; then
-    SDL_INCLUDE="$SDL_INCLUDE -I/usr/local/include"
-fi
-INCLUDE="$SDL_INCLUDE"
 case "$host" in
     *-*-cygwin*)
         # We build SDL on cygwin without the UNIX emulation layer
@@ -73,6 +69,14 @@
 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
 BUILD_LDFLAGS="$LDFLAGS"
 EXTRA_LDFLAGS="$BASE_LDFLAGS"
+for path in /usr/local; do
+    if test -d $path/include; then
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
+    fi
+    if test -d $path/lib; then
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
+    fi
+done
 SDL_CFLAGS="$BASE_CFLAGS"
 SDL_LIBS="-lSDL $BASE_LDFLAGS"
 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
@@ -774,13 +778,13 @@
                     ;;
                 *)
                     x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
-                    for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib
-                    do if test "x$x11_lib" = "x"; then
-                           x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
-                       fi
-                       if test "x$x11ext_lib" = "x"; then
-                           x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
-                       fi
+                    for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do
+                        if test "x$x11_lib" = "x"; then
+                            x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                        fi
+                        if test "x$x11ext_lib" = "x"; then
+                            x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                        fi
                     done
                     ;;
             esac