| 256 : ${mandir:='${datarootdir}/man'} |
256 : ${mandir:='${datarootdir}/man'} |
| 257 : ${localedir:='${datarootdir}/locale'} |
257 : ${localedir:='${datarootdir}/locale'} |
| 258 |
258 |
| 259 |
259 |
| 260 # check if a config.site exists and load it |
260 # check if a config.site exists and load it |
| |
261 CONFIG_SITE_OK=0 |
| 261 if [ -n "$CONFIG_SITE" ]; then |
262 if [ -n "$CONFIG_SITE" ]; then |
| 262 # CONFIG_SITE may contain space separated file names |
263 # CONFIG_SITE may contain space separated file names |
| 263 for cs in $CONFIG_SITE; do |
264 for cs in $CONFIG_SITE; do |
| 264 printf "loading defaults from $cs... " |
265 printf "loading defaults from $cs... " |
| 265 . "$cs" |
266 if [ -f "$cs" ]; then |
| 266 echo ok |
267 . "$cs" |
| |
268 echo ok |
| |
269 CONFIG_SITE_OK=1 |
| |
270 break |
| |
271 else |
| |
272 echo "not found" |
| |
273 fi |
| 267 done |
274 done |
| 268 elif [ -f "$prefix/share/config.site" ]; then |
275 elif [ -f "$prefix/share/config.site" ]; then |
| 269 printf "loading site defaults... " |
276 printf "loading site defaults... " |
| 270 . "$prefix/share/config.site" |
277 . "$prefix/share/config.site" |
| 271 echo ok |
278 echo ok |
| |
279 CONFIG_SITE_OK=1 |
| 272 elif [ -f "$prefix/etc/config.site" ]; then |
280 elif [ -f "$prefix/etc/config.site" ]; then |
| 273 printf "loading site defaults... " |
281 printf "loading site defaults... " |
| 274 . "$prefix/etc/config.site" |
282 . "$prefix/etc/config.site" |
| 275 echo ok |
283 echo ok |
| 276 else |
284 CONFIG_SITE_OK=1 |
| |
285 fi |
| |
286 |
| |
287 if [ $CONFIG_SITE_OK -eq 0 ]; then |
| 277 # try to detect the correct libdir on our own, except it was changed by the user |
288 # try to detect the correct libdir on our own, except it was changed by the user |
| 278 if test "$libdir" = '${exec_prefix}/lib'; then |
289 if [ "$libdir" = '${exec_prefix}/lib' ] ; then |
| 279 if [ "$OS" = "SunOS" ]; then |
290 if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then |
| 280 test -d "${exec_prefix}/lib/64" && test "$TOOLCHAIN_WSIZE" = "64" && libdir='${exec_prefix}/lib/64' |
291 if [ "$OS" = "SunOS" ]; then |
| 281 else |
292 [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64' |
| 282 # check if the standard libdir even exists |
|
| 283 if test -d "${exec_prefix}/lib" ; then |
|
| 284 : |
|
| 285 else |
293 else |
| 286 # if it does not, maybe a lib32 exists |
294 [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64' |
| 287 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' |
|
| 288 fi |
295 fi |
| 289 if [ "$TOOLCHAIN_WSIZE" = "64" ]; then |
296 elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then |
| 290 # now check if there is a special 64bit libdir that we should use |
297 if [ "$OS" = "SunOS" ]; then |
| 291 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do |
298 [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32' |
| 292 if [ $ARCH = $i ]; then |
299 else |
| 293 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' |
300 [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32' |
| 294 break |
|
| 295 fi |
|
| 296 done |
|
| 297 fi |
301 fi |
| 298 fi |
302 fi |
| 299 fi |
303 fi |
| 300 fi |
304 fi |
| 301 ]]# |
305 ]]# |