Thu, 14 Sep 2023 22:59:05 +0200
major evolution of configure template - fixes #283
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
1 | #!/bin/sh |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
2 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
3 | # create temporary directory |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
4 | TEMP_DIR=".tmp-$(uname -n)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
5 | rm -Rf "$TEMP_DIR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
6 | if ! mkdir -p "$TEMP_DIR"; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
7 | echo "Cannot create tmp dir $TEMP_DIR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
8 | echo "Abort" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
9 | exit 1 |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
10 | fi |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
11 | touch "$TEMP_DIR/options" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
12 | touch "$TEMP_DIR/features" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
13 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
14 | # define standard variables |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
15 | PREFIX=/usr |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
16 | EPREFIX=/usr |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
17 | BINDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
18 | SBINDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
19 | LIBDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
20 | LIBEXECDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
21 | DATADIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
22 | SYSCONFDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
23 | SHAREDSTATEDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
24 | LOCALSTATEDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
25 | INCLUDEDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
26 | INFODIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
27 | MANDIR= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
28 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
29 | # custom variables |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
30 | HOST=$(uname -n) |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
31 | PREFIX=$(pwd)/work |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
32 | INSTALL_DIR=$PREFIX |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
33 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
34 | # features |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
35 | FEATURE_PG=auto |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
36 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
37 | # clean abort |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
38 | abort_configure() |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
39 | { |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
40 | rm -Rf "$TEMP_DIR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
41 | exit 1 |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
42 | } |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
43 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
44 | # help text |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
45 | printhelp() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
46 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
47 | echo "Usage: $0 [OPTIONS]..." |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
48 | cat << __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
49 | Installation directories: |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
50 | --prefix=PREFIX path prefix for architecture-independent files |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
51 | [/usr] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
52 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
53 | [PREFIX] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
54 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
55 | --bindir=DIR user executables [EPREFIX/bin] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
56 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
57 | --libexecdir=DIR program executables [EPREFIX/libexec] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
58 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
59 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
60 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
61 | --libdir=DIR object code libraries [EPREFIX/lib] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
62 | --includedir=DIR C header files [PREFIX/include] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
63 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
64 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
65 | --infodir=DIR info documentation [DATAROOTDIR/info] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
66 | --mandir=DIR man documentation [DATAROOTDIR/man] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
67 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
68 | Optional Features: |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
69 | --disable-pg |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
70 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
71 | __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
72 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
73 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
74 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
75 | # parse arguments |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
76 | # |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
77 | BUILD_TYPE="default" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
78 | for ARG in "$@" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
79 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
80 | case "$ARG" in |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
81 | "--prefix="*) PREFIX=${ARG#--prefix=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
82 | "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
83 | "--bindir="*) BINDIR=${ARG#----bindir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
84 | "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
85 | "--libdir="*) LIBDIR=${ARG#--libdir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
86 | "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
87 | "--datadir="*) DATADIR=${ARG#--datadir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
88 | "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
89 | "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
90 | "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
91 | "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
92 | "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
93 | "--mandir"*) MANDIR=${ARG#--mandir} ;; |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
94 | "--help"*) printhelp; abort_configure ;; |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
95 | "--debug") BUILD_TYPE="debug" ;; |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
96 | "--release") BUILD_TYPE="release" ;; |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
97 | "--enable-pg") FEATURE_PG=on ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
98 | "--disable-pg") unset FEATURE_PG ;; |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
99 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
100 | esac |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
101 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
102 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
103 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
104 | # set dir variables |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
105 | BINDIR=${BINDIR:-"$EPREFIX/bin"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
106 | SBINDIR=${SBINDIR:-"$EPREFIX/sbin"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
107 | LIBDIR=${LIBDIR:-"$EPREFIX/lib"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
108 | LIBEXECDIR=${LIBEXECDIR:-"$EPREFIX/libexec"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
109 | DATADIR=${DATADIR:-"$PREFIX/share"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
110 | SYSCONFDIR=${SYSCONFDIR:-"$PREFIX/etc"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
111 | SHAREDSTATEDIR=${SHAREDSTATEDIR:-"$PREFIX/com"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
112 | LOCALSTATEDIR=${LOCALSTATEDIR:-"$PREFIX/var"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
113 | INCLUDEDIR=${INCLUDEDIR:-"$PREFIX/include"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
114 | INFODIR=${INFODIR:-"$PREFIX/info"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
115 | MANDIR=${MANDIR:-"$PREFIX/man"} |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
116 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
117 | # Test for availability of pkg-config |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
118 | PKG_CONFIG=$(command -v pkg-config) |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
119 | PKG_CONFIG=${PKG_CONFIG:-"false"} |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
120 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
121 | # Simple uname based platform detection |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
122 | # $PLATFORM is used for platform dependent dependency selection |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
123 | OS=$(uname -s) |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
124 | OS_VERSION=$(uname -r) |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
125 | printf "detect platform... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
126 | if [ "$OS" = "SunOS" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
127 | PLATFORM="solaris sunos unix svr4" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
128 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
129 | if [ "$OS" = "Linux" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
130 | PLATFORM="linux unix" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
131 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
132 | if [ "$OS" = "FreeBSD" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
133 | PLATFORM="freebsd bsd unix" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
134 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
135 | if [ "$OS" = "Darwin" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
136 | PLATFORM="macos osx bsd unix" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
137 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
138 | if echo "$OS" | grep -i "MINGW" > /dev/null; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
139 | PLATFORM="windows mingw" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
140 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
141 | PLATFORM=${PLATFORM:-"unix"} |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
142 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
143 | PLATFORM_NAME=$(echo "$PLATFORM" | cut -f1 -d' ' -) |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
144 | echo "$PLATFORM_NAME" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
145 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
146 | isplatform() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
147 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
148 | for p in $PLATFORM |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
149 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
150 | if [ "$p" = "$1" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
151 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
152 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
153 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
154 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
155 | } |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
156 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
157 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
158 | # generate config.mk |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
159 | cat > "$TEMP_DIR/vars.mk" << __EOF__ |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
160 | PREFIX=$PREFIX |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
161 | EPREFIX=$EPREFIX |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
162 | BINDIR=$BINDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
163 | SBINDIR=$SBINDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
164 | LIBDIR=$LIBDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
165 | LIBEXECDIR=$LIBEXECDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
166 | DATADIR=$DATADIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
167 | SYSCONFDIR=$SYSCONFDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
168 | SHAREDSTATEDIR=$SHAREDSTATEDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
169 | LOCALSTATEDIR=$LOCALSTATEDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
170 | INCLUDEDIR=$INCLUDEDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
171 | INFODIR=$INFODIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
172 | MANDIR=$MANDIR |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
173 | HOST=$HOST |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
174 | PREFIX=$PREFIX |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
175 | INSTALL_DIR=$INSTALL_DIR |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
176 | __EOF__ |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
177 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
178 | # |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
179 | # config.mk generated by configure |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
180 | # |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
181 | __EOF__ |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
182 | sort -u "$TEMP_DIR/vars.mk" >> "$TEMP_DIR/config.mk" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
183 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
184 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
185 | # toolchain detection |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
186 | # this will insert make vars to config.mk |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
187 | . make/toolchain.sh |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
188 | if [ -n "$TOOLCHAIN_ERROR" ]; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
189 | echo "Toolchain error: $TOOLCHAIN_ERROR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
190 | echo "Abort." |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
191 | abort_configure |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
192 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
193 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
194 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
195 | # DEPENDENCIES |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
196 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
197 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
198 | # create buffer for make variables required by dependencies |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
199 | echo > "$TEMP_DIR/make.mk" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
200 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
201 | dependency_libpq() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
202 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
203 | printf "checking for libpq... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
204 | # dependency libpq |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
205 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
206 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
207 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
208 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
209 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
210 | if ! $PKG_CONFIG libpq ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
211 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
212 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
213 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags libpq)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
214 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs libpq)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
215 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
216 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
217 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
218 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
219 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
220 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
221 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
222 | dependency_openssl() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
223 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
224 | printf "checking for openssl... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
225 | # dependency openssl |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
226 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
227 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
228 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
229 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
230 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
231 | if ! $PKG_CONFIG openssl ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
232 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
233 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
234 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags openssl)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
235 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs openssl)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
236 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
237 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
238 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
239 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
240 | # dependency openssl platform="bsd" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
241 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
242 | do |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
243 | if ! isplatform "bsd"; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
244 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
245 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
246 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
247 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
248 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
249 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
250 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
251 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
252 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
253 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
254 | dependency_libxml2() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
255 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
256 | printf "checking for libxml2... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
257 | # dependency libxml2 platform="macos" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
258 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
259 | do |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
260 | if ! isplatform "macos"; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
261 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
262 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
263 | if tmp_flags=$(xml2-config --cflags) ; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
264 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
265 | else |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
266 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
267 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
268 | if tmp_flags=$(xml2-config --libs) ; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
269 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
270 | else |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
271 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
272 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
273 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
274 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
275 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
276 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
277 | # dependency libxml2 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
278 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
279 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
280 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
281 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
282 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
283 | if ! $PKG_CONFIG libxml-2.0 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
284 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
285 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
286 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags libxml-2.0)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
287 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs libxml-2.0)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
288 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
289 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
290 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
291 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
292 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
293 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
294 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
295 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
296 | DEPENDENCIES_FAILED= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
297 | ERROR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
298 | # unnamed dependencies |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
299 | TEMP_CFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
300 | TEMP_LDFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
301 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
302 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
303 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
304 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
305 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
306 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
307 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
308 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
309 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
310 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
311 | # add unnamed dependency flags to config.mk |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
312 | echo >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
313 | if [ -n "${TEMP_CFLAGS}" ]; then |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
314 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
315 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
316 | if [ -n "${TEMP_LDFLAGS}" ]; then |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
317 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
318 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
319 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
320 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
321 | # OPTION VALUES |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
322 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
323 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
324 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
325 | # TARGETS |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
326 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
327 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
328 | # Target |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
329 | TEMP_CFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
330 | TEMP_LDFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
331 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
332 | if ! dependency_libxml2; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
333 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
334 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
335 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
336 | if ! dependency_openssl; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
337 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
338 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
339 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
340 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
341 | # Features |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
342 | if [ -n "$FEATURE_PG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
343 | # check dependency |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
344 | if ! dependency_libpq ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
345 | # "auto" features can fail and are just disabled in this case |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
346 | if [ "$FEATURE_PG" = "auto" ]; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
347 | unset FEATURE_PG |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
348 | else |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
349 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
350 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
351 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
352 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
353 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
354 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
355 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
356 | echo >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
357 | if [ -n "${TEMP_CFLAGS}" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
358 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
359 | fi |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
360 | if [ "$BUILD_TYPE" = "debug" ]; then |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
361 | echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
362 | fi |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
363 | if [ "$BUILD_TYPE" = "release" ]; then |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
364 | echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
49
diff
changeset
|
365 | fi |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
366 | if [ -n "${TEMP_LDFLAGS}" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
367 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
368 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
369 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
370 | if [ $ERROR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
371 | echo |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
372 | echo "Error: Unresolved dependencies" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
373 | echo "$DEPENDENCIES_FAILED" |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
374 | abort_configure |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
375 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
376 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
377 | echo "configure finished" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
378 | echo |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
379 | echo "Build Config:" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
380 | echo " PREFIX: $PREFIX" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
381 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
382 | echo "Features:" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
383 | if [ -n "$FEATURE_PG" ]; then |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
384 | echo " pg: on" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
385 | else |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
386 | echo " pg: off" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
39
diff
changeset
|
387 | fi |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
388 | echo |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
389 | cat "$TEMP_DIR/config.mk" "$TEMP_DIR/make.mk" > config.mk |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
390 | rm -Rf "$TEMP_DIR" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
391 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
392 |