sdl-config.in
changeset 0 74212992fb08
child 168 e92aa316c517
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sdl-config.in	Thu Apr 26 16:45:43 2001 +0000
     1.3 @@ -0,0 +1,65 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +prefix=@prefix@
     1.7 +exec_prefix=@exec_prefix@
     1.8 +exec_prefix_set=no
     1.9 +
    1.10 +usage="\
    1.11 +Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
    1.12 +
    1.13 +if test $# -eq 0; then
    1.14 +      echo "${usage}" 1>&2
    1.15 +      exit 1
    1.16 +fi
    1.17 +
    1.18 +while test $# -gt 0; do
    1.19 +  case "$1" in
    1.20 +  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    1.21 +  *) optarg= ;;
    1.22 +  esac
    1.23 +
    1.24 +  case $1 in
    1.25 +    --prefix=*)
    1.26 +      prefix=$optarg
    1.27 +      if test $exec_prefix_set = no ; then
    1.28 +        exec_prefix=$optarg
    1.29 +      fi
    1.30 +      ;;
    1.31 +    --prefix)
    1.32 +      echo $prefix
    1.33 +      ;;
    1.34 +    --exec-prefix=*)
    1.35 +      exec_prefix=$optarg
    1.36 +      exec_prefix_set=yes
    1.37 +      ;;
    1.38 +    --exec-prefix)
    1.39 +      echo $exec_prefix
    1.40 +      ;;
    1.41 +    --version)
    1.42 +      echo @SDL_VERSION@
    1.43 +      ;;
    1.44 +    --cflags)
    1.45 +      if test @includedir@ != /usr/include ; then
    1.46 +          # Handle oddities in Win32 path handling (assumes prefix)
    1.47 +          prefix=`echo ${prefix} | sed 's,^//\([A-Z]\),\1:,'`
    1.48 +
    1.49 +          includes=-I@includedir@
    1.50 +      fi
    1.51 +      echo $includes -I@includedir@/SDL @SDL_CFLAGS@
    1.52 +      ;;
    1.53 +@ENABLE_SHARED_TRUE@    --libs)
    1.54 +@ENABLE_SHARED_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
    1.55 +@ENABLE_SHARED_TRUE@      echo $libdirs @SDL_LIBS@
    1.56 +@ENABLE_SHARED_TRUE@      ;;
    1.57 +@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
    1.58 +@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
    1.59 +@ENABLE_STATIC_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
    1.60 +@ENABLE_STATIC_TRUE@      echo $libdirs @SDL_LIBS@ @SYSTEM_LIBS@
    1.61 +@ENABLE_STATIC_TRUE@      ;;
    1.62 +    *)
    1.63 +      echo "${usage}" 1>&2
    1.64 +      exit 1
    1.65 +      ;;
    1.66 +  esac
    1.67 +  shift
    1.68 +done