Sun, 07 Dec 2025 20:16:59 +0100
update uwproj
| 742 | 1 | #!/bin/sh |
| 2 | ||
| 3 | ||
| 867 | 4 | # some utility functions |
| 742 | 5 | isplatform() |
| 6 | { | |
| 7 | for p in $PLATFORM | |
| 8 | do | |
| 787 | 9 | if [ "$p" = "$1" ]; then |
| 742 | 10 | return 0 |
| 11 | fi | |
| 12 | done | |
| 13 | return 1 | |
| 14 | } | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
15 | notisplatform() |
| 742 | 16 | { |
| 17 | for p in $PLATFORM | |
| 18 | do | |
| 787 | 19 | if [ "$p" = "$1" ]; then |
| 742 | 20 | return 1 |
| 21 | fi | |
| 22 | done | |
| 23 | return 0 | |
| 24 | } | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
25 | istoolchain() |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
26 | { |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
27 | for t in $TOOLCHAIN |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
28 | do |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
29 | if [ "$t" = "$1" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
30 | return 0 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
31 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
32 | done |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
33 | return 1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
34 | } |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
35 | notistoolchain() |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
36 | { |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
37 | for t in $TOOLCHAIN |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
38 | do |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
39 | if [ "$t" = "$1" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
40 | return 1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
41 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
42 | done |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
43 | return 0 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
44 | } |
| 742 | 45 | |
| 867 | 46 | # clean abort |
| 47 | abort_configure() | |
| 48 | { | |
| 49 | rm -Rf "$TEMP_DIR" | |
| 50 | exit 1 | |
| 51 | } | |
| 52 | ||
| 53 | # Test for availability of pkg-config | |
| 54 | PKG_CONFIG=`command -v pkg-config` | |
| 55 | : ${PKG_CONFIG:="false"} | |
| 56 | ||
| 57 | # Simple uname based platform detection | |
| 58 | # $PLATFORM is used for platform dependent dependency selection | |
| 59 | OS=`uname -s` | |
| 60 | OS_VERSION=`uname -r` | |
| 890 | 61 | ARCH=`uname -m` |
| 867 | 62 | printf "detect platform... " |
| 63 | if [ "$OS" = "SunOS" ]; then | |
| 64 | PLATFORM="solaris sunos unix svr4" | |
| 65 | elif [ "$OS" = "Linux" ]; then | |
| 66 | PLATFORM="linux unix" | |
| 67 | elif [ "$OS" = "FreeBSD" ]; then | |
| 68 | PLATFORM="freebsd bsd unix" | |
| 69 | elif [ "$OS" = "OpenBSD" ]; then | |
| 70 | PLATFORM="openbsd bsd unix" | |
| 71 | elif [ "$OS" = "NetBSD" ]; then | |
| 72 | PLATFORM="netbsd bsd unix" | |
| 73 | elif [ "$OS" = "Darwin" ]; then | |
| 74 | PLATFORM="macos osx bsd unix" | |
| 75 | elif echo "$OS" | grep -i "MINGW" > /dev/null; then | |
| 76 | PLATFORM="windows mingw" | |
| 77 | fi | |
| 78 | : ${PLATFORM:="unix"} | |
| 79 | ||
| 80 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` | |
| 81 | echo "$PLATFORM_NAME" | |
| 82 | ||
| 83 | ||
| 84 | # help text | |
| 85 | printhelp() | |
| 86 | { | |
| 87 | echo "Usage: $0 [OPTIONS]..." | |
| 890 | 88 | echo 'Configuration:' |
| 89 | cat << '__EOF__' | |
| 867 | 90 | |
| 91 | Build Types: | |
| 92 | --debug add extra compile flags for debug builds | |
| 93 | --release add extra compile flags for release builds | |
| 94 | ||
| 95 | __EOF__ | |
| 890 | 96 | abort_configure |
| 867 | 97 | } |
| 98 | ||
| 99 | # create temporary directory | |
| 100 | TEMP_DIR=".tmp-`uname -n`" | |
| 101 | rm -Rf "$TEMP_DIR" | |
| 102 | if mkdir -p "$TEMP_DIR"; then | |
| 103 | : | |
| 104 | else | |
| 105 | echo "Cannot create tmp dir $TEMP_DIR" | |
| 106 | echo "Abort" | |
| 107 | exit 1 | |
| 108 | fi | |
| 109 | touch "$TEMP_DIR/options" | |
| 110 | touch "$TEMP_DIR/features" | |
| 111 | ||
| 890 | 112 | # config variables |
| 867 | 113 | |
| 114 | # features | |
| 115 | ||
| 116 | # | |
| 117 | # parse arguments | |
| 118 | # | |
| 119 | BUILD_TYPE="default" | |
| 120 | for ARG in "$@" | |
| 121 | do | |
| 122 | case "$ARG" in | |
| 890 | 123 | "--help"*) printhelp ;; |
| 124 | "--debug") BUILD_TYPE="debug" ;; | |
| 125 | "--release") BUILD_TYPE="release" ;; | |
| 867 | 126 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
| 127 | esac | |
| 128 | done | |
| 129 | ||
| 890 | 130 | # toolchain detection utilities |
| 131 | . make/toolchain.sh | |
| 132 | ||
| 133 | # check languages | |
| 134 | lang_c= | |
| 135 | lang_cpp= | |
| 136 | if detect_c_compiler ; then | |
| 137 | lang_c=1 | |
| 138 | fi | |
| 139 | ||
| 867 | 140 | |
| 141 | ||
| 142 | # set defaults for dir variables | |
| 143 | : ${exec_prefix:="$prefix"} | |
| 144 | : ${bindir:='${exec_prefix}/bin'} | |
| 145 | : ${sbindir:='${exec_prefix}/sbin'} | |
| 146 | : ${libdir:='${exec_prefix}/lib'} | |
| 147 | : ${libexecdir:='${exec_prefix}/libexec'} | |
| 148 | : ${datarootdir:='${prefix}/share'} | |
| 149 | : ${datadir:='${datarootdir}'} | |
| 150 | : ${sharedstatedir:='${prefix}/com'} | |
| 890 | 151 | if [ -z "$sysconfdir" ]; then |
| 152 | if [ "$prefix" = '/usr' ]; then | |
| 153 | sysconfdir='/etc' | |
| 154 | else | |
| 155 | sysconfdir='${prefix}/etc' | |
| 156 | fi | |
| 157 | fi | |
| 158 | if [ -z "$localstatedir" ]; then | |
| 159 | if [ "$prefix" = '/usr' ]; then | |
| 160 | localstatedir='/var' | |
| 161 | else | |
| 162 | localstatedir='${prefix}/var' | |
| 163 | fi | |
| 164 | fi | |
| 165 | if [ -z "$runstatedir" ]; then | |
| 166 | if [ "$prefix" = '/usr' ]; then | |
| 167 | runstatedir='/var/run' | |
| 168 | else | |
| 169 | runstatedir='${prefix}/var' | |
| 170 | fi | |
| 171 | fi | |
| 867 | 172 | : ${includedir:='${prefix}/include'} |
| 173 | : ${infodir:='${datarootdir}/info'} | |
| 174 | : ${mandir:='${datarootdir}/man'} | |
| 175 | : ${localedir:='${datarootdir}/locale'} | |
| 176 | ||
| 177 | ||
| 178 | # check if a config.site exists and load it | |
| 890 | 179 | CONFIG_SITE_OK=0 |
| 867 | 180 | if [ -n "$CONFIG_SITE" ]; then |
| 181 | # CONFIG_SITE may contain space separated file names | |
| 182 | for cs in $CONFIG_SITE; do | |
| 183 | printf "loading defaults from $cs... " | |
| 890 | 184 | if [ -f "$cs" ]; then |
| 185 | . "$cs" | |
| 186 | echo ok | |
| 187 | CONFIG_SITE_OK=1 | |
| 188 | break | |
| 189 | else | |
| 190 | echo "not found" | |
| 191 | fi | |
| 867 | 192 | done |
| 193 | elif [ -f "$prefix/share/config.site" ]; then | |
| 194 | printf "loading site defaults... " | |
| 195 | . "$prefix/share/config.site" | |
| 196 | echo ok | |
| 890 | 197 | CONFIG_SITE_OK=1 |
| 867 | 198 | elif [ -f "$prefix/etc/config.site" ]; then |
| 199 | printf "loading site defaults... " | |
| 200 | . "$prefix/etc/config.site" | |
| 201 | echo ok | |
| 890 | 202 | CONFIG_SITE_OK=1 |
| 203 | fi | |
| 204 | ||
| 205 | if [ $CONFIG_SITE_OK -eq 0 ]; then | |
| 206 | # try to detect the correct libdir on our own, except it was changed by the user | |
| 207 | if [ "$libdir" = '${exec_prefix}/lib' ] ; then | |
| 208 | if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then | |
| 209 | if [ "$OS" = "SunOS" ]; then | |
| 210 | [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64' | |
| 211 | else | |
| 212 | [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64' | |
| 213 | fi | |
| 214 | elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then | |
| 215 | if [ "$OS" = "SunOS" ]; then | |
| 216 | [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32' | |
| 217 | else | |
| 218 | [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32' | |
| 219 | fi | |
| 220 | fi | |
| 221 | fi | |
| 867 | 222 | fi |
| 223 | ||
| 742 | 224 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
225 | # generate vars.mk |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
226 | cat > "$TEMP_DIR/vars.mk" << __EOF__ |
| 742 | 227 | __EOF__ |
| 228 | ||
| 229 | ||
| 230 | # | |
| 231 | # DEPENDENCIES | |
| 232 | # | |
| 233 | ||
| 890 | 234 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
235 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
236 | # create buffer for make variables required by dependencies |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
237 | echo > "$TEMP_DIR/make.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
238 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
239 | test_pkg_config() |
| 742 | 240 | { |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
241 | if "$PKG_CONFIG" --exists "$1" ; then : |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
242 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
243 | if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
244 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
245 | if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then : |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
246 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
247 | if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
248 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
249 | return 0 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
250 | } |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
251 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
252 | print_check_msg() |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
253 | { |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
254 | if [ -z "$1" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
255 | shift |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
256 | printf "$@" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
257 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
258 | } |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
259 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
260 | dependency_error_curl() |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
261 | { |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
262 | print_check_msg "$dep_checked_curl" "checking for curl... " |
| 742 | 263 | # dependency curl platform="windows" |
| 264 | while true | |
| 265 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
266 | if notisplatform "windows"; then |
| 742 | 267 | break |
| 268 | fi | |
| 787 | 269 | TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include" |
| 270 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl" | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
271 | print_check_msg "$dep_checked_curl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
272 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
273 | return 1 |
| 742 | 274 | done |
| 787 | 275 | |
| 742 | 276 | # dependency curl platform="macos" |
| 277 | while true | |
| 278 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
279 | if notisplatform "macos"; then |
| 742 | 280 | break |
| 281 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
282 | if tmp_flags=`curl-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
283 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 284 | else |
| 285 | break | |
| 286 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
287 | if tmp_flags=`curl-config --ldflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
288 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 289 | else |
| 290 | break | |
| 291 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
292 | print_check_msg "$dep_checked_curl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
293 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
294 | return 1 |
| 742 | 295 | done |
| 787 | 296 | |
| 297 | # dependency curl | |
| 742 | 298 | while true |
| 299 | do | |
| 300 | if [ -z "$PKG_CONFIG" ]; then | |
| 787 | 301 | break |
| 742 | 302 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
303 | if test_pkg_config "libcurl" "" "" "" ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
304 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libcurl`" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
305 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libcurl`" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
306 | else |
| 742 | 307 | break |
| 308 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
309 | print_check_msg "$dep_checked_curl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
310 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
311 | return 1 |
| 742 | 312 | done |
| 787 | 313 | |
| 314 | # dependency curl | |
| 742 | 315 | while true |
| 316 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
317 | if tmp_flags=`curl-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
318 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 319 | else |
| 320 | break | |
| 321 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
322 | if tmp_flags=`curl-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
323 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 324 | else |
| 325 | break | |
| 326 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
327 | print_check_msg "$dep_checked_curl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
328 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
329 | return 1 |
| 742 | 330 | done |
| 787 | 331 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
332 | print_check_msg "$dep_checked_curl" "no\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
333 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
334 | return 0 |
| 742 | 335 | } |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
336 | dependency_error_openssl() |
| 742 | 337 | { |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
338 | print_check_msg "$dep_checked_openssl" "checking for openssl... " |
| 742 | 339 | # dependency openssl platform="windows" |
| 340 | while true | |
| 341 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
342 | if notisplatform "windows"; then |
| 742 | 343 | break |
| 344 | fi | |
| 787 | 345 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
346 | print_check_msg "$dep_checked_openssl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
347 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
348 | return 1 |
| 742 | 349 | done |
| 787 | 350 | |
| 742 | 351 | # dependency openssl platform="macos" |
| 352 | while true | |
| 353 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
354 | if notisplatform "macos"; then |
| 742 | 355 | break |
| 356 | fi | |
| 787 | 357 | TEMP_LDFLAGS="$TEMP_LDFLAGS -framework CoreFoundation" |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
358 | print_check_msg "$dep_checked_openssl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
359 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
360 | return 1 |
| 742 | 361 | done |
| 787 | 362 | |
| 742 | 363 | # dependency openssl platform="bsd" |
| 364 | while true | |
| 365 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
366 | if notisplatform "bsd"; then |
| 742 | 367 | break |
| 368 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
369 | if isplatform "macos" || istoolchain "macos"; then |
| 742 | 370 | break |
| 371 | fi | |
| 787 | 372 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
373 | print_check_msg "$dep_checked_openssl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
374 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
375 | return 1 |
| 742 | 376 | done |
| 787 | 377 | |
| 378 | # dependency openssl | |
| 742 | 379 | while true |
| 380 | do | |
| 381 | if [ -z "$PKG_CONFIG" ]; then | |
| 787 | 382 | break |
| 742 | 383 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
384 | if test_pkg_config "openssl" "" "" "" ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
385 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
386 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
387 | else |
| 742 | 388 | break |
| 389 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
390 | print_check_msg "$dep_checked_openssl" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
391 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
392 | return 1 |
| 742 | 393 | done |
| 787 | 394 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
395 | print_check_msg "$dep_checked_openssl" "no\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
396 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
397 | return 0 |
| 742 | 398 | } |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
399 | dependency_error_libxml2() |
| 742 | 400 | { |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
401 | print_check_msg "$dep_checked_libxml2" "checking for libxml2... " |
| 742 | 402 | # dependency libxml2 platform="windows" |
| 403 | while true | |
| 404 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
405 | if notisplatform "windows"; then |
| 742 | 406 | break |
| 407 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
408 | if tmp_flags=`xml2-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
409 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 410 | else |
| 411 | break | |
| 412 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
413 | if tmp_flags=`xml2-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
414 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 415 | else |
| 416 | break | |
| 417 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
418 | print_check_msg "$dep_checked_libxml2" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
419 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
420 | return 1 |
| 742 | 421 | done |
| 787 | 422 | |
| 742 | 423 | # dependency libxml2 platform="macos" |
| 424 | while true | |
| 425 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
426 | if notisplatform "macos"; then |
| 742 | 427 | break |
| 428 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
429 | if tmp_flags=`xml2-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
430 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 431 | else |
| 432 | break | |
| 433 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
434 | if tmp_flags=`xml2-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
435 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 436 | else |
| 437 | break | |
| 438 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
439 | print_check_msg "$dep_checked_libxml2" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
440 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
441 | return 1 |
| 742 | 442 | done |
| 787 | 443 | |
| 444 | # dependency libxml2 | |
| 742 | 445 | while true |
| 446 | do | |
| 447 | if [ -z "$PKG_CONFIG" ]; then | |
| 787 | 448 | break |
| 742 | 449 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
450 | if test_pkg_config "libxml-2.0" "" "" "" ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
451 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
452 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
453 | else |
| 742 | 454 | break |
| 455 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
456 | print_check_msg "$dep_checked_libxml2" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
457 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
458 | return 1 |
| 742 | 459 | done |
| 787 | 460 | |
| 461 | # dependency libxml2 | |
| 742 | 462 | while true |
| 463 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
464 | if tmp_flags=`xml2-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
465 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 466 | else |
| 467 | break | |
| 468 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
469 | if tmp_flags=`xml2-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
470 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 471 | else |
| 472 | break | |
| 473 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
474 | print_check_msg "$dep_checked_libxml2" "yes\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
475 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
476 | return 1 |
| 742 | 477 | done |
| 787 | 478 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
479 | print_check_msg "$dep_checked_libxml2" "no\n" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
480 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
481 | return 0 |
| 742 | 482 | } |
| 483 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
484 | # start collecting dependency information |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
485 | echo > "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
486 | |
| 742 | 487 | DEPENDENCIES_FAILED= |
| 488 | ERROR=0 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
489 | # unnamed dependencies |
| 867 | 490 | TEMP_CFLAGS="$CFLAGS" |
| 491 | TEMP_CXXFLAGS="$CXXFLAGS" | |
| 492 | TEMP_LDFLAGS="$LDFLAGS" | |
| 742 | 493 | while true |
| 494 | do | |
| 495 | while true | |
| 496 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
497 | if [ -z "$lang_c" ] ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
498 | ERROR=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
499 | break |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
500 | fi |
| 787 | 501 | |
| 502 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lm -lpthread" | |
| 742 | 503 | break |
| 504 | done | |
| 505 | break | |
| 506 | done | |
| 507 | while true | |
| 508 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
509 | if notisplatform "bsd"; then |
| 742 | 510 | break |
| 511 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
512 | if isplatform "macos" || istoolchain "macos"; then |
| 742 | 513 | break |
| 514 | fi | |
| 515 | while true | |
| 516 | do | |
| 787 | 517 | |
| 518 | TEMP_CFLAGS="$TEMP_CFLAGS -I/usr/local/include" | |
| 519 | TEMP_LDFLAGS="$TEMP_LDFLAGS -L/usr/local/lib" | |
| 742 | 520 | break |
| 521 | done | |
| 522 | break | |
| 523 | done | |
| 524 | while true | |
| 525 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
526 | if notisplatform "macos"; then |
| 742 | 527 | break |
| 528 | fi | |
| 529 | while true | |
| 530 | do | |
| 787 | 531 | |
| 532 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
| 742 | 533 | OBJ_EXT = .o |
| 534 | LIB_EXT = .a | |
| 535 | __EOF__ | |
| 536 | break | |
| 537 | done | |
| 538 | break | |
| 539 | done | |
| 540 | while true | |
| 541 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
542 | if notisplatform "unix"; then |
| 742 | 543 | break |
| 544 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
545 | if isplatform "macos" || istoolchain "macos"; then |
| 742 | 546 | break |
| 547 | fi | |
| 548 | while true | |
| 549 | do | |
| 787 | 550 | |
| 551 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
| 742 | 552 | OBJ_EXT = .o |
| 553 | LIB_EXT = .a | |
| 554 | __EOF__ | |
| 555 | break | |
| 556 | done | |
| 557 | break | |
| 558 | done | |
| 559 | ||
| 867 | 560 | # build type |
| 561 | if [ "$BUILD_TYPE" = "debug" ]; then | |
| 890 | 562 | TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" |
| 563 | TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" | |
| 867 | 564 | fi |
| 565 | if [ "$BUILD_TYPE" = "release" ]; then | |
| 890 | 566 | TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" |
| 567 | TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" | |
| 867 | 568 | fi |
| 569 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
570 | # add general dependency flags to flags.mk |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
571 | echo "# general flags" >> "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
572 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
573 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 574 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
575 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
576 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 577 | fi |
| 787 | 578 | if [ -n "${TEMP_LDFLAGS}" ]; then |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
579 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 580 | fi |
| 581 | ||
| 582 | # | |
| 583 | # OPTION VALUES | |
| 584 | # | |
| 585 | ||
| 586 | # | |
| 587 | # TARGETS | |
| 588 | # | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
589 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
590 | echo >> "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
591 | echo "configuring target: dav" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
592 | echo "# flags for target dav" >> "$TEMP_DIR/flags.mk" |
| 787 | 593 | TEMP_CFLAGS= |
| 594 | TEMP_CXXFLAGS= | |
| 595 | TEMP_LDFLAGS= | |
| 742 | 596 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
597 | if dependency_error_curl; then |
| 787 | 598 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
| 599 | ERROR=1 | |
| 742 | 600 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
601 | if dependency_error_libxml2; then |
| 787 | 602 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
| 603 | ERROR=1 | |
| 742 | 604 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
605 | if dependency_error_openssl; then |
| 787 | 606 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " |
| 607 | ERROR=1 | |
| 742 | 608 | fi |
| 609 | ||
| 610 | # Features | |
| 611 | ||
| 612 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
613 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
614 | echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
615 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
616 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
617 | echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 618 | fi |
| 787 | 619 | if [ -n "${TEMP_LDFLAGS}" ]; then |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
620 | echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 621 | fi |
| 622 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
623 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
624 | # final result |
| 742 | 625 | if [ $ERROR -ne 0 ]; then |
| 787 | 626 | echo |
| 627 | echo "Error: Unresolved dependencies" | |
| 628 | echo "$DEPENDENCIES_FAILED" | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
629 | abort_configure |
| 742 | 630 | fi |
| 631 | ||
| 632 | echo "configure finished" | |
| 633 | echo | |
| 890 | 634 | echo "Toolchain:" |
| 867 | 635 | echo " name: $TOOLCHAIN_NAME" |
| 636 | if [ -n "$TOOLCHAIN_CC" ]; then | |
| 637 | echo " cc: $TOOLCHAIN_CC" | |
| 638 | fi | |
| 639 | if [ -n "$TOOLCHAIN_CXX" ]; then | |
| 640 | echo " cxx: $TOOLCHAIN_CXX" | |
| 641 | fi | |
| 642 | if [ -n "$TOOLCHAIN_WSIZE" ]; then | |
| 643 | echo " word size: $TOOLCHAIN_WSIZE bit" | |
| 644 | fi | |
| 645 | if [ -n "$TOOLCHAIN_CSTD" ]; then | |
| 646 | echo " default C std: $TOOLCHAIN_CSTD" | |
| 647 | fi | |
| 648 | echo | |
| 890 | 649 | echo "Config:" |
| 742 | 650 | echo |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
651 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
652 | # generate the config.mk file |
| 867 | 653 | pwd=`pwd` |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
654 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
655 | # |
| 867 | 656 | # config.mk generated by: |
| 657 | # pwd: $pwd | |
| 658 | # $0 $@ | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
659 | # |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
660 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
661 | __EOF__ |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
662 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" |
| 867 | 663 | cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk |
| 787 | 664 | rm -Rf "$TEMP_DIR" |