configure

Sun, 30 Nov 2025 16:01:48 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 30 Nov 2025 16:01:48 +0100
changeset 1535
593e349b6d61
parent 1528
6a687a7caed8
permissions
-rwxr-xr-x

Added tag v3.2 for changeset 38d3f40a50ec

753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 #!/bin/sh
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
3
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
4 # some utility functions
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
5 isplatform()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
6 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
7 for p in $PLATFORM
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
8 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
9 if [ "$p" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
10 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
11 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
12 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
13 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
14 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
15 notisplatform()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
16 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
17 for p in $PLATFORM
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
18 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
19 if [ "$p" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
20 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
21 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
22 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
23 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
24 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
25 istoolchain()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
26 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
27 for t in $TOOLCHAIN
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
28 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
29 if [ "$t" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
30 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
31 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
32 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
33 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
34 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
35 notistoolchain()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
36 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
37 for t in $TOOLCHAIN
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
38 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
39 if [ "$t" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
40 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
41 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
42 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
43 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
44 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
45
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
46 # clean abort
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
47 abort_configure()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
48 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
49 rm -Rf "$TEMP_DIR"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
50 exit 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
51 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
52
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
53 # Test for availability of pkg-config
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
54 PKG_CONFIG=`command -v pkg-config`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
55 : ${PKG_CONFIG:="false"}
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
56
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
57 # Simple uname based platform detection
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
58 # $PLATFORM is used for platform dependent dependency selection
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
59 OS=`uname -s`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
60 OS_VERSION=`uname -r`
1335
158eb29f0b27 update uwproj - adds libdir detection w/o config.site
Mike Becker <universe@uap-core.de>
parents: 1330
diff changeset
61 ARCH=`uname -m`
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
62 printf "detect platform... "
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
63 if [ "$OS" = "SunOS" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
64 PLATFORM="solaris sunos unix svr4"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
65 elif [ "$OS" = "Linux" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
66 PLATFORM="linux unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
67 elif [ "$OS" = "FreeBSD" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
68 PLATFORM="freebsd bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
69 elif [ "$OS" = "OpenBSD" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
70 PLATFORM="openbsd bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
71 elif [ "$OS" = "NetBSD" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
72 PLATFORM="netbsd bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
73 elif [ "$OS" = "Darwin" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
74 PLATFORM="macos osx bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
75 elif echo "$OS" | grep -i "MINGW" > /dev/null; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
76 PLATFORM="windows mingw"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
77 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
78 : ${PLATFORM:="unix"}
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
79
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
80 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
81 echo "$PLATFORM_NAME"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
82
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
83
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
84 # help text
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
85 printhelp()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
86 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
87 echo "Usage: $0 [OPTIONS]..."
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
88 echo 'Configuration:'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
89 if true \
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
90 ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
91 :
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
92 if test -z "$prefix__described__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
93 prefix__described__=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
94 cat << '__EOF__'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
95 --prefix path prefix for architecture-independent files [/usr]
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
96 __EOF__
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
97 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
98 if test -z "$exec_prefix__described__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
99 exec_prefix__described__=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
100 cat << '__EOF__'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
101 --exec-prefix path prefix for architecture-dependent files [PREFIX]
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
102 __EOF__
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
103 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
104 if test -z "$libdir__described__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
105 libdir__described__=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
106 cat << '__EOF__'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
107 --libdir object code libraries [EPREFIX/lib]
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
108 __EOF__
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
109 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
110 if test -z "$includedir__described__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
111 includedir__described__=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
112 cat << '__EOF__'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
113 --includedir C header files [PREFIX/include]
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
114 __EOF__
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
115 fi
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
116 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
117 if true \
1528
6a687a7caed8 fix that pkgconfdir is only different on FreeBSD
Mike Becker <universe@uap-core.de>
parents: 1526
diff changeset
118 && isplatform "freebsd" \
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
119 ; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
120 :
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
121 if test -z "$pkgconfigdir__described__"; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
122 pkgconfigdir__described__=1
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
123 cat << '__EOF__'
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
124 --pkgconfigdir location of the *.pc files
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
125 __EOF__
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
126 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
127 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
128 if true \
1528
6a687a7caed8 fix that pkgconfdir is only different on FreeBSD
Mike Becker <universe@uap-core.de>
parents: 1526
diff changeset
129 && notisplatform "freebsd" \
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
130 ; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
131 :
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
132 if test -z "$pkgconfigdir__described__"; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
133 pkgconfigdir__described__=1
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
134 cat << '__EOF__'
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
135 --pkgconfigdir location of the *.pc files
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
136 __EOF__
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
137 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
138 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
139 if true \
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
140 ; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
141 :
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
142 if test -z "$DOXYGEN__described__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
143 DOXYGEN__described__=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
144 cat << '__EOF__'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
145 --doxygen path of the Doxygen executable
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
146 __EOF__
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
147 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
148 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
149 cat << '__EOF__'
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
150
1017
b0098854071f add check for C23 compatibility
Mike Becker <universe@uap-core.de>
parents: 990
diff changeset
151 Build Types:
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
152 --debug add extra compile flags for debug builds
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
153 --release add extra compile flags for release builds
1017
b0098854071f add check for C23 compatibility
Mike Becker <universe@uap-core.de>
parents: 990
diff changeset
154
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
155 Optional Features:
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
156 --enable-api-docs run Doxygen during build
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
157 --enable-coverage test coverage with gcov
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
158 --enable-asan address sanitizer
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
159 --disable-memrchr
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
160 --disable-cxx-tests the check-cxx makefile target
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
161 --disable-szmul-builtin use custom implementation, instead
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
162
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
163 __EOF__
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
164 abort_configure
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
165 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
166
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 # create temporary directory
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 TEMP_DIR=".tmp-`uname -n`"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 rm -Rf "$TEMP_DIR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 if mkdir -p "$TEMP_DIR"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 echo "Cannot create tmp dir $TEMP_DIR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 echo "Abort"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 exit 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 touch "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 touch "$TEMP_DIR/features"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
180 # config variables
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
181 if true \
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
182 ; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
183 :
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
184 if test -z "$prefix__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
185 prefix__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
186 prefix='/usr'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
187 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
188 if test -z "$exec_prefix__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
189 exec_prefix__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
190 exec_prefix=''
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
191 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
192 if test -z "$libdir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
193 libdir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
194 libdir=''
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
195 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
196 if test -z "$includedir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
197 includedir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
198 includedir=''
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
199 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
200 if test -z "$VERSION__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
201 VERSION__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
202 VERSION='3.2.0'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
203 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
204 if test -z "$LIBVERSION__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
205 LIBVERSION__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
206 LIBVERSION='6.0.0'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
207 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
208 if test -z "$LIBVERSION_MAJOR__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
209 LIBVERSION_MAJOR__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
210 LIBVERSION_MAJOR='6'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
211 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
212 if test -z "$root_dir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
213 root_dir__initialized__=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
214 root_dir=`pwd`
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
215 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
216 if test -z "$build_dir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
217 build_dir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
218 build_dir='${root_dir}/build'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
219 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
220 if test -z "$docs_dir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
221 docs_dir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
222 docs_dir='${root_dir}/build/docs'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
223 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
224 if test -z "$dist_dir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
225 dist_dir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
226 dist_dir='${root_dir}/dist'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
227 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
228 if test -z "$MKDIR__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
229 MKDIR__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
230 MKDIR='/bin/mkdir -p'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
231 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
232 if test -z "$RMFILE__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
233 RMFILE__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
234 RMFILE='/bin/rm -f'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
235 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
236 if test -z "$RMDIR__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
237 RMDIR__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
238 RMDIR='/bin/rm -f -R'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
239 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
240 if test -z "$COPYFILE__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
241 COPYFILE__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
242 COPYFILE='/bin/cp -f'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
243 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
244 if test -z "$COPYALL__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
245 COPYALL__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
246 COPYALL='/bin/cp -f -R'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
247 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
248 if test -z "$SYMLINK__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
249 SYMLINK__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
250 SYMLINK='/bin/ln -s'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
251 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
252 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
253 if true \
1528
6a687a7caed8 fix that pkgconfdir is only different on FreeBSD
Mike Becker <universe@uap-core.de>
parents: 1526
diff changeset
254 && isplatform "freebsd" \
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
255 ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
256 :
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
257 if test -z "$pkgconfigdir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
258 pkgconfigdir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
259 pkgconfigdir='${exec_prefix}/libdata/pkgconfig'
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
260 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
261 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
262 if true \
1528
6a687a7caed8 fix that pkgconfdir is only different on FreeBSD
Mike Becker <universe@uap-core.de>
parents: 1526
diff changeset
263 && notisplatform "freebsd" \
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
264 ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
265 :
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
266 if test -z "$pkgconfigdir__initialized__"; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
267 pkgconfigdir__initialized__=1
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
268 pkgconfigdir='${libdir}/pkgconfig'
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
269 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
270 fi
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
271 if true \
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
272 ; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
273 :
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
274 if test -z "$DOXYGEN__initialized__"; then
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
275 DOXYGEN__initialized__=1
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
276 DOXYGEN=`command -v doxygen || echo '/bin/false'`
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
277 fi
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
278 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 # features
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
281 FEATURE_MEMRCHR=auto
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
282 FEATURE_CXX_TESTS=auto
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
283 FEATURE_SZMUL_BUILTIN=auto
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
284
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
285 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
286 # parse arguments
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
287 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
288 BUILD_TYPE="default"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
289 for ARG in "$@"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
290 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
291 case "$ARG" in
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
292 "--prefix="*) prefix=${ARG#--prefix=} ;;
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
293 "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;;
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
294 "--libdir="*) libdir=${ARG#--libdir=} ;;
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
295 "--includedir="*) includedir=${ARG#--includedir=} ;;
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
296 "--pkgconfigdir="*) pkgconfigdir=${ARG#--pkgconfigdir=} ;;
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
297 "--doxygen="*) DOXYGEN=${ARG#--doxygen=} ;;
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
298 "--help"*) printhelp ;;
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
299 "--debug") BUILD_TYPE="debug" ;;
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
300 "--release") BUILD_TYPE="release" ;;
1140
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
301 "--enable-api-docs") FEATURE_API_DOCS=on ;;
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
302 "--disable-api-docs") unset FEATURE_API_DOCS ;;
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
303 "--enable-coverage") FEATURE_COVERAGE=on ;;
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
304 "--disable-coverage") unset FEATURE_COVERAGE ;;
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
305 "--enable-asan") FEATURE_ASAN=on ;;
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
306 "--disable-asan") unset FEATURE_ASAN ;;
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
307 "--enable-memrchr") FEATURE_MEMRCHR=on ;;
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
308 "--disable-memrchr") unset FEATURE_MEMRCHR ;;
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
309 "--enable-cxx-tests") FEATURE_CXX_TESTS=on ;;
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
310 "--disable-cxx-tests") unset FEATURE_CXX_TESTS ;;
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
311 "--enable-szmul-builtin") FEATURE_SZMUL_BUILTIN=on ;;
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
312 "--disable-szmul-builtin") unset FEATURE_SZMUL_BUILTIN ;;
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313 "-"*) echo "unknown option: $ARG"; abort_configure ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 esac
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
317 # toolchain detection utilities
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
318 . make/toolchain.sh
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
319
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
320 # check languages
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
321 lang_c=
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
322 lang_cpp=
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
323 if detect_cpp_compiler ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
324 lang_cpp=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
325 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
326 if detect_c_compiler ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
327 lang_c=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
328 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
329
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
330
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
331
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 # set defaults for dir variables
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 : ${exec_prefix:="$prefix"}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334 : ${bindir:='${exec_prefix}/bin'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 : ${sbindir:='${exec_prefix}/sbin'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 : ${libdir:='${exec_prefix}/lib'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 : ${libexecdir:='${exec_prefix}/libexec'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338 : ${datarootdir:='${prefix}/share'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 : ${datadir:='${datarootdir}'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 : ${sharedstatedir:='${prefix}/com'}
1492
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
341 if [ -z "$sysconfdir" ]; then
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
342 if [ "$prefix" = '/usr' ]; then
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
343 sysconfdir='/etc'
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
344 else
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
345 sysconfdir='${prefix}/etc'
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
346 fi
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
347 fi
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
348 if [ -z "$localstatedir" ]; then
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
349 if [ "$prefix" = '/usr' ]; then
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
350 localstatedir='/var'
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
351 else
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
352 localstatedir='${prefix}/var'
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
353 fi
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
354 fi
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
355 if [ -z "$runstatedir" ]; then
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
356 if [ "$prefix" = '/usr' ]; then
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
357 runstatedir='/var/run'
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
358 else
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
359 runstatedir='${prefix}/var'
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
360 fi
cc83ce484bf7 update uwproj
Mike Becker <universe@uap-core.de>
parents: 1471
diff changeset
361 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
362 : ${includedir:='${prefix}/include'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 : ${infodir:='${datarootdir}/info'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364 : ${mandir:='${datarootdir}/man'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
365 : ${localedir:='${datarootdir}/locale'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
367
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
368 # check if a config.site exists and load it
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
369 CONFIG_SITE_OK=0
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 if [ -n "$CONFIG_SITE" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 # CONFIG_SITE may contain space separated file names
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 for cs in $CONFIG_SITE; do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 printf "loading defaults from $cs... "
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
374 if [ -f "$cs" ]; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
375 . "$cs"
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
376 echo ok
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
377 CONFIG_SITE_OK=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
378 break
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
379 else
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
380 echo "not found"
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
381 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 elif [ -f "$prefix/share/config.site" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 printf "loading site defaults... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
385 . "$prefix/share/config.site"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
386 echo ok
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
387 CONFIG_SITE_OK=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
388 elif [ -f "$prefix/etc/config.site" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
389 printf "loading site defaults... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
390 . "$prefix/etc/config.site"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
391 echo ok
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
392 CONFIG_SITE_OK=1
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
393 fi
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
394
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
395 if [ $CONFIG_SITE_OK -eq 0 ]; then
1335
158eb29f0b27 update uwproj - adds libdir detection w/o config.site
Mike Becker <universe@uap-core.de>
parents: 1330
diff changeset
396 # try to detect the correct libdir on our own, except it was changed by the user
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
397 if [ "$libdir" = '${exec_prefix}/lib' ] ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
398 if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
399 if [ "$OS" = "SunOS" ]; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
400 [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64'
1335
158eb29f0b27 update uwproj - adds libdir detection w/o config.site
Mike Becker <universe@uap-core.de>
parents: 1330
diff changeset
401 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
402 [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64'
1335
158eb29f0b27 update uwproj - adds libdir detection w/o config.site
Mike Becker <universe@uap-core.de>
parents: 1330
diff changeset
403 fi
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
404 elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
405 if [ "$OS" = "SunOS" ]; then
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
406 [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
407 else
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
408 [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
409 fi
1335
158eb29f0b27 update uwproj - adds libdir detection w/o config.site
Mike Becker <universe@uap-core.de>
parents: 1330
diff changeset
410 fi
158eb29f0b27 update uwproj - adds libdir detection w/o config.site
Mike Becker <universe@uap-core.de>
parents: 1330
diff changeset
411 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
413
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
414
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
415 # generate vars.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
416 cat > "$TEMP_DIR/vars.mk" << __EOF__
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
417 prefix=$prefix
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
418 exec_prefix=$exec_prefix
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
419 libdir=$libdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
420 includedir=$includedir
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
421 VERSION=$VERSION
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
422 LIBVERSION=$LIBVERSION
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
423 LIBVERSION_MAJOR=$LIBVERSION_MAJOR
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
424 root_dir=$root_dir
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
425 build_dir=$build_dir
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
426 docs_dir=$docs_dir
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
427 dist_dir=$dist_dir
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
428 MKDIR=$MKDIR
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
429 RMFILE=$RMFILE
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
430 RMDIR=$RMDIR
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
431 COPYFILE=$COPYFILE
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
432 COPYALL=$COPYALL
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
433 SYMLINK=$SYMLINK
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
434 pkgconfigdir=$pkgconfigdir
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
435 DOXYGEN=$DOXYGEN
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
436 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
437
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
438
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
439 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
440 # DEPENDENCIES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
441 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
442
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
443
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
444
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
445 # create buffer for make variables required by dependencies
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
446 echo > "$TEMP_DIR/make.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
448 test_pkg_config()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
449 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
450 if "$PKG_CONFIG" --exists "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
451 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
452 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
453 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
454 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
455 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
458 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
461 print_check_msg()
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
462 {
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
463 if [ -z "$1" ]; then
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
464 shift
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
465 printf "$@"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
466 fi
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
467 }
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
468
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
469 dependency_error_coverage()
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
470 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
471 print_check_msg "$dep_checked_coverage" "checking for coverage... "
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
472 # dependency coverage toolchain="gcc"
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
473 while true
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
474 do
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
475 if notistoolchain "gcc"; then
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
476 break
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
477 fi
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
478 if command -v gcovr > /dev/null 2>&1 ; then
1064
f3b04cd60776 change coverage tool from gcov to gcovr
Mike Becker <universe@uap-core.de>
parents: 1017
diff changeset
479 :
f3b04cd60776 change coverage tool from gcov to gcovr
Mike Becker <universe@uap-core.de>
parents: 1017
diff changeset
480 else
f3b04cd60776 change coverage tool from gcov to gcovr
Mike Becker <universe@uap-core.de>
parents: 1017
diff changeset
481 break
f3b04cd60776 change coverage tool from gcov to gcovr
Mike Becker <universe@uap-core.de>
parents: 1017
diff changeset
482 fi
788
b34ff44e6433 move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents: 772
diff changeset
483 TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}"
b34ff44e6433 move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents: 772
diff changeset
484 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
485 print_check_msg "$dep_checked_coverage" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
486 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
487 return 1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
488 done
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
489
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
490 print_check_msg "$dep_checked_coverage" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
491 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
492 return 0
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
493 }
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
494 dependency_error_asan()
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
495 {
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
496 print_check_msg "$dep_checked_asan" "checking for asan... "
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
497 # dependency asan toolchain="gnuc"
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
498 while true
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
499 do
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
500 if notistoolchain "gnuc"; then
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
501 break
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
502 fi
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
503 TEMP_CFLAGS="$TEMP_CFLAGS -fsanitize=address"
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
504 TEMP_LDFLAGS="$TEMP_LDFLAGS -fsanitize=address"
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
505 print_check_msg "$dep_checked_asan" "yes\n"
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
506 dep_checked_asan=1
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
507 return 1
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
508 done
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
509
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
510 print_check_msg "$dep_checked_asan" "no\n"
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
511 dep_checked_asan=1
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
512 return 0
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
513 }
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
514 dependency_error_cxx()
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
515 {
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
516 print_check_msg "$dep_checked_cxx" "checking for cxx... "
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
517 # dependency cxx
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
518 while true
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
519 do
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
520 if [ -z "$lang_cpp" ] ; then
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
521 break
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
522 fi
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
523 print_check_msg "$dep_checked_cxx" "yes\n"
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
524 dep_checked_cxx=1
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
525 return 1
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
526 done
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
527
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
528 print_check_msg "$dep_checked_cxx" "no\n"
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
529 dep_checked_cxx=1
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
530 return 0
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
531 }
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
532 dependency_error_memrchr()
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
533 {
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
534 print_check_msg "$dep_checked_memrchr" "checking for memrchr... "
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
535 # dependency memrchr
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
536 while true
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
537 do
1414
597cf869e8bc missing custom CFLAGS when testing for memrchr availability
Mike Becker <universe@uap-core.de>
parents: 1413
diff changeset
538 if $TOOLCHAIN_CC $CFLAGS -o /dev/null make/test_memrchr.c > /dev/null 2>&1 ; then
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
539 :
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
540 else
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
541 break
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
542 fi
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
543 TEMP_CFLAGS="$TEMP_CFLAGS -DWITH_MEMRCHR"
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
544 print_check_msg "$dep_checked_memrchr" "yes\n"
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
545 dep_checked_memrchr=1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
546 return 1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
547 done
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
548
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
549 # dependency memrchr
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
550 while true
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
551 do
1414
597cf869e8bc missing custom CFLAGS when testing for memrchr availability
Mike Becker <universe@uap-core.de>
parents: 1413
diff changeset
552 if $TOOLCHAIN_CC $CFLAGS -o /dev/null -D_GNU_SOURCE make/test_memrchr.c > /dev/null 2>&1 ; then
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
553 :
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
554 else
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
555 break
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
556 fi
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
557 TEMP_CFLAGS="$TEMP_CFLAGS -DWITH_MEMRCHR -DMEMRCHR_NEED_GNU"
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
558 print_check_msg "$dep_checked_memrchr" "yes\n"
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
559 dep_checked_memrchr=1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
560 return 1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
561 done
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
562
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
563 print_check_msg "$dep_checked_memrchr" "no\n"
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
564 dep_checked_memrchr=1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
565 return 0
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
566 }
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 dependency_error_doxygen()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
569 print_check_msg "$dep_checked_doxygen" "checking for doxygen... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 # dependency doxygen
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
572 do
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
573 if test -n "$DOXYGEN" > /dev/null 2>&1 ; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
574 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
576 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
577 fi
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
578 print_check_msg "$dep_checked_doxygen" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
579 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
580 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
581 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
582
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
583 print_check_msg "$dep_checked_doxygen" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
584 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
585 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
586 }
990
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
587 dependency_error_no_coverage()
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
588 {
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
589 print_check_msg "$dep_checked_no_coverage" "checking for no_coverage... "
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
590 # dependency no_coverage
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
591 while true
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
592 do
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
593 if test -z "$FEATURE_COVERAGE" > /dev/null 2>&1 ; then
990
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
594 :
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
595 else
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
596 break
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
597 fi
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
598 print_check_msg "$dep_checked_no_coverage" "yes\n"
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
599 dep_checked_no_coverage=1
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
600 return 1
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
601 done
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
602
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
603 print_check_msg "$dep_checked_no_coverage" "no\n"
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
604 dep_checked_no_coverage=1
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
605 return 0
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
606 }
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
607
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
608 # start collecting dependency information
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
609 echo > "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
610
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
611 DEPENDENCIES_FAILED=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
612 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
613 # unnamed dependencies
1017
b0098854071f add check for C23 compatibility
Mike Becker <universe@uap-core.de>
parents: 990
diff changeset
614 TEMP_CFLAGS="$CFLAGS"
b0098854071f add check for C23 compatibility
Mike Becker <universe@uap-core.de>
parents: 990
diff changeset
615 TEMP_CXXFLAGS="$CXXFLAGS"
b0098854071f add check for C23 compatibility
Mike Becker <universe@uap-core.de>
parents: 990
diff changeset
616 TEMP_LDFLAGS="$LDFLAGS"
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
617 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
618 do
1460
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
619 if notisplatform "macos"; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
620 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
621 fi
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
622 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
623 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
624 if [ -z "$lang_c" ] ; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
625 ERROR=1
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
626 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
627 fi
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
628
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
629 cat >> "$TEMP_DIR/make.mk" << __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
630 AR=ar
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
631 ARFLAGS=r
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
632 STLIB_EXT=.a
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
633 SHLIB_EXT=.dylib
1471
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1461
diff changeset
634
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1461
diff changeset
635 SHLIB_LDFLAGS=-dynamiclib -current_version \$(LIBVERSION) -compatibility_version \$(LIBVERSION)
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1461
diff changeset
636 INSTALL_LIB=\$(root_dir)/make/install-lib-macos.sh
1460
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
637 __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
638 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
639 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
640 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
641 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
642 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
643 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
644 if notisplatform "unix"; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
645 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
646 fi
1461
dfd79d615049 remove mingw support (we have MSVC support) + fix regression on macos platform
Mike Becker <universe@uap-core.de>
parents: 1460
diff changeset
647 if isplatform "macos" || istoolchain "macos"; then
dfd79d615049 remove mingw support (we have MSVC support) + fix regression on macos platform
Mike Becker <universe@uap-core.de>
parents: 1460
diff changeset
648 break
dfd79d615049 remove mingw support (we have MSVC support) + fix regression on macos platform
Mike Becker <universe@uap-core.de>
parents: 1460
diff changeset
649 fi
1460
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
650 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
651 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
652 if [ -z "$lang_c" ] ; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
653 ERROR=1
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
654 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
655 fi
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
656
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
657 cat >> "$TEMP_DIR/make.mk" << __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
658 AR=ar
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
659 ARFLAGS=cr
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
660 STLIB_EXT=.a
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
661 SHLIB_EXT=.so
1471
2309b553c604 install shared libs with a new install-lib script, with variants for normal unix and macos - fixes #752 broken macos dylib support
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1461
diff changeset
662 INSTALL_LIB=\$(root_dir)/make/install-lib.sh
1460
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
663 __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
664 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
665 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
666 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
667 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
668 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
669 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
670 if notistoolchain "gnuc"; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
671 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
672 fi
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
673 if isplatform "macos" || istoolchain "macos"; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
674 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
675 fi
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
676 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
677 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
678
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
679 cat >> "$TEMP_DIR/make.mk" << __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
680 SHLIB_LDFLAGS += -Wl,-soname,libucx\$(SHLIB_EXT).\$(LIBVERSION_MAJOR)
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
681 __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
682 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
683 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
684 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
685 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
686 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
687 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
688 if notistoolchain "suncc"; then
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
689 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
690 fi
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
691 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
692 do
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
693
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
694 cat >> "$TEMP_DIR/make.mk" << __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
695 SHLIB_LDFLAGS += -h libucx\$(SHLIB_EXT).\$(LIBVERSION_MAJOR)
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
696 __EOF__
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
697 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
698 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
699 break
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
700 done
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
701 while true
464f896249c1 add support for multiple parallel versions of ucx
Mike Becker <universe@uap-core.de>
parents: 1456
diff changeset
702 do
842
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
703 if notisplatform "solaris"; then
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
704 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
705 fi
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
706 while true
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
707 do
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
708
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
709 TEMP_LDFLAGS="$TEMP_LDFLAGS -lm"
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
710 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
711 done
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
712 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
713 done
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
714
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
715 # build type
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
716 if [ "$BUILD_TYPE" = "debug" ]; then
1330
caa66055b025 apply latest uwproj fixes
Mike Becker <universe@uap-core.de>
parents: 1320
diff changeset
717 TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS"
caa66055b025 apply latest uwproj fixes
Mike Becker <universe@uap-core.de>
parents: 1320
diff changeset
718 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS"
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
719 fi
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
720 if [ "$BUILD_TYPE" = "release" ]; then
1330
caa66055b025 apply latest uwproj fixes
Mike Becker <universe@uap-core.de>
parents: 1320
diff changeset
721 TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS"
caa66055b025 apply latest uwproj fixes
Mike Becker <universe@uap-core.de>
parents: 1320
diff changeset
722 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS"
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
723 fi
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
724
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
725 # add general dependency flags to flags.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
726 echo "# general flags" >> "$TEMP_DIR/flags.mk"
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
727 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
728 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
729 fi
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
730 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
731 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
732 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
733 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
734 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
735 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
736
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
737 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
738 # OPTION VALUES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
739 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
740
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
741 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
742 # TARGETS
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
743 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
744
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
745 echo >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
746 echo "configuring global target"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
747 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
748 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
749 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
750 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
751
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
752
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
753 # Features
1140
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
754 if [ -n "$FEATURE_API_DOCS" ]; then
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
755 # check dependency
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
756 if dependency_error_doxygen ; then
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
757 # "auto" features can fail and are just disabled in this case
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
758 if [ "$FEATURE_API_DOCS" = "auto" ]; then
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
759 DISABLE_FEATURE_API_DOCS=1
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
760 else
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
761 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED doxygen "
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
762 ERROR=1
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
763 fi
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
764 fi
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
765 if [ -n "$DISABLE_FEATURE_API_DOCS" ]; then
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
766 unset FEATURE_API_DOCS
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
767 fi
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
768 fi
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
769 if [ -n "$FEATURE_API_DOCS" ]; then
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
770 :
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
771 cat >> "$TEMP_DIR/make.mk" << __EOF__
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
772 # Documentation
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
773 WITH_API_DOCS=yes
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
774 __EOF__
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
775 else
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
776 :
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
777 fi
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
778 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
779 # check dependency
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
780 if dependency_error_coverage ; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
781 # "auto" features can fail and are just disabled in this case
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
782 if [ "$FEATURE_COVERAGE" = "auto" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
783 DISABLE_FEATURE_COVERAGE=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
784 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
785 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED coverage "
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
786 ERROR=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
787 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
788 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
789 if [ -n "$DISABLE_FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
790 unset FEATURE_COVERAGE
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
791 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
792 fi
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
793 if [ -n "$FEATURE_COVERAGE" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
794 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
795 else
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
796 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
797 fi
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
798 if [ -n "$FEATURE_ASAN" ]; then
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
799 # check dependency
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
800 if dependency_error_asan ; then
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
801 # "auto" features can fail and are just disabled in this case
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
802 if [ "$FEATURE_ASAN" = "auto" ]; then
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
803 DISABLE_FEATURE_ASAN=1
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
804 else
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
805 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED asan "
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
806 ERROR=1
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
807 fi
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
808 fi
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
809 if [ -n "$DISABLE_FEATURE_ASAN" ]; then
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
810 unset FEATURE_ASAN
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
811 fi
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
812 fi
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
813 if [ -n "$FEATURE_ASAN" ]; then
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
814 :
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
815 else
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
816 :
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
817 fi
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
818 if [ -n "$FEATURE_MEMRCHR" ]; then
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
819 # check dependency
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
820 if dependency_error_memrchr ; then
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
821 # "auto" features can fail and are just disabled in this case
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
822 if [ "$FEATURE_MEMRCHR" = "auto" ]; then
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
823 DISABLE_FEATURE_MEMRCHR=1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
824 else
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
825 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED memrchr "
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
826 ERROR=1
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
827 fi
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
828 fi
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
829 if [ -n "$DISABLE_FEATURE_MEMRCHR" ]; then
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
830 unset FEATURE_MEMRCHR
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
831 fi
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
832 fi
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
833 if [ -n "$FEATURE_MEMRCHR" ]; then
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
834 :
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
835 else
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
836 :
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
837 fi
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
838 if [ -n "$FEATURE_CXX_TESTS" ]; then
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
839 # check dependency
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
840 if dependency_error_cxx ; then
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
841 # "auto" features can fail and are just disabled in this case
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
842 if [ "$FEATURE_CXX_TESTS" = "auto" ]; then
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
843 DISABLE_FEATURE_CXX_TESTS=1
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
844 else
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
845 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED cxx "
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
846 ERROR=1
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
847 fi
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
848 fi
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
849 if [ -n "$DISABLE_FEATURE_CXX_TESTS" ]; then
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
850 unset FEATURE_CXX_TESTS
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
851 fi
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
852 fi
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
853 if [ -n "$FEATURE_CXX_TESTS" ]; then
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
854 :
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
855 cat >> "$TEMP_DIR/make.mk" << __EOF__
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
856 # Enable the check-cxx target
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
857 WITH_CXX_TEST=yes
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
858 __EOF__
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
859 else
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
860 :
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
861 fi
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
862 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
990
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
863 # check dependency
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
864 if dependency_error_no_coverage ; then
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
865 # "auto" features can fail and are just disabled in this case
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
866 if [ "$FEATURE_SZMUL_BUILTIN" = "auto" ]; then
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
867 DISABLE_FEATURE_SZMUL_BUILTIN=1
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
868 else
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
869 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED no_coverage "
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
870 ERROR=1
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
871 fi
f708863e7ec6 automatically disable szmul builtin when testing with coverage
Mike Becker <universe@uap-core.de>
parents: 988
diff changeset
872 fi
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
873 if [ -n "$DISABLE_FEATURE_SZMUL_BUILTIN" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
874 unset FEATURE_SZMUL_BUILTIN
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
875 fi
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
876 fi
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
877 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
878 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
879 else
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
880 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
881 TEMP_CFLAGS="$TEMP_CFLAGS -DCX_NO_SZMUL_BUILTIN"
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
882 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -DCX_NO_SZMUL_BUILTIN"
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
883 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
884
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
885
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
886 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
887 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
888 fi
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
889 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
890 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
891 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
892 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
893 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
894 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
895
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
896
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
897 # final result
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
898 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
899 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
900 echo "Error: Unresolved dependencies"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
901 echo "$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
902 abort_configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
903 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
904
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
905 echo "configure finished"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
906 echo
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
907 echo "Toolchain:"
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
908 echo " name: $TOOLCHAIN_NAME"
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
909 if [ -n "$TOOLCHAIN_CC" ]; then
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
910 echo " cc: $TOOLCHAIN_CC"
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
911 fi
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
912 if [ -n "$TOOLCHAIN_CXX" ]; then
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
913 echo " cxx: $TOOLCHAIN_CXX"
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
914 fi
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
915 if [ -n "$TOOLCHAIN_WSIZE" ]; then
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
916 echo " word size: $TOOLCHAIN_WSIZE bit"
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
917 fi
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
918 if [ -n "$TOOLCHAIN_CSTD" ]; then
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
919 echo " default C std: $TOOLCHAIN_CSTD"
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
920 fi
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
921 echo
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
922 echo "Config:"
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
923 printf ' %-16s' 'prefix:'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
924 echo "$prefix"
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
925 printf ' %-16s' 'exec-prefix:'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
926 echo "$exec_prefix"
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
927 printf ' %-16s' 'libdir:'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
928 echo "$libdir"
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
929 printf ' %-16s' 'includedir:'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
930 echo "$includedir"
1526
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
931 printf ' %-16s' 'pkgconfigdir:'
047f8a19f7fa add command line option for pkgconfigdir
Mike Becker <universe@uap-core.de>
parents: 1525
diff changeset
932 echo "$pkgconfigdir"
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
933 printf ' %-16s' 'doxygen:'
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
934 echo "$DOXYGEN"
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
935 echo
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
936 echo "Features:"
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
937 printf ' %-16s' 'api-docs:'
1140
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
938 if [ -n "$FEATURE_API_DOCS" ]; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
939 echo 'on'
1140
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
940 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
941 echo 'off'
1140
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents: 1064
diff changeset
942 fi
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
943 printf ' %-16s' 'coverage:'
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
944 if [ -n "$FEATURE_COVERAGE" ]; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
945 echo 'on'
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
946 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
947 echo 'off'
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
948 fi
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
949 printf ' %-16s' 'asan:'
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
950 if [ -n "$FEATURE_ASAN" ]; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
951 echo 'on'
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
952 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
953 echo 'off'
1320
f76b70a72614 add an option to enable address sanitizer
Mike Becker <universe@uap-core.de>
parents: 1310
diff changeset
954 fi
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
955 printf ' %-16s' 'memrchr:'
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
956 if [ -n "$FEATURE_MEMRCHR" ]; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
957 echo 'on'
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
958 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
959 echo 'off'
1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents: 1335
diff changeset
960 fi
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
961 printf ' %-16s' 'cxx-tests:'
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
962 if [ -n "$FEATURE_CXX_TESTS" ]; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
963 echo 'on'
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
964 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
965 echo 'off'
988
15b3ca7ee33f make ucx C++ compatible again (and add tests for it) - fixes #486
Mike Becker <universe@uap-core.de>
parents: 987
diff changeset
966 fi
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
967 printf ' %-16s' 'szmul-builtin:'
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
968 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
969 echo 'on'
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
970 else
1523
b5c32391802f update uwproj and fix pkgconfigdir location on BSD
Mike Becker <universe@uap-core.de>
parents: 1492
diff changeset
971 echo 'off'
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
972 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
973 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
974
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
975 # generate the config.mk file
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
976 pwd=`pwd`
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
977 cat > "$TEMP_DIR/config.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
978 #
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
979 # config.mk generated by:
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
980 # pwd: $pwd
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
981 # $0 $@
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
982 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
983
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
984 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
985 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
1310
ca52ea73a4ca update uwproj
Mike Becker <universe@uap-core.de>
parents: 1280
diff changeset
986 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
987 rm -Rf "$TEMP_DIR"

mercurial