Mon, 02 Oct 2023 16:23:33 +0200
do not generate flags when lang is not required - fixes #311
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | #!/bin/sh |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
3 | # create temporary directory |
53
704368f1bb23
revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
4 | TEMP_DIR=".tmp-`uname -n`" |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
5 | rm -Rf "$TEMP_DIR" |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
6 | if mkdir -p "$TEMP_DIR"; then |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
7 | : |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
8 | else |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
9 | echo "Cannot create tmp dir $TEMP_DIR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
10 | echo "Abort" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
11 | exit 1 |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
12 | fi |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
13 | touch "$TEMP_DIR/options" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
14 | touch "$TEMP_DIR/features" |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
15 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
16 | # define standard variables |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
17 | PREFIX=/usr |
75
b49869bd2a0a
fix wrong EPREFIX when PREFIX is overridden
Mike Becker <universe@uap-core.de>
parents:
73
diff
changeset
|
18 | EPREFIX= |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | BINDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | SBINDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | LIBDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | LIBEXECDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | DATADIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | SYSCONFDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | SHAREDSTATEDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | LOCALSTATEDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | INCLUDEDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | INFODIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | MANDIR= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
31 | # custom variables |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
32 | HOST=`uname -n` |
76
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
33 | PREFIX="`pwd`/work" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
34 | INSTALL_DIR="$PREFIX" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
35 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
36 | # features |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
37 | FEATURE_PG=auto |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
38 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
39 | # clean abort |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
40 | abort_configure() |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
41 | { |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
42 | rm -Rf "$TEMP_DIR" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
43 | exit 1 |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
44 | } |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
45 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
46 | # help text |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
47 | printhelp() |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
48 | { |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
49 | echo "Usage: $0 [OPTIONS]..." |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
50 | cat << __EOF__ |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
51 | Installation directories: |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
52 | --prefix=PREFIX path prefix for architecture-independent files |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
53 | [/usr] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
54 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
55 | [PREFIX] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
56 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
57 | --bindir=DIR user executables [EPREFIX/bin] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
58 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
59 | --libexecdir=DIR program executables [EPREFIX/libexec] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
60 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
61 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
62 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
63 | --libdir=DIR object code libraries [EPREFIX/lib] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
64 | --includedir=DIR C header files [PREFIX/include] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
67 | --infodir=DIR info documentation [DATAROOTDIR/info] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
68 | --mandir=DIR man documentation [DATAROOTDIR/man] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
69 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | Optional Features: |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
71 | --disable-pg |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
72 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
73 | __EOF__ |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
74 | } |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
75 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
76 | # |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
77 | # parse arguments |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
78 | # |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
79 | BUILD_TYPE="default" |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
80 | for ARG in "$@" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
81 | do |
16
4fac0e25ee04
improve posix shell compatibility
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
15
diff
changeset
|
82 | case "$ARG" in |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
83 | "--prefix="*) PREFIX=${ARG#--prefix=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
84 | "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
85 | "--bindir="*) BINDIR=${ARG#----bindir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
86 | "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
87 | "--libdir="*) LIBDIR=${ARG#--libdir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
88 | "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
89 | "--datadir="*) DATADIR=${ARG#--datadir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
90 | "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
91 | "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
92 | "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
93 | "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
94 | "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
95 | "--mandir"*) MANDIR=${ARG#--mandir} ;; |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
96 | "--help"*) printhelp; abort_configure ;; |
51
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
97 | "--debug") BUILD_TYPE="debug" ;; |
5c12e9e29733
add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents:
47
diff
changeset
|
98 | "--release") BUILD_TYPE="release" ;; |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
99 | "--enable-pg") FEATURE_PG=on ;; |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
100 | "--disable-pg") unset FEATURE_PG ;; |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
101 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
102 | esac |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
103 | done |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
104 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
105 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
106 | # set dir variables |
75
b49869bd2a0a
fix wrong EPREFIX when PREFIX is overridden
Mike Becker <universe@uap-core.de>
parents:
73
diff
changeset
|
107 | : ${EPREFIX:="$PREFIX"} |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
108 | : ${BINDIR:="$EPREFIX/bin"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
109 | : ${SBINDIR:="$EPREFIX/sbin"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
110 | : ${LIBDIR:="$EPREFIX/lib"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
111 | : ${LIBEXECDIR:="$EPREFIX/libexec"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
112 | : ${DATADIR:="$PREFIX/share"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
113 | : ${SYSCONFDIR:="$PREFIX/etc"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
114 | : ${SHAREDSTATEDIR:="$PREFIX/com"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
115 | : ${LOCALSTATEDIR:="$PREFIX/var"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
116 | : ${INCLUDEDIR:="$PREFIX/include"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
117 | : ${INFODIR:="$PREFIX/info"} |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
118 | : ${MANDIR:="$PREFIX/man"} |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
119 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
120 | # Test for availability of pkg-config |
53
704368f1bb23
revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
121 | PKG_CONFIG=`command -v pkg-config` |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
122 | : ${PKG_CONFIG:="false"} |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
123 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
124 | # Simple uname based platform detection |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
125 | # $PLATFORM is used for platform dependent dependency selection |
53
704368f1bb23
revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
126 | OS=`uname -s` |
704368f1bb23
revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
127 | OS_VERSION=`uname -r` |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
128 | printf "detect platform... " |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
129 | if [ "$OS" = "SunOS" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
130 | PLATFORM="solaris sunos unix svr4" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
131 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
132 | if [ "$OS" = "Linux" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
133 | PLATFORM="linux unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
134 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
135 | if [ "$OS" = "FreeBSD" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
136 | PLATFORM="freebsd bsd unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
137 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
138 | if [ "$OS" = "Darwin" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
139 | PLATFORM="macos osx bsd unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
140 | fi |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
141 | if echo "$OS" | grep -i "MINGW" > /dev/null; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
142 | PLATFORM="windows mingw" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
143 | fi |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
144 | : ${PLATFORM:="unix"} |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
145 | |
53
704368f1bb23
revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
146 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
147 | echo "$PLATFORM_NAME" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
148 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
149 | isplatform() |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
150 | { |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
151 | for p in $PLATFORM |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
152 | do |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
153 | if [ "$p" = "$1" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
154 | return 0 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
155 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
156 | done |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
157 | return 1 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
158 | } |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
159 | notisplatform() |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
160 | { |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
161 | for p in $PLATFORM |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
162 | do |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
163 | if [ "$p" = "$1" ]; then |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
164 | return 1 |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
165 | fi |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
166 | done |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
167 | return 0 |
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
168 | } |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
169 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
170 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
171 | # generate vars.mk |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
172 | cat > "$TEMP_DIR/vars.mk" << __EOF__ |
76
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
173 | PREFIX="$PREFIX" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
174 | EPREFIX="$EPREFIX" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
175 | BINDIR="$BINDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
176 | SBINDIR="$SBINDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
177 | LIBDIR="$LIBDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
178 | LIBEXECDIR="$LIBEXECDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
179 | DATADIR="$DATADIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
180 | SYSCONFDIR="$SYSCONFDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
181 | SHAREDSTATEDIR="$SHAREDSTATEDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
182 | LOCALSTATEDIR="$LOCALSTATEDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
183 | INCLUDEDIR="$INCLUDEDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
184 | INFODIR="$INFODIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
185 | MANDIR="$MANDIR" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
186 | HOST="$HOST" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
187 | PREFIX="$PREFIX" |
620358ea3a0b
fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents:
75
diff
changeset
|
188 | INSTALL_DIR="$INSTALL_DIR" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
189 | __EOF__ |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
190 | sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
191 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
192 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
193 | # toolchain detection utilities |
13
cdf8bf4549c4
fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
194 | . make/toolchain.sh |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
195 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
196 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
197 | # DEPENDENCIES |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
198 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
199 | |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
200 | # check languages |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
201 | lang_c= |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
202 | lang_cpp= |
73
5d84da6be928
update test example with recent output of uwproj
Mike Becker <universe@uap-core.de>
parents:
71
diff
changeset
|
203 | if detect_cpp_compiler ; then |
5d84da6be928
update test example with recent output of uwproj
Mike Becker <universe@uap-core.de>
parents:
71
diff
changeset
|
204 | lang_cpp=1 |
5d84da6be928
update test example with recent output of uwproj
Mike Becker <universe@uap-core.de>
parents:
71
diff
changeset
|
205 | fi |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
206 | if detect_c_compiler ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
207 | lang_c=1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
208 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
209 | |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
210 | # create buffer for make variables required by dependencies |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
211 | echo > "$TEMP_DIR/make.mk" |
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
212 | |
63
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
213 | test_pkg_config() |
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
214 | { |
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
215 | if "$PKG_CONFIG" --exists "$1" ; then : |
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
216 | else return 1 ; fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
217 | if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : |
63
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
218 | else return 1 ; fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
219 | if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then : |
63
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
220 | else return 1 ; fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
221 | if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : |
63
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
222 | else return 1 ; fi |
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
223 | return 0 |
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
224 | } |
ac47c2fb2c4a
fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents:
60
diff
changeset
|
225 | |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
226 | dependency_error_cpp() |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
227 | { |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
228 | printf "checking for cpp... " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
229 | # dependency cpp |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
230 | while true |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
231 | do |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
232 | if [ -z "$lang_cpp" ] ; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
233 | break |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
234 | fi |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
235 | echo yes |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
236 | return 1 |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
237 | done |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
238 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
239 | echo no |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
240 | return 0 |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
241 | } |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
242 | dependency_error_libpq() |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
243 | { |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
244 | printf "checking for libpq... " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
245 | # dependency libpq |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
246 | while true |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
247 | do |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
8
diff
changeset
|
248 | if [ -z "$PKG_CONFIG" ]; then |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
249 | break |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
250 | fi |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
251 | if test_pkg_config "libpq" "" "" "" ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
252 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libpq`" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
253 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libpq`" |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
254 | else |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
255 | break |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
256 | fi |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
257 | echo yes |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
258 | return 1 |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
259 | done |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
260 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
261 | echo no |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
262 | return 0 |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
263 | } |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
264 | dependency_error_openssl() |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
265 | { |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
266 | printf "checking for openssl... " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
267 | # dependency openssl |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
268 | while true |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
269 | do |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
270 | if [ -z "$lang_c" ] ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
271 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
272 | fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
273 | if [ -z "$PKG_CONFIG" ]; then |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
274 | break |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
275 | fi |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
276 | if test_pkg_config "openssl" "" "" "" ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
277 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
278 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
279 | else |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
280 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
281 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
282 | echo yes |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
283 | return 1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
284 | done |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
285 | |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
286 | # dependency openssl platform="bsd" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
287 | while true |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
288 | do |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
289 | if notisplatform "bsd"; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
290 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
291 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
292 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lssl -lcrypto" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
293 | echo yes |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
294 | return 1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
295 | done |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
296 | |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
297 | echo no |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
298 | return 0 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
299 | } |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
300 | dependency_error_libxml2() |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
301 | { |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
302 | printf "checking for libxml2... " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
303 | # dependency libxml2 platform="macos" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
304 | while true |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
305 | do |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
306 | if notisplatform "macos"; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
307 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
308 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
309 | if tmp_flags=`xml2-config --cflags` ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
310 | TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
311 | else |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
312 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
313 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
314 | if tmp_flags=`xml2-config --libs` ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
315 | TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
316 | else |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
317 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
318 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
319 | echo yes |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
320 | return 1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
321 | done |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
322 | |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
323 | # dependency libxml2 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
324 | while true |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
325 | do |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
326 | if [ -z "$PKG_CONFIG" ]; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
327 | break |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
328 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
329 | if test_pkg_config "libxml-2.0" "" "" "" ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
330 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`" |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
331 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`" |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
332 | else |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
333 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
334 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
335 | echo yes |
60
43d6680e6410
update reference configure scripts
Mike Becker <universe@uap-core.de>
parents:
54
diff
changeset
|
336 | return 1 |
4
6bf4c948d0ba
make targets without name and prefix possible
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
337 | done |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
338 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
339 | echo no |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
340 | return 0 |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
341 | } |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
342 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
343 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
344 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
345 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
346 | # start collecting dependency information |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
347 | echo > "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
348 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
349 | DEPENDENCIES_FAILED= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
350 | ERROR=0 |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
351 | # unnamed dependencies |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
352 | TEMP_CFLAGS= |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
353 | TEMP_CXXFLAGS= |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
354 | TEMP_LDFLAGS= |
2
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
355 | while true |
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
356 | do |
5
895bf81d3b6e
add missing source changes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
357 | while true |
895bf81d3b6e
add missing source changes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
358 | do |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
359 | if [ -z "$lang_c" ] ; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
360 | ERROR=1 |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
361 | break |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
362 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
363 | |
2
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
364 | break |
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
365 | done |
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
366 | break |
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
367 | done |
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
368 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
369 | # add general dependency flags to flags.mk |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
370 | echo "# general flags" >> "$TEMP_DIR/flags.mk" |
77
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
371 | if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
372 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
373 | fi |
77
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
374 | if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
375 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
2
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
376 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
377 | if [ -n "${TEMP_LDFLAGS}" ]; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
378 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
2
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
379 | fi |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
380 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
381 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
382 | # OPTION VALUES |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
383 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
384 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
385 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
386 | # TARGETS |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
387 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
388 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
389 | echo >> "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
390 | # Target |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
391 | echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
392 | TEMP_CFLAGS= |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
393 | TEMP_CXXFLAGS= |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
394 | TEMP_LDFLAGS= |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
395 | |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
396 | if dependency_error_libxml2; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
397 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
398 | ERROR=1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
399 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
400 | if dependency_error_openssl; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
401 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
402 | ERROR=1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
403 | fi |
4
6bf4c948d0ba
make targets without name and prefix possible
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
404 | |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
405 | # Features |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
406 | if [ -n "$FEATURE_PG" ]; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
407 | # check dependency |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
408 | if dependency_error_libpq ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
409 | # "auto" features can fail and are just disabled in this case |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
410 | if [ "$FEATURE_PG" = "auto" ]; then |
68
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
411 | DISABLE_FEATURE_PG=1 |
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
412 | else |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
413 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
414 | ERROR=1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
415 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
416 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
417 | # check dependency |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
418 | if dependency_error_cpp ; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
419 | # "auto" features can fail and are just disabled in this case |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
420 | if [ "$FEATURE_PG" = "auto" ]; then |
68
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
421 | DISABLE_FEATURE_PG=1 |
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
422 | else |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
423 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED cpp " |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
424 | ERROR=1 |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
425 | fi |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
426 | fi |
68
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
427 | if [ -n "$DISABLE_FEATURE_PG" ]; then |
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
428 | unset FEATURE_PG |
c997c0978665
fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
67
diff
changeset
|
429 | fi |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
430 | fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
431 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
432 | |
77
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
433 | if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
434 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
435 | fi |
77
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
436 | if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
437 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
438 | fi |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
439 | if [ "$BUILD_TYPE" = "debug" ]; then |
77
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
440 | if [ -n "$lang_c" ]; then |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
441 | echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
442 | fi |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
443 | if [ -n "$lang_cpp" ]; then |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
444 | echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
445 | fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
446 | fi |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
447 | if [ "$BUILD_TYPE" = "release" ]; then |
77
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
448 | if [ -n "$lang_c" ]; then |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
449 | echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
450 | fi |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
451 | if [ -n "$lang_cpp" ]; then |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
452 | echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
439902ff0af3
do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
453 | fi |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
454 | fi |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
455 | if [ -n "${TEMP_LDFLAGS}" ]; then |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
456 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
457 | fi |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
458 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
459 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
460 | # final result |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
461 | if [ $ERROR -ne 0 ]; then |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
462 | echo |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
463 | echo "Error: Unresolved dependencies" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
464 | echo "$DEPENDENCIES_FAILED" |
52
afcb57893858
major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents:
51
diff
changeset
|
465 | abort_configure |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
466 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
467 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
468 | echo "configure finished" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
469 | echo |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
470 | echo "Build Config:" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
471 | echo " PREFIX: $PREFIX" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
472 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
34
diff
changeset
|
473 | echo "Features:" |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
474 | if [ -n "$FEATURE_PG" ]; then |
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
475 | echo " pg: on" |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
34
diff
changeset
|
476 | else |
67
e43d30273f74
check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
477 | echo " pg: off" |
47
78ee95836412
automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
34
diff
changeset
|
478 | fi |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
479 | echo |
66
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
480 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
481 | # generate the config.mk file |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
482 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
483 | # |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
484 | # config.mk generated by configure |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
485 | # |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
486 | |
dc758dcd4645
add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents:
63
diff
changeset
|
487 | __EOF__ |
71
b8d06f7b617c
fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents:
68
diff
changeset
|
488 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" |
b8d06f7b617c
fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents:
68
diff
changeset
|
489 | cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
490 | rm -Rf "$TEMP_DIR" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
491 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
492 |