Tue, 14 Oct 2025 21:02:26 +0200
add TODOs for using modern ucx features
| 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` | |
| 61 | printf "detect platform... " | |
| 62 | if [ "$OS" = "SunOS" ]; then | |
| 63 | PLATFORM="solaris sunos unix svr4" | |
| 64 | elif [ "$OS" = "Linux" ]; then | |
| 65 | PLATFORM="linux unix" | |
| 66 | elif [ "$OS" = "FreeBSD" ]; then | |
| 67 | PLATFORM="freebsd bsd unix" | |
| 68 | elif [ "$OS" = "OpenBSD" ]; then | |
| 69 | PLATFORM="openbsd bsd unix" | |
| 70 | elif [ "$OS" = "NetBSD" ]; then | |
| 71 | PLATFORM="netbsd bsd unix" | |
| 72 | elif [ "$OS" = "Darwin" ]; then | |
| 73 | PLATFORM="macos osx bsd unix" | |
| 74 | elif echo "$OS" | grep -i "MINGW" > /dev/null; then | |
| 75 | PLATFORM="windows mingw" | |
| 76 | fi | |
| 77 | : ${PLATFORM:="unix"} | |
| 78 | ||
| 79 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` | |
| 80 | echo "$PLATFORM_NAME" | |
| 81 | ||
| 82 | ||
| 83 | # help text | |
| 84 | printhelp() | |
| 85 | { | |
| 86 | echo "Usage: $0 [OPTIONS]..." | |
| 87 | cat << __EOF__ | |
| 88 | Installation directories: | |
| 89 | --prefix=PREFIX path prefix for architecture-independent files | |
| 90 | [$prefix] | |
| 91 | --exec-prefix=EPREFIX path prefix for architecture-dependent files | |
| 92 | [PREFIX] | |
| 93 | ||
| 94 | --bindir=DIR user executables [EPREFIX/bin] | |
| 95 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
| 96 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
| 97 | --sysconfdir=DIR system configuration files [PREFIX/etc] | |
| 98 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
| 99 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
| 100 | --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run] | |
| 101 | --libdir=DIR object code libraries [EPREFIX/lib] | |
| 102 | --includedir=DIR C header files [PREFIX/include] | |
| 103 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
| 104 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
| 105 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
| 106 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
| 107 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
| 108 | ||
| 109 | Build Types: | |
| 110 | --debug add extra compile flags for debug builds | |
| 111 | --release add extra compile flags for release builds | |
| 112 | ||
| 113 | __EOF__ | |
| 114 | } | |
| 115 | ||
| 116 | # create temporary directory | |
| 117 | TEMP_DIR=".tmp-`uname -n`" | |
| 118 | rm -Rf "$TEMP_DIR" | |
| 119 | if mkdir -p "$TEMP_DIR"; then | |
| 120 | : | |
| 121 | else | |
| 122 | echo "Cannot create tmp dir $TEMP_DIR" | |
| 123 | echo "Abort" | |
| 124 | exit 1 | |
| 125 | fi | |
| 126 | touch "$TEMP_DIR/options" | |
| 127 | touch "$TEMP_DIR/features" | |
| 128 | ||
| 129 | # define standard variables | |
| 130 | # also define standard prefix (this is where we will search for config.site) | |
| 131 | prefix=/usr | |
| 132 | exec_prefix= | |
| 133 | bindir= | |
| 134 | sbindir= | |
| 135 | libdir= | |
| 136 | libexecdir= | |
| 137 | datarootdir= | |
| 138 | datadir= | |
| 139 | sysconfdir= | |
| 140 | sharedstatedir= | |
| 141 | localstatedir= | |
| 142 | runstatedir= | |
| 143 | includedir= | |
| 144 | infodir= | |
| 145 | localedir= | |
| 146 | mandir= | |
| 147 | ||
| 148 | # custom variables | |
| 149 | ||
| 150 | # features | |
| 151 | ||
| 152 | # | |
| 153 | # parse arguments | |
| 154 | # | |
| 155 | BUILD_TYPE="default" | |
| 156 | for ARG in "$@" | |
| 157 | do | |
| 158 | case "$ARG" in | |
| 159 | "--prefix="*) prefix=${ARG#--prefix=} ;; | |
| 160 | "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;; | |
| 161 | "--bindir="*) bindir=${ARG#----bindir=} ;; | |
| 162 | "--sbindir="*) sbindir=${ARG#--sbindir=} ;; | |
| 163 | "--libdir="*) libdir=${ARG#--libdir=} ;; | |
| 164 | "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;; | |
| 165 | "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; | |
| 166 | "--datadir="*) datadir=${ARG#--datadir=} ;; | |
| 167 | "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; | |
| 168 | "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; | |
| 169 | "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; | |
| 170 | "--includedir="*) includedir=${ARG#--includedir=} ;; | |
| 171 | "--infodir="*) infodir=${ARG#--infodir=} ;; | |
| 172 | "--mandir"*) mandir=${ARG#--mandir} ;; | |
| 173 | "--localedir"*) localedir=${ARG#--localedir} ;; | |
| 174 | "--help"*) printhelp; abort_configure ;; | |
| 175 | "--debug") BUILD_TYPE="debug" ;; | |
| 176 | "--release") BUILD_TYPE="release" ;; | |
| 177 | "-"*) echo "unknown option: $ARG"; abort_configure ;; | |
| 178 | esac | |
| 179 | done | |
| 180 | ||
| 181 | ||
| 182 | ||
| 183 | # set defaults for dir variables | |
| 184 | : ${exec_prefix:="$prefix"} | |
| 185 | : ${bindir:='${exec_prefix}/bin'} | |
| 186 | : ${sbindir:='${exec_prefix}/sbin'} | |
| 187 | : ${libdir:='${exec_prefix}/lib'} | |
| 188 | : ${libexecdir:='${exec_prefix}/libexec'} | |
| 189 | : ${datarootdir:='${prefix}/share'} | |
| 190 | : ${datadir:='${datarootdir}'} | |
| 191 | : ${sysconfdir:='${prefix}/etc'} | |
| 192 | : ${sharedstatedir:='${prefix}/com'} | |
| 193 | : ${localstatedir:='${prefix}/var'} | |
| 194 | : ${runstatedir:='${localstatedir}/run'} | |
| 195 | : ${includedir:='${prefix}/include'} | |
| 196 | : ${infodir:='${datarootdir}/info'} | |
| 197 | : ${mandir:='${datarootdir}/man'} | |
| 198 | : ${localedir:='${datarootdir}/locale'} | |
| 199 | ||
| 200 | # remember the above values and compare them later | |
| 201 | orig_bindir="$bindir" | |
| 202 | orig_sbindir="$sbindir" | |
| 203 | orig_libdir="$libdir" | |
| 204 | orig_libexecdir="$libexecdir" | |
| 205 | orig_datarootdir="$datarootdir" | |
| 206 | orig_datadir="$datadir" | |
| 207 | orig_sysconfdir="$sysconfdir" | |
| 208 | orig_sharedstatedir="$sharedstatedir" | |
| 209 | orig_localstatedir="$localstatedir" | |
| 210 | orig_runstatedir="$runstatedir" | |
| 211 | orig_includedir="$includedir" | |
| 212 | orig_infodir="$infodir" | |
| 213 | orig_mandir="$mandir" | |
| 214 | orig_localedir="$localedir" | |
| 215 | ||
| 216 | # check if a config.site exists and load it | |
| 217 | if [ -n "$CONFIG_SITE" ]; then | |
| 218 | # CONFIG_SITE may contain space separated file names | |
| 219 | for cs in $CONFIG_SITE; do | |
| 220 | printf "loading defaults from $cs... " | |
| 221 | . "$cs" | |
| 222 | echo ok | |
| 223 | done | |
| 224 | elif [ -f "$prefix/share/config.site" ]; then | |
| 225 | printf "loading site defaults... " | |
| 226 | . "$prefix/share/config.site" | |
| 227 | echo ok | |
| 228 | elif [ -f "$prefix/etc/config.site" ]; then | |
| 229 | printf "loading site defaults... " | |
| 230 | . "$prefix/etc/config.site" | |
| 231 | echo ok | |
| 232 | fi | |
| 233 | ||
| 742 | 234 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
235 | # generate vars.mk |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
236 | cat > "$TEMP_DIR/vars.mk" << __EOF__ |
| 809 | 237 | prefix=$prefix |
| 238 | exec_prefix=$exec_prefix | |
| 239 | bindir=$bindir | |
| 240 | sbindir=$sbindir | |
| 241 | libdir=$libdir | |
| 242 | libexecdir=$libexecdir | |
| 243 | datarootdir=$datarootdir | |
| 244 | datadir=$datadir | |
| 245 | sysconfdir=$sysconfdir | |
| 246 | sharedstatedir=$sharedstatedir | |
| 247 | localstatedir=$localstatedir | |
| 248 | runstatedir=$runstatedir | |
| 249 | includedir=$includedir | |
| 250 | infodir=$infodir | |
| 251 | mandir=$mandir | |
| 252 | localedir=$localedir | |
| 742 | 253 | __EOF__ |
| 254 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
255 | # toolchain detection utilities |
| 742 | 256 | . make/toolchain.sh |
| 257 | ||
| 258 | # | |
| 259 | # DEPENDENCIES | |
| 260 | # | |
| 261 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
262 | # check languages |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
263 | lang_c= |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
264 | lang_cpp= |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
265 | if detect_c_compiler ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
266 | lang_c=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
267 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
268 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
269 | # 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
|
270 | echo > "$TEMP_DIR/make.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
271 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
272 | test_pkg_config() |
| 742 | 273 | { |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
274 | if "$PKG_CONFIG" --exists "$1" ; then : |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
275 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
276 | 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
|
277 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
278 | 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
|
279 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
280 | 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
|
281 | else return 1 ; fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
282 | return 0 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
283 | } |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
284 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
285 | print_check_msg() |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
286 | { |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
287 | if [ -z "$1" ]; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
288 | shift |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
289 | printf "$@" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
290 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
291 | } |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
292 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
293 | dependency_error_curl() |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
294 | { |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
295 | print_check_msg "$dep_checked_curl" "checking for curl... " |
| 742 | 296 | # dependency curl platform="windows" |
| 297 | while true | |
| 298 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
299 | if notisplatform "windows"; then |
| 742 | 300 | break |
| 301 | fi | |
| 787 | 302 | TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include" |
| 303 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl" | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
304 | 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
|
305 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
306 | return 1 |
| 742 | 307 | done |
| 787 | 308 | |
| 742 | 309 | # dependency curl platform="macos" |
| 310 | while true | |
| 311 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
312 | if notisplatform "macos"; then |
| 742 | 313 | break |
| 314 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
315 | if tmp_flags=`curl-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
316 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 317 | else |
| 318 | break | |
| 319 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
320 | if tmp_flags=`curl-config --ldflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
321 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 322 | else |
| 323 | break | |
| 324 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
325 | 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
|
326 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
327 | return 1 |
| 742 | 328 | done |
| 787 | 329 | |
| 330 | # dependency curl | |
| 742 | 331 | while true |
| 332 | do | |
| 333 | if [ -z "$PKG_CONFIG" ]; then | |
| 787 | 334 | break |
| 742 | 335 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
336 | if test_pkg_config "libcurl" "" "" "" ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
337 | 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
|
338 | 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
|
339 | else |
| 742 | 340 | break |
| 341 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
342 | 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
|
343 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
344 | return 1 |
| 742 | 345 | done |
| 787 | 346 | |
| 347 | # dependency curl | |
| 742 | 348 | while true |
| 349 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
350 | if tmp_flags=`curl-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
351 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 352 | else |
| 353 | break | |
| 354 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
355 | if tmp_flags=`curl-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
356 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 357 | else |
| 358 | break | |
| 359 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
360 | 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
|
361 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
362 | return 1 |
| 742 | 363 | done |
| 787 | 364 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
365 | 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
|
366 | dep_checked_curl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
367 | return 0 |
| 742 | 368 | } |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
369 | dependency_error_openssl() |
| 742 | 370 | { |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
371 | print_check_msg "$dep_checked_openssl" "checking for openssl... " |
| 742 | 372 | # dependency openssl platform="windows" |
| 373 | while true | |
| 374 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
375 | if notisplatform "windows"; then |
| 742 | 376 | break |
| 377 | fi | |
| 787 | 378 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
379 | 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
|
380 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
381 | return 1 |
| 742 | 382 | done |
| 787 | 383 | |
| 742 | 384 | # dependency openssl platform="macos" |
| 385 | while true | |
| 386 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
387 | if notisplatform "macos"; then |
| 742 | 388 | break |
| 389 | fi | |
| 787 | 390 | TEMP_LDFLAGS="$TEMP_LDFLAGS -framework CoreFoundation" |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
391 | 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
|
392 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
393 | return 1 |
| 742 | 394 | done |
| 787 | 395 | |
| 742 | 396 | # dependency openssl platform="bsd" |
| 397 | while true | |
| 398 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
399 | if notisplatform "bsd"; then |
| 742 | 400 | break |
| 401 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
402 | if isplatform "macos" || istoolchain "macos"; then |
| 742 | 403 | break |
| 404 | fi | |
| 787 | 405 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
406 | 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
|
407 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
408 | return 1 |
| 742 | 409 | done |
| 787 | 410 | |
| 411 | # dependency openssl | |
| 742 | 412 | while true |
| 413 | do | |
| 414 | if [ -z "$PKG_CONFIG" ]; then | |
| 787 | 415 | break |
| 742 | 416 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
417 | if test_pkg_config "openssl" "" "" "" ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
418 | 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
|
419 | 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
|
420 | else |
| 742 | 421 | break |
| 422 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
423 | 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
|
424 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
425 | return 1 |
| 742 | 426 | done |
| 787 | 427 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
428 | 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
|
429 | dep_checked_openssl=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
430 | return 0 |
| 742 | 431 | } |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
432 | dependency_error_libxml2() |
| 742 | 433 | { |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
434 | print_check_msg "$dep_checked_libxml2" "checking for libxml2... " |
| 742 | 435 | # dependency libxml2 platform="windows" |
| 436 | while true | |
| 437 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
438 | if notisplatform "windows"; then |
| 742 | 439 | break |
| 440 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
441 | if tmp_flags=`xml2-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
442 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 443 | else |
| 444 | break | |
| 445 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
446 | if tmp_flags=`xml2-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
447 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 448 | else |
| 449 | break | |
| 450 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
451 | 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
|
452 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
453 | return 1 |
| 742 | 454 | done |
| 787 | 455 | |
| 742 | 456 | # dependency libxml2 platform="macos" |
| 457 | while true | |
| 458 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
459 | if notisplatform "macos"; then |
| 742 | 460 | break |
| 461 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
462 | if tmp_flags=`xml2-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
463 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 464 | else |
| 465 | break | |
| 466 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
467 | if tmp_flags=`xml2-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
468 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 469 | else |
| 470 | break | |
| 471 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
472 | 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
|
473 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
474 | return 1 |
| 742 | 475 | done |
| 787 | 476 | |
| 477 | # dependency libxml2 | |
| 742 | 478 | while true |
| 479 | do | |
| 480 | if [ -z "$PKG_CONFIG" ]; then | |
| 787 | 481 | break |
| 742 | 482 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
483 | 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
|
484 | 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
|
485 | 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
|
486 | else |
| 742 | 487 | break |
| 488 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
489 | 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
|
490 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
491 | return 1 |
| 742 | 492 | done |
| 787 | 493 | |
| 494 | # dependency libxml2 | |
| 742 | 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 tmp_flags=`xml2-config --cflags` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
498 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
| 742 | 499 | else |
| 500 | break | |
| 501 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
502 | if tmp_flags=`xml2-config --libs` ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
503 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
| 742 | 504 | else |
| 505 | break | |
| 506 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
507 | 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
|
508 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
509 | return 1 |
| 742 | 510 | done |
| 787 | 511 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
512 | 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
|
513 | dep_checked_libxml2=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
514 | return 0 |
| 742 | 515 | } |
| 516 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
517 | # start collecting dependency information |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
518 | echo > "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
519 | |
| 742 | 520 | DEPENDENCIES_FAILED= |
| 521 | ERROR=0 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
522 | # unnamed dependencies |
| 867 | 523 | TEMP_CFLAGS="$CFLAGS" |
| 524 | TEMP_CXXFLAGS="$CXXFLAGS" | |
| 525 | TEMP_LDFLAGS="$LDFLAGS" | |
| 742 | 526 | while true |
| 527 | do | |
| 528 | while true | |
| 529 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
530 | if [ -z "$lang_c" ] ; then |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
531 | ERROR=1 |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
532 | break |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
533 | fi |
| 787 | 534 | |
| 535 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lm -lpthread" | |
| 742 | 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 "bsd"; 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 | TEMP_CFLAGS="$TEMP_CFLAGS -I/usr/local/include" | |
| 552 | TEMP_LDFLAGS="$TEMP_LDFLAGS -L/usr/local/lib" | |
| 742 | 553 | break |
| 554 | done | |
| 555 | break | |
| 556 | done | |
| 557 | while true | |
| 558 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
559 | if notisplatform "macos"; then |
| 742 | 560 | break |
| 561 | fi | |
| 562 | while true | |
| 563 | do | |
| 787 | 564 | |
| 565 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
| 742 | 566 | OBJ_EXT = .o |
| 567 | LIB_EXT = .a | |
| 568 | __EOF__ | |
| 569 | break | |
| 570 | done | |
| 571 | break | |
| 572 | done | |
| 573 | while true | |
| 574 | do | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
575 | if notisplatform "unix"; then |
| 742 | 576 | break |
| 577 | fi | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
578 | if isplatform "macos" || istoolchain "macos"; then |
| 742 | 579 | break |
| 580 | fi | |
| 581 | while true | |
| 582 | do | |
| 787 | 583 | |
| 584 | cat >> "$TEMP_DIR/make.mk" << __EOF__ | |
| 742 | 585 | OBJ_EXT = .o |
| 586 | LIB_EXT = .a | |
| 587 | __EOF__ | |
| 588 | break | |
| 589 | done | |
| 590 | break | |
| 591 | done | |
| 592 | ||
| 867 | 593 | # build type |
| 594 | if [ "$BUILD_TYPE" = "debug" ]; then | |
| 595 | TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" | |
| 596 | TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" | |
| 597 | fi | |
| 598 | if [ "$BUILD_TYPE" = "release" ]; then | |
| 599 | TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" | |
| 600 | TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" | |
| 601 | fi | |
| 602 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
603 | # add general dependency flags to flags.mk |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
604 | echo "# general flags" >> "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
605 | 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
|
606 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 607 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
608 | 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
|
609 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 610 | fi |
| 787 | 611 | if [ -n "${TEMP_LDFLAGS}" ]; then |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
612 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 613 | fi |
| 614 | ||
| 615 | # | |
| 616 | # OPTION VALUES | |
| 617 | # | |
| 618 | ||
| 619 | # | |
| 620 | # TARGETS | |
| 621 | # | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
622 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
623 | echo >> "$TEMP_DIR/flags.mk" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
624 | echo "configuring target: dav" |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
625 | echo "# flags for target dav" >> "$TEMP_DIR/flags.mk" |
| 787 | 626 | TEMP_CFLAGS= |
| 627 | TEMP_CXXFLAGS= | |
| 628 | TEMP_LDFLAGS= | |
| 742 | 629 | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
630 | if dependency_error_curl; then |
| 787 | 631 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
| 632 | ERROR=1 | |
| 742 | 633 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
634 | if dependency_error_libxml2; then |
| 787 | 635 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
| 636 | ERROR=1 | |
| 742 | 637 | fi |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
638 | if dependency_error_openssl; then |
| 787 | 639 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " |
| 640 | ERROR=1 | |
| 742 | 641 | fi |
| 642 | ||
| 643 | # Features | |
| 644 | ||
| 645 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
646 | 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
|
647 | 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
|
648 | fi |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
649 | 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
|
650 | echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 651 | fi |
| 787 | 652 | if [ -n "${TEMP_LDFLAGS}" ]; then |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
653 | echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
| 742 | 654 | fi |
| 655 | ||
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
656 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
657 | # final result |
| 742 | 658 | if [ $ERROR -ne 0 ]; then |
| 787 | 659 | echo |
| 660 | echo "Error: Unresolved dependencies" | |
| 661 | echo "$DEPENDENCIES_FAILED" | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
662 | abort_configure |
| 742 | 663 | fi |
| 664 | ||
| 665 | echo "configure finished" | |
| 666 | echo | |
| 867 | 667 | echo "Toolchain" |
| 668 | echo " name: $TOOLCHAIN_NAME" | |
| 669 | if [ -n "$TOOLCHAIN_CC" ]; then | |
| 670 | echo " cc: $TOOLCHAIN_CC" | |
| 671 | fi | |
| 672 | if [ -n "$TOOLCHAIN_CXX" ]; then | |
| 673 | echo " cxx: $TOOLCHAIN_CXX" | |
| 674 | fi | |
| 675 | if [ -n "$TOOLCHAIN_WSIZE" ]; then | |
| 676 | echo " word size: $TOOLCHAIN_WSIZE bit" | |
| 677 | fi | |
| 678 | if [ -n "$TOOLCHAIN_CSTD" ]; then | |
| 679 | echo " default C std: $TOOLCHAIN_CSTD" | |
| 680 | fi | |
| 681 | echo | |
| 742 | 682 | echo "Build Config:" |
| 867 | 683 | echo " prefix: $prefix" |
| 684 | echo " exec_prefix: $exec_prefix" | |
| 685 | if [ "$orig_bindir" != "$bindir" ]; then | |
| 686 | echo " bindir: $bindir" | |
| 687 | fi | |
| 688 | if [ "$orig_sbindir" != "$sbindir" ]; then | |
| 689 | echo " sbindir: $sbindir" | |
| 690 | fi | |
| 691 | if [ "$orig_libdir" != "$libdir" ]; then | |
| 692 | echo " libdir: $libdir" | |
| 693 | fi | |
| 694 | if [ "$orig_libexecdir" != "$libexecdir" ]; then | |
| 695 | echo " libexecdir: $libexecdir" | |
| 696 | fi | |
| 697 | if [ "$orig_datarootdir" != "$datarootdir" ]; then | |
| 698 | echo " datarootdir: $datarootdir" | |
| 699 | fi | |
| 700 | if [ "$orig_datadir" != "$datadir" ]; then | |
| 701 | echo " datadir: $datadir" | |
| 702 | fi | |
| 703 | if [ "$orig_sysconfdir" != "$sysconfdir" ]; then | |
| 704 | echo " sysconfdir: $sysconfdir" | |
| 705 | fi | |
| 706 | if [ "$orig_sharedstatedir" != "$sharedstatedir" ]; then | |
| 707 | echo " sharedstatedir: $sharedstatedir" | |
| 708 | fi | |
| 709 | if [ "$orig_localstatedir" != "$localstatedir" ]; then | |
| 710 | echo " localstatedir: $localstatedir" | |
| 711 | fi | |
| 712 | if [ "$orig_runstatedir" != "$runstatedir" ]; then | |
| 713 | echo " runstatedir: $runstatedir" | |
| 714 | fi | |
| 715 | if [ "$orig_includedir" != "$includedir" ]; then | |
| 716 | echo " includedir: $includedir" | |
| 717 | fi | |
| 718 | if [ "$orig_infodir" != "$infodir" ]; then | |
| 719 | echo " infodir: $infodir" | |
| 720 | fi | |
| 721 | if [ "$orig_mandir" != "$mandir" ]; then | |
| 722 | echo " mandir: $mandir" | |
| 723 | fi | |
| 724 | if [ "$orig_localedir" != "$localedir" ]; then | |
| 725 | echo " localedir: $localedir" | |
| 726 | fi | |
| 742 | 727 | echo |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
728 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
729 | # generate the config.mk file |
| 867 | 730 | pwd=`pwd` |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
731 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
732 | # |
| 867 | 733 | # config.mk generated by: |
| 734 | # pwd: $pwd | |
| 735 | # $0 $@ | |
|
802
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
736 | # |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
737 | |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
738 | __EOF__ |
|
16e5b9d32754
update build files to latest uwproj
Mike Becker <universe@uap-core.de>
parents:
787
diff
changeset
|
739 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" |
| 867 | 740 | cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk |
| 787 | 741 | rm -Rf "$TEMP_DIR" |