make/configure.vm

changeset 69
f70ba8f14b41
parent 45
2cb7fdd2ba18
equal deleted inserted replaced
68:5509c71f34b2 69:f70ba8f14b41
57 57
58 # Simple uname based platform detection 58 # Simple uname based platform detection
59 # $PLATFORM is used for platform dependent dependency selection 59 # $PLATFORM is used for platform dependent dependency selection
60 OS=`uname -s` 60 OS=`uname -s`
61 OS_VERSION=`uname -r` 61 OS_VERSION=`uname -r`
62 ARCH=`uname -m`
62 printf "detect platform... " 63 printf "detect platform... "
63 if [ "$OS" = "SunOS" ]; then 64 if [ "$OS" = "SunOS" ]; then
64 PLATFORM="solaris sunos unix svr4" 65 PLATFORM="solaris sunos unix svr4"
65 elif [ "$OS" = "Linux" ]; then 66 elif [ "$OS" = "Linux" ]; then
66 PLATFORM="linux unix" 67 PLATFORM="linux unix"
274 echo ok 275 echo ok
275 elif [ -f "$prefix/etc/config.site" ]; then 276 elif [ -f "$prefix/etc/config.site" ]; then
276 printf "loading site defaults... " 277 printf "loading site defaults... "
277 . "$prefix/etc/config.site" 278 . "$prefix/etc/config.site"
278 echo ok 279 echo ok
280 else
281 # try to detect the correct libdir on our own, except it was changed by the user
282 if test "$libdir" = '${exec_prefix}/lib'; then
283 if [ "$OS" = "SunOS" ]; then
284 test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64'
285 else
286 # check if the standard libdir even exists
287 if test -d "${exec_prefix}/lib" ; then
288 :
289 else
290 # if it does not, maybe a lib32 exists
291 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32'
292 fi
293 # now check if there is a special 64bit libdir that we should use
294 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do
295 if [ $ARCH = $i ]; then
296 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64'
297 break
298 fi
299 done
300 fi
301 fi
279 fi 302 fi
280 ]]# 303 ]]#
281 ## End of unparsed content ** 304 ## End of unparsed content **
282 305
283 # generate vars.mk 306 # generate vars.mk
375 if [ -z "$PKG_CONFIG" ]; then 398 if [ -z "$PKG_CONFIG" ]; then
376 break 399 break
377 fi 400 fi
378 #end 401 #end
379 #foreach( $test in $sub.tests ) 402 #foreach( $test in $sub.tests )
380 if $test > /dev/null ; then 403 if $test > /dev/null 2>&1 ; then
381 : 404 :
382 else 405 else
383 break 406 break
384 fi 407 fi
385 #end 408 #end
477 fi 500 fi
478 #end 501 #end
479 502
480 #foreach( $flags in $dependency.flags ) 503 #foreach( $flags in $dependency.flags )
481 #if( $flags.exec ) 504 #if( $flags.exec )
482 $flags.value > /dev/null
483 if tmp_flags=`$flags.value` ; then 505 if tmp_flags=`$flags.value` ; then
484 TEMP_$flags.varName="$TEMP_$flags.varName $tmp_flags" 506 TEMP_$flags.varName="$TEMP_$flags.varName $tmp_flags"
485 else 507 else
486 ERROR=1 508 ERROR=1
487 break 509 break

mercurial