for sdl_config in `bash type -a sdl-config | awk '{print $NF}' | xargs` do if env $cc -o $TMPE $OS_CFLAGS `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes else if test "$cocoa" = "no" ; then sdl=yes fi fi # static link with sdl ? if test "$sdl" = "yes" ; then aa="no" `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" sdl_static_libs=`$sdl_config --static-libs 2>/dev/null` if [ "$aa" = "yes" ] ; then sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" fi if $cc -o $TMPE $OS_CFLAGS `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then sdl_static=yes fi fi # static link fi # sdl compile test if test "$sdl" = "yes"; then break # found a working one, quit looking fi done # end of search for sdl-config