Home | History | Annotate | Download | only in sdl-1.2.12
      1 #!/bin/sh
      2 
      3 curdir=`dirname $0`
      4 prefix=`dirname $curdir`
      5 exec_prefix=@exec_prefix@
      6 exec_prefix_set=no
      7 libdir=@libdir@
      8 
      9 @ENABLE_STATIC_FALSE@usage="\
     10 @ENABLE_STATIC_FALSE@Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
     11 @ENABLE_STATIC_TRUE@usage="\
     12 @ENABLE_STATIC_TRUE@Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
     13 
     14 if test $# -eq 0; then
     15       echo "${usage}" 1>&2
     16       exit 1
     17 fi
     18 
     19 while test $# -gt 0; do
     20   case "$1" in
     21   -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
     22   *) optarg= ;;
     23   esac
     24 
     25   case $1 in
     26     --prefix=*)
     27       prefix=$optarg
     28       if test $exec_prefix_set = no ; then
     29         exec_prefix=$optarg
     30       fi
     31       ;;
     32     --prefix)
     33       echo $prefix
     34       ;;
     35     --exec-prefix=*)
     36       exec_prefix=$optarg
     37       exec_prefix_set=yes
     38       ;;
     39     --exec-prefix)
     40       echo $exec_prefix
     41       ;;
     42     --version)
     43       echo @SDL_VERSION@
     44       ;;
     45     --cflags)
     46       echo -I@includedir@/SDL @SDL_CFLAGS@
     47       ;;
     48 @ENABLE_SHARED_TRUE@    --libs)
     49 @ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
     50 @ENABLE_SHARED_TRUE@      ;;
     51 @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
     52 @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
     53 @ENABLE_STATIC_TRUE@      echo @SDL_STATIC_LIBS@
     54 @ENABLE_STATIC_TRUE@      ;;
     55     *)
     56       echo "${usage}" 1>&2
     57       exit 1
     58       ;;
     59   esac
     60   shift
     61 done
     62