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