Mon, 13 Oct 2025 21:37:42 +0200
start a sub-project to implement a texture atlas editor
0 | 1 | #!/bin/sh |
2 | ||
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
3 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
4 | # some utility functions |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
5 | isplatform() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
6 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
7 | for p in $PLATFORM |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
8 | do |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
9 | if [ "$p" = "$1" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
10 | return 0 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
11 | fi |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
12 | done |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
13 | return 1 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
14 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
15 | notisplatform() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
16 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
17 | for p in $PLATFORM |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
18 | do |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
19 | if [ "$p" = "$1" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
20 | return 1 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
21 | fi |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
22 | done |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
23 | return 0 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
24 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
25 | istoolchain() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
26 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
27 | for t in $TOOLCHAIN |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
28 | do |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
29 | if [ "$t" = "$1" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
30 | return 0 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
31 | fi |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
32 | done |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
33 | return 1 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
34 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
35 | notistoolchain() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
36 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
37 | for t in $TOOLCHAIN |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
38 | do |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
39 | if [ "$t" = "$1" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
40 | return 1 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
41 | fi |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
42 | done |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
43 | return 0 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
44 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
45 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
46 | # clean abort |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
47 | abort_configure() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
48 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
49 | rm -Rf "$TEMP_DIR" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
50 | exit 1 |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
51 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
52 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
53 | # Test for availability of pkg-config |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
54 | PKG_CONFIG=`command -v pkg-config` |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
55 | : ${PKG_CONFIG:="false"} |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
56 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
57 | # Simple uname based platform detection |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
58 | # $PLATFORM is used for platform dependent dependency selection |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
59 | OS=`uname -s` |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
60 | OS_VERSION=`uname -r` |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
61 | printf "detect platform... " |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
62 | if [ "$OS" = "SunOS" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
63 | PLATFORM="solaris sunos unix svr4" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
64 | elif [ "$OS" = "Linux" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
65 | PLATFORM="linux unix" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
66 | elif [ "$OS" = "FreeBSD" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
67 | PLATFORM="freebsd bsd unix" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
68 | elif [ "$OS" = "OpenBSD" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
69 | PLATFORM="openbsd bsd unix" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
70 | elif [ "$OS" = "NetBSD" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
71 | PLATFORM="netbsd bsd unix" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
72 | elif [ "$OS" = "Darwin" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
73 | PLATFORM="macos osx bsd unix" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
74 | elif echo "$OS" | grep -i "MINGW" > /dev/null; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
75 | PLATFORM="windows mingw" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
76 | fi |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
77 | : ${PLATFORM:="unix"} |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
78 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
79 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
80 | echo "$PLATFORM_NAME" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
81 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
82 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
83 | # help text |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
84 | printhelp() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
85 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
86 | echo "Usage: $0 [OPTIONS]..." |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
87 | cat << __EOF__ |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
88 | Installation directories: |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
89 | --prefix=PREFIX path prefix for architecture-independent files |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
90 | [$prefix] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
91 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
92 | [PREFIX] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
93 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
94 | --bindir=DIR user executables [EPREFIX/bin] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
95 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
96 | --libexecdir=DIR program executables [EPREFIX/libexec] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
97 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
98 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
99 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
100 | --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
101 | --libdir=DIR object code libraries [EPREFIX/lib] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
102 | --includedir=DIR C header files [PREFIX/include] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
103 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
104 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
105 | --infodir=DIR info documentation [DATAROOTDIR/info] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
106 | --mandir=DIR man documentation [DATAROOTDIR/man] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
107 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
108 | |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
109 | Build Types: |
103 | 110 | --debug add extra compile flags for debug builds |
111 | --release add extra compile flags for release builds | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
112 | |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
113 | Optional Features: |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
114 | --enable-asan Enable address sanitization. |
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
115 | --enable-tools Enable compilation of tools. |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
116 | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
117 | __EOF__ |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
118 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
119 | |
0 | 120 | # create temporary directory |
121 | TEMP_DIR=".tmp-`uname -n`" | |
122 | rm -Rf "$TEMP_DIR" | |
123 | if mkdir -p "$TEMP_DIR"; then | |
124 | : | |
125 | else | |
126 | echo "Cannot create tmp dir $TEMP_DIR" | |
127 | echo "Abort" | |
128 | exit 1 | |
129 | fi | |
130 | touch "$TEMP_DIR/options" | |
131 | touch "$TEMP_DIR/features" | |
132 | ||
133 | # define standard variables | |
1 | 134 | # also define standard prefix (this is where we will search for config.site) |
135 | prefix=/usr | |
136 | exec_prefix= | |
137 | bindir= | |
138 | sbindir= | |
139 | libdir= | |
140 | libexecdir= | |
141 | datarootdir= | |
142 | datadir= | |
143 | sysconfdir= | |
144 | sharedstatedir= | |
145 | localstatedir= | |
146 | runstatedir= | |
147 | includedir= | |
148 | infodir= | |
149 | localedir= | |
150 | mandir= | |
0 | 151 | |
152 | # custom variables | |
84
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
153 | if true \ |
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
154 | ; then |
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
155 | SRCDIR=`pwd` |
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
156 | TOOLKIT_HOME="${TOOLKIT_HOME:=/usr}" |
84
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
157 | fi |
0 | 158 | |
159 | # features | |
160 | ||
161 | # | |
162 | # parse arguments | |
163 | # | |
164 | BUILD_TYPE="default" | |
165 | for ARG in "$@" | |
166 | do | |
167 | case "$ARG" in | |
1 | 168 | "--prefix="*) prefix=${ARG#--prefix=} ;; |
169 | "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;; | |
170 | "--bindir="*) bindir=${ARG#----bindir=} ;; | |
171 | "--sbindir="*) sbindir=${ARG#--sbindir=} ;; | |
172 | "--libdir="*) libdir=${ARG#--libdir=} ;; | |
173 | "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;; | |
174 | "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; | |
175 | "--datadir="*) datadir=${ARG#--datadir=} ;; | |
176 | "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; | |
177 | "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; | |
178 | "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; | |
179 | "--includedir="*) includedir=${ARG#--includedir=} ;; | |
180 | "--infodir="*) infodir=${ARG#--infodir=} ;; | |
181 | "--mandir"*) mandir=${ARG#--mandir} ;; | |
182 | "--localedir"*) localedir=${ARG#--localedir} ;; | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
183 | "--help"*) printhelp; abort_configure ;; |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
184 | "--debug") BUILD_TYPE="debug" ;; |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
185 | "--release") BUILD_TYPE="release" ;; |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
186 | "--enable-asan") FEATURE_ASAN=on ;; |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
187 | "--disable-asan") unset FEATURE_ASAN ;; |
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
188 | "--enable-tools") FEATURE_TOOLS=on ;; |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
189 | "--disable-tools") unset FEATURE_TOOLS ;; |
0 | 190 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
191 | esac | |
192 | done | |
193 | ||
194 | ||
1 | 195 | |
196 | # set defaults for dir variables | |
197 | : ${exec_prefix:="$prefix"} | |
198 | : ${bindir:='${exec_prefix}/bin'} | |
199 | : ${sbindir:='${exec_prefix}/sbin'} | |
200 | : ${libdir:='${exec_prefix}/lib'} | |
201 | : ${libexecdir:='${exec_prefix}/libexec'} | |
202 | : ${datarootdir:='${prefix}/share'} | |
203 | : ${datadir:='${datarootdir}'} | |
204 | : ${sysconfdir:='${prefix}/etc'} | |
205 | : ${sharedstatedir:='${prefix}/com'} | |
206 | : ${localstatedir:='${prefix}/var'} | |
207 | : ${runstatedir:='${localstatedir}/run'} | |
208 | : ${includedir:='${prefix}/include'} | |
209 | : ${infodir:='${datarootdir}/info'} | |
210 | : ${mandir:='${datarootdir}/man'} | |
211 | : ${localedir:='${datarootdir}/locale'} | |
212 | ||
103 | 213 | # remember the above values and compare them later |
214 | orig_bindir="$bindir" | |
215 | orig_sbindir="$sbindir" | |
216 | orig_libdir="$libdir" | |
217 | orig_libexecdir="$libexecdir" | |
218 | orig_datarootdir="$datarootdir" | |
219 | orig_datadir="$datadir" | |
220 | orig_sysconfdir="$sysconfdir" | |
221 | orig_sharedstatedir="$sharedstatedir" | |
222 | orig_localstatedir="$localstatedir" | |
223 | orig_runstatedir="$runstatedir" | |
224 | orig_includedir="$includedir" | |
225 | orig_infodir="$infodir" | |
226 | orig_mandir="$mandir" | |
227 | orig_localedir="$localedir" | |
228 | ||
1 | 229 | # check if a config.site exists and load it |
230 | if [ -n "$CONFIG_SITE" ]; then | |
231 | # CONFIG_SITE may contain space separated file names | |
232 | for cs in $CONFIG_SITE; do | |
233 | printf "loading defaults from $cs... " | |
234 | . "$cs" | |
235 | echo ok | |
236 | done | |
237 | elif [ -f "$prefix/share/config.site" ]; then | |
238 | printf "loading site defaults... " | |
239 | . "$prefix/share/config.site" | |
240 | echo ok | |
241 | elif [ -f "$prefix/etc/config.site" ]; then | |
242 | printf "loading site defaults... " | |
243 | . "$prefix/etc/config.site" | |
244 | echo ok | |
245 | fi | |
0 | 246 | |
247 | ||
248 | # generate vars.mk | |
249 | cat > "$TEMP_DIR/vars.mk" << __EOF__ | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
250 | prefix=$prefix |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
251 | exec_prefix=$exec_prefix |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
252 | bindir=$bindir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
253 | sbindir=$sbindir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
254 | libdir=$libdir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
255 | libexecdir=$libexecdir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
256 | datarootdir=$datarootdir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
257 | datadir=$datadir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
258 | sysconfdir=$sysconfdir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
259 | sharedstatedir=$sharedstatedir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
260 | localstatedir=$localstatedir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
261 | runstatedir=$runstatedir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
262 | includedir=$includedir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
263 | infodir=$infodir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
264 | mandir=$mandir |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
265 | localedir=$localedir |
0 | 266 | __EOF__ |
267 | ||
268 | # toolchain detection utilities | |
269 | . make/toolchain.sh | |
270 | ||
271 | # | |
272 | # DEPENDENCIES | |
273 | # | |
274 | ||
275 | # check languages | |
276 | lang_c= | |
277 | lang_cpp= | |
278 | if detect_c_compiler ; then | |
279 | lang_c=1 | |
280 | fi | |
281 | ||
282 | # create buffer for make variables required by dependencies | |
283 | echo > "$TEMP_DIR/make.mk" | |
284 | ||
285 | test_pkg_config() | |
286 | { | |
287 | if "$PKG_CONFIG" --exists "$1" ; then : | |
288 | else return 1 ; fi | |
289 | if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : | |
290 | else return 1 ; fi | |
291 | if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then : | |
292 | else return 1 ; fi | |
293 | if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : | |
294 | else return 1 ; fi | |
295 | return 0 | |
296 | } | |
297 | ||
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
298 | print_check_msg() |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
299 | { |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
300 | if [ -z "$1" ]; then |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
301 | shift |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
302 | printf "$@" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
303 | fi |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
304 | } |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
305 | |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
306 | dependency_error_asan() |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
307 | { |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
308 | print_check_msg "$dep_checked_asan" "checking for asan... " |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
309 | # dependency asan toolchain="gnuc" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
310 | while true |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
311 | do |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
312 | if notistoolchain "gnuc"; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
313 | break |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
314 | fi |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
315 | TEMP_CFLAGS="$TEMP_CFLAGS -fsanitize=address" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
316 | TEMP_LDFLAGS="$TEMP_LDFLAGS -fsanitize=address" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
317 | print_check_msg "$dep_checked_asan" "yes\n" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
318 | dep_checked_asan=1 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
319 | return 1 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
320 | done |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
321 | |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
322 | print_check_msg "$dep_checked_asan" "no\n" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
323 | dep_checked_asan=1 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
324 | return 0 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
325 | } |
253 | 326 | dependency_error_sdl3_ttf() |
0 | 327 | { |
253 | 328 | print_check_msg "$dep_checked_sdl3_ttf" "checking for sdl3_ttf... " |
329 | # dependency sdl3_ttf | |
0 | 330 | while true |
331 | do | |
332 | if [ -z "$PKG_CONFIG" ]; then | |
333 | break | |
334 | fi | |
253 | 335 | if test_pkg_config "sdl3-ttf" "" "" "" ; then |
336 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-ttf`" | |
337 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-ttf`" | |
0 | 338 | else |
339 | break | |
340 | fi | |
253 | 341 | print_check_msg "$dep_checked_sdl3_ttf" "yes\n" |
342 | dep_checked_sdl3_ttf=1 | |
0 | 343 | return 1 |
344 | done | |
345 | ||
253 | 346 | print_check_msg "$dep_checked_sdl3_ttf" "no\n" |
347 | dep_checked_sdl3_ttf=1 | |
88
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
348 | return 0 |
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
349 | } |
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
350 | dependency_error_gtk3() |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
351 | { |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
352 | print_check_msg "$dep_checked_gtk3" "checking for gtk3... " |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
353 | # dependency gtk3 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
354 | while true |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
355 | do |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
356 | if [ -z "$PKG_CONFIG" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
357 | break |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
358 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
359 | if test_pkg_config "gtk+-3.0" "" "" "" ; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
360 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-3.0`" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
361 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-3.0`" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
362 | else |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
363 | break |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
364 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
365 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK3" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
366 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
367 | print_check_msg "$dep_checked_gtk3" "yes\n" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
368 | dep_checked_gtk3=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
369 | return 1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
370 | done |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
371 | |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
372 | print_check_msg "$dep_checked_gtk3" "no\n" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
373 | dep_checked_gtk3=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
374 | return 0 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
375 | } |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
376 | dependency_error_toolkit() |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
377 | { |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
378 | print_check_msg "$dep_checked_toolkit" "checking for toolkit... " |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
379 | # dependency toolkit |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
380 | while true |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
381 | do |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
382 | if test -n "$TOOLKIT_HOME" > /dev/null ; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
383 | : |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
384 | else |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
385 | break |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
386 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
387 | if test -f "$TOOLKIT_HOME/lib/libuitk.a" > /dev/null ; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
388 | : |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
389 | else |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
390 | break |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
391 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
392 | if test -f "$TOOLKIT_HOME/include/ui/ui.h" > /dev/null ; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
393 | : |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
394 | else |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
395 | break |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
396 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
397 | TEMP_CFLAGS="$TEMP_CFLAGS -I$TOOLKIT_HOME/include" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
398 | TEMP_LDFLAGS="$TEMP_LDFLAGS $TOOLKIT_HOME/lib/libuitk.a" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
399 | print_check_msg "$dep_checked_toolkit" "yes\n" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
400 | dep_checked_toolkit=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
401 | return 1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
402 | done |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
403 | |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
404 | print_check_msg "$dep_checked_toolkit" "no\n" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
405 | dep_checked_toolkit=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
406 | return 0 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
407 | } |
0 | 408 | dependency_error_glew() |
409 | { | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
410 | print_check_msg "$dep_checked_glew" "checking for glew... " |
0 | 411 | # dependency glew |
412 | while true | |
413 | do | |
414 | if [ -z "$PKG_CONFIG" ]; then | |
415 | break | |
416 | fi | |
417 | if test_pkg_config "glew" "" "" "" ; then | |
418 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags glew`" | |
419 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs glew`" | |
420 | else | |
421 | break | |
422 | fi | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
423 | print_check_msg "$dep_checked_glew" "yes\n" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
424 | dep_checked_glew=1 |
0 | 425 | return 1 |
426 | done | |
427 | ||
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
428 | print_check_msg "$dep_checked_glew" "no\n" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
429 | dep_checked_glew=1 |
0 | 430 | return 0 |
431 | } | |
253 | 432 | dependency_error_sdl3_image() |
433 | { | |
434 | print_check_msg "$dep_checked_sdl3_image" "checking for sdl3_image... " | |
435 | # dependency sdl3_image | |
436 | while true | |
437 | do | |
438 | if [ -z "$PKG_CONFIG" ]; then | |
439 | break | |
440 | fi | |
441 | if test_pkg_config "sdl3-image" "" "" "" ; then | |
442 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-image`" | |
443 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-image`" | |
444 | else | |
445 | break | |
446 | fi | |
447 | print_check_msg "$dep_checked_sdl3_image" "yes\n" | |
448 | dep_checked_sdl3_image=1 | |
449 | return 1 | |
450 | done | |
451 | ||
452 | print_check_msg "$dep_checked_sdl3_image" "no\n" | |
453 | dep_checked_sdl3_image=1 | |
454 | return 0 | |
455 | } | |
0 | 456 | dependency_error_ucx() |
457 | { | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
458 | print_check_msg "$dep_checked_ucx" "checking for ucx... " |
0 | 459 | # dependency ucx |
460 | while true | |
461 | do | |
462 | if check_lib ucx cx/common.h > /dev/null ; then | |
463 | : | |
464 | else | |
465 | break | |
466 | fi | |
467 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lucx" | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
468 | print_check_msg "$dep_checked_ucx" "yes\n" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
469 | dep_checked_ucx=1 |
0 | 470 | return 1 |
471 | done | |
472 | ||
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
473 | print_check_msg "$dep_checked_ucx" "no\n" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
474 | dep_checked_ucx=1 |
0 | 475 | return 0 |
476 | } | |
253 | 477 | dependency_error_sdl3() |
478 | { | |
479 | print_check_msg "$dep_checked_sdl3" "checking for sdl3... " | |
480 | # dependency sdl3 | |
481 | while true | |
482 | do | |
483 | if [ -z "$PKG_CONFIG" ]; then | |
484 | break | |
485 | fi | |
486 | if test_pkg_config "sdl3" "" "" "" ; then | |
487 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3`" | |
488 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3`" | |
489 | else | |
490 | break | |
491 | fi | |
492 | print_check_msg "$dep_checked_sdl3" "yes\n" | |
493 | dep_checked_sdl3=1 | |
494 | return 1 | |
495 | done | |
496 | ||
497 | print_check_msg "$dep_checked_sdl3" "no\n" | |
498 | dep_checked_sdl3=1 | |
499 | return 0 | |
500 | } | |
0 | 501 | |
502 | # start collecting dependency information | |
503 | echo > "$TEMP_DIR/flags.mk" | |
504 | ||
505 | DEPENDENCIES_FAILED= | |
506 | ERROR=0 | |
507 | # unnamed dependencies | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
508 | TEMP_CFLAGS="$CFLAGS" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
509 | TEMP_CXXFLAGS="$CXXFLAGS" |
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
510 | TEMP_LDFLAGS="$LDFLAGS" |
0 | 511 | while true |
512 | do | |
513 | while true | |
514 | do | |
515 | if [ -z "$lang_c" ] ; then | |
516 | ERROR=1 | |
517 | break | |
518 | fi | |
519 | ||
128 | 520 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lm" |
84
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
521 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
522 | srcdir=$SRCDIR |
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
523 | __EOF__ |
0 | 524 | break |
525 | done | |
526 | break | |
527 | done | |
528 | ||
103 | 529 | # build type |
530 | if [ "$BUILD_TYPE" = "debug" ]; then | |
531 | TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" | |
532 | TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" | |
533 | fi | |
534 | if [ "$BUILD_TYPE" = "release" ]; then | |
535 | TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" | |
536 | TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" | |
537 | fi | |
538 | ||
0 | 539 | # add general dependency flags to flags.mk |
540 | echo "# general flags" >> "$TEMP_DIR/flags.mk" | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
541 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
0 | 542 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
543 | fi | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
544 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
0 | 545 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
546 | fi | |
547 | if [ -n "${TEMP_LDFLAGS}" ]; then | |
548 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" | |
549 | fi | |
550 | ||
551 | # | |
552 | # OPTION VALUES | |
553 | # | |
554 | ||
555 | # | |
556 | # TARGETS | |
557 | # | |
558 | ||
559 | echo >> "$TEMP_DIR/flags.mk" | |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
560 | echo "configuring global target" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
561 | echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" |
0 | 562 | TEMP_CFLAGS= |
563 | TEMP_CXXFLAGS= | |
564 | TEMP_LDFLAGS= | |
565 | ||
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
566 | if dependency_error_ucx; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
567 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
0 | 568 | ERROR=1 |
569 | fi | |
253 | 570 | if dependency_error_sdl3; then |
571 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3 " | |
0 | 572 | ERROR=1 |
573 | fi | |
253 | 574 | if dependency_error_sdl3_ttf; then |
575 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3_ttf " | |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
576 | ERROR=1 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
577 | fi |
253 | 578 | if dependency_error_sdl3_image; then |
579 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3_image " | |
88
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
580 | ERROR=1 |
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
581 | fi |
0 | 582 | if dependency_error_glew; then |
583 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED glew " | |
584 | ERROR=1 | |
585 | fi | |
586 | ||
587 | # Features | |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
588 | if [ -n "$FEATURE_ASAN" ]; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
589 | # check dependency |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
590 | if dependency_error_asan ; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
591 | # "auto" features can fail and are just disabled in this case |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
592 | if [ "$FEATURE_ASAN" = "auto" ]; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
593 | DISABLE_FEATURE_ASAN=1 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
594 | else |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
595 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED asan " |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
596 | ERROR=1 |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
597 | fi |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
598 | fi |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
599 | if [ -n "$DISABLE_FEATURE_ASAN" ]; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
600 | unset FEATURE_ASAN |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
601 | fi |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
602 | fi |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
603 | if [ -n "$FEATURE_ASAN" ]; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
604 | : |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
605 | else |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
606 | : |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
607 | fi |
0 | 608 | |
609 | ||
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
610 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
0 | 611 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
612 | fi | |
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
613 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
0 | 614 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
615 | fi | |
616 | if [ -n "${TEMP_LDFLAGS}" ]; then | |
617 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" | |
618 | fi | |
619 | ||
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
620 | echo >> "$TEMP_DIR/flags.mk" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
621 | echo "configuring target: tools" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
622 | echo "# flags for target tools" >> "$TEMP_DIR/flags.mk" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
623 | TEMP_CFLAGS= |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
624 | TEMP_CXXFLAGS= |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
625 | TEMP_LDFLAGS= |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
626 | |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
627 | if dependency_error_toolkit; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
628 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED toolkit " |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
629 | ERROR=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
630 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
631 | if dependency_error_gtk3; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
632 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
633 | ERROR=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
634 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
635 | if dependency_error_ucx; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
636 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
637 | ERROR=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
638 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
639 | |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
640 | # Features |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
641 | if [ -n "$FEATURE_TOOLS" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
642 | if [ -n "$DISABLE_FEATURE_TOOLS" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
643 | unset FEATURE_TOOLS |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
644 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
645 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
646 | if [ -n "$FEATURE_TOOLS" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
647 | : |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
648 | else |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
649 | : |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
650 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
651 | NO_TOOLS=1 |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
652 | __EOF__ |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
653 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
654 | |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
655 | |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
656 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
657 | echo "TOOLS_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
658 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
659 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
660 | echo "TOOLS_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
661 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
662 | if [ -n "${TEMP_LDFLAGS}" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
663 | echo "TOOLS_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
664 | fi |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
665 | |
0 | 666 | |
667 | # final result | |
668 | if [ $ERROR -ne 0 ]; then | |
669 | echo | |
670 | echo "Error: Unresolved dependencies" | |
671 | echo "$DEPENDENCIES_FAILED" | |
672 | abort_configure | |
673 | fi | |
674 | ||
675 | echo "configure finished" | |
676 | echo | |
103 | 677 | echo "Toolchain" |
678 | echo " name: $TOOLCHAIN_NAME" | |
679 | if [ -n "$TOOLCHAIN_CC" ]; then | |
680 | echo " cc: $TOOLCHAIN_CC" | |
681 | fi | |
682 | if [ -n "$TOOLCHAIN_CXX" ]; then | |
683 | echo " cxx: $TOOLCHAIN_CXX" | |
684 | fi | |
685 | if [ -n "$TOOLCHAIN_WSIZE" ]; then | |
686 | echo " word size: $TOOLCHAIN_WSIZE bit" | |
687 | fi | |
688 | if [ -n "$TOOLCHAIN_CSTD" ]; then | |
689 | echo " default C std: $TOOLCHAIN_CSTD" | |
690 | fi | |
691 | echo | |
0 | 692 | echo "Build Config:" |
103 | 693 | echo " prefix: $prefix" |
694 | echo " exec_prefix: $exec_prefix" | |
695 | if [ "$orig_bindir" != "$bindir" ]; then | |
696 | echo " bindir: $bindir" | |
697 | fi | |
698 | if [ "$orig_sbindir" != "$sbindir" ]; then | |
699 | echo " sbindir: $sbindir" | |
700 | fi | |
701 | if [ "$orig_libdir" != "$libdir" ]; then | |
702 | echo " libdir: $libdir" | |
703 | fi | |
704 | if [ "$orig_libexecdir" != "$libexecdir" ]; then | |
705 | echo " libexecdir: $libexecdir" | |
706 | fi | |
707 | if [ "$orig_datarootdir" != "$datarootdir" ]; then | |
708 | echo " datarootdir: $datarootdir" | |
709 | fi | |
710 | if [ "$orig_datadir" != "$datadir" ]; then | |
711 | echo " datadir: $datadir" | |
712 | fi | |
713 | if [ "$orig_sysconfdir" != "$sysconfdir" ]; then | |
714 | echo " sysconfdir: $sysconfdir" | |
715 | fi | |
716 | if [ "$orig_sharedstatedir" != "$sharedstatedir" ]; then | |
717 | echo " sharedstatedir: $sharedstatedir" | |
718 | fi | |
719 | if [ "$orig_localstatedir" != "$localstatedir" ]; then | |
720 | echo " localstatedir: $localstatedir" | |
721 | fi | |
722 | if [ "$orig_runstatedir" != "$runstatedir" ]; then | |
723 | echo " runstatedir: $runstatedir" | |
724 | fi | |
725 | if [ "$orig_includedir" != "$includedir" ]; then | |
726 | echo " includedir: $includedir" | |
727 | fi | |
728 | if [ "$orig_infodir" != "$infodir" ]; then | |
729 | echo " infodir: $infodir" | |
730 | fi | |
731 | if [ "$orig_mandir" != "$mandir" ]; then | |
732 | echo " mandir: $mandir" | |
733 | fi | |
734 | if [ "$orig_localedir" != "$localedir" ]; then | |
735 | echo " localedir: $localedir" | |
736 | fi | |
0 | 737 | echo |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
738 | echo "Features:" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
739 | if [ -n "$FEATURE_ASAN" ]; then |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
740 | echo " asan: on" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
741 | else |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
742 | echo " asan: off" |
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
743 | fi |
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
744 | if [ -n "$FEATURE_TOOLS" ]; then |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
745 | echo " tools: on" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
746 | else |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
747 | echo " tools: off" |
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
748 | fi |
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
749 | echo |
0 | 750 | |
751 | # generate the config.mk file | |
103 | 752 | pwd=`pwd` |
0 | 753 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
754 | # | |
103 | 755 | # config.mk generated by: |
756 | # pwd: $pwd | |
757 | # $0 $@ | |
0 | 758 | # |
759 | ||
760 | __EOF__ | |
761 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" | |
103 | 762 | cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk |
0 | 763 | rm -Rf "$TEMP_DIR" |