configure

Sat, 03 Aug 2019 17:54:54 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 03 Aug 2019 17:54:54 +0200
changeset 204
e870a7c8f223
parent 109
8a0a7754f123
child 206
f5bdca63bbe7
permissions
-rwxr-xr-x

replace old build system with 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`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
25 mkdir -p $TEMP_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
26 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
27 echo "Cannot create tmp dir"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
28 echo "Abort"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
29 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
30 touch $TEMP_DIR/options
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
31 touch $TEMP_DIR/features
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 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
38 echo "Usage: $0 [OPTIONS]..."
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
39 cat << __EOF__
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:
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
60 --enable-pg
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 #
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
66 # parse arguments
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 #
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
68 for ARG in $@
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
69 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
70 if [[ $ARG == --prefix=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
71 PREFIX=${ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
72 elif [[ $ARG = --exec-prefix=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
73 EPREFIX=${ARG:14}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
74 elif [[ $ARG = --bindir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
75 BINDIR=${ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
76 elif [[ $ARG = --sbindir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
77 SBINDIR=${ARG:10}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
78 elif [[ $ARG = --libdir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
79 LIBDIR=${ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
80 elif [[ $ARG = --libexecdir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
81 LIBEXECDIR=${ARG:13}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
82 elif [[ $ARG = --datadir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
83 DATADIR=${ARG:10}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
84 elif [[ $ARG = --sysconfdir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
85 SYSCONFDIR=${ARG:13}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
86 elif [[ $ARG = --sharedstatedir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
87 SHAREDSTATEDIR=${ARG:17}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
88 elif [[ $ARG = --localstatedir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
89 LOCALSTATEDIR=${ARG:16}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
90 elif [[ $ARG = --includedir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
91 INCLUDEDIR=${ARG:12}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
92 elif [[ $ARG = --infodir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
93 INFODIR=${ARG:10}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
94 elif [[ $ARG = --mandir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
95 MANDIR=${ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
96 elif [ $ARG = "--help" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
97 printhelp
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
98 exit 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
99 elif [[ $ARG == --enable-pg ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
100 FEATURE_PG=on
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
101 elif [[ $ARG == --disable-pg ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
102 unset FEATURE_PG
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
103 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
104 done
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
106 # set dir variables
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
107 if [ -z $BINDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
108 BINDIR=$EPREFIX/bin
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
109 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
110 if [ -z $SBINDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
111 SBINDIR=$EPREFIX/sbin
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
112 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
113 if [ -z $LIBDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
114 LIBDIR=$EPREFIX/lib
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
115 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
116 if [ -z $LIBEXEC ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
117 LIBEXECDIR=$EPREFIX/libexec
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
118 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
119 if [ -z $DATADIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
120 DATADIR=$PREFIX/share
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
121 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
122 if [ -z $SYSCONFDIR]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
123 SYSCONFDIR=$PREFIX/etc
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 if [ -z $SHAREDSTATEDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
126 SHAREDSTATEDIR=$PREFIX/com
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
127 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
128 if [ -z $LOCALSTATEDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
129 LOCALSTATEDIR=$PREFIX/var
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
130 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
131 if [ -z $INCLUDEDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
132 INCLUDEDIR=$PREFIX/include
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
133 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
134 if [ -z $INFODIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
135 INFODIR=$PREFIX/info
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
136 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
137 if [ -z $MANDIR ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
138 MANDIR=$PREFIX/man
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
139 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
140
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
141 which pkg-config > /dev/null
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
142 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
143 PKG_CONFIG=pkg-config
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
144 else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
145 PKG_CONFIG=false
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
146 fi
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
147
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
148 # Simple uname based platform detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
149 # $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
150 printf "detect platform... "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
151 if [ $OS = SunOS ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
152 PLATFORM="solaris sunos unix svr4"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
153 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
154 if [ $OS = Linux ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
155 PLATFORM="linux unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
156 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
157 if [ $OS = FreeBSD ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
158 PLATFORM="freebsd bsd unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
159 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
160 if [ $OS = Darwin ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
161 PLATFORM="macos osx bsd unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
162 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
163 echo $OS | grep "MINGW" > /dev/null
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
164 if [ $? -eq 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
165 PLATFORM="windows mingw"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
166 fi
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
167
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
168 if [ -z "$PLATFORM" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
169 PLATFORM="unix"
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
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
172 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
173 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
174 PLATFORM_NAME=$p
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
175 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
176 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
177 echo $PLATFORM_NAME
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
178
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
179 isplatform()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
180 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
181 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
182 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
183 if [ $p = $1 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
184 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
185 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
186 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
187 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
188 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
189
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
190 # generate config.mk and config.h
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
191 cat > $TEMP_DIR/config.mk << __EOF__
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
192 #
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
193 # config.mk generated by configure
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
194 #
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
195
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
196 # general vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
197 HOST=$HOST
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
198 PREFIX=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
199 INSTALL_DIR=$INSTALL_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
200
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
201 EPREFIX=$EPREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
202
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
203 BINDIR=$BINDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
204 SBINDIR=$SBINDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
205 LIBDIR=$LIBDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
206 LIBEXECDIR=$LIBEXECDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
207 DATADIR=$DATADIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
208 SYSCONFDIR=$SYSCONFDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
209 SHAREDSTATEDIR=$SHAREDSTATEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
210 LOCALSTATEDIR=$LOCALSTATEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
211 INCLUDEDIR=$INCLUDEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
212 INFODIR=$INFODIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
213 MANDIR=$MANDIR
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
214
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
215 __EOF__
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
216
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
217 echo > $TEMP_DIR/make.mk
41
bb7a1f5a8b48 added Linux support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 40
diff changeset
218
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
219 ENV_CFLAGS=$CFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
220 ENV_LDFLAGS=$LDFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
221 ENV_CXXFLAGS=$CXXFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
222
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
223 # Toolchain detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
224 # this will insert make vars to config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
225 source make/toolchain.sh
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
226
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
227 # add user specified flags to config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
228 echo >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
229 if [[ ! -z ${ENV_CFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
230 echo "CFLAGS += $ENV_CFLAGS" >> $TEMP_DIR/config.mk
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
231 fi
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
232 if [[ ! -z ${ENV_CXXFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
233 echo "CXXFLAGS += $ENV_CXXFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
234 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
235 if [[ ! -z ${ENV_LDFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
236 echo "LDFLAGS += $ENV_LDFLAGS" >> $TEMP_DIR/config.mk
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
237 fi
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
238
204
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 # DEPENDENCIES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
241 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
242
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
243 dependency_libpq()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
244 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
245 printf "checking for libpq... "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
246 # dependency libpq
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
247 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
248 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
249 if [ -z "PKG_CONFIG" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
250 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
251 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
252 if ! pkg-config libpq ; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
253 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
254 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
255 CFLAGS+=" `pkg-config --cflags libpq`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
256 LDFLAGS+=" `pkg-config --libs libpq`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
257 echo yes
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
258 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
259 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
260
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
261 echo no
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
262 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
263 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
264 dependency_openssl()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
265 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
266 printf "checking for openssl... "
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 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
269 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
270 if [ -z "PKG_CONFIG" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
271 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
272 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
273 if ! pkg-config openssl ; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
274 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
275 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
276 CFLAGS+=" `pkg-config --cflags openssl`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
277 LDFLAGS+=" `pkg-config --libs openssl`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
278 echo yes
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
279 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
280 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
281
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
282 echo no
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
283 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
284 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
285 dependency_libxml2()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
286 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
287 printf "checking for libxml2... "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
288 # dependency libxml2
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
289 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
290 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
291 if [ -z "PKG_CONFIG" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
292 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
293 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
294 if ! pkg-config libxml-2.0 ; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
295 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
296 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
297 CFLAGS+=" `pkg-config --cflags libxml-2.0`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
298 LDFLAGS+=" `pkg-config --libs libxml-2.0`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
299 echo yes
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
300 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
301 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
302
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
303 echo no
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
304 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
305 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
306
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
307 DEPENDENCIES_FAILED=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
308 ERROR=0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
309 # general dependencies
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
310 CFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
311 LDFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
312 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
313 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
314 if ! isplatform "linux"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
315 break
109
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
316 fi
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
317 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
318 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
319
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
320 CFLAGS+="-DLINUX"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
321 LDFLAGS+="-lpthread -ldl -lm -lldap"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
322 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
323 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
324 PLATFORM_DAEMONOBJ = event_linux.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
325
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
326 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
327 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
328 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
329 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
330
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
331 __EOF__
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 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
334 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
335
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
336 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
337 done
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
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
340 if ! isplatform "bsd"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
341 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
342 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
343 if isplatform "macos"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
344 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
345 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
346 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
347 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
348
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
349 CFLAGS+="-DBSD"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
350 LDFLAGS+="-lpthread -lm -lldap"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
351 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
352 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
353 PLATFORM_DAEMONOBJ = event_bsd.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
354
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
355 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
356 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
357 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
358 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
359
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
360 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
361
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
362 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
363 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
364
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
365 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
366 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
367 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
368 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
369 if ! isplatform "macos"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
370 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
371 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
372 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
373 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
374
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
375 CFLAGS+="-DBSD -DOSX"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
376 LDFLAGS+="-lpthread -ldl -lm -lldap"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
377 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
378 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
379 PLATFORM_DAEMONOBJ = event_bsd.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
380
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
381 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
382 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
383 LIB_EXT = .dylib
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
384 APP_EXT =
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 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
387
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
388 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
389 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
390
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
391 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
392 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
393 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
394 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
395 if ! isplatform "solaris"; then
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 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
398 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
399 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
400
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
401 CFLAGS+="-DSOLARIS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
402 LDFLAGS+="-lsocket -lnsl -lsendfile -lposix4 -lpthread -ldl -lm -lmd -lldap"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
403 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
404 # platform dependend source files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
405 PLATFORM_DAEMONOBJ = event_solaris.o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
406
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
407 # platform dependend vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
408 OBJ_EXT = .o
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
409 LIB_EXT = .so
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
410 APP_EXT =
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
411
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
412 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
413
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
414 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
415 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
416
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
417 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
418 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
419
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
420 # add general dependency flags to config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
421 echo >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
422 if [[ ! -z ${CFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
423 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
424 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
425 if [[ ! -z ${CXXFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
426 echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
427 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
428 if [[ ! -z ${LDFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
429 echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
109
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
430 fi
8a0a7754f123 experimental BSD support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 94
diff changeset
431
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
432 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
433 # OPTION VALUES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
434 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
435
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
436 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
437 # TARGETS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
438 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
439 CFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
440 CXXFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
441 LDFLAGS=
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
442
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
443 # Target
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
444 CFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
445 LDFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
446 CXXFLAGS=
62
c47e081b6c0f added keyfile based authentication
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
447
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
448 dependency_libxml2
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
449 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
450 DEPENDENCIES_FAILED+="libxml2 "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
451 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
452 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
453 dependency_openssl
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
454 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
455 DEPENDENCIES_FAILED+="openssl "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
456 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
457 fi
41
bb7a1f5a8b48 added Linux support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 40
diff changeset
458
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
459
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
460 echo >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
461 if [[ ! -z ${CFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
462 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
463 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
464 if [[ ! -z ${CXXFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
465 echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
466 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
467 if [[ ! -z ${LDFLAGS} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
468 echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
469 fi
40
56cda23f48d4 removed NSPR
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
470
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
471 if [ $ERROR -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
472 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
473 echo "Error: Unresolved dependencies"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
474 echo $DEPENCIES_FAILED
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
475 rm -Rf $TEMP_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
476 exit 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
477 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
478
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
479 echo "configure finished"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
480 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
481 echo "Build Config:"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
482 echo " PREFIX: $PREFIX"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
483 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
484 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
485 cat $TEMP_DIR/config.mk $TEMP_DIR/make.mk > config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
486 rm -Rf $TEMP_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
487
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 109
diff changeset
488

mercurial