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