test/configure

Sun, 15 Dec 2024 14:56:05 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 15 Dec 2024 14:56:05 +0100
changeset 129
b38ea78d842c
parent 128
22f7262475e7
child 130
424a0fb2c64f
permissions
-rwxr-xr-x

add detection for invalid option values - fixes #518

0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2
116
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
3
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
4 # some utility functions
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
5 isplatform()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
6 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
7 for p in $PLATFORM
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
8 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
9 if [ "$p" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
10 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
11 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
12 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
13 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
14 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
15 notisplatform()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
16 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
17 for p in $PLATFORM
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
18 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
19 if [ "$p" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
20 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
21 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
22 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
23 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
24 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
25 istoolchain()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
26 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
27 for t in $TOOLCHAIN
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
28 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
29 if [ "$t" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
30 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
31 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
32 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
33 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
34 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
35 notistoolchain()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
36 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
37 for t in $TOOLCHAIN
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
38 do
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
39 if [ "$t" = "$1" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
40 return 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
41 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
42 done
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
43 return 0
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
44 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
45
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
46 # clean abort
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
47 abort_configure()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
48 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
49 rm -Rf "$TEMP_DIR"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
50 exit 1
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
51 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
52
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
53 # Test for availability of pkg-config
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
54 PKG_CONFIG=`command -v pkg-config`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
55 : ${PKG_CONFIG:="false"}
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
56
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
57 # Simple uname based platform detection
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
58 # $PLATFORM is used for platform dependent dependency selection
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
59 OS=`uname -s`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
60 OS_VERSION=`uname -r`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
61 printf "detect platform... "
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
62 if [ "$OS" = "SunOS" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
63 PLATFORM="solaris sunos unix svr4"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
64 elif [ "$OS" = "Linux" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
65 PLATFORM="linux unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
66 elif [ "$OS" = "FreeBSD" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
67 PLATFORM="freebsd bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
68 elif [ "$OS" = "OpenBSD" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
69 PLATFORM="openbsd bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
70 elif [ "$OS" = "NetBSD" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
71 PLATFORM="netbsd bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
72 elif [ "$OS" = "Darwin" ]; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
73 PLATFORM="macos osx bsd unix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
74 elif echo "$OS" | grep -i "MINGW" > /dev/null; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
75 PLATFORM="windows mingw"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
76 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
77 : ${PLATFORM:="unix"}
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
78
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
79 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
80 echo "$PLATFORM_NAME"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
81
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
82
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
83 # help text
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
84 printhelp()
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
85 {
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
86 echo "Usage: $0 [OPTIONS]..."
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
87 cat << __EOF__
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
88 Installation directories:
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
89 --prefix=PREFIX path prefix for architecture-independent files
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
90 [$prefix]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
91 --exec-prefix=EPREFIX path prefix for architecture-dependent files
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
92 [PREFIX]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
93
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
94 --bindir=DIR user executables [EPREFIX/bin]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
95 --sbindir=DIR system admin executables [EPREFIX/sbin]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
96 --libexecdir=DIR program executables [EPREFIX/libexec]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
97 --sysconfdir=DIR system configuration files [PREFIX/etc]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
98 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
99 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
100 --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
101 --libdir=DIR object code libraries [EPREFIX/lib]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
102 --includedir=DIR C header files [PREFIX/include]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
103 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
104 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
105 --infodir=DIR info documentation [DATAROOTDIR/info]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
106 --mandir=DIR man documentation [DATAROOTDIR/man]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
107 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
108
128
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
109 Build Types:
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
110 --debug add extra compile flags for debug builds
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
111 --release add extra compile flags for release builds
22f7262475e7 fixes debug/release options only showing when other options are specified - fixes #528
Mike Becker <universe@uap-core.de>
parents: 127
diff changeset
112
116
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
113 Optional Features:
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
114 --disable-pg
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
115
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
116 __EOF__
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
117 }
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
118
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
119 # create temporary directory
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
120 TEMP_DIR=".tmp-`uname -n`"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
121 rm -Rf "$TEMP_DIR"
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
122 if mkdir -p "$TEMP_DIR"; then
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
123 :
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
124 else
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
125 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
126 echo "Abort"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
127 exit 1
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
128 fi
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
129 touch "$TEMP_DIR/options"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
130 touch "$TEMP_DIR/features"
7
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
131
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
132 # define standard variables
88
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
133 # also define standard prefix (this is where we will search for config.site)
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
134 prefix=/usr
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
135 exec_prefix=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
136 bindir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
137 sbindir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
138 libdir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
139 libexecdir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
140 datarootdir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
141 datadir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
142 sysconfdir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
143 sharedstatedir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
144 localstatedir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
145 runstatedir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
146 includedir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
147 infodir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
148 localedir=
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
149 mandir=
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
150
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
151 # custom variables
116
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
152 if true \
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
153 && notisplatform "mingw" \
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
154 ; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
155 prefix="`pwd`/work"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
156 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
157 if true \
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
158 && isplatform "mingw" \
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
159 ; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
160 prefix="`pwd -W`/work"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
161 fi
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
162 if true \
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
163 ; then
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
164 HOST=`uname -n`
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
165 install_dir="$prefix"
41981a23aff8 add platform attributes to config element
Mike Becker <universe@uap-core.de>
parents: 115
diff changeset
166 fi
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
167
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
168 # features
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
169 FEATURE_PG=auto
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
170
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
171 #
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
172 # parse arguments
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
173 #
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
174 BUILD_TYPE="default"
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
175 for ARG in "$@"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
176 do
16
4fac0e25ee04 improve posix shell compatibility
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 15
diff changeset
177 case "$ARG" in
88
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
178 "--prefix="*) prefix=${ARG#--prefix=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
179 "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
180 "--bindir="*) bindir=${ARG#----bindir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
181 "--sbindir="*) sbindir=${ARG#--sbindir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
182 "--libdir="*) libdir=${ARG#--libdir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
183 "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
184 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
185 "--datadir="*) datadir=${ARG#--datadir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
186 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
187 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
188 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
189 "--includedir="*) includedir=${ARG#--includedir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
190 "--infodir="*) infodir=${ARG#--infodir=} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
191 "--mandir"*) mandir=${ARG#--mandir} ;;
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
192 "--localedir"*) localedir=${ARG#--localedir} ;;
127
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
193 "--help"*) printhelp; abort_configure ;;
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
194 "--debug") BUILD_TYPE="debug" ;;
33bc4ae5d7cf improve error text when option is used without value - fixes #519
Mike Becker <universe@uap-core.de>
parents: 123
diff changeset
195 "--release") BUILD_TYPE="release" ;;
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
196 "--enable-pg") FEATURE_PG=on ;;
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
197 "--disable-pg") unset FEATURE_PG ;;
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
198 "-"*) echo "unknown option: $ARG"; abort_configure ;;
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
199 esac
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
200 done
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
201
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
202
88
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
203
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
204 # set defaults for dir variables
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
205 : ${exec_prefix:="$prefix"}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
206 : ${bindir:='${exec_prefix}/bin'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
207 : ${sbindir:='${exec_prefix}/sbin'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
208 : ${libdir:='${exec_prefix}/lib'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
209 : ${libexecdir:='${exec_prefix}/libexec'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
210 : ${datarootdir:='${prefix}/share'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
211 : ${datadir:='${datarootdir}'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
212 : ${sysconfdir:='${prefix}/etc'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
213 : ${sharedstatedir:='${prefix}/com'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
214 : ${localstatedir:='${prefix}/var'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
215 : ${runstatedir:='${localstatedir}/run'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
216 : ${includedir:='${prefix}/include'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
217 : ${infodir:='${datarootdir}/info'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
218 : ${mandir:='${datarootdir}/man'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
219 : ${localedir:='${datarootdir}/locale'}
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
220
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
221 # check if a config.site exists and load it
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
222 if [ -n "$CONFIG_SITE" ]; then
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
223 # CONFIG_SITE may contain space separated file names
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
224 for cs in $CONFIG_SITE; do
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
225 printf "loading defaults from $cs... "
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
226 . "$cs"
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
227 echo ok
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
228 done
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
229 elif [ -f "$prefix/share/config.site" ]; then
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
230 printf "loading site defaults... "
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
231 . "$prefix/share/config.site"
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
232 echo ok
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
233 elif [ -f "$prefix/etc/config.site" ]; then
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
234 printf "loading site defaults... "
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
235 . "$prefix/etc/config.site"
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
236 echo ok
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
237 fi
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
238
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
239
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
240 # generate vars.mk
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
241 cat > "$TEMP_DIR/vars.mk" << __EOF__
114
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
242 prefix=$prefix
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
243 exec_prefix=$exec_prefix
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
244 bindir=$bindir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
245 sbindir=$sbindir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
246 libdir=$libdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
247 libexecdir=$libexecdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
248 datarootdir=$datarootdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
249 datadir=$datadir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
250 sysconfdir=$sysconfdir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
251 sharedstatedir=$sharedstatedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
252 localstatedir=$localstatedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
253 runstatedir=$runstatedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
254 includedir=$includedir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
255 infodir=$infodir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
256 mandir=$mandir
0fa5a6f08245 remove unnecessary double-quotes in vars.mk - fixes #370
Mike Becker <universe@uap-core.de>
parents: 106
diff changeset
257 localedir=$localedir
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
258 __EOF__
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
259
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
260 # toolchain detection utilities
13
cdf8bf4549c4 fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 12
diff changeset
261 . make/toolchain.sh
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
262
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
263 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
264 # DEPENDENCIES
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
265 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
266
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
267 # check languages
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
268 lang_c=
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
269 lang_cpp=
73
5d84da6be928 update test example with recent output of uwproj
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
270 if detect_cpp_compiler ; then
5d84da6be928 update test example with recent output of uwproj
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
271 lang_cpp=1
5d84da6be928 update test example with recent output of uwproj
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
272 fi
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
273 if detect_c_compiler ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
274 lang_c=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
275 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
276
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
277 # 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
278 echo > "$TEMP_DIR/make.mk"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
279
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
280 test_pkg_config()
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
281 {
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
282 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
283 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
284 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
285 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
286 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
287 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
288 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
289 else return 1 ; fi
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
290 return 0
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
291 }
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 60
diff changeset
292
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
293 print_check_msg()
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
294 {
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
295 if [ -z "$1" ]; then
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
296 shift
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
297 printf "$@"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
298 fi
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
299 }
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
300
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
301 dependency_error_cpp()
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
302 {
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
303 print_check_msg "$dep_checked_cpp" "checking for cpp... "
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
304 # dependency cpp
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
305 while true
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
306 do
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
307 if [ -z "$lang_cpp" ] ; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
308 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
309 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
310 print_check_msg "$dep_checked_cpp" "yes\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
311 dep_checked_cpp=1
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
312 return 1
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
313 done
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
314
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
315 print_check_msg "$dep_checked_cpp" "no\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
316 dep_checked_cpp=1
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
317 return 0
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
318 }
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
319 dependency_error_libpq()
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
320 {
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
321 print_check_msg "$dep_checked_libpq" "checking for libpq... "
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
322 # dependency libpq
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
323 while true
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
324 do
9
ebdecbbb2f79 fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 8
diff changeset
325 if [ -z "$PKG_CONFIG" ]; then
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
326 break
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
327 fi
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
328 if test_pkg_config "libpq" "" "" "" ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
329 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libpq`"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
330 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libpq`"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
331 else
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
332 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
333 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
334 print_check_msg "$dep_checked_libpq" "yes\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
335 dep_checked_libpq=1
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
336 return 1
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
337 done
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
338
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
339 print_check_msg "$dep_checked_libpq" "no\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
340 dep_checked_libpq=1
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
341 return 0
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
342 }
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
343 dependency_error_openssl()
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
344 {
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
345 print_check_msg "$dep_checked_openssl" "checking for openssl... "
106
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
346 # dependency openssl toolchain="clang"
103
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
347 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
348 do
106
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
349 if notistoolchain "clang"; then
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
350 break
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
351 fi
103
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
352 if [ -z "$lang_c" ] ; then
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
353 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
354 fi
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
355 if [ -z "$PKG_CONFIG" ]; then
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
356 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
357 fi
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
358 if test_pkg_config "openssl" "" "" "" ; then
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
359 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
360 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
361 else
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
362 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
363 fi
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
364 TEMP_CFLAGS="$TEMP_CFLAGS -DOPENSSL_CLANG"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
365 print_check_msg "$dep_checked_openssl" "yes\n"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
366 dep_checked_openssl=1
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
367 return 1
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
368 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
369
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
370 # dependency openssl platform="bsd"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
371 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
372 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
373 if notisplatform "bsd"; then
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
374 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
375 fi
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
376 TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
377 print_check_msg "$dep_checked_openssl" "yes\n"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
378 dep_checked_openssl=1
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
379 return 1
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
380 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
381
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
382 # dependency openssl
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
383 while true
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
384 do
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
385 if [ -z "$lang_c" ] ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
386 break
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
387 fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
388 if [ -z "$PKG_CONFIG" ]; then
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
389 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
390 fi
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
391 if test_pkg_config "openssl" "" "" "" ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
392 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
393 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
394 else
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
395 break
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
396 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
397 print_check_msg "$dep_checked_openssl" "yes\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
398 dep_checked_openssl=1
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
399 return 1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
400 done
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
401
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
402 print_check_msg "$dep_checked_openssl" "no\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
403 dep_checked_openssl=1
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
404 return 0
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
405 }
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
406 dependency_error_libxml2()
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
407 {
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
408 print_check_msg "$dep_checked_libxml2" "checking for libxml2... "
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
409 # dependency libxml2 platform="macos"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
410 while true
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
411 do
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
412 if notisplatform "macos"; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
413 break
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
414 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
415 if tmp_flags=`xml2-config --cflags` ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
416 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
417 else
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
418 break
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
419 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
420 if tmp_flags=`xml2-config --libs` ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
421 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
422 else
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
423 break
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
424 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
425 print_check_msg "$dep_checked_libxml2" "yes\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
426 dep_checked_libxml2=1
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
427 return 1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
428 done
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
429
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
430 # dependency libxml2
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
431 while true
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
432 do
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
433 if [ -z "$PKG_CONFIG" ]; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
434 break
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
435 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
436 if test_pkg_config "libxml-2.0" "" "" "" ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
437 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`"
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
438 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`"
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
439 else
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
440 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
441 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
442 print_check_msg "$dep_checked_libxml2" "yes\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
443 dep_checked_libxml2=1
60
43d6680e6410 update reference configure scripts
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
444 return 1
4
6bf4c948d0ba make targets without name and prefix possible
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 3
diff changeset
445 done
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
446
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
447 print_check_msg "$dep_checked_libxml2" "no\n"
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
448 dep_checked_libxml2=1
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
449 return 0
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
450 }
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
451
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
452 # start collecting dependency information
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
453 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
454
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
455 DEPENDENCIES_FAILED=
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
456 ERROR=0
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
457 # unnamed dependencies
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
458 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
459 TEMP_CXXFLAGS=
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
460 TEMP_LDFLAGS=
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
461 while true
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
462 do
5
895bf81d3b6e add missing source changes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 4
diff changeset
463 while true
895bf81d3b6e add missing source changes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 4
diff changeset
464 do
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
465 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
466 ERROR=1
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
467 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
468 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
469
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
470 break
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
471 done
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
472 break
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
473 done
103
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
474 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
475 do
106
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
476 if notistoolchain "gcc"; then
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
477 break
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
478 fi
103
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
479 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
480 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
481
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
482 TEMP_CFLAGS="$TEMP_CFLAGS -DTOOLCHAIN_GCC"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
483 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
484 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
485 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
486 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
487 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
488 do
106
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
489 if notistoolchain "clang"; then
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
490 break
7aa59deee50c recreate test script with newest uwproj version
Mike Becker <universe@uap-core.de>
parents: 105
diff changeset
491 fi
103
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
492 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
493 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
494
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
495 TEMP_CFLAGS="$TEMP_CFLAGS -DTOOLCHAIN_CLANG"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
496 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
497 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
498 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
499 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
500 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
501 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
502 if isplatform "gcc" || istoolchain "gcc"; then
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
503 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
504 fi
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
505 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
506 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
507
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
508 TEMP_CFLAGS="$TEMP_CFLAGS -DNOT_TOOLCHAIN_GCC"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
509 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
510 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
511 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
512 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
513 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
514 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
515 if isplatform "clang" || istoolchain "clang"; then
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
516 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
517 fi
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
518 while true
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
519 do
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
520
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
521 TEMP_CFLAGS="$TEMP_CFLAGS -DNOT_TOOLCHAIN_CLANG"
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
522 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
523 done
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
524 break
01ec9f32835e add toolchain attribute - relates to #346
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 102
diff changeset
525 done
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
526
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
527 # 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
528 echo "# general flags" >> "$TEMP_DIR/flags.mk"
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
529 if [ -n "${TEMP_CFLAGS}" ] && [ -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
530 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
531 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
532 if [ -n "${TEMP_CXXFLAGS}" ] && [ -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
533 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
534 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
535 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
536 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
537 fi
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
538
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
539 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
540 # OPTION VALUES
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
541 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
542
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
543 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
544 # TARGETS
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
545 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
546
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
547 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
548 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
549 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
550 TEMP_CFLAGS=
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
551 TEMP_CXXFLAGS=
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
552 TEMP_LDFLAGS=
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
553
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
554 if dependency_error_libxml2; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
555 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
556 ERROR=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
557 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
558 if dependency_error_openssl; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
559 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl "
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
560 ERROR=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
561 fi
4
6bf4c948d0ba make targets without name and prefix possible
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 3
diff changeset
562
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
563 # Features
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
564 if [ -n "$FEATURE_PG" ]; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
565 # check dependency
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
566 if dependency_error_libpq ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
567 # "auto" features can fail and are just disabled in this case
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
568 if [ "$FEATURE_PG" = "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
569 DISABLE_FEATURE_PG=1
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
570 else
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
571 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
572 ERROR=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
573 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
574 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
575 # check dependency
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
576 if dependency_error_cpp ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
577 # "auto" features can fail and are just disabled in this case
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
578 if [ "$FEATURE_PG" = "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_PG=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
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
581 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED cpp "
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
582 ERROR=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
583 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
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_PG" ]; 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_PG
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
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
588 fi
122
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
589 if [ -n "$FEATURE_PG" ]; then
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
590 :
123
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
591 else
d89b75fdf0aa add target data for disabled features - resolves #476
Mike Becker <universe@uap-core.de>
parents: 122
diff changeset
592 :
122
5706694c17c4 fix configure not emitting target data for features - fixes #478
Mike Becker <universe@uap-core.de>
parents: 116
diff changeset
593 fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
594
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
595
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
596 if [ -n "${TEMP_CFLAGS}" ] && [ -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
597 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
598 fi
94
002497e6c27d replace -a with && in configure
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
599 if [ -n "${TEMP_CXXFLAGS}" ] && [ -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
600 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
601 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
602 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
603 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
604 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
605 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
606 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
607 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
608 fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
609 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
610 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
611 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
612 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
613 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
614 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
615 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
616 fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
617 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
618 if [ -n "${TEMP_LDFLAGS}" ]; then
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
619 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
620 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
621
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
622
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
623 # final result
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
624 if [ $ERROR -ne 0 ]; then
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
625 echo
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
626 echo "Error: Unresolved dependencies"
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
627 echo "$DEPENDENCIES_FAILED"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
628 abort_configure
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
629 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
630
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
631 echo "configure finished"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
632 echo
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
633 echo "Build Config:"
88
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
634 echo " PREFIX: $prefix"
0a663c3692a0 add support for config.site - fixes #313
Mike Becker <universe@uap-core.de>
parents: 83
diff changeset
635 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 34
diff changeset
636 echo "Features:"
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
637 if [ -n "$FEATURE_PG" ]; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
638 echo " pg: on"
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 34
diff changeset
639 else
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
640 echo " pg: off"
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 34
diff changeset
641 fi
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
642 echo
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
643
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
644 # 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
645 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
646 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
647 # 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
648 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
649
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
650 __EOF__
71
b8d06f7b617c fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
651 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
652 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 20
diff changeset
653 rm -Rf "$TEMP_DIR"

mercurial