sdl-config revision b565d46b836401fa5dac23f9f8f0841c7a41e58e
1#!/bin/sh
2
3curdir=`dirname $0`
4prefix=`dirname $curdir`
5exec_prefix=${prefix}
6exec_prefix_set=no
7libdir=${exec_prefix}/lib
8
9#usage="\
10#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
11usage="\
12Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
13
14if test $# -eq 0; then
15      echo "${usage}" 1>&2
16      exit 1
17fi
18
19while 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
61done
62