sdl2-config.in
changeset 6250 cce0ddcf6747
parent 2100 62debeaac5e9
child 7841 b5d893a07471
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sdl2-config.in	Sun Jan 22 17:21:00 2012 -0500
     1.3 @@ -0,0 +1,60 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +prefix=@prefix@
     1.7 +exec_prefix=@exec_prefix@
     1.8 +exec_prefix_set=no
     1.9 +libdir=@libdir@
    1.10 +
    1.11 +@ENABLE_STATIC_FALSE@usage="\
    1.12 +@ENABLE_STATIC_FALSE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
    1.13 +@ENABLE_STATIC_TRUE@usage="\
    1.14 +@ENABLE_STATIC_TRUE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
    1.15 +
    1.16 +if test $# -eq 0; then
    1.17 +      echo "${usage}" 1>&2
    1.18 +      exit 1
    1.19 +fi
    1.20 +
    1.21 +while test $# -gt 0; do
    1.22 +  case "$1" in
    1.23 +  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    1.24 +  *) optarg= ;;
    1.25 +  esac
    1.26 +
    1.27 +  case $1 in
    1.28 +    --prefix=*)
    1.29 +      prefix=$optarg
    1.30 +      if test $exec_prefix_set = no ; then
    1.31 +        exec_prefix=$optarg
    1.32 +      fi
    1.33 +      ;;
    1.34 +    --prefix)
    1.35 +      echo $prefix
    1.36 +      ;;
    1.37 +    --exec-prefix=*)
    1.38 +      exec_prefix=$optarg
    1.39 +      exec_prefix_set=yes
    1.40 +      ;;
    1.41 +    --exec-prefix)
    1.42 +      echo $exec_prefix
    1.43 +      ;;
    1.44 +    --version)
    1.45 +      echo @SDL_VERSION@
    1.46 +      ;;
    1.47 +    --cflags)
    1.48 +      echo -I@includedir@/SDL2 @SDL_CFLAGS@
    1.49 +      ;;
    1.50 +@ENABLE_SHARED_TRUE@    --libs)
    1.51 +@ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
    1.52 +@ENABLE_SHARED_TRUE@      ;;
    1.53 +@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
    1.54 +@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
    1.55 +@ENABLE_STATIC_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@
    1.56 +@ENABLE_STATIC_TRUE@      ;;
    1.57 +    *)
    1.58 +      echo "${usage}" 1>&2
    1.59 +      exit 1
    1.60 +      ;;
    1.61 +  esac
    1.62 +  shift
    1.63 +done