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 |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
15 | PREFIX=/usr |
52
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 |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
30 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
31 | # features |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
32 | FEATURE_DB=auto |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
33 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
34 | # clean abort |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
35 | abort_configure() |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
36 | { |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
37 | rm -Rf "$TEMP_DIR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
38 | exit 1 |
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 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
41 | # help text |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
42 | printhelp() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
43 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
44 | echo "Usage: $0 [OPTIONS]..." |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
45 | cat << __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
46 | Installation directories: |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
47 | --prefix=PREFIX path prefix for architecture-independent files |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
48 | [/usr] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
49 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
50 | [PREFIX] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
51 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
52 | --bindir=DIR user executables [EPREFIX/bin] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
53 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
54 | --libexecdir=DIR program executables [EPREFIX/libexec] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
55 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
56 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
57 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
58 | --libdir=DIR object code libraries [EPREFIX/lib] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
59 | --includedir=DIR C header files [PREFIX/include] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
60 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
61 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
62 | --infodir=DIR info documentation [DATAROOTDIR/info] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
63 | --mandir=DIR man documentation [DATAROOTDIR/man] |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
64 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
65 | Options: |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
66 | --debug add extra compile flags for debug builds |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
67 | --release add extra compile flags for release builds |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
68 | --toolkit=(gtk3|cli|gtk2|wpf) |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
69 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
70 | Optional Features: |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
71 | --disable-db |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
72 | --enable-gui |
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 | __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
75 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
76 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
77 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
78 | # parse arguments |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
79 | # |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
80 | BUILD_TYPE="default" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
81 | for ARG in "$@" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
82 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
83 | case "$ARG" in |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
84 | "--prefix="*) PREFIX=${ARG#--prefix=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
85 | "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
86 | "--bindir="*) BINDIR=${ARG#----bindir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
87 | "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
88 | "--libdir="*) LIBDIR=${ARG#--libdir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
89 | "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
90 | "--datadir="*) DATADIR=${ARG#--datadir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
91 | "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
92 | "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
93 | "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
94 | "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
95 | "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
96 | "--mandir"*) MANDIR=${ARG#--mandir} ;; |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
97 | "--help"*) printhelp; abort_configure ;; |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
98 | "--debug") BUILD_TYPE="debug" ;; |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
99 | "--release") BUILD_TYPE="release" ;; |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
100 | "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
101 | "--enable-db") FEATURE_DB=on ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
102 | "--disable-db") unset FEATURE_DB ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
103 | "--enable-gui") FEATURE_GUI=on ;; |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
104 | "--disable-gui") unset FEATURE_GUI ;; |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
105 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
106 | esac |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
107 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
108 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
109 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
110 | # set dir variables |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
111 | BINDIR=${BINDIR:-"$EPREFIX/bin"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
112 | SBINDIR=${SBINDIR:-"$EPREFIX/sbin"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
113 | LIBDIR=${LIBDIR:-"$EPREFIX/lib"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
114 | LIBEXECDIR=${LIBEXECDIR:-"$EPREFIX/libexec"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
115 | DATADIR=${DATADIR:-"$PREFIX/share"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
116 | SYSCONFDIR=${SYSCONFDIR:-"$PREFIX/etc"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
117 | SHAREDSTATEDIR=${SHAREDSTATEDIR:-"$PREFIX/com"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
118 | LOCALSTATEDIR=${LOCALSTATEDIR:-"$PREFIX/var"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
119 | INCLUDEDIR=${INCLUDEDIR:-"$PREFIX/include"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
120 | INFODIR=${INFODIR:-"$PREFIX/info"} |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
121 | MANDIR=${MANDIR:-"$PREFIX/man"} |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
122 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
123 | # Test for availability of pkg-config |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
124 | PKG_CONFIG=$(command -v pkg-config) |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
125 | PKG_CONFIG=${PKG_CONFIG:-"false"} |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
126 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
127 | # Simple uname based platform detection |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
128 | # $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
|
129 | OS=$(uname -s) |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
130 | OS_VERSION=$(uname -r) |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
131 | printf "detect platform... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
132 | if [ "$OS" = "SunOS" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
133 | PLATFORM="solaris sunos unix svr4" |
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" = "Linux" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
136 | PLATFORM="linux unix" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
137 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
138 | if [ "$OS" = "FreeBSD" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
139 | PLATFORM="freebsd bsd unix" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
140 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
141 | if [ "$OS" = "Darwin" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
142 | PLATFORM="macos osx bsd unix" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
143 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
144 | if echo "$OS" | grep -i "MINGW" > /dev/null; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
145 | PLATFORM="windows mingw" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
146 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
147 | PLATFORM=${PLATFORM:-"unix"} |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
148 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
149 | 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
|
150 | echo "$PLATFORM_NAME" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
151 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
152 | isplatform() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
153 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
154 | for p in $PLATFORM |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
155 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
156 | if [ "$p" = "$1" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
157 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
158 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
159 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
160 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
161 | } |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
162 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
163 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
164 | # generate config.mk |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
165 | cat > "$TEMP_DIR/vars.mk" << __EOF__ |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
166 | PREFIX=$PREFIX |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
167 | EPREFIX=$EPREFIX |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
168 | BINDIR=$BINDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
169 | SBINDIR=$SBINDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
170 | LIBDIR=$LIBDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
171 | LIBEXECDIR=$LIBEXECDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
172 | DATADIR=$DATADIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
173 | SYSCONFDIR=$SYSCONFDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
174 | SHAREDSTATEDIR=$SHAREDSTATEDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
175 | LOCALSTATEDIR=$LOCALSTATEDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
176 | INCLUDEDIR=$INCLUDEDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
177 | INFODIR=$INFODIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
178 | MANDIR=$MANDIR |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
179 | __EOF__ |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
180 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
181 | # |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
182 | # config.mk generated by configure |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
183 | # |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
184 | __EOF__ |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
185 | 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
|
186 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
187 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
188 | # toolchain detection |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
189 | # this will insert make vars to config.mk |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
190 | . make/toolchain.sh |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
191 | if [ -n "$TOOLCHAIN_ERROR" ]; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
192 | echo "Toolchain error: $TOOLCHAIN_ERROR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
193 | echo "Abort." |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
194 | abort_configure |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
195 | fi |
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 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
198 | # DEPENDENCIES |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
199 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
200 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
201 | # 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
|
202 | echo > "$TEMP_DIR/make.mk" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
203 | |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
204 | dependency_qt4() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
205 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
206 | printf "checking for qt4... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
207 | # dependency qt4 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
208 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
209 | do |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
210 | if ! which qmake-qt4 > /dev/null ; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
211 | break |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
212 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
213 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
214 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
215 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
216 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
217 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
218 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
219 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
220 | dependency_curl() |
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 | printf "checking for curl... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
223 | # dependency curl platform="windows" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
224 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
225 | do |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
226 | if ! isplatform "windows"; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
227 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
228 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
229 | TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
230 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
231 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
232 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
233 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
234 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
235 | # dependency curl platform="macos" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
236 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
237 | do |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
238 | if ! isplatform "macos"; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
239 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
240 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
241 | if tmp_flags=$(curl-config --cflags) ; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
242 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
243 | else |
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 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
246 | if tmp_flags=$(curl-config --ldflags) ; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
247 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
248 | else |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
249 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
250 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
251 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
252 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
253 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
254 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
255 | # dependency curl |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
256 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
257 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
258 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
259 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
260 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
261 | if ! $PKG_CONFIG libcurl ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
262 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
263 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
264 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags libcurl)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
265 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs libcurl)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
266 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
267 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
268 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
269 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
270 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
271 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
272 | } |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
273 | dependency_gtk2() |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
274 | { |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
275 | printf "checking for gtk2... " |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
276 | # dependency gtk2 |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
277 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
278 | do |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
279 | if [ -z "$PKG_CONFIG" ]; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
280 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
281 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
282 | if ! $PKG_CONFIG gtk+-2.0 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
283 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
284 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
285 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags gtk+-2.0)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
286 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs gtk+-2.0)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
287 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
288 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
289 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
290 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
291 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
292 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
293 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
294 | dependency_sqlite() |
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 | printf "checking for sqlite... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
297 | # dependency sqlite |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
298 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
299 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
300 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
301 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
302 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
303 | if ! $PKG_CONFIG sqlite3 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
304 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
305 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
306 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags sqlite3)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
307 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs sqlite3)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
308 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
309 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
310 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
311 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
312 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
313 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
314 | } |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
315 | dependency_test() |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
316 | { |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
317 | printf "checking for test... " |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
318 | # dependency test platform="bsd" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
319 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
320 | do |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
321 | if ! isplatform "bsd"; then |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
322 | break |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
323 | fi |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
324 | if isplatform "macos"; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
325 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
326 | fi |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
327 | TEMP_CFLAGS="$TEMP_CFLAGS -DBSD" |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
328 | echo yes |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
329 | return 0 |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
330 | done |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
331 | |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
332 | # dependency test |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
333 | while true |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
334 | do |
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
335 | TEMP_CFLAGS="$TEMP_CFLAGS -DTEST" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
336 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
337 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
338 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
339 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
340 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
341 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
342 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
343 | dependency_gtk3() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
344 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
345 | printf "checking for gtk3... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
346 | # dependency gtk3 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
347 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
348 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
349 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
350 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
351 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
352 | if ! $PKG_CONFIG gtk+-5.0 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
353 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
354 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
355 | TEMP_CFLAGS="$TEMP_CFLAGS $("$PKG_CONFIG" --cflags gtk+-5.0)" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
356 | TEMP_LDFLAGS="$TEMP_LDFLAGS $("$PKG_CONFIG" --libs gtk+-5.0)" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
357 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
358 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
359 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
360 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
361 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
362 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
363 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
364 | dependency_deptest() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
365 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
366 | printf "checking for deptest... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
367 | # dependency deptest |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
368 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
369 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
370 | TEMP_CFLAGS="$TEMP_CFLAGS -DDEPTEST" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
371 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
372 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
373 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
374 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
375 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
376 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
377 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
378 | dependency_libxml2() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
379 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
380 | printf "checking for libxml2... " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
381 | # dependency libxml2 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
382 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
383 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
384 | if [ -z "$PKG_CONFIG" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
385 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
386 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
387 | if ! $PKG_CONFIG --atleast-version=2.8 libxml-2.0 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
388 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
389 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
390 | 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
|
391 | 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
|
392 | cat >> $TEMP_DIR/make.mk << __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
393 | # Dependency: libxml2 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
394 | xml = libxml2 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
395 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
396 | __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
397 | echo yes |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
398 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
399 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
400 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
401 | echo no |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
402 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
403 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
404 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
405 | DEPENDENCIES_FAILED= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
406 | ERROR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
407 | # unnamed dependencies |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
408 | TEMP_CFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
409 | TEMP_LDFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
410 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
411 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
412 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
413 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
414 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
415 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
416 | MVAR = 123 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
417 | MVAR += 123 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
418 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
419 | __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
420 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
421 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
422 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
423 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
424 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
425 | # add unnamed dependency flags to config.mk |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
426 | echo >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
427 | if [ -n "${TEMP_CFLAGS}" ]; then |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
428 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
429 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
430 | if [ -n "${TEMP_LDFLAGS}" ]; then |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
431 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
432 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
433 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
434 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
435 | # OPTION VALUES |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
436 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
437 | checkopt_toolkit_gtk3() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
438 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
439 | VERR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
440 | if ! dependency_gtk3 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
441 | VERR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
442 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
443 | if [ $VERR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
444 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
445 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
446 | TEMP_CFLAGS="$TEMP_CFLAGS -Da=b" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
447 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
448 | UIOBJ += graphics_cairo.o |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
449 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
450 | __EOF__ |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
451 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
452 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
453 | checkopt_toolkit_cli() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
454 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
455 | VERR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
456 | if ! dependency_curl ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
457 | VERR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
458 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
459 | if ! dependency_test ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
460 | VERR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
461 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
462 | if [ $VERR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
463 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
464 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
465 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
466 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
467 | checkopt_toolkit_gtk2() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
468 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
469 | VERR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
470 | if ! dependency_gtk2 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
471 | VERR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
472 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
473 | if [ $VERR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
474 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
475 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
476 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
477 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
478 | checkopt_toolkit_wpf() |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
479 | { |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
480 | VERR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
481 | if ! dependency_test ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
482 | VERR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
483 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
484 | if [ $VERR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
485 | return 1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
486 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
487 | return 0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
488 | } |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
489 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
490 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
491 | # TARGETS |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
492 | # |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
493 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
494 | # Target: dav |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
495 | TEMP_CFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
496 | TEMP_LDFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
497 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
498 | if ! dependency_curl; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
499 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
500 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
501 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
502 | if ! dependency_libxml2; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
503 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
504 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
505 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
506 | if ! dependency_test; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
507 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
508 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
509 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
510 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
511 | # Features |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
512 | if [ -n "$FEATURE_DB" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
513 | # check dependency |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
514 | if ! dependency_sqlite ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
515 | # "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
|
516 | if [ "$FEATURE_DB" = "auto" ]; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
517 | unset FEATURE_DB |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
518 | else |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
519 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
520 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
521 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
522 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
523 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
524 | if [ -n "$FEATURE_GUI" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
525 | # check dependency |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
526 | if ! dependency_gtk3 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
527 | # "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
|
528 | if [ "$FEATURE_GUI" = "auto" ]; then |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
529 | unset FEATURE_GUI |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
530 | else |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
531 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
532 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
533 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
534 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
535 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
536 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
537 | # Option: --toolkit |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
538 | if [ -z $OPT_TOOLKIT ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
539 | SAVED_ERROR="$ERROR" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
540 | SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
541 | ERROR=1 |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
542 | while true |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
543 | do |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
544 | if isplatform "windows"; then |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
545 | if checkopt_toolkit_wpf ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
546 | echo " toolkit: wpf" >> "$TEMP_DIR/options" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
547 | ERROR=0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
548 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
549 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
550 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
551 | if checkopt_toolkit_gtk3 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
552 | echo " toolkit: gtk3" >> "$TEMP_DIR/options" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
553 | ERROR=0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
554 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
555 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
556 | if checkopt_toolkit_gtk2 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
557 | echo " toolkit: gtk2" >> "$TEMP_DIR/options" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
558 | ERROR=0 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
559 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
560 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
561 | break |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
562 | done |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
563 | if [ $ERROR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
564 | SAVED_ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
565 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
566 | ERROR="$SAVED_ERROR" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
567 | DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
568 | else |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
569 | if false; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
570 | false |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
571 | elif [ "$OPT_TOOLKIT" = "gtk3" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
572 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
573 | if ! checkopt_toolkit_gtk3 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
574 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
575 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
576 | elif [ "$OPT_TOOLKIT" = "cli" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
577 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
578 | if ! checkopt_toolkit_cli ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
579 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
580 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
581 | elif [ "$OPT_TOOLKIT" = "gtk2" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
582 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
583 | if ! checkopt_toolkit_gtk2 ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
584 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
585 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
586 | elif [ "$OPT_TOOLKIT" = "wpf" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
587 | echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
588 | if ! checkopt_toolkit_wpf ; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
589 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
590 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
591 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
592 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
593 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
594 | echo >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
595 | if [ -n "${TEMP_CFLAGS}" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
596 | echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
597 | fi |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
598 | if [ "$BUILD_TYPE" = "debug" ]; then |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
599 | echo 'DAV_CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
600 | fi |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
601 | if [ "$BUILD_TYPE" = "release" ]; then |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
602 | echo 'DAV_CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
603 | fi |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
604 | if [ -n "${TEMP_LDFLAGS}" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
605 | echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
606 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
607 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
608 | # Target |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
609 | TEMP_CFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
610 | TEMP_LDFLAGS= |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
611 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
612 | if ! dependency_deptest; then |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
613 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest " |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
614 | ERROR=1 |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
615 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
616 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
617 | # Features |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
618 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
619 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
620 | echo >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
621 | if [ -n "${TEMP_CFLAGS}" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
622 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
623 | fi |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
624 | if [ "$BUILD_TYPE" = "debug" ]; then |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
625 | echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
626 | fi |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
627 | if [ "$BUILD_TYPE" = "release" ]; then |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
628 | echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
629 | fi |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
630 | if [ -n "${TEMP_LDFLAGS}" ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
631 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
632 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
633 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
634 | if [ $ERROR -ne 0 ]; then |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
635 | echo |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
636 | echo "Error: Unresolved dependencies" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
637 | echo "$DEPENDENCIES_FAILED" |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
638 | abort_configure |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
639 | fi |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
640 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
641 | echo "configure finished" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
642 | echo |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
643 | echo "Build Config:" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
644 | echo " PREFIX: $PREFIX" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
645 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
646 | echo "Options:" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
647 | cat "$TEMP_DIR/options" |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
648 | echo "Features:" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
649 | if [ -n "$FEATURE_DB" ]; then |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
650 | echo " db: on" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
651 | else |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
652 | echo " db: off" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
653 | fi |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
654 | if [ -n "$FEATURE_GUI" ]; then |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
655 | echo " gui: on" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
656 | else |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
657 | echo " gui: off" |
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
46
diff
changeset
|
658 | fi |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
659 | echo |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
660 | 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
|
661 | rm -Rf "$TEMP_DIR" |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
662 | |
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
663 |