1#!/bin/sh
2
3prefix=/usr/local
4exec_prefix=${prefix}
5exec_prefix_set=no
6libdir=${exec_prefix}/lib
7
8#usage="\
9#Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
10usage="\
11Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
12
13if test $# -eq 0; then
14      echo "${usage}" 1>&2
15      exit 1
16fi
17
18while test $# -gt 0; do
19  case "$1" in
20  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
21  *) optarg= ;;
22  esac
23
24  case $1 in
25    --prefix=*)
26      prefix=$optarg
27      if test $exec_prefix_set = no ; then
28        exec_prefix=$optarg
29      fi
30      ;;
31    --prefix)
32      echo $prefix
33      ;;
34    --exec-prefix=*)
35      exec_prefix=$optarg
36      exec_prefix_set=yes
37      ;;
38    --exec-prefix)
39      echo $exec_prefix
40      ;;
41    --version)
42      echo 2.0.13
43      ;;
44    --cflags)
45      echo -I${prefix}/include/SDL2  -D_REENTRANT
46      ;;
47    --libs)
48      echo -L${exec_prefix}/lib -Wl,-rpath,${libdir} -Wl,--enable-new-dtags -lSDL2
49      ;;
50    --static-libs)
51#    --libs|--static-libs)
52      echo -L${exec_prefix}/lib -lSDL2  -Wl,--no-undefined -lm -ldl -lpthread -lrt
53      ;;
54    *)
55      echo "${usage}" 1>&2
56      exit 1
57      ;;
58  esac
59  shift
60done
61