summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-2.30.2/sdl2-config.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/contrib/SDL-2.30.2/sdl2-config.in')
-rw-r--r--src/contrib/SDL-2.30.2/sdl2-config.in65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/contrib/SDL-2.30.2/sdl2-config.in b/src/contrib/SDL-2.30.2/sdl2-config.in
new file mode 100644
index 0000000..f6eca76
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/sdl2-config.in
@@ -0,0 +1,65 @@
1#!/bin/sh
2
3# Get the canonical path of the folder containing this script
4bindir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
5
6# Calculate the canonical path of the prefix, relative to the folder of this script
7prefix=$(cd -P -- "$bindir/@bin_prefix_relpath@" && printf '%s\n' "$(pwd -P)")
8exec_prefix=@exec_prefix@
9exec_prefix_set=no
10libdir=@libdir@
11
12@ENABLE_STATIC_FALSE@usage="\
13@ENABLE_STATIC_FALSE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
14@ENABLE_STATIC_TRUE@usage="\
15@ENABLE_STATIC_TRUE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
16
17if test $# -eq 0; then
18 echo "${usage}" 1>&2
19 exit 1
20fi
21
22while test $# -gt 0; do
23 case "$1" in
24 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
25 *) optarg= ;;
26 esac
27
28 case $1 in
29 --prefix=*)
30 prefix=$optarg
31 if test $exec_prefix_set = no ; then
32 exec_prefix=$optarg
33 fi
34 ;;
35 --prefix)
36 echo $prefix
37 ;;
38 --exec-prefix=*)
39 exec_prefix=$optarg
40 exec_prefix_set=yes
41 ;;
42 --exec-prefix)
43 echo $exec_prefix
44 ;;
45 --version)
46 echo @SDL_VERSION@
47 ;;
48 --cflags)
49 echo -I@includedir@/SDL2 @SDL_CFLAGS@
50 ;;
51@ENABLE_SHARED_TRUE@ --libs)
52@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
53@ENABLE_SHARED_TRUE@ ;;
54@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
55@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
56@ENABLE_STATIC_TRUE@ sdl_static_libs=$(echo "@SDL_LIBS@ @SDL_STATIC_LIBS@" | sed -E "s#-lSDL2[ $]#$libdir/libSDL2.a #g")
57@ENABLE_STATIC_TRUE@ echo -L@libdir@ $sdl_static_libs
58@ENABLE_STATIC_TRUE@ ;;
59 *)
60 echo "${usage}" 1>&2
61 exit 1
62 ;;
63 esac
64 shift
65done