src/test/resources/golden-sample/configure2

Fri, 06 Oct 2023 20:49:15 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 06 Oct 2023 20:49:15 +0200
changeset 86
ad0f22720c50
parent 83
868e0d4b0a57
permissions
-rwxr-xr-x

start development of version 0.2.0

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
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
4 TEMP_DIR=".tmp-`uname -n`"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
5 rm -Rf "$TEMP_DIR"
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
6 if mkdir -p "$TEMP_DIR"; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
7 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
8 else
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
9 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
10 echo "Abort"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
11 exit 1
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
12 fi
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
13 touch "$TEMP_DIR/options"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
14 touch "$TEMP_DIR/features"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
16 # define standard variables
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 PREFIX=/usr
75
b49869bd2a0a fix wrong EPREFIX when PREFIX is overridden
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
18 EPREFIX=
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 BINDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 SBINDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 LIBDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 LIBEXECDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 DATADIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 SYSCONFDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 SHAREDSTATEDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 LOCALSTATEDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 INCLUDEDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 INFODIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 MANDIR=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
31 # custom variables
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 # features
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
34 FEATURE_DB=auto
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
36 # clean abort
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
37 abort_configure()
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
38 {
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
39 rm -Rf "$TEMP_DIR"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
40 exit 1
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
41 }
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
42
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 # help text
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 printhelp()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 echo "Usage: $0 [OPTIONS]..."
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 cat << __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 Installation directories:
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 --prefix=PREFIX path prefix for architecture-independent files
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 [/usr]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 --exec-prefix=EPREFIX path prefix for architecture-dependent files
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 [PREFIX]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 --bindir=DIR user executables [EPREFIX/bin]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 --sbindir=DIR system admin executables [EPREFIX/sbin]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 --libexecdir=DIR program executables [EPREFIX/libexec]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 --sysconfdir=DIR system configuration files [PREFIX/etc]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60 --libdir=DIR object code libraries [EPREFIX/lib]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 --includedir=DIR C header files [PREFIX/include]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 --infodir=DIR info documentation [DATAROOTDIR/info]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 --mandir=DIR man documentation [DATAROOTDIR/man]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 Options:
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
68 --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
69 --release add extra compile flags for release builds
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 --toolkit=(gtk3|cli|gtk2|wpf)
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 Optional Features:
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 --disable-db
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 --enable-gui
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 __EOF__
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
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 # parse arguments
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 #
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
82 BUILD_TYPE="default"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 for ARG in "$@"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 case "$ARG" in
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 "--prefix="*) PREFIX=${ARG#--prefix=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 "--bindir="*) BINDIR=${ARG#----bindir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 "--libdir="*) LIBDIR=${ARG#--libdir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 "--datadir="*) DATADIR=${ARG#--datadir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 "--infodir="*) INFODIR=${ARG#--infodir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 "--mandir"*) MANDIR=${ARG#--mandir} ;;
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
99 "--help"*) printhelp; abort_configure ;;
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
100 "--debug") BUILD_TYPE="debug" ;;
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
101 "--release") BUILD_TYPE="release" ;;
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 "--enable-db") FEATURE_DB=on ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 "--disable-db") unset FEATURE_DB ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 "--enable-gui") FEATURE_GUI=on ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 "--disable-gui") unset FEATURE_GUI ;;
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
107 "-"*) echo "unknown option: $ARG"; abort_configure ;;
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 esac
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
111
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
112 # set dir variables
75
b49869bd2a0a fix wrong EPREFIX when PREFIX is overridden
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
113 : ${EPREFIX:="$PREFIX"}
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
114 : ${BINDIR:="$EPREFIX/bin"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
115 : ${SBINDIR:="$EPREFIX/sbin"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
116 : ${LIBDIR:="$EPREFIX/lib"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
117 : ${LIBEXECDIR:="$EPREFIX/libexec"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
118 : ${DATADIR:="$PREFIX/share"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
119 : ${SYSCONFDIR:="$PREFIX/etc"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
120 : ${SHAREDSTATEDIR:="$PREFIX/com"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
121 : ${LOCALSTATEDIR:="$PREFIX/var"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
122 : ${INCLUDEDIR:="$PREFIX/include"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
123 : ${INFODIR:="$PREFIX/info"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
124 : ${MANDIR:="$PREFIX/man"}
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
126 # Test for availability of pkg-config
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
127 PKG_CONFIG=`command -v pkg-config`
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
128 : ${PKG_CONFIG:="false"}
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 # Simple uname based platform detection
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 # $PLATFORM is used for platform dependent dependency selection
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
132 OS=`uname -s`
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
133 OS_VERSION=`uname -r`
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 printf "detect platform... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 if [ "$OS" = "SunOS" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 PLATFORM="solaris sunos unix svr4"
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" = "Linux" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 PLATFORM="linux 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" = "FreeBSD" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 PLATFORM="freebsd bsd unix"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 if [ "$OS" = "Darwin" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 PLATFORM="macos osx bsd unix"
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 if echo "$OS" | grep -i "MINGW" > /dev/null; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 PLATFORM="windows mingw"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
150 : ${PLATFORM:="unix"}
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
152 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
153 echo "$PLATFORM_NAME"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
154
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
155 isplatform()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
156 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 for p in $PLATFORM
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
159 if [ "$p" = "$1" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160 return 0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
161 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
162 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
163 return 1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
164 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
165 notisplatform()
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
166 {
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
167 for p in $PLATFORM
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
168 do
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
169 if [ "$p" = "$1" ]; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
170 return 1
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
171 fi
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
172 done
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
173 return 0
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
174 }
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
175
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
177 # generate vars.mk
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
178 cat > "$TEMP_DIR/vars.mk" << __EOF__
76
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
179 PREFIX="$PREFIX"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
180 EPREFIX="$EPREFIX"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
181 BINDIR="$BINDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
182 SBINDIR="$SBINDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
183 LIBDIR="$LIBDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
184 LIBEXECDIR="$LIBEXECDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
185 DATADIR="$DATADIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
186 SYSCONFDIR="$SYSCONFDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
187 SHAREDSTATEDIR="$SHAREDSTATEDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
188 LOCALSTATEDIR="$LOCALSTATEDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
189 INCLUDEDIR="$INCLUDEDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
190 INFODIR="$INFODIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
191 MANDIR="$MANDIR"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
192 __EOF__
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
193 sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk"
39
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
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
196 # toolchain detection utilities
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
197 . make/toolchain.sh
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
198
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 # DEPENDENCIES
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
201 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
202
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
203 # check languages
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
204 lang_c=
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
205 lang_cpp=
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
206 if detect_c_compiler ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
207 lang_c=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
208 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
209
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
210 # 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
211 echo > "$TEMP_DIR/make.mk"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
212
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
213 test_pkg_config()
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
214 {
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
215 if "$PKG_CONFIG" --exists "$1" ; then :
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
216 else return 1 ; fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
217 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
218 else return 1 ; fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
219 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
220 else return 1 ; fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
221 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
222 else return 1 ; fi
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
223 return 0
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
224 }
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
225
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
226 dependency_error_qt4()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
227 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228 printf "checking for qt4... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229 # dependency qt4
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
230 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
231 do
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
232 if which qmake-qt4 > /dev/null ; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
233 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
234 else
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
235 break
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
237 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
238 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
239 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
240
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
241 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
242 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
243 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
244 dependency_error_curl()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
245 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
246 printf "checking for curl... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
247 # dependency curl platform="windows"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
248 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
249 do
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
250 if notisplatform "windows"; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
251 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
252 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
253 TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254 TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
255 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
256 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
259 # dependency curl platform="macos"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 do
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
262 if notisplatform "macos"; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
264 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
265 if tmp_flags=`curl-config --cflags` ; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
266 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
267 else
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
268 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
270 if tmp_flags=`curl-config --ldflags` ; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
271 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 else
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
276 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 # dependency curl
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
282 if [ -z "$PKG_CONFIG" ]; then
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
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
285 if test_pkg_config "libcurl" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
286 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libcurl`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
287 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libcurl`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
288 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
289 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
290 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
291 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
292 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
293 done
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 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
296 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
297 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
298 dependency_error_gtk2()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
299 {
40
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
300 printf "checking for gtk2... "
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
301 # dependency gtk2
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
302 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
303 do
40
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
304 if [ -z "$PKG_CONFIG" ]; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
305 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
306 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
307 if test_pkg_config "gtk+-2.0" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
308 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
309 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
310 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
312 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
314 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
318 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
320 dependency_error_sqlite()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322 printf "checking for sqlite... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323 # dependency sqlite
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
324 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
325 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
326 if [ -z "$PKG_CONFIG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
328 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
329 if test_pkg_config "sqlite3" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
330 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sqlite3`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
331 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sqlite3`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
332 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
336 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
340 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
341 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
342 dependency_error_test()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343 {
40
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
344 printf "checking for test... "
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
345 # dependency test platform="bsd"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
346 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
347 do
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
348 if notisplatform "bsd"; then
40
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
349 break
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
350 fi
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
351 if isplatform "macos"; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
352 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
353 fi
40
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
354 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD"
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
355 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
356 return 1
40
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
357 done
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
358
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
359 # dependency test
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
360 while true
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
361 do
b42bfc9e9983 first minor code improvements
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
362 TEMP_CFLAGS="$TEMP_CFLAGS -DTEST"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
364 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
365 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
368 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
369 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
370 dependency_error_gtk3()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 printf "checking for gtk3... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 # dependency gtk3
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
374 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
375 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 if [ -z "$PKG_CONFIG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
377 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
378 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
379 if test_pkg_config "gtk+-5.0" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
380 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-5.0`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
381 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-5.0`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
382 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
385 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
386 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
387 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
388
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
389 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
390 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
391 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
392 dependency_error_deptest()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
393 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
394 printf "checking for deptest... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
395 # dependency deptest
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
396 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
397 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
398 TEMP_CFLAGS="$TEMP_CFLAGS -DDEPTEST"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
399 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
400 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
401 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
404 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
406 dependency_error_libxml2()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 printf "checking for libxml2... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
409 # dependency libxml2
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 if [ -z "$PKG_CONFIG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
413 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
414 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
415 if test_pkg_config "libxml-2.0" "2.8" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
416 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
417 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
418 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
419 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
420 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
421 cat >> $TEMP_DIR/make.mk << __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
422 # Dependency: libxml2
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
423 xml = libxml2
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
424
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
425 __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
426 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
427 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
428 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
429
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
430 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
431 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
432 }
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
433
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
434
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
435
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
436
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
437 # start collecting dependency information
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
438 echo > "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
439
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
440 DEPENDENCIES_FAILED=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
441 ERROR=0
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
442 # unnamed dependencies
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
443 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
444 TEMP_CXXFLAGS=
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
445 TEMP_LDFLAGS=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
446 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
448 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
449 do
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
450 if [ -z "$lang_c" ] ; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
451 ERROR=1
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
452 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
453 fi
39
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 cat >> "$TEMP_DIR/make.mk" << __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 MVAR = 123
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 MVAR += 123
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
458
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459 __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
461 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
462 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
463 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
464
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
465 # add general dependency flags to flags.mk
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
466 echo "# general flags" >> "$TEMP_DIR/flags.mk"
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
467 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
468 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
469 fi
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
470 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
471 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
39
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 [ -n "${TEMP_LDFLAGS}" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
474 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
39
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
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 # OPTION VALUES
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 checkopt_toolkit_gtk3()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
481 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
482 VERR=0
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
483 if dependency_error_gtk3 ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
484 VERR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
485 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
486 if [ $VERR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
487 return 1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
488 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
489 TEMP_CFLAGS="$TEMP_CFLAGS -Da=b"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
490 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -Da=b"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
491 cat >> "$TEMP_DIR/make.mk" << __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
492 UIOBJ += graphics_cairo.o
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 __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
495 return 0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
496 }
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
497 checkopt_toolkit_cli()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
498 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
499 VERR=0
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
500 if dependency_error_curl ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501 VERR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
502 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
503 if dependency_error_test ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
504 VERR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
505 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
506 if [ $VERR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
507 return 1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
508 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509 return 0
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 checkopt_toolkit_gtk2()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
513 VERR=0
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
514 if dependency_error_gtk2 ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515 VERR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
516 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
517 if [ $VERR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
518 return 1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
519 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
520 return 0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
521 }
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
522 checkopt_toolkit_wpf()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
523 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
524 VERR=0
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
525 if dependency_error_test ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
526 VERR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
527 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
528 if [ $VERR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529 return 1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
530 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
531 return 0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 }
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 # TARGETS
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
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
538 echo >> "$TEMP_DIR/flags.mk"
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
539 echo "configuring target: dav"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
540 echo "# flags for target dav" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
542 TEMP_CXXFLAGS=
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 TEMP_LDFLAGS=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
545 if dependency_error_curl; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
546 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
547 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
548 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
549 if dependency_error_libxml2; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
551 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
552 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
553 if dependency_error_test; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
554 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
555 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
556 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
557
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
558 # Features
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
559 if [ -n "$FEATURE_DB" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
560 # check dependency
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
561 if dependency_error_sqlite ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
562 # "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
563 if [ "$FEATURE_DB" = "auto" ]; then
68
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
564 DISABLE_FEATURE_DB=1
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
565 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
566 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569 fi
68
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
570 if [ -n "$DISABLE_FEATURE_DB" ]; then
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
571 unset FEATURE_DB
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
572 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
573 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
574 if [ -n "$FEATURE_GUI" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 # check dependency
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
576 if dependency_error_gtk3 ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
577 # "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
578 if [ "$FEATURE_GUI" = "auto" ]; then
68
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
579 DISABLE_FEATURE_GUI=1
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
580 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
581 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
582 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
583 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
584 fi
68
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
585 if [ -n "$DISABLE_FEATURE_GUI" ]; then
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
586 unset FEATURE_GUI
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
587 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
588 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
589
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
590 # Option: --toolkit
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
591 if [ -z "$OPT_TOOLKIT" ]; then
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
592 echo "auto-detecting option 'toolkit'"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
593 SAVED_ERROR="$ERROR"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
594 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
595 ERROR=1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
596 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
597 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
598 if isplatform "windows"; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
599 if checkopt_toolkit_wpf ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
600 echo " toolkit: wpf" >> "$TEMP_DIR/options"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
601 ERROR=0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
602 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
603 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
604 fi
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
605 if checkopt_toolkit_gtk3 ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
606 echo " toolkit: gtk3" >> "$TEMP_DIR/options"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
607 ERROR=0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
608 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
609 fi
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
610 if checkopt_toolkit_gtk2 ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
611 echo " toolkit: gtk2" >> "$TEMP_DIR/options"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
612 ERROR=0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
613 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
614 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
615 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
616 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
617 if [ $ERROR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
618 SAVED_ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
619 SAVED_DEPENDENCIES_FAILED="option 'toolkit' $SAVED_DEPENDENCIES_FAILED"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
620 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
621 ERROR="$SAVED_ERROR"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
622 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
623 else
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
624 echo "checking option toolkit = $OPT_TOOLKIT"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
625 if false; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
626 false
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
627 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
628 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
629 if checkopt_toolkit_gtk3 ; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
630 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
631 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
632 ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
633 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
634 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
635 elif [ "$OPT_TOOLKIT" = "cli" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
636 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
637 if checkopt_toolkit_cli ; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
638 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
639 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
640 ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
641 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
642 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
643 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
644 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
645 if checkopt_toolkit_gtk2 ; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
646 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
647 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
648 ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
649 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
650 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
651 elif [ "$OPT_TOOLKIT" = "wpf" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
652 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
653 if checkopt_toolkit_wpf ; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
654 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
655 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
656 ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
657 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
658 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
659 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
660 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
661
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
662 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
663 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
664 fi
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
665 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
666 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
667 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
668 if [ "$BUILD_TYPE" = "debug" ]; then
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
669 if [ -n "$lang_c" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
670 echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
671 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
672 if [ -n "$lang_cpp" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
673 echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
674 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
675 fi
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
676 if [ "$BUILD_TYPE" = "release" ]; then
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
677 if [ -n "$lang_c" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
678 echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
679 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
680 if [ -n "$lang_cpp" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
681 echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
682 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
683 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
684 if [ -n "${TEMP_LDFLAGS}" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
685 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
686 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
687
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
688 echo >> "$TEMP_DIR/flags.mk"
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
689 echo "configuring global target"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
690 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
691 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
692 TEMP_CXXFLAGS=
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
693 TEMP_LDFLAGS=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
694
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
695 if dependency_error_deptest; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
696 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
697 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
698 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
699
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
700 # Features
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
701
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
702
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
703 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
704 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
705 fi
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
706 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
707 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
708 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
709 if [ "$BUILD_TYPE" = "debug" ]; then
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
710 if [ -n "$lang_c" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
711 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
712 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
713 if [ -n "$lang_cpp" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
714 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
715 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
716 fi
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
717 if [ "$BUILD_TYPE" = "release" ]; then
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
718 if [ -n "$lang_c" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
719 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
720 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
721 if [ -n "$lang_cpp" ]; then
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
722 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
723 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
724 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
725 if [ -n "${TEMP_LDFLAGS}" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
726 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
727 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
728
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
729
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
730 # final result
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
731 if [ $ERROR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
732 echo
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
733 echo "Error: Unresolved dependencies"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
734 echo "$DEPENDENCIES_FAILED"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
735 abort_configure
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
736 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
737
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
738 echo "configure finished"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
739 echo
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
740 echo "Build Config:"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
741 echo " PREFIX: $PREFIX"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
742 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
743 echo "Options:"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
744 cat "$TEMP_DIR/options"
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
745 echo "Features:"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
746 if [ -n "$FEATURE_DB" ]; then
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
747 echo " db: on"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
748 else
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
749 echo " db: off"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
750 fi
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
751 if [ -n "$FEATURE_GUI" ]; then
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
752 echo " gui: on"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
753 else
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
754 echo " gui: off"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
755 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
756 echo
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
757
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
758 # generate the config.mk file
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
759 cat > "$TEMP_DIR/config.mk" << __EOF__
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
760 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
761 # config.mk generated by configure
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
762 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
763
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
764 __EOF__
71
b8d06f7b617c fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
765 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
b8d06f7b617c fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
766 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
767 rm -Rf "$TEMP_DIR"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
768
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
769

mercurial