Ticket #8299: configure-freebsd.patch

File configure-freebsd.patch, 912 bytes (added by sev-, 20 years ago)

Fix sdl-config searching under FreeBSD

  • configure

    old new  
    8282find_sdlconfig()
    8383{
    8484printf "Looking for sdl-config... "
    85 sdlconfigs="$_sdlconfig sdl-config sdl11-config sdl12-config"
    86 for sdlconfig in $sdlconfigs; do
    87   if test "-e $sdlconfig" ; then
    88     _sdlconfig=$sdlconfig
    89     echo $_sdlconfig
    90     break
    91   else
    92     echo "none found!"
    93     exit 1
    94   fi
     85sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
     86_sdlconfig=
     87
     88IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     89ac_dummy="$PATH"
     90
     91for ac_dir in $ac_dummy; do                                                   
     92  for sdlconfig in $sdlconfigs; do
     93    if test -e "$ac_dir/$sdlconfig" ; then
     94      _sdlconfig=$sdlconfig
     95      echo $_sdlconfig
     96      break
     97    fi
     98  done
    9599done
     100
     101IFS="$ac_save_ifs"
     102
     103if test -z "$_sdlconfig"; then
     104  echo "none found!"
     105  exit 1
     106fi
     107
    96108}
    97109
    98110#