configure

Tue, 12 Sep 2023 18:08:11 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 12 Sep 2023 18:08:11 +0200
changeset 511
a5a142fea2ae
parent 485
222557f4f595
child 515
2c3fe06a9210
permissions
-rwxr-xr-x

update uwproj

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
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
3 HOST=`uname -n`
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
4 PREFIX=`pwd`/work
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
5 INSTALL_DIR=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
6
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
7 EPREFIX=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
8
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
9 BINDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
10 SBINDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
11 LIBDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
12 LIBEXECDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
13 DATADIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
14 SYSCONFDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
15 SHAREDSTATEDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
16 LOCALSTATEDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
17 INCLUDEDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
18 INFODIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
19 MANDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
20
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
21 OS=`uname -s`
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
22 OS_VERSION=`uname -r`
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
23
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
24 TEMP_DIR=".tmp-`uname -n`"
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
25 mkdir -p "$TEMP_DIR"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
26 if [ $? -ne 0 ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
27 echo "Cannot create tmp dir"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
28 echo "Abort"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
29 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
30 touch "$TEMP_DIR/options"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
31 touch "$TEMP_DIR/features"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
32
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
33 # features
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
34
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
35 # help text
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
36 printhelp()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
37 {
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
38 echo "Usage: $0 [OPTIONS]..."
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
39 cat << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
40 Installation directories:
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
41 --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
42 [/usr]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
43 --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
44 [PREFIX]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
45
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
46 --bindir=DIR user executables [EPREFIX/bin]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
47 --sbindir=DIR system admin executables [EPREFIX/sbin]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
48 --libexecdir=DIR program executables [EPREFIX/libexec]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
49 --sysconfdir=DIR system configuration files [PREFIX/etc]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
50 --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
51 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
52 --libdir=DIR object code libraries [EPREFIX/lib]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
53 --includedir=DIR C header files [PREFIX/include]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
54 --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
55 --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
56 --infodir=DIR info documentation [DATAROOTDIR/info]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
57 --mandir=DIR man documentation [DATAROOTDIR/man]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
58
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
59 Optional Features:
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
60 --enable-postgresql
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
61
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
62 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
63 }
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 #
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
66 # parse arguments
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 #
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
68 for ARG in "$@"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
69 do
267
4ded424f4a5f update configure script / fix configure on freebsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 260
diff changeset
70 case "$ARG" in
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
71 "--prefix="*) PREFIX=${ARG#--prefix=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
72 "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
73 "--bindir="*) BINDIR=${ARG#----bindir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
74 "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
75 "--libdir="*) LIBDIR=${ARG#--libdir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
76 "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
77 "--datadir="*) DATADIR=${ARG#--datadir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
78 "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
79 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
80 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
81 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
82 "--infodir="*) INFODIR=${ARG#--infodir=} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
83 "--mandir"*) MANDIR=${ARG#--mandir} ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
84 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
85 "--enable-postgresql") FEATURE_POSTGRESQL=on ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
86 "--disable-postgresql") unset FEATURE_POSTGRESQL ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
87 "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;;
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
88 esac
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
89 done
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
91 # set dir variables
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
92 if [ -z "$BINDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
93 BINDIR=$EPREFIX/bin
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
94 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
95 if [ -z "$SBINDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
96 SBINDIR=$EPREFIX/sbin
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
97 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
98 if [ -z "$LIBDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
99 LIBDIR=$EPREFIX/lib
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
100 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
101 if [ -z "$LIBEXEC" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
102 LIBEXECDIR=$EPREFIX/libexec
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
103 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
104 if [ -z "$DATADIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
105 DATADIR=$PREFIX/share
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
106 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
107 if [ -z "$SYSCONFDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
108 SYSCONFDIR=$PREFIX/etc
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
109 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
110 if [ -z "$SHAREDSTATEDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
111 SHAREDSTATEDIR=$PREFIX/com
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
112 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
113 if [ -z "$LOCALSTATEDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
114 LOCALSTATEDIR=$PREFIX/var
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
115 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
116 if [ -z "$INCLUDEDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
117 INCLUDEDIR=$PREFIX/include
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
118 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
119 if [ -z "$INFODIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
120 INFODIR=$PREFIX/info
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
121 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
122 if [ -z "$MANDIR" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
123 MANDIR=$PREFIX/man
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
124 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
125
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
126 which pkg-config > /dev/null
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
127 if [ $? -eq 0 ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
128 PKG_CONFIG=pkg-config
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
129 else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
130 PKG_CONFIG=false
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
131 fi
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
132
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
133 # Simple uname based platform detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
134 # $PLATFORM is used for platform dependent dependency selection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
135 printf "detect platform... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
136 if [ "$OS" = "SunOS" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
137 PLATFORM="solaris sunos unix svr4"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
138 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
139 if [ "$OS" = "Linux" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
140 PLATFORM="linux unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
141 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
142 if [ "$OS" = "FreeBSD" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
143 PLATFORM="freebsd bsd unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
144 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
145 if [ "$OS" = "Darwin" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
146 PLATFORM="macos osx bsd unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
147 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
148 echo "$OS" | grep -i "MINGW" > /dev/null
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
149 if [ $? -eq 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
150 PLATFORM="windows mingw"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
151 fi
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
152
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
153 if [ -z "$PLATFORM" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
154 PLATFORM="unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
155 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
156
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
157 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
158 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
159 PLATFORM_NAME=$p
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
160 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
161 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
162 echo $PLATFORM_NAME
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
163
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
164 isplatform()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
165 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
166 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
167 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
168 if [ "$p" = "$1" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
169 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
170 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
171 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
172 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
173 }
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
174 isnotplatform()
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
175 {
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
176 for p in $PLATFORM
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
177 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
178 if [ "$p" = "$1" ]; then
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
179 return 1
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
180 fi
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
181 done
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
182 return 0
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
183 }
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
184
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
185 # generate config.mk and config.h
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
186 cat > "$TEMP_DIR/config.mk" << __EOF__
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
187 #
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
188 # config.mk generated by configure
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
189 #
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
190
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
191 # general vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
192 HOST=$HOST
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
193 PREFIX=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
194 INSTALL_DIR=$INSTALL_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
195
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
196 EPREFIX=$EPREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
197
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
198 BINDIR=$BINDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
199 SBINDIR=$SBINDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
200 LIBDIR=$LIBDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
201 LIBEXECDIR=$LIBEXECDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
202 DATADIR=$DATADIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
203 SYSCONFDIR=$SYSCONFDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
204 SHAREDSTATEDIR=$SHAREDSTATEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
205 LOCALSTATEDIR=$LOCALSTATEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
206 INCLUDEDIR=$INCLUDEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
207 INFODIR=$INFODIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
208 MANDIR=$MANDIR
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
209
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
210 __EOF__
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
211
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
212 echo > "$TEMP_DIR/make.mk"
41
bb7a1f5a8b48 added Linux support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 40
diff changeset
213
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
214 ENV_CFLAGS=$CFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
215 ENV_LDFLAGS=$LDFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
216 ENV_CXXFLAGS=$CXXFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
217
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
218 # Toolchain detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
219 # this will insert make vars to config.mk
209
a6d8181a8127 replace source with . in configure script and fix toolchain detection
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 208
diff changeset
220 . make/toolchain.sh
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
221
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
222 # add user specified flags to config.mk
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
223 echo "# project specific flags" >> "$TEMP_DIR/config.mk"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
224 if [ -n "${ENV_CFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
225 echo "CFLAGS += $ENV_CFLAGS" >> "$TEMP_DIR/config.mk"
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
226 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
227 if [ -n "${ENV_CXXFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
228 echo "CXXFLAGS += $ENV_CXXFLAGS" >> "$TEMP_DIR/config.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
229 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
230 if [ -n "${ENV_LDFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
231 echo "LDFLAGS += $ENV_LDFLAGS" >> "$TEMP_DIR/config.mk"
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
232 fi
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
233
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
234 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
235 # DEPENDENCIES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
236 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
237
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
238 dependency_libpq()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
239 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
240 printf "checking for libpq... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
241 # dependency libpq
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
242 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
243 do
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
244 if [ -z "$PKG_CONFIG" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
245 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
246 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
247 $PKG_CONFIG libpq
208
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
248 if [ $? -ne 0 ] ; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
249 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
250 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
251 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags libpq`"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
252 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs libpq`"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
253 cat >> $TEMP_DIR/make.mk << __EOF__
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
254 # Dependency: libpq
287
a171da778817 prepare build system for postgresql plugin tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 270
diff changeset
255 CFLAGS += -DENABLE_POSTGRESQL
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
256 PLUGINS += postgresql
287
a171da778817 prepare build system for postgresql plugin tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 270
diff changeset
257 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
258
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
259 __EOF__
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
260 echo yes
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
261 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
262 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
263
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
264 echo no
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
265 return 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
266 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
267 dependency_openssl()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
268 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
269 printf "checking for openssl... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
270 # dependency openssl
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
271 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
272 do
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
273 if [ -z "$PKG_CONFIG" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
274 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
275 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
276 $PKG_CONFIG openssl
208
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
277 if [ $? -ne 0 ] ; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
278 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
279 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
280 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags openssl`"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
281 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs openssl`"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
282 echo yes
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
283 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
284 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
285
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
286 # dependency openssl
458
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
287 while true
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
288 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
289 TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
290 echo yes
458
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
291 return 0
15bf3c1796f2 fix openssl dependency resolution on bsd
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 453
diff changeset
292 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
293
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
294 echo no
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
295 return 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
296 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
297 dependency_libxml2()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
298 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
299 printf "checking for libxml2... "
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
300 # dependency libxml2
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
301 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
302 do
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
303 if [ -z "$PKG_CONFIG" ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
304 break
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
305 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
306 $PKG_CONFIG libxml-2.0
208
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
307 if [ $? -ne 0 ] ; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
308 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
309 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
310 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags libxml-2.0`"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
311 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs libxml-2.0`"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
312 echo yes
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
313 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
314 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
315
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
316 # dependency libxml2
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
317 while true
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
318 do
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
319 xml2-config --cflags > /dev/null
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
320 if [ $? -eq 0 ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
321 TEMP_CFLAGS="$TEMP_CFLAGS `xml2-config --cflags`"
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
322 else
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
323 break
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
324 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
325 echo yes
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
326 return 0
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
327 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
328
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
329 echo no
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
330 return 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
331 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
332
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
333 DEPENDENCIES_FAILED=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
334 ERROR=0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
335 # general dependencies
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
336 TEMP_CFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
337 TEMP_LDFLAGS=
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
338 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
339 do
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
340 if isnotplatform "linux"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
341 break
109
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
342 fi
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
343 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
344 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
345
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
346 TEMP_CFLAGS="$TEMP_CFLAGS -DLINUX"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
347 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread -ldl -lm -lldap -llber"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
348 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
349 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
350 PLATFORM_DAEMONOBJ = event_linux.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
351
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
352 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
353 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
354 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
355 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
356
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
357 # ld flags
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
358 UCX_SO_NAME =
485
222557f4f595 fix configure script: escape $$ORIGIN
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 464
diff changeset
359 RPATH_WS_LIB_FLAG = -Wl,-rpath,'\$\$ORIGIN/../lib'
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
360
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
361 __EOF__
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
362
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
363 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
364 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
365
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
366 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
367 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
368 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
369 do
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
370 if isnotplatform "bsd"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
371 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
372 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
373 if isplatform "macos"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
374 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
375 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
376 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
377 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
378
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
379 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD -I/usr/local/include"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
380 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread -lm -lldap -llber"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
381 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
382 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
383 PLATFORM_DAEMONOBJ = event_bsd.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
384
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
385 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
386 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
387 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
388 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
389
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
390 # ld flags
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
391 UCX_SO_NAME =
485
222557f4f595 fix configure script: escape $$ORIGIN
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 464
diff changeset
392 RPATH_WS_LIB_FLAG = -Wl,-rpath,'\$\$ORIGIN/../lib'
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
393
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
394 __EOF__
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
395
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
396 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
397 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
398
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
399 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
400 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
401 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
402 do
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
403 if isnotplatform "macos"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
404 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
405 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
406 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
407 do
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
408
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
409 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD -DOSX"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
410 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread -ldl -lm -lldap -llber"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
411 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
412 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
413 PLATFORM_DAEMONOBJ = event_bsd.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
414
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
415 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
416 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
417 LIB_EXT = .dylib
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
418 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
419
453
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
420 # ld flags
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
421 UCX_SO_NAME = -install_name @rpath/libucx.dylib
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
422 RPATH_WS_LIB_FLAG = -rpath @loader_path/../lib
4586d534f9b5 fix build on macos
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 287
diff changeset
423
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
424 __EOF__
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
425
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
426 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
427 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
428
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
429 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
430 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
431 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
432 do
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
433 if isnotplatform "solaris"; then
204
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 fi
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
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
438
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
439 TEMP_CFLAGS="$TEMP_CFLAGS -DSOLARIS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
440 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
441 cat >> "$TEMP_DIR/make.mk" << __EOF__
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
442 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
443 PLATFORM_DAEMONOBJ = event_solaris.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
444
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
445 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
446 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
447 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
448 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
449
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
450 __EOF__
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
451
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
452 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
453 done
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
454
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
455 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
456 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
457
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
458 # add general dependency flags to config.mk
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
459 echo >> "$TEMP_DIR/config.mk"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
460 if [ -n "${TEMP_CFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
461 echo "CFLAGS += $TEMP_CFLAGS" >> $TEMP_DIR/config.mk
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
462 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
463 if [ -n "${TEMP_CXXFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
464 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> $TEMP_DIR/config.mk
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
465 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
466 if [ -n "${TEMP_LDFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
467 echo "LDFLAGS += $TEMP_LDFLAGS" >> $TEMP_DIR/config.mk
109
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
468 fi
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
469
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
470 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
471 # OPTION VALUES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
472 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
473
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
474 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
475 # TARGETS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
476 #
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
477 TEMP_CFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
478 TEMP_CXXFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
479 TEMP_LDFLAGS=
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
480
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
481 # Target
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
482 TEMP_CFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
483 TEMP_LDFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
484 TEMP_CXXFLAGS=
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
485
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
486 dependency_libxml2
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
487 if [ $? -ne 0 ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
488 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 "
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
489 ERROR=1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
490 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
491 dependency_openssl
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
492 if [ $? -ne 0 ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
493 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl "
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
494 ERROR=1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
495 fi
41
bb7a1f5a8b48 added Linux support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 40
diff changeset
496
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
497 # Features
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
498
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
499
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
500 echo >> "$TEMP_DIR/config.mk"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
501 if [ -n "${TEMP_CFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
502 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk"
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
503 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
504 if [ -n "${TEMP_CXXFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
505 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk"
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
506 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
507 if [ -n "${TEMP_LDFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
508 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk"
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
509 fi
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
510
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
511 # Target: postgresql
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
512 TEMP_CFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
513 TEMP_LDFLAGS=
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
514 TEMP_CXXFLAGS=
270
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
515
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
516
4cfaa02055cd add first code for postgresql plugin: resourcepool type implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 267
diff changeset
517 # Features
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
518 if [ -n "$FEATURE_POSTGRESQL" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
519 # check dependency
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
520 dependency_libpq
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
521 if [ $? -ne 0 ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
522 # "auto" features can fail and are just disabled in this case
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
523 if [ "$FEATURE_POSTGRESQL" != "auto" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
524 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
525 ERROR=1
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
526 fi
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
527 fi
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
528 fi
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
529
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
530
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
531 echo >> "$TEMP_DIR/config.mk"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
532 if [ -n "${TEMP_CFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
533 echo "POSTGRESQL_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
534 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
535 if [ -n "${TEMP_CXXFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
536 echo "POSTGRESQL_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
537 fi
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
538 if [ -n "${TEMP_LDFLAGS}" ]; then
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
539 echo "POSTGRESQL_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
540 fi
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
541
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
542 if [ $ERROR -ne 0 ]; then
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
543 echo
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
544 echo "Error: Unresolved dependencies"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
545 echo "$DEPENDENCIES_FAILED"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
546 rm -Rf "$TEMP_DIR"
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
547 exit 1
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
548 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
549
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
550 echo "configure finished"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
551 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
552 echo "Build Config:"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
553 echo " PREFIX: $PREFIX"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
554 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
555 echo
511
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
556 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/make.mk" > config.mk
a5a142fea2ae update uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 485
diff changeset
557 rm -Rf "$TEMP_DIR"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
558
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
559

mercurial