test/configure

Sat, 20 Jan 2024 15:47:39 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 20 Jan 2024 15:47:39 +0100
changeset 105
4b3e655339cb
parent 103
01ec9f32835e
child 106
7aa59deee50c
permissions
-rwxr-xr-x

improve toolchain detection

relates to #347

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

mercurial