test/configure

changeset 146
d27511c87b70
parent 145
1d2ac6c76bfd
child 159
b0344d89ade6
equal deleted inserted replaced
145:1d2ac6c76bfd 146:d27511c87b70
56 56
57 # Simple uname based platform detection 57 # Simple uname based platform detection
58 # $PLATFORM is used for platform dependent dependency selection 58 # $PLATFORM is used for platform dependent dependency selection
59 OS=`uname -s` 59 OS=`uname -s`
60 OS_VERSION=`uname -r` 60 OS_VERSION=`uname -r`
61 ARCH=`uname -m`
61 printf "detect platform... " 62 printf "detect platform... "
62 if [ "$OS" = "SunOS" ]; then 63 if [ "$OS" = "SunOS" ]; then
63 PLATFORM="solaris sunos unix svr4" 64 PLATFORM="solaris sunos unix svr4"
64 elif [ "$OS" = "Linux" ]; then 65 elif [ "$OS" = "Linux" ]; then
65 PLATFORM="linux unix" 66 PLATFORM="linux unix"
248 echo ok 249 echo ok
249 elif [ -f "$prefix/etc/config.site" ]; then 250 elif [ -f "$prefix/etc/config.site" ]; then
250 printf "loading site defaults... " 251 printf "loading site defaults... "
251 . "$prefix/etc/config.site" 252 . "$prefix/etc/config.site"
252 echo ok 253 echo ok
254 else
255 # try to detect the correct libdir on our own, except it was changed by the user
256 if test "$libdir" = '${exec_prefix}/lib'; then
257 if [ "$OS" = "SunOS" ]; then
258 test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64'
259 else
260 # check if the standard libdir even exists
261 if test -d "${exec_prefix}/lib" ; then
262 :
263 else
264 # if it does not, maybe a lib32 exists
265 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32'
266 fi
267 # now check if there is a special 64bit libdir that we should use
268 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do
269 if [ $ARCH = $i ]; then
270 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64'
271 break
272 fi
273 done
274 fi
275 fi
253 fi 276 fi
254 277
255 278
256 # generate vars.mk 279 # generate vars.mk
257 cat > "$TEMP_DIR/vars.mk" << __EOF__ 280 cat > "$TEMP_DIR/vars.mk" << __EOF__

mercurial