add and update SDL for Win32; make Win32 build work
[xonotic/xonotic.git] / misc / builddeps / dp.win32 / bin / sdl-config
1 #!/bin/sh
2
3 prefix=${0%/bin/sdl-config}
4 exec_prefix=${prefix}
5 exec_prefix_set=no
6 libdir=${exec_prefix}/lib
7
8 #usage="\
9 #Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
10 usage="\
11 Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
12
13 if test $# -eq 0; then
14       echo "${usage}" 1>&2
15       exit 1
16 fi
17
18 while test $# -gt 0; do
19   case "$1" in
20   -*=*) optarg=`echo "$1" | LC_ALL="C" 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 1.2.14
43       ;;
44     --cflags)
45       echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main
46       ;;
47     --libs)
48       echo -L${exec_prefix}/lib  -lmingw32 -lSDLmain -lSDL  -mwindows
49       ;;
50     --static-libs)
51 #    --libs|--static-libs)
52       echo -L${exec_prefix}/lib  -lmingw32 -lSDLmain -lSDL  -mwindows  -lm -luser32 -lgdi32 -lwinmm -ldxguid -ldinput8
53       ;;
54     *)
55       echo "${usage}" 1>&2
56       exit 1
57       ;;
58   esac
59   shift
60 done