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 |