configure

Fri, 20 Sep 2024 20:04:35 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 20 Sep 2024 20:04:35 +0200
changeset 560
87485c36081b
parent 515
2c3fe06a9210
permissions
-rwxr-xr-x

fix trace log use after free

40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
2
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
3 # create temporary directory
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
4 TEMP_DIR=".tmp-`uname -n`"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
5 rm -Rf "$TEMP_DIR"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
6 if mkdir -p "$TEMP_DIR"; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
7 :
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
8 else
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
9 echo "Cannot create tmp dir $TEMP_DIR"
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
10 echo "Abort"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
11 exit 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
12 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
13 touch "$TEMP_DIR/options"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
14 touch "$TEMP_DIR/features"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
15
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
16 # define standard variables
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
17 # also define standard prefix (this is where we will search for config.site)
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
18 prefix=/usr
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
19 exec_prefix=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
20 bindir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
21 sbindir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
22 libdir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
23 libexecdir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
24 datarootdir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
25 datadir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
26 sysconfdir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
27 sharedstatedir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
28 localstatedir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
29 runstatedir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
30 includedir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
31 infodir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
32 localedir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
33 mandir=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
34
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
35 # custom variables
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
36 HOST=`uname -n`
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
37 PREFIX="`pwd`/work"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
38 INSTALL_DIR="$PREFIX"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
39
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
40 # features
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
41
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
42 # clean abort
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
43 abort_configure()
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
44 {
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
45 rm -Rf "$TEMP_DIR"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
46 exit 1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
47 }
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
48
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
49 # help text
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
50 printhelp()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
51 {
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
52 echo "Usage: $0 [OPTIONS]..."
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
53 cat << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
54 Installation directories:
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
55 --prefix=PREFIX path prefix for architecture-independent files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
56 [/usr]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
57 --exec-prefix=EPREFIX path prefix for architecture-dependent files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
58 [PREFIX]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
59
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
60 --bindir=DIR user executables [EPREFIX/bin]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
61 --sbindir=DIR system admin executables [EPREFIX/sbin]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
62 --libexecdir=DIR program executables [EPREFIX/libexec]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
63 --sysconfdir=DIR system configuration files [PREFIX/etc]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
64 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
65 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
66 --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
67 --libdir=DIR object code libraries [EPREFIX/lib]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
68 --includedir=DIR C header files [PREFIX/include]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
69 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
70 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
71 --infodir=DIR info documentation [DATAROOTDIR/info]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
72 --mandir=DIR man documentation [DATAROOTDIR/man]
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
73 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
74
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
75 Optional Features:
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
76 --enable-postgresql
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
77
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
78 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
79 }
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81 #
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
82 # parse arguments
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 #
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
84 BUILD_TYPE="default"
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
85 for ARG in "$@"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
86 do
267
4ded424f4a5f update configure script / fix configure on freebsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 260
diff changeset
87 case "$ARG" in
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
88 "--prefix="*) prefix=${ARG#--prefix=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
89 "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
90 "--bindir="*) bindir=${ARG#----bindir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
91 "--sbindir="*) sbindir=${ARG#--sbindir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
92 "--libdir="*) libdir=${ARG#--libdir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
93 "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
94 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
95 "--datadir="*) datadir=${ARG#--datadir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
96 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
97 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
98 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
99 "--includedir="*) includedir=${ARG#--includedir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
100 "--infodir="*) infodir=${ARG#--infodir=} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
101 "--mandir"*) mandir=${ARG#--mandir} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
102 "--localedir"*) localedir=${ARG#--localedir} ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
103 "--help"*) printhelp; abort_configure ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
104 "--debug") BUILD_TYPE="debug" ;;
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
105 "--release") BUILD_TYPE="release" ;;
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
106 "--enable-postgresql") FEATURE_POSTGRESQL=on ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
107 "--disable-postgresql") unset FEATURE_POSTGRESQL ;;
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
108 "-"*) echo "unknown option: $ARG"; abort_configure ;;
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
109 esac
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
110 done
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
111
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
112
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
113
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
114 # set defaults for dir variables
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
115 : ${exec_prefix:="$prefix"}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
116 : ${bindir:='${exec_prefix}/bin'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
117 : ${sbindir:='${exec_prefix}/sbin'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
118 : ${libdir:='${exec_prefix}/lib'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
119 : ${libexecdir:='${exec_prefix}/libexec'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
120 : ${datarootdir:='${prefix}/share'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
121 : ${datadir:='${datarootdir}'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
122 : ${sysconfdir:='${prefix}/etc'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
123 : ${sharedstatedir:='${prefix}/com'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
124 : ${localstatedir:='${prefix}/var'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
125 : ${runstatedir:='${localstatedir}/run'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
126 : ${includedir:='${prefix}/include'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
127 : ${infodir:='${datarootdir}/info'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
128 : ${mandir:='${datarootdir}/man'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
129 : ${localedir:='${datarootdir}/locale'}
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
130
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
131 # check if a config.site exists and load it
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
132 if [ -n "$CONFIG_SITE" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
133 # CONFIG_SITE may contain space separated file names
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
134 for cs in $CONFIG_SITE; do
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
135 printf "loading defaults from $cs... "
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
136 . "$cs"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
137 echo ok
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
138 done
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
139 elif [ -f "$prefix/share/config.site" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
140 printf "loading site defaults... "
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
141 . "$prefix/share/config.site"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
142 echo ok
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
143 elif [ -f "$prefix/etc/config.site" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
144 printf "loading site defaults... "
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
145 . "$prefix/etc/config.site"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
146 echo ok
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
147 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
148
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
149 # Test for availability of pkg-config
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
150 PKG_CONFIG=`command -v pkg-config`
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
151 : ${PKG_CONFIG:="false"}
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
152
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
153 # Simple uname based platform detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
154 # $PLATFORM is used for platform dependent dependency selection
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
155 OS=`uname -s`
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
156 OS_VERSION=`uname -r`
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
157 printf "detect platform... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
158 if [ "$OS" = "SunOS" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
159 PLATFORM="solaris sunos unix svr4"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
160 elif [ "$OS" = "Linux" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
161 PLATFORM="linux unix"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
162 elif [ "$OS" = "FreeBSD" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
163 PLATFORM="freebsd bsd unix"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
164 elif [ "$OS" = "OpenBSD" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
165 PLATFORM="openbsd bsd unix"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
166 elif [ "$OS" = "NetBSD" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
167 PLATFORM="netbsd bsd unix"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
168 elif [ "$OS" = "Darwin" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
169 PLATFORM="macos osx bsd unix"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
170 elif echo "$OS" | grep -i "MINGW" > /dev/null; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
171 PLATFORM="windows mingw"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
172 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
173 : ${PLATFORM:="unix"}
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
174
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
175 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
176 echo "$PLATFORM_NAME"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
177
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
178 isplatform()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
179 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
180 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
181 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
182 if [ "$p" = "$1" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
183 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
184 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
185 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
186 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
187 }
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
188 notisplatform()
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
189 {
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
190 for p in $PLATFORM
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
191 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
192 if [ "$p" = "$1" ]; then
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
193 return 1
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
194 fi
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
195 done
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
196 return 0
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
197 }
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
198 istoolchain()
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
199 {
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
200 for t in $TOOLCHAIN
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
201 do
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
202 if [ "$t" = "$1" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
203 return 0
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
204 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
205 done
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
206 return 1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
207 }
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
208 notistoolchain()
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
209 {
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
210 for t in $TOOLCHAIN
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
211 do
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
212 if [ "$t" = "$1" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
213 return 1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
214 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
215 done
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
216 return 0
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
217 }
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
218
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
219
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
220 # generate vars.mk
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
221 cat > "$TEMP_DIR/vars.mk" << __EOF__
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
222 prefix=$prefix
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
223 exec_prefix=$exec_prefix
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
224 bindir=$bindir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
225 sbindir=$sbindir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
226 libdir=$libdir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
227 libexecdir=$libexecdir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
228 datarootdir=$datarootdir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
229 datadir=$datadir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
230 sysconfdir=$sysconfdir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
231 sharedstatedir=$sharedstatedir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
232 localstatedir=$localstatedir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
233 runstatedir=$runstatedir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
234 includedir=$includedir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
235 infodir=$infodir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
236 mandir=$mandir
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
237 localedir=$localedir
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
238 HOST=$HOST
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
239 PREFIX=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
240 INSTALL_DIR=$INSTALL_DIR
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
241 __EOF__
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
242
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
243 # toolchain detection utilities
209
a6d8181a8127 replace source with . in configure script and fix toolchain detection
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 208
diff changeset
244 . make/toolchain.sh
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
245
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
246 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
247 # DEPENDENCIES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
248 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
249
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
250 # check languages
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
251 lang_c=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
252 lang_cpp=
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
253 if detect_c_compiler ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
254 lang_c=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
255 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
256
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
257 # create buffer for make variables required by dependencies
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
258 echo > "$TEMP_DIR/make.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
259
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
260 test_pkg_config()
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
261 {
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
262 if "$PKG_CONFIG" --exists "$1" ; then :
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
263 else return 1 ; fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
264 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
265 else return 1 ; fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
266 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
267 else return 1 ; fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
268 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
269 else return 1 ; fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
270 return 0
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
271 }
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
272
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
273 print_check_msg()
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
274 {
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
275 if [ -z "$1" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
276 shift
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
277 printf "$@"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
278 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
279 }
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
280
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
281 dependency_error_libpq()
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
282 {
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
283 print_check_msg "$dep_checked_libpq" "checking for libpq... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
284 # dependency libpq
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
285 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
286 do
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
287 if [ -z "$PKG_CONFIG" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
288 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
289 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
290 if test_pkg_config "libpq" "" "" "" ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
291 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libpq`"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
292 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libpq`"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
293 else
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
294 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
295 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
296 cat >> $TEMP_DIR/make.mk << __EOF__
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
297 # Dependency: libpq
287
a171da778817 prepare build system for postgresql plugin tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 270
diff changeset
298 CFLAGS += -DENABLE_POSTGRESQL
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
299 PLUGINS += postgresql
287
a171da778817 prepare build system for postgresql plugin tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 270
diff changeset
300 TEST_PLUGIN_LDFLAGS += -lwspgtest
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
301 __EOF__
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
302 print_check_msg "$dep_checked_libpq" "yes\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
303 dep_checked_libpq=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
304 return 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
305 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
306
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
307 print_check_msg "$dep_checked_libpq" "no\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
308 dep_checked_libpq=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
309 return 0
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
310 }
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
311 dependency_error_openssl()
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
312 {
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
313 print_check_msg "$dep_checked_openssl" "checking for openssl... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
314 # dependency openssl
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
315 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
316 do
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
317 if [ -z "$PKG_CONFIG" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
318 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
319 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
320 if test_pkg_config "openssl" "" "" "" ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
321 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
322 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
323 else
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
324 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
325 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
326 print_check_msg "$dep_checked_openssl" "yes\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
327 dep_checked_openssl=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
328 return 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
329 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
330
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
331 # dependency openssl
458
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
332 while true
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
333 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
334 TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
335 print_check_msg "$dep_checked_openssl" "yes\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
336 dep_checked_openssl=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
337 return 1
458
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
338 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
339
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
340 print_check_msg "$dep_checked_openssl" "no\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
341 dep_checked_openssl=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
342 return 0
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
343 }
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
344 dependency_error_libxml2()
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
345 {
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
346 print_check_msg "$dep_checked_libxml2" "checking for libxml2... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
347 # dependency libxml2
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
348 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
349 do
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
350 if [ -z "$PKG_CONFIG" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
351 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
352 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
353 if test_pkg_config "libxml-2.0" "" "" "" ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
354 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
355 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
356 else
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
357 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
358 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
359 print_check_msg "$dep_checked_libxml2" "yes\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
360 dep_checked_libxml2=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
361 return 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
362 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
363
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
364 # dependency libxml2
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
365 while true
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
366 do
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
367 if tmp_flags=`xml2-config --cflags` ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
368 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
369 else
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
370 break
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
371 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
372 if tmp_flags=`xml2-config --libs` ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
373 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags"
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
374 else
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
375 break
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
376 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
377 print_check_msg "$dep_checked_libxml2" "yes\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
378 dep_checked_libxml2=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
379 return 1
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
380 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
381
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
382 print_check_msg "$dep_checked_libxml2" "no\n"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
383 dep_checked_libxml2=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
384 return 0
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
385 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
386
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
387 # start collecting dependency information
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
388 echo > "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
389
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
390 DEPENDENCIES_FAILED=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
391 ERROR=0
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
392 # unnamed dependencies
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
393 TEMP_CFLAGS=
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
394 TEMP_CXXFLAGS=
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
395 TEMP_LDFLAGS=
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
396 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
397 do
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
398 while true
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
399 do
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
400 if [ -z "$lang_c" ] ; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
401 ERROR=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
402 break
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
403 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
404
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
405 break
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
406 done
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
407 break
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
408 done
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
409 while true
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
410 do
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
411 if notisplatform "linux"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
412 break
109
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
413 fi
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
414 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
415 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
416
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
417 TEMP_CFLAGS="$TEMP_CFLAGS -DLINUX"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
418 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread -ldl -lm -lldap -llber"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
419 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
420 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
421 PLATFORM_DAEMONOBJ = event_linux.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
422
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
423 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
424 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
425 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
426 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
427
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
428 # ld flags
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
429 UCX_SO_NAME =
485
222557f4f595 fix configure script: escape $$ORIGIN
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 464
diff changeset
430 RPATH_WS_LIB_FLAG = -Wl,-rpath,'\$\$ORIGIN/../lib'
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
431 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
432 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
433 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
434 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
435 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
436 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
437 do
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
438 if notisplatform "bsd"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
439 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
440 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
441 if isplatform "macos" || istoolchain "macos"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
442 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
443 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
444 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
445 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
446
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
447 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD -I/usr/local/include"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
448 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread -lm -lldap -llber"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
449 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
450 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
451 PLATFORM_DAEMONOBJ = event_bsd.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
452
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
453 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
454 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
455 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
456 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
457
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
458 # ld flags
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
459 UCX_SO_NAME =
485
222557f4f595 fix configure script: escape $$ORIGIN
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 464
diff changeset
460 RPATH_WS_LIB_FLAG = -Wl,-rpath,'\$\$ORIGIN/../lib'
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
461 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
462 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
463 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
464 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
465 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
466 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
467 do
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
468 if notisplatform "macos"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
469 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
470 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
471 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
472 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
473
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
474 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD -DOSX"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
475 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread -ldl -lm -lldap -llber"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
476 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
477 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
478 PLATFORM_DAEMONOBJ = event_bsd.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
479
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
480 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
481 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
482 LIB_EXT = .dylib
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
483 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
484
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
485 # ld flags
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
486 UCX_SO_NAME = -install_name @rpath/libucx.dylib
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
487 RPATH_WS_LIB_FLAG = -rpath @loader_path/../lib
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
488 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
489 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
490 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
491 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
492 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
493 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
494 do
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
495 if notisplatform "solaris"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
496 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
497 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
498 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
499 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
500
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
501 TEMP_CFLAGS="$TEMP_CFLAGS -DSOLARIS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
502 TEMP_LDFLAGS="$TEMP_LDFLAGS -lsocket -lnsl -lsendfile -lposix4 -lpthread -ldl -lm -lmd -lldap"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
503 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
504 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
505 PLATFORM_DAEMONOBJ = event_solaris.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
506
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
507 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
508 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
509 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
510 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
511 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
512 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
513 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
514 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
515 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
516
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
517 # add general dependency flags to flags.mk
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
518 echo "# general flags" >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
519 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
520 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
521 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
522 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
523 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
524 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
525 if [ -n "${TEMP_LDFLAGS}" ]; then
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
526 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
109
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
527 fi
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
528
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
529 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
530 # OPTION VALUES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
531 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
532
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
533 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
534 # TARGETS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
535 #
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
536
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
537 echo >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
538 echo "configuring global target"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
539 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
540 TEMP_CFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
541 TEMP_CXXFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
542 TEMP_LDFLAGS=
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
543
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
544 if dependency_error_libxml2; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
545 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
546 ERROR=1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
547 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
548 if dependency_error_openssl; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
549 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl "
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
550 ERROR=1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
551 fi
41
bb7a1f5a8b48 added Linux support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 40
diff changeset
552
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
553 # Features
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
554
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
555
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
556 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
557 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
558 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
559 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
560 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
561 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
562 if [ "$BUILD_TYPE" = "debug" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
563 if [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
564 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
565 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
566 if [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
567 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
568 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
569 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
570 if [ "$BUILD_TYPE" = "release" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
571 if [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
572 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
573 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
574 if [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
575 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
576 fi
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
577 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
578 if [ -n "${TEMP_LDFLAGS}" ]; then
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
579 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
580 fi
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
581
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
582 echo >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
583 echo "configuring target: postgresql"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
584 echo "# flags for target postgresql" >> "$TEMP_DIR/flags.mk"
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
585 TEMP_CFLAGS=
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
586 TEMP_CXXFLAGS=
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
587 TEMP_LDFLAGS=
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
588
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
589
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
590 # Features
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
591 if [ -n "$FEATURE_POSTGRESQL" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
592 # check dependency
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
593 if dependency_error_libpq ; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
594 # "auto" features can fail and are just disabled in this case
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
595 if [ "$FEATURE_POSTGRESQL" = "auto" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
596 DISABLE_FEATURE_POSTGRESQL=1
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
597 else
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
598 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
599 ERROR=1
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
600 fi
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
601 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
602 if [ -n "$DISABLE_FEATURE_POSTGRESQL" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
603 unset FEATURE_POSTGRESQL
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
604 fi
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
605 fi
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
606
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
607
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
608 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
609 echo "POSTGRESQL_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
610 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
611 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
612 echo "POSTGRESQL_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
613 fi
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
614 if [ "$BUILD_TYPE" = "debug" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
615 if [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
616 echo 'POSTGRESQL_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
617 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
618 if [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
619 echo 'POSTGRESQL_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
620 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
621 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
622 if [ "$BUILD_TYPE" = "release" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
623 if [ -n "$lang_c" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
624 echo 'POSTGRESQL_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
625 fi
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
626 if [ -n "$lang_cpp" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
627 echo 'POSTGRESQL_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
628 fi
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
629 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
630 if [ -n "${TEMP_LDFLAGS}" ]; then
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
631 echo "POSTGRESQL_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
632 fi
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
633
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
634
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
635 # final result
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
636 if [ $ERROR -ne 0 ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
637 echo
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
638 echo "Error: Unresolved dependencies"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
639 echo "$DEPENDENCIES_FAILED"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
640 abort_configure
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
641 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
642
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
643 echo "configure finished"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
644 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
645 echo "Build Config:"
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
646 echo " PREFIX: $prefix"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
647 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
648 echo "Features:"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
649 if [ -n "$FEATURE_POSTGRESQL" ]; then
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
650 echo " postgresql: on"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
651 else
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
652 echo " postgresql: off"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
653 fi
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
654 echo
515
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
655
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
656 # generate the config.mk file
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
657 cat > "$TEMP_DIR/config.mk" << __EOF__
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
658 #
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
659 # config.mk generated by configure
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
660 #
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
661
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
662 __EOF__
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
663 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
2c3fe06a9210 update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 511
diff changeset
664 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
665 rm -Rf "$TEMP_DIR"

mercurial