src/test/resources/golden-sample/configure

Mon, 18 Sep 2023 23:20:29 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 18 Sep 2023 23:20:29 +0200
changeset 66
dc758dcd4645
parent 63
ac47c2fb2c4a
child 67
e43d30273f74
permissions
-rwxr-xr-x

add basic support for the lang element - fixes #284

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
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
17 PREFIX=/usr
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
18 EPREFIX=/usr
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
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
32 HOST=`uname -n`
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
33 PREFIX=`pwd`/work
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
34 INSTALL_DIR=$PREFIX
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 # features
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
37 FEATURE_PG=auto
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
39 # clean abort
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
40 abort_configure()
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 rm -Rf "$TEMP_DIR"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
43 exit 1
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
44 }
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
45
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 # help text
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 printhelp()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 echo "Usage: $0 [OPTIONS]..."
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 cat << __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 Installation directories:
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 --prefix=PREFIX path prefix for architecture-independent files
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 [/usr]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 --exec-prefix=EPREFIX path prefix for architecture-dependent files
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 [PREFIX]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 --bindir=DIR user executables [EPREFIX/bin]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 --sbindir=DIR system admin executables [EPREFIX/sbin]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 --libexecdir=DIR program executables [EPREFIX/libexec]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60 --sysconfdir=DIR system configuration files [PREFIX/etc]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 --libdir=DIR object code libraries [EPREFIX/lib]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 --includedir=DIR C header files [PREFIX/include]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 --infodir=DIR info documentation [DATAROOTDIR/info]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 --mandir=DIR man documentation [DATAROOTDIR/man]
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 Optional Features:
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
71 --disable-pg
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 __EOF__
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 }
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 # parse arguments
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 #
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
79 BUILD_TYPE="default"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 for ARG in "$@"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 case "$ARG" in
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 "--prefix="*) PREFIX=${ARG#--prefix=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 "--bindir="*) BINDIR=${ARG#----bindir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 "--libdir="*) LIBDIR=${ARG#--libdir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 "--datadir="*) DATADIR=${ARG#--datadir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 "--infodir="*) INFODIR=${ARG#--infodir=} ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 "--mandir"*) MANDIR=${ARG#--mandir} ;;
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
96 "--help"*) printhelp; abort_configure ;;
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
97 "--debug") BUILD_TYPE="debug" ;;
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
98 "--release") BUILD_TYPE="release" ;;
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 "--enable-pg") FEATURE_PG=on ;;
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 "--disable-pg") unset FEATURE_PG ;;
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
101 "-"*) echo "unknown option: $ARG"; abort_configure ;;
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 esac
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
105
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 # set dir variables
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
107 : ${BINDIR:="$EPREFIX/bin"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
108 : ${SBINDIR:="$EPREFIX/sbin"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
109 : ${LIBDIR:="$EPREFIX/lib"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
110 : ${LIBEXECDIR:="$EPREFIX/libexec"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
111 : ${DATADIR:="$PREFIX/share"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
112 : ${SYSCONFDIR:="$PREFIX/etc"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
113 : ${SHAREDSTATEDIR:="$PREFIX/com"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
114 : ${LOCALSTATEDIR:="$PREFIX/var"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
115 : ${INCLUDEDIR:="$PREFIX/include"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
116 : ${INFODIR:="$PREFIX/info"}
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
117 : ${MANDIR:="$PREFIX/man"}
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
119 # Test for availability of pkg-config
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
120 PKG_CONFIG=`command -v pkg-config`
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
121 : ${PKG_CONFIG:="false"}
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 # Simple uname based platform detection
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 # $PLATFORM is used for platform dependent dependency selection
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
125 OS=`uname -s`
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
126 OS_VERSION=`uname -r`
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 printf "detect platform... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 if [ "$OS" = "SunOS" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 PLATFORM="solaris sunos unix svr4"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 if [ "$OS" = "Linux" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 PLATFORM="linux unix"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 if [ "$OS" = "FreeBSD" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 PLATFORM="freebsd bsd unix"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 if [ "$OS" = "Darwin" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 PLATFORM="macos osx bsd unix"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 fi
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
140 if echo "$OS" | grep -i "MINGW" > /dev/null; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 PLATFORM="windows mingw"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
143 : ${PLATFORM:="unix"}
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
145 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
146 echo "$PLATFORM_NAME"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 isplatform()
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 for p in $PLATFORM
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152 if [ "$p" = "$1" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
153 return 0
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
154 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
155 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
156 return 1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
158 notisplatform()
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
159 {
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
160 for p in $PLATFORM
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
161 do
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
162 if [ "$p" = "$1" ]; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
163 return 1
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
164 fi
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
165 done
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
166 return 0
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
167 }
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
168
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
170 # generate vars.mk
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
171 cat > "$TEMP_DIR/vars.mk" << __EOF__
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 PREFIX=$PREFIX
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 EPREFIX=$EPREFIX
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 BINDIR=$BINDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 SBINDIR=$SBINDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 LIBDIR=$LIBDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 LIBEXECDIR=$LIBEXECDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 DATADIR=$DATADIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179 SYSCONFDIR=$SYSCONFDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
180 SHAREDSTATEDIR=$SHAREDSTATEDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
181 LOCALSTATEDIR=$LOCALSTATEDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
182 INCLUDEDIR=$INCLUDEDIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
183 INFODIR=$INFODIR
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
184 MANDIR=$MANDIR
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
185 HOST=$HOST
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
186 PREFIX=$PREFIX
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
187 INSTALL_DIR=$INSTALL_DIR
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
188 __EOF__
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
189 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
190
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
191
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
192 # toolchain detection utilities
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
193 . make/toolchain.sh
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 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
196 # DEPENDENCIES
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
197 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
198
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
199 # 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
200 echo > "$TEMP_DIR/make.mk"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
201
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
202 test_pkg_config()
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
203 {
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
204 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
205 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
206 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
207 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
208 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
209 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
210 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
211 else return 1 ; fi
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
212 return 0
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
213 }
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
214
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
215 dependency_error_libpq()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
216 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
217 printf "checking for libpq... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
218 # dependency libpq
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
219 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
220 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
221 if [ -z "$PKG_CONFIG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
222 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
224 if test_pkg_config "libpq" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
225 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libpq`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
226 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libpq`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
227 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
230 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
231 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
234 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
235 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
237 dependency_error_openssl()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
238 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
239 printf "checking for openssl... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
240 # dependency openssl
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
241 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
242 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
243 if [ -z "$PKG_CONFIG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
244 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
245 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
246 if test_pkg_config "openssl" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
247 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
248 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`"
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
249 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
250 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
251 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
252 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
253 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
255
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
256 # dependency openssl platform="bsd"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258 do
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
259 if notisplatform "bsd"; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262 TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
264 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
267 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
268 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269 }
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
270 dependency_error_libxml2()
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
271 {
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 printf "checking for libxml2... "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 # dependency libxml2 platform="macos"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 do
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
276 if notisplatform "macos"; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
279 if tmp_flags=`xml2-config --cflags` ; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
280 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 else
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
282 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
283 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
284 if tmp_flags=`xml2-config --libs` ; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
285 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
286 else
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
287 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
288 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
289 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
290 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
291 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
292
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
293 # dependency libxml2
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
294 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
295 do
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
296 if [ -z "$PKG_CONFIG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
297 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
298 fi
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
299 if test_pkg_config "libxml-2.0" "" "" "" ; then
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
300 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
301 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
302 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
303 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
304 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
305 echo yes
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
306 return 1
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
307 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
308
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
309 echo no
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
310 return 0
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 }
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
312
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
313 # start collecting dependency information
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
314 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
315
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316 DEPENDENCIES_FAILED=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 ERROR=0
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
318 # unnamed dependencies
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
320 TEMP_CXXFLAGS=
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321 TEMP_LDFLAGS=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322 while true
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323 do
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
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
326 if detect_cpp_compiler ; then
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
327 :
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
328 else
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
329 ERROR=1
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
330 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
331 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332
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 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 break
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 done
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
338 # 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
339 echo "# general flags" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 if [ -n "${TEMP_CFLAGS}" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
341 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
342 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
343 if [ -n "${TEMP_CXXFLAGS}" ]; then
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
344 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
345 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
346 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
347 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
348 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
349
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
350 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
351 # OPTION VALUES
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
352 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
353
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
354 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
355 # TARGETS
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
356 #
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
357
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
358 echo >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
359 # Target
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
360 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
361 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
362 TEMP_CXXFLAGS=
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 TEMP_LDFLAGS=
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
365 if dependency_error_libxml2; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
368 fi
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
369 if dependency_error_openssl; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 ERROR=1
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
374 # Features
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
375 if [ -n "$FEATURE_PG" ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 # check dependency
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 52
diff changeset
377 if dependency_error_libpq ; then
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
378 # "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
379 if [ "$FEATURE_PG" = "auto" ]; then
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
380 unset FEATURE_PG
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
381 else
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 ERROR=1
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 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
386 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
387
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 if [ -n "${TEMP_CFLAGS}" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
390 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
391 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
392 if [ -n "${TEMP_CXXFLAGS}" ]; then
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
393 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
394 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
395 if [ "$BUILD_TYPE" = "debug" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
396 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
397 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
398 fi
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
399 if [ "$BUILD_TYPE" = "release" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
400 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
401 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 49
diff changeset
402 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 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
404 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
406
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
407
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
408 # final result
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
409 if [ $ERROR -ne 0 ]; then
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
410 echo
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
411 echo "Error: Unresolved dependencies"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 echo "$DEPENDENCIES_FAILED"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
413 abort_configure
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
414 fi
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
415
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
416 echo "configure finished"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
417 echo
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
418 echo "Build Config:"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
419 echo " PREFIX: $PREFIX"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
420 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
421 echo "Features:"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
422 if [ -n "$FEATURE_PG" ]; then
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
423 echo " pg: on"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
424 else
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
425 echo " pg: off"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
426 fi
39
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
427 echo
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
428
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
429 # 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
430 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
431 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
432 # 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
433 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
434
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
435 __EOF__
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
436 write_toolchain_defaults "$TEMP_DIR/config.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
437 cat "$TEMP_DIR/config.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
438 rm -Rf "$TEMP_DIR"
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
439
3ca85da78515 add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
diff changeset
440

mercurial