configure

Sun, 30 Nov 2025 22:22:12 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 30 Nov 2025 22:22:12 +0100
changeset 87
84f94d476934
parent 86
db21aab20169
permissions
-rwxr-xr-x

update uwproj and fix echos in Makefile

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
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
3
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
4 # some utility functions
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
5 isplatform()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
6 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
7 for p in $PLATFORM
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
8 do
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
9 if [ "$p" = "$1" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
10 return 0
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
11 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
12 done
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
13 return 1
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
14 }
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
15 notisplatform()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
16 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
17 for p in $PLATFORM
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
18 do
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
19 if [ "$p" = "$1" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
20 return 1
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
21 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
22 done
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
23 return 0
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
24 }
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
25 istoolchain()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
26 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
27 for t in $TOOLCHAIN
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
28 do
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
29 if [ "$t" = "$1" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
30 return 0
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
31 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
32 done
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
33 return 1
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
34 }
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
35 notistoolchain()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
36 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
37 for t in $TOOLCHAIN
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
38 do
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
39 if [ "$t" = "$1" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
40 return 1
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
41 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
42 done
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
43 return 0
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
44 }
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
45
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
46 # clean abort
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
47 abort_configure()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
48 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
49 rm -Rf "$TEMP_DIR"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
50 exit 1
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
51 }
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
52
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
53 # Test for availability of pkg-config
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
54 PKG_CONFIG=`command -v pkg-config`
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
55 : ${PKG_CONFIG:="false"}
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
56
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
57 # Simple uname based platform detection
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
58 # $PLATFORM is used for platform dependent dependency selection
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
59 OS=`uname -s`
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
60 OS_VERSION=`uname -r`
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
61 ARCH=`uname -m`
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
62 printf "detect platform... "
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
63 if [ "$OS" = "SunOS" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
64 PLATFORM="solaris sunos unix svr4"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
65 elif [ "$OS" = "Linux" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
66 PLATFORM="linux unix"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
67 elif [ "$OS" = "FreeBSD" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
68 PLATFORM="freebsd bsd unix"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
69 elif [ "$OS" = "OpenBSD" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
70 PLATFORM="openbsd bsd unix"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
71 elif [ "$OS" = "NetBSD" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
72 PLATFORM="netbsd bsd unix"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
73 elif [ "$OS" = "Darwin" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
74 PLATFORM="macos osx bsd unix"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
75 elif echo "$OS" | grep -i "MINGW" > /dev/null; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
76 PLATFORM="windows mingw"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
77 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
78 : ${PLATFORM:="unix"}
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
79
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
80 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
81 echo "$PLATFORM_NAME"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
82
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
83
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
84 # help text
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
85 printhelp()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
86 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
87 echo "Usage: $0 [OPTIONS]..."
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
88 echo 'Configuration:'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
89 cat << '__EOF__'
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
90
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
91 Build Types:
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
92 --debug add extra compile flags for debug builds
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
93 --release add extra compile flags for release builds
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
94
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
95 __EOF__
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
96 abort_configure
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
97 }
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
98
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 # create temporary directory
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 TEMP_DIR=".tmp-`uname -n`"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 rm -Rf "$TEMP_DIR"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 if mkdir -p "$TEMP_DIR"; then
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 :
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 else
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 echo "Cannot create tmp dir $TEMP_DIR"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 echo "Abort"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 exit 1
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 touch "$TEMP_DIR/options"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 touch "$TEMP_DIR/features"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
112 # config variables
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 # features
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 # parse arguments
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
119 BUILD_TYPE="default"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120 for ARG in "$@"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 do
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 case "$ARG" in
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
123 "--help"*) printhelp ;;
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
124 "--debug") BUILD_TYPE="debug" ;;
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
125 "--release") BUILD_TYPE="release" ;;
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 "-"*) echo "unknown option: $ARG"; abort_configure ;;
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 esac
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 done
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
130 # toolchain detection utilities
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
131 . make/toolchain.sh
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
132
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
133 # check languages
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
134 lang_c=
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
135 lang_cpp=
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
136 if detect_c_compiler ; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
137 lang_c=1
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
138 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
139
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
141
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
142 # set defaults for dir variables
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
143 : ${exec_prefix:="$prefix"}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
144 : ${bindir:='${exec_prefix}/bin'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
145 : ${sbindir:='${exec_prefix}/sbin'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
146 : ${libdir:='${exec_prefix}/lib'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
147 : ${libexecdir:='${exec_prefix}/libexec'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
148 : ${datarootdir:='${prefix}/share'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
149 : ${datadir:='${datarootdir}'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
150 : ${sharedstatedir:='${prefix}/com'}
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
151 if [ -z "$sysconfdir" ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
152 if [ "$prefix" = '/usr' ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
153 sysconfdir='/etc'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
154 else
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
155 sysconfdir='${prefix}/etc'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
156 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
157 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
158 if [ -z "$localstatedir" ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
159 if [ "$prefix" = '/usr' ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
160 localstatedir='/var'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
161 else
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
162 localstatedir='${prefix}/var'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
163 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
164 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
165 if [ -z "$runstatedir" ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
166 if [ "$prefix" = '/usr' ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
167 runstatedir='/var/run'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
168 else
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
169 runstatedir='${prefix}/var'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
170 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
171 fi
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
172 : ${includedir:='${prefix}/include'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
173 : ${infodir:='${datarootdir}/info'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
174 : ${mandir:='${datarootdir}/man'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
175 : ${localedir:='${datarootdir}/locale'}
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
176
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
177
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
178 # check if a config.site exists and load it
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
179 CONFIG_SITE_OK=0
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
180 if [ -n "$CONFIG_SITE" ]; then
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
181 # 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
182 for cs in $CONFIG_SITE; do
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
183 printf "loading defaults from $cs... "
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
184 if [ -f "$cs" ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
185 . "$cs"
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
186 echo ok
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
187 CONFIG_SITE_OK=1
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
188 break
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
189 else
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
190 echo "not found"
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
191 fi
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
192 done
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
193 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
194 printf "loading site defaults... "
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
195 . "$prefix/share/config.site"
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
196 echo ok
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
197 CONFIG_SITE_OK=1
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
198 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
199 printf "loading site defaults... "
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
200 . "$prefix/etc/config.site"
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
201 echo ok
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
202 CONFIG_SITE_OK=1
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
203 fi
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
204
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
205 if [ $CONFIG_SITE_OK -eq 0 ]; then
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
206 # try to detect the correct libdir on our own, except it was changed by the user
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
207 if [ "$libdir" = '${exec_prefix}/lib' ] ; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
208 if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
209 if [ "$OS" = "SunOS" ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
210 [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64'
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
211 else
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
212 [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64'
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
213 fi
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
214 elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
215 if [ "$OS" = "SunOS" ]; then
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
216 [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
217 else
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
218 [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32'
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
219 fi
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
220 fi
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
221 fi
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
222 fi
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225 # generate vars.mk
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
226 cat > "$TEMP_DIR/vars.mk" << __EOF__
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
227 __EOF__
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229
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 # DEPENDENCIES
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
234
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
235
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236 # create buffer for make variables required by dependencies
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
237 echo > "$TEMP_DIR/make.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
238
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
239 test_pkg_config()
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
240 {
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
241 if "$PKG_CONFIG" --exists "$1" ; then :
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
242 else return 1 ; fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
243 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
244 else return 1 ; fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
245 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
246 else return 1 ; fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
247 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
248 else return 1 ; fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
249 return 0
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
250 }
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
251
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
252 print_check_msg()
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
253 {
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
254 if [ -z "$1" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
255 shift
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
256 printf "$@"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
257 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
258 }
68
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 # start collecting dependency information
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262 echo > "$TEMP_DIR/flags.mk"
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 DEPENDENCIES_FAILED=
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265 ERROR=0
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266 # unnamed dependencies
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
267 TEMP_CFLAGS="$CFLAGS"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
268 TEMP_CXXFLAGS="$CXXFLAGS"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
269 TEMP_LDFLAGS="$LDFLAGS"
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270 while true
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
271 do
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 while true
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 do
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 if [ -z "$lang_c" ] ; then
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 ERROR=1
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
276 break
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 break
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 done
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 break
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
282 done
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
283
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
284 # build type
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
285 if [ "$BUILD_TYPE" = "debug" ]; then
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
286 TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS"
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
287 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS"
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
288 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
289 if [ "$BUILD_TYPE" = "release" ]; then
86
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
290 TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS"
db21aab20169 update uwproj (fixes various configure bugs)
Mike Becker <universe@uap-core.de>
parents: 85
diff changeset
291 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS"
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
292 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
293
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
294 # add general dependency flags to flags.mk
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
295 echo "# general flags" >> "$TEMP_DIR/flags.mk"
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
296 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
297 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
298 fi
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
299 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
300 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
301 fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
302 if [ -n "${TEMP_LDFLAGS}" ]; then
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
303 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
304 fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
305
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
306 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
307 # OPTION VALUES
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
308 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
309
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
310 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 # TARGETS
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
312 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 echo >> "$TEMP_DIR/flags.mk"
74
ed9a5ffd1f13 update uwproj (adds support for config.site)
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
315 echo "configuring target: default"
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316 echo "# flags for target default" >> "$TEMP_DIR/flags.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 TEMP_CFLAGS=
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 TEMP_CXXFLAGS=
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 TEMP_LDFLAGS=
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322 # Features
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
324
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
325 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
326 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 fi
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
328 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
329 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
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 if [ -n "${TEMP_LDFLAGS}" ]; then
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 # final result
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 if [ $ERROR -ne 0 ]; then
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338 echo
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 echo "Error: Unresolved dependencies"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 echo "$DEPENDENCIES_FAILED"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
341 abort_configure
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
342 fi
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
344 echo "configure finished"
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
345 echo
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
346 echo "Toolchain:"
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
347 echo " name: $TOOLCHAIN_NAME"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
348 if [ -n "$TOOLCHAIN_CC" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
349 echo " cc: $TOOLCHAIN_CC"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
350 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
351 if [ -n "$TOOLCHAIN_CXX" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
352 echo " cxx: $TOOLCHAIN_CXX"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
353 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
354 if [ -n "$TOOLCHAIN_WSIZE" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
355 echo " word size: $TOOLCHAIN_WSIZE bit"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
356 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
357 if [ -n "$TOOLCHAIN_CSTD" ]; then
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
358 echo " default C std: $TOOLCHAIN_CSTD"
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
359 fi
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
360 echo
87
84f94d476934 update uwproj and fix echos in Makefile
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
361 echo "Config:"
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
362 echo
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364 # generate the config.mk file
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
365 pwd=`pwd`
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366 cat > "$TEMP_DIR/config.mk" << __EOF__
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 #
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
368 # config.mk generated by:
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
369 # pwd: $pwd
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
370 # $0 $@
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 #
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 __EOF__
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
374 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
85
6960d25eb0ba update uwproj
Mike Becker <universe@uap-core.de>
parents: 74
diff changeset
375 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
68
ae763178ee1e replace autoconf with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 rm -Rf "$TEMP_DIR"

mercurial