OSDN Git Service

835f83d919634172b4d4e0e5a3373e4f9bffce87
[android-x86/prebuilt.git] / windows / sdl / bin / sdl-config
1 #!/bin/sh
2
3 curdir=`dirname $0`
4 prefix=`dirname $curdir`
5 exec_prefix=${prefix}
6 exec_prefix_set=no
7 libdir=${exec_prefix}/lib
8
9 #usage="\
10 #Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
11 usage="\
12 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 1.2.12
44       ;;
45     --cflags)
46       echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main
47       ;;
48 #    --libs)
49 #      echo -L${exec_prefix}/lib @SDL_RLD_FLAGS@ @SDL_LIBS@
50 #      ;;
51 #    --static-libs)
52     --libs|--static-libs)
53       echo ${libdir}/libSDLmain.a ${libdir}/libSDL.a -luser32 -lgdi32 -lwinmm
54       ;;
55     *)
56       echo "${usage}" 1>&2
57       exit 1
58       ;;
59   esac
60   shift
61 done