comparison 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
comparison
equal deleted inserted replaced
1570:a740bca2a1b1 1571:0160eb7cccee
48 else 48 else
49 AC_DEFINE(SDL_BYTEORDER, 1234) 49 AC_DEFINE(SDL_BYTEORDER, 1234)
50 fi 50 fi
51 51
52 dnl Set up the compiler and linker flags 52 dnl Set up the compiler and linker flags
53 SDL_INCLUDE="-I$srcdir/include $SDL_INCLUDE" 53 INCLUDE="-I$srcdir/include"
54 if test x$srcdir != x.; then 54 if test x$srcdir != x.; then
55 SDL_INCLUDE="-Iinclude $SDL_INCLUDE" 55 INCLUDE="-Iinclude $INCLUDE"
56 fi 56 fi
57 if test -d /usr/local/include; then
58 SDL_INCLUDE="$SDL_INCLUDE -I/usr/local/include"
59 fi
60 INCLUDE="$SDL_INCLUDE"
61 case "$host" in 57 case "$host" in
62 *-*-cygwin*) 58 *-*-cygwin*)
63 # We build SDL on cygwin without the UNIX emulation layer 59 # We build SDL on cygwin without the UNIX emulation layer
64 BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin" 60 BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
65 BASE_LDFLAGS="-mno-cygwin" 61 BASE_LDFLAGS="-mno-cygwin"
71 esac 67 esac
72 BUILD_CFLAGS="$CFLAGS" 68 BUILD_CFLAGS="$CFLAGS"
73 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS" 69 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
74 BUILD_LDFLAGS="$LDFLAGS" 70 BUILD_LDFLAGS="$LDFLAGS"
75 EXTRA_LDFLAGS="$BASE_LDFLAGS" 71 EXTRA_LDFLAGS="$BASE_LDFLAGS"
72 for path in /usr/local; do
73 if test -d $path/include; then
74 EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
75 fi
76 if test -d $path/lib; then
77 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
78 fi
79 done
76 SDL_CFLAGS="$BASE_CFLAGS" 80 SDL_CFLAGS="$BASE_CFLAGS"
77 SDL_LIBS="-lSDL $BASE_LDFLAGS" 81 SDL_LIBS="-lSDL $BASE_LDFLAGS"
78 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" 82 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
79 CFLAGS="$CFLAGS $EXTRA_CFLAGS" 83 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
80 LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" 84 LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
772 x11_lib='libX11.so' 776 x11_lib='libX11.so'
773 x11ext_lib='libXext.so' 777 x11ext_lib='libXext.so'
774 ;; 778 ;;
775 *) 779 *)
776 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] 780 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
777 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib 781 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do
778 do if test "x$x11_lib" = "x"; then 782 if test "x$x11_lib" = "x"; then
779 x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 783 x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
780 fi 784 fi
781 if test "x$x11ext_lib" = "x"; then 785 if test "x$x11ext_lib" = "x"; then
782 x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 786 x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
783 fi 787 fi
784 done 788 done
785 ;; 789 ;;
786 esac 790 esac
787 791
788 X_CFLAGS="$X_CFLAGS -DXTHREADS" 792 X_CFLAGS="$X_CFLAGS -DXTHREADS"