Sun, 10 Sep 2023 13:10:07 +0200
make FeatureType.default an xs:boolean - fixes #296
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 | |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
3 | #foreach( $var in $vars ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
4 | #if( $var.exec ) |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
5 | ${var.varName}=`${var.value}` |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
6 | #else |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
7 | ${var.varName}=${var.value} |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
8 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
9 | #end |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
11 | #if ( ! $project.hasVar("PREFIX") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
12 | PREFIX=/usr |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
13 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
14 | #if ( ! $project.hasVar("EPREFIX") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
15 | EPREFIX=$PREFIX |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
16 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
17 | |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
18 | #if ( ! $project.hasVar("BINDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | BINDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
20 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
21 | #if ( ! $project.hasVar("SBINDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | SBINDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
23 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
24 | #if ( ! $project.hasVar("LIBDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | LIBDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
26 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
27 | #if ( ! $project.hasVar("LIBEXECDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | LIBEXECDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
29 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
30 | #if ( ! $project.hasVar("DATADIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
31 | DATADIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
32 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
33 | #if ( ! $project.hasVar("SYSCONFDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
34 | SYSCONFDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
35 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
36 | #if ( ! $project.hasVar("SHAREDSTATEDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
37 | SHAREDSTATEDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
38 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
39 | #if ( ! $project.hasVar("LOCALSTATEDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
40 | LOCALSTATEDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
41 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
42 | #if ( ! $project.hasVar("INCLUDEDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
43 | INCLUDEDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
44 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
45 | #if ( ! $project.hasVar("INFODIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
46 | INFODIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
47 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
48 | #if ( ! $project.hasVar("MANDIR") ) |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
49 | MANDIR= |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
50 | #end |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
51 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
52 | OS=`uname -s` |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
53 | OS_VERSION=`uname -r` |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
54 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
55 | TEMP_DIR=".tmp-`uname -n`" |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
56 | mkdir -p "$TEMP_DIR" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
57 | if [ $? -ne 0 ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
58 | echo "Cannot create tmp dir" |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
59 | echo "Abort" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
60 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
61 | touch "$TEMP_DIR/options" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
62 | touch "$TEMP_DIR/features" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
63 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
64 | # features |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | #foreach( $feature in $features ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | #if( ${feature.isDefault()} ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
67 | ${feature.getVarName()}=on |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
68 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
69 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
71 | # help text |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
72 | printhelp() |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
73 | { |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
74 | echo "Usage: $0 [OPTIONS]..." |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
75 | cat << __EOF__ |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
76 | Installation directories: |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
77 | --prefix=PREFIX path prefix for architecture-independent files |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
78 | [/usr] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
79 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
80 | [PREFIX] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
81 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
82 | --bindir=DIR user executables [EPREFIX/bin] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
83 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
84 | --libexecdir=DIR program executables [EPREFIX/libexec] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
85 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
86 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
87 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
88 | --libdir=DIR object code libraries [EPREFIX/lib] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
89 | --includedir=DIR C header files [PREFIX/include] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
90 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
91 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
92 | --infodir=DIR info documentation [DATAROOTDIR/info] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
93 | --mandir=DIR man documentation [DATAROOTDIR/man] |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
94 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
95 | #if( $options.size() > 0 ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
96 | Options: |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
97 | #foreach( $opt in $options ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
98 | --${opt.getArgument()}=${opt.getValuesString()} |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
99 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
100 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
101 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
102 | #if( $features.size() > 0 ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
103 | Optional Features: |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
104 | #foreach( $feature in $features ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
105 | #if( $feature.default ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
106 | --disable-${feature.arg} |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
107 | #else |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
108 | --enable-${feature.arg} |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
109 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
110 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
111 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
112 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
113 | __EOF__ |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
114 | } |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
115 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
116 | # |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
117 | # parse arguments |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
118 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
119 | #set( $D = '$' ) |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
120 | for ARG in "$@" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
121 | do |
16
4fac0e25ee04
improve posix shell compatibility
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
15
diff
changeset
|
122 | case "$ARG" in |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
123 | "--prefix="*) PREFIX=${D}{ARG#--prefix=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
124 | "--exec-prefix="*) EPREFIX=${D}{ARG#--exec-prefix=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
125 | "--bindir="*) BINDIR=${D}{ARG#----bindir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
126 | "--sbindir="*) SBINDIR=${D}{ARG#--sbindir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
127 | "--libdir="*) LIBDIR=${D}{ARG#--libdir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
128 | "--libexecdir="*) LIBEXECDIR=${D}{ARG#--libexecdir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
129 | "--datadir="*) DATADIR=${D}{ARG#--datadir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
130 | "--sysconfdir="*) SYSCONFDIR=${D}{ARG#--sysconfdir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
131 | "--sharedstatedir="*) SHAREDSTATEDIR=${D}{ARG#--sharedstatedir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
132 | "--localstatedir="*) LOCALSTATEDIR=${D}{ARG#--localstatedir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
133 | "--includedir="*) INCLUDEDIR=${D}{ARG#--includedir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
134 | "--infodir="*) INFODIR=${D}{ARG#--infodir=} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
135 | "--mandir"*) MANDIR=${D}{ARG#--mandir} ;; |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
136 | "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
137 | #foreach( $opt in $options ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
138 | "--${opt.getArgument()}="*) ${opt.getVarName()}=${D}{ARG#--${opt.getArgument()}=} ;; |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
139 | #end |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
140 | #foreach( $feature in $features ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
141 | "--enable-${feature.arg}") ${feature.getVarName()}=on ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
142 | "--disable-${feature.arg}") unset ${feature.getVarName()} ;; |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
143 | #end |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
144 | "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;; |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
145 | esac |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
146 | done |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
147 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
148 | # set dir variables |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
149 | if [ -z "$BINDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
150 | BINDIR=$EPREFIX/bin |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
151 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
152 | if [ -z "$SBINDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
153 | SBINDIR=$EPREFIX/sbin |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
154 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
155 | if [ -z "$LIBDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
156 | LIBDIR=$EPREFIX/lib |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
157 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
158 | if [ -z "$LIBEXEC" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
159 | LIBEXECDIR=$EPREFIX/libexec |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
160 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
161 | if [ -z "$DATADIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
162 | DATADIR=$PREFIX/share |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
163 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
164 | if [ -z "$SYSCONFDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
165 | SYSCONFDIR=$PREFIX/etc |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
166 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
167 | if [ -z "$SHAREDSTATEDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
168 | SHAREDSTATEDIR=$PREFIX/com |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
169 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
170 | if [ -z "$LOCALSTATEDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
171 | LOCALSTATEDIR=$PREFIX/var |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
172 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
173 | if [ -z "$INCLUDEDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
174 | INCLUDEDIR=$PREFIX/include |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
175 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
176 | if [ -z "$INFODIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
177 | INFODIR=$PREFIX/info |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
178 | fi |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
179 | if [ -z "$MANDIR" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
180 | MANDIR=$PREFIX/man |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
181 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
182 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
183 | which pkg-config > /dev/null |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
184 | if [ $? -eq 0 ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
185 | PKG_CONFIG=pkg-config |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
186 | else |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
187 | PKG_CONFIG=false |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
188 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
189 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
190 | # Simple uname based platform detection |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
191 | # $PLATFORM is used for platform dependent dependency selection |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
192 | printf "detect platform... " |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
193 | if [ "$OS" = "SunOS" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
194 | PLATFORM="solaris sunos unix svr4" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
195 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
196 | if [ "$OS" = "Linux" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
197 | PLATFORM="linux unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
198 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
199 | if [ "$OS" = "FreeBSD" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
200 | PLATFORM="freebsd bsd unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
201 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
202 | if [ "$OS" = "Darwin" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
203 | PLATFORM="macos osx bsd unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
204 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
205 | echo "$OS" | grep -i "MINGW" > /dev/null |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
206 | if [ $? -eq 0 ]; then |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
207 | PLATFORM="windows mingw" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
208 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
209 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
210 | if [ -z "$PLATFORM" ]; then |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
211 | PLATFORM="unix" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
212 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
213 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
214 | for p in $PLATFORM |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
215 | do |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
216 | PLATFORM_NAME=$p |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
217 | break |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
218 | done |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
219 | echo $PLATFORM_NAME |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
220 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
221 | isplatform() |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
222 | { |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
223 | for p in $PLATFORM |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
224 | do |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
225 | if [ "$p" = "$1" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
226 | return 0 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
227 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
228 | done |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
229 | return 1 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
230 | } |
11
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
231 | isnotplatform() |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
232 | { |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
233 | for p in $PLATFORM |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
234 | do |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
235 | if [ "$p" = "$1" ]; then |
11
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
236 | return 1 |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
237 | fi |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
238 | done |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
239 | return 0 |
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
240 | } |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
241 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
242 | # generate config.mk and config.h |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
243 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
244 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
245 | # config.mk generated by configure |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
246 | # |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
247 | |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
248 | # general vars |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
249 | #foreach( $var in $vars ) |
40
b42bfc9e9983
first minor code improvements
Mike Becker <universe@uap-core.de>
parents:
39
diff
changeset
|
250 | ${var.varName}=$${var.varName} |
7
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
251 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
252 | |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
253 | #if ( ! $project.hasVar("PREFIX") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
254 | PREFIX=$PREFIX |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
255 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
256 | #if ( ! $project.hasVar("EPREFIX") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
257 | EPREFIX=$EPREFIX |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
258 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
259 | |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
260 | #if ( ! $project.hasVar("BINDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
261 | BINDIR=$BINDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
262 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
263 | #if ( ! $project.hasVar("SBINDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
264 | SBINDIR=$SBINDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
265 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
266 | #if ( ! $project.hasVar("LIBDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
267 | LIBDIR=$LIBDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
268 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
269 | #if ( ! $project.hasVar("LIBEXECDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
270 | LIBEXECDIR=$LIBEXECDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
271 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
272 | #if ( ! $project.hasVar("DATADIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
273 | DATADIR=$DATADIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
274 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
275 | #if ( ! $project.hasVar("SYSCONFDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
276 | SYSCONFDIR=$SYSCONFDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
277 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
278 | #if ( ! $project.hasVar("SHAREDSTATEDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
279 | SHAREDSTATEDIR=$SHAREDSTATEDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
280 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
281 | #if ( ! $project.hasVar("LOCALSTATEDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
282 | LOCALSTATEDIR=$LOCALSTATEDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
283 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
284 | #if ( ! $project.hasVar("INCLUDEDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
285 | INCLUDEDIR=$INCLUDEDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
286 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
287 | #if ( ! $project.hasVar("INFODIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
288 | INFODIR=$INFODIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
289 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
290 | #if ( ! $project.hasVar("MANDIR") ) |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
291 | MANDIR=$MANDIR |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
292 | #end |
686991ae6e2f
add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
293 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
294 | __EOF__ |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
295 | |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
296 | echo > "$TEMP_DIR/make.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
297 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
298 | ENV_CFLAGS=$CFLAGS |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
299 | ENV_LDFLAGS=$LDFLAGS |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
300 | ENV_CXXFLAGS=$CXXFLAGS |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
301 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
302 | # Toolchain detection |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
303 | # this will insert make vars to config.mk |
13
cdf8bf4549c4
fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
304 | . make/toolchain.sh |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
305 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
306 | # add user specified flags to config.mk |
37
ef09f80e911e
add separating comment to config.mk
Mike Becker <universe@uap-core.de>
parents:
34
diff
changeset
|
307 | echo "# project specific flags" >> "$TEMP_DIR/config.mk" |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
308 | if [ -n "${ENV_CFLAGS}" ]; then |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
309 | echo "CFLAGS += $ENV_CFLAGS" >> "$TEMP_DIR/config.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
310 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
311 | if [ -n "${ENV_CXXFLAGS}" ]; then |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
312 | echo "CXXFLAGS += $ENV_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
313 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
314 | if [ -n "${ENV_LDFLAGS}" ]; then |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
315 | echo "LDFLAGS += $ENV_LDFLAGS" >> "$TEMP_DIR/config.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
316 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
317 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
318 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
319 | # DEPENDENCIES |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
320 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
321 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
322 | #foreach( $dependency in $namedDependencies ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
323 | dependency_${dependency.name}() |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
324 | { |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
325 | printf "checking for ${dependency.name}... " |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
326 | #foreach( $sub in $dependency.getSubdependencies() ) |
39
3ca85da78515
add RegressionTest - fixes #264
Mike Becker <universe@uap-core.de>
parents:
37
diff
changeset
|
327 | # dependency $sub.getFullName() |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
328 | while true |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
329 | do |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
330 | #if( $sub.platform ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
331 | if isnotplatform "${sub.platform}"; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
332 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
333 | fi |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
334 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
335 | #foreach( $not in $sub.getNotList() ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
336 | if isplatform "${not}"; then |
3
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
337 | break |
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
338 | fi |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
339 | #end |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
340 | #if( $sub.pkgconfig.size() > 0 ) |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
341 | if [ -z "$PKG_CONFIG" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
342 | break |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
343 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
344 | #end |
33
b77d51b3c9bb
dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents:
32
diff
changeset
|
345 | #foreach( $test in $sub.tests ) |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
346 | $test > /dev/null |
33
b77d51b3c9bb
dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents:
32
diff
changeset
|
347 | if [ $? -ne 0 ]; then |
b77d51b3c9bb
dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents:
32
diff
changeset
|
348 | break |
b77d51b3c9bb
dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents:
32
diff
changeset
|
349 | fi |
b77d51b3c9bb
dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents:
32
diff
changeset
|
350 | #end |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
351 | #foreach( $pkg in $sub.pkgconfig ) |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
352 | $PKG_CONFIG $pkg.getPkgConfigParam() |
12
a775e493d340
yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
11
diff
changeset
|
353 | if [ $? -ne 0 ] ; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
354 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
355 | fi |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
356 | TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
357 | TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
358 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
359 | #foreach( $flags in $sub.flags ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
360 | #if( $flags.exec ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
361 | $flags.value > /dev/null |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
362 | if [ $? -eq 0 ]; then |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
363 | TEMP_$flags.varName="$TEMP_$flags.varName `$flags.value`" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
364 | else |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
365 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
366 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
367 | #else |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
368 | TEMP_$flags.varName="$TEMP_$flags.varName $flags.value" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
369 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
370 | #end |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
371 | #if ( $sub.make.length() > 0 ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
372 | cat >> $TEMP_DIR/make.mk << __EOF__ |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
373 | # Dependency: $dependency.name |
2
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
374 | $sub.make |
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
375 | __EOF__ |
3
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
376 | #end |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
377 | echo yes |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
378 | return 0 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
379 | done |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
380 | |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
381 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
382 | echo no |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
383 | return 1 |
0
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 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
386 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
387 | DEPENDENCIES_FAILED= |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
388 | ERROR=0 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
389 | #if( $dependencies.size() > 0 ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
390 | # general dependencies |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
391 | TEMP_CFLAGS= |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
392 | TEMP_LDFLAGS= |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
393 | #foreach( $dependency in $dependencies ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
394 | while true |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
395 | do |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
396 | #if( $dependency.platform ) |
11
215b49563679
more configure template fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
9
diff
changeset
|
397 | if isnotplatform "${dependency.platform}"; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
398 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
399 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
400 | #end |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
401 | #foreach( $not in $dependency.getNotList() ) |
3
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
402 | if isplatform "${not}"; then |
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
403 | break |
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
404 | fi |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
405 | #end |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
406 | while true |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
407 | do |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
408 | #if( $dependency.pkgconfig.size() > 0 ) |
9
ebdecbbb2f79
fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
7
diff
changeset
|
409 | if [ -z "$PKG_CONFIG" ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
410 | ERROR=1 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
411 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
412 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
413 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
414 | #foreach( $pkg in $dependency.pkgconfig ) |
41 | 415 | printf "checking for pkg-config package $pkg.name... " |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
416 | $PKG_CONFIG $pkg.getPkgConfigParam() |
12
a775e493d340
yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
11
diff
changeset
|
417 | if [ $? -ne 0 ]; then |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
418 | echo no |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
419 | ERROR=1 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
420 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
421 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
422 | echo yes |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
423 | TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
424 | TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
425 | #end |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
426 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
427 | #foreach( $flags in $dependency.flags ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
428 | #if( $flags.exec ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
429 | $flags.value > /dev/null |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
430 | if [ $? -ne 0 ]; then |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
431 | TEMP_$flags.varName="$TEMP_$flags.varName `$flags.value`" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
432 | else |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
433 | ERROR=1 |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
434 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
435 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
436 | #else |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
437 | TEMP_$flags.varName="$TEMP_$flags.varName $flags.value" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
438 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
439 | #end |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
440 | #if ( $dependency.make.length() > 0 ) |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
441 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
6
d4363f69fd97
fix unnamed dependency make code template
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
442 | $dependency.make |
2
14a4b7f0bc74
add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
443 | __EOF__ |
3
9d60baefa4ed
add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
444 | #end |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
445 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
446 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
447 | done |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
448 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
449 | break |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
450 | done |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
451 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
452 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
453 | # add general dependency flags to config.mk |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
454 | echo >> "$TEMP_DIR/config.mk" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
455 | if [ -n "${TEMP_CFLAGS}" ]; then |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
456 | echo "CFLAGS += $TEMP_CFLAGS" >> $TEMP_DIR/config.mk |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
457 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
458 | if [ -n "${TEMP_CXXFLAGS}" ]; then |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
459 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> $TEMP_DIR/config.mk |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
460 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
461 | if [ -n "${TEMP_LDFLAGS}" ]; then |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
462 | echo "LDFLAGS += $TEMP_LDFLAGS" >> $TEMP_DIR/config.mk |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
463 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
464 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
465 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
466 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
467 | # OPTION VALUES |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
468 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
469 | #foreach( $opt in $options ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
470 | #foreach( $val in $opt.values ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
471 | ${val.func}() |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
472 | { |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
473 | VERR=0 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
474 | #foreach( $dep in $val.dependencies ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
475 | dependency_$dep |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
476 | if [ $? -ne 0 ]; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
477 | VERR=1 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
478 | fi |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
479 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
480 | if [ $VERR -ne 0 ]; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
481 | return 1 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
482 | fi |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
483 | #foreach( $def in $val.defines ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
484 | TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}" |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
485 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
486 | #if( $val.hasMake() ) |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
487 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
488 | $val.make |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
489 | __EOF__ |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
490 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
491 | return 0 |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
492 | } |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
493 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
494 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
495 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
496 | # |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
497 | # TARGETS |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
498 | # |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
499 | TEMP_CFLAGS= |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
500 | TEMP_CXXFLAGS= |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
501 | TEMP_LDFLAGS= |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
502 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
503 | #foreach( $target in $targets ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
504 | #if ( $target.name ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
505 | # Target: $target.name |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
506 | #else |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
507 | # Target |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
508 | #end |
30
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
509 | TEMP_CFLAGS= |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
510 | TEMP_LDFLAGS= |
d4c38bb71fa0
don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
511 | TEMP_CXXFLAGS= |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
512 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
513 | #foreach( $dependency in $target.dependencies ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
514 | dependency_$dependency |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
515 | if [ $? -ne 0 ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
516 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} " |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
517 | ERROR=1 |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
518 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
519 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
520 | |
14
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
521 | # Features |
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
522 | #foreach( $feature in $target.features ) |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
523 | if [ -n "$${feature.getVarName()}" ]; then |
14
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
524 | #foreach( $dependency in $feature.dependencies ) |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
525 | # check dependency |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
526 | dependency_$dependency |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
527 | if [ $? -ne 0 ]; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
528 | # "auto" features can fail and are just disabled in this case |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
529 | if [ "$${feature.getVarName()}" != "auto" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
530 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} " |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
531 | ERROR=1 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
532 | fi |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
533 | fi |
14
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
534 | #end |
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
535 | fi |
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
536 | #end |
87fea7ab27de
implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
537 | |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
538 | #foreach( $opt in $target.options ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
539 | # Option: --${opt.argument} |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
540 | if [ -z ${D}${opt.getVarName()} ]; then |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
541 | SAVED_ERROR="$ERROR" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
542 | SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
543 | ERROR=0 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
544 | while true |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
545 | do |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
546 | #foreach( $optdef in $opt.defaults ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
547 | #if( $optdef.platform ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
548 | if isplatform "$optdef.platform"; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
549 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
550 | $optdef.func |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
551 | if [ $? -eq 0 ]; then |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
552 | echo " ${opt.argument}: ${optdef.valueName}" >> "$TEMP_DIR/options" |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
553 | ERROR=0 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
554 | break |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
555 | fi |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
556 | #if( $optdef.platform ) |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
557 | fi |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
558 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
559 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
560 | break |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
561 | done |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
562 | if [ $ERROR -ne 0 ]; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
563 | SAVED_ERROR=1 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
564 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
565 | ERROR="$SAVED_ERROR" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
566 | DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
567 | else |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
568 | if false; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
569 | false |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
570 | #foreach( $optval in $opt.values ) |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
571 | elif [ "${D}${opt.getVarName()}" = "${optval.value}" ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
572 | echo " ${opt.argument}: ${D}${opt.getVarName()}" >> $TEMP_DIR/options |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
573 | $optval.func |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
574 | if [ $? -ne 0 ]; then |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
575 | ERROR=1 |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
576 | fi |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
577 | #end |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
578 | fi |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
579 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
580 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
581 | |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
582 | echo >> "$TEMP_DIR/config.mk" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
583 | if [ -n "${TEMP_CFLAGS}" ]; then |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
584 | echo "${target.getCFlags()} += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
585 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
586 | if [ -n "${TEMP_CXXFLAGS}" ]; then |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
587 | echo "${target.getCXXFlags()} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
588 | fi |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
589 | if [ -n "${TEMP_LDFLAGS}" ]; then |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
590 | echo "${target.getLDFlags()} += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
591 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
592 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
593 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
594 | if [ $ERROR -ne 0 ]; then |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
595 | echo |
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
596 | echo "Error: Unresolved dependencies" |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
597 | echo "$DEPENDENCIES_FAILED" |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
598 | rm -Rf "$TEMP_DIR" |
32
c3132f7f19da
fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents:
30
diff
changeset
|
599 | exit 1 |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
600 | fi |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
601 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
602 | echo "configure finished" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
603 | echo |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
604 | echo "Build Config:" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
605 | echo " PREFIX: $PREFIX" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
606 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
607 | #if ( $options.size() > 0 ) |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
608 | echo "Options:" |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
609 | cat "$TEMP_DIR/options" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
610 | #end |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
611 | echo |
34
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
612 | cat "$TEMP_DIR/config.mk" "$TEMP_DIR/make.mk" > config.mk |
4486849e6a6c
fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents:
33
diff
changeset
|
613 | rm -Rf "$TEMP_DIR" |
0
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
614 | |
38775db5fdf5
add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
615 |