| 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" |
| 242 : ${includedir:='${prefix}/include'} |
243 : ${includedir:='${prefix}/include'} |
| 243 : ${infodir:='${datarootdir}/info'} |
244 : ${infodir:='${datarootdir}/info'} |
| 244 : ${mandir:='${datarootdir}/man'} |
245 : ${mandir:='${datarootdir}/man'} |
| 245 : ${localedir:='${datarootdir}/locale'} |
246 : ${localedir:='${datarootdir}/locale'} |
| 246 |
247 |
| |
248 # remember the above values and compare them later |
| |
249 orig_bindir="$bindir" |
| |
250 orig_sbindir="$sbindir" |
| |
251 orig_libdir="$libdir" |
| |
252 orig_libexecdir="$libexecdir" |
| |
253 orig_datarootdir="$datarootdir" |
| |
254 orig_datadir="$datadir" |
| |
255 orig_sysconfdir="$sysconfdir" |
| |
256 orig_sharedstatedir="$sharedstatedir" |
| |
257 orig_localstatedir="$localstatedir" |
| |
258 orig_runstatedir="$runstatedir" |
| |
259 orig_includedir="$includedir" |
| |
260 orig_infodir="$infodir" |
| |
261 orig_mandir="$mandir" |
| |
262 orig_localedir="$localedir" |
| |
263 |
| 247 # check if a config.site exists and load it |
264 # check if a config.site exists and load it |
| 248 if [ -n "$CONFIG_SITE" ]; then |
265 if [ -n "$CONFIG_SITE" ]; then |
| 249 # CONFIG_SITE may contain space separated file names |
266 # CONFIG_SITE may contain space separated file names |
| 250 for cs in $CONFIG_SITE; do |
267 for cs in $CONFIG_SITE; do |
| 251 printf "loading defaults from $cs... " |
268 printf "loading defaults from $cs... " |
| 258 echo ok |
275 echo ok |
| 259 elif [ -f "$prefix/etc/config.site" ]; then |
276 elif [ -f "$prefix/etc/config.site" ]; then |
| 260 printf "loading site defaults... " |
277 printf "loading site defaults... " |
| 261 . "$prefix/etc/config.site" |
278 . "$prefix/etc/config.site" |
| 262 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 |
| 263 fi |
302 fi |
| 264 ]]# |
303 ]]# |
| 265 ## End of unparsed content ** |
304 ## End of unparsed content ** |
| 266 |
305 |
| 267 # generate vars.mk |
306 # generate vars.mk |
| 485 done |
524 done |
| 486 #end |
525 #end |
| 487 |
526 |
| 488 # build type |
527 # build type |
| 489 if [ "$BUILD_TYPE" = "debug" ]; then |
528 if [ "$BUILD_TYPE" = "debug" ]; then |
| 490 TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" |
529 TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" |
| 491 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" |
530 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" |
| 492 fi |
531 fi |
| 493 if [ "$BUILD_TYPE" = "release" ]; then |
532 if [ "$BUILD_TYPE" = "release" ]; then |
| 494 TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" |
533 TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" |
| 495 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" |
534 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" |
| 496 fi |
535 fi |
| 497 |
536 |
| 498 # add general dependency flags to flags.mk |
537 # add general dependency flags to flags.mk |
| 499 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
538 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
| 500 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
539 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
| 685 abort_configure |
724 abort_configure |
| 686 fi |
725 fi |
| 687 |
726 |
| 688 echo "configure finished" |
727 echo "configure finished" |
| 689 echo |
728 echo |
| |
729 echo "Toolchain" |
| |
730 echo " name: $TOOLCHAIN_NAME" |
| |
731 if [ -n "$TOOLCHAIN_CC" ]; then |
| |
732 echo " cc: $TOOLCHAIN_CC" |
| |
733 fi |
| |
734 if [ -n "$TOOLCHAIN_CXX" ]; then |
| |
735 echo " cxx: $TOOLCHAIN_CXX" |
| |
736 fi |
| |
737 if [ -n "$TOOLCHAIN_WSIZE" ]; then |
| |
738 echo " word size: $TOOLCHAIN_WSIZE bit" |
| |
739 fi |
| |
740 if [ -n "$TOOLCHAIN_CSTD" ]; then |
| |
741 echo " default C std: $TOOLCHAIN_CSTD" |
| |
742 fi |
| |
743 echo |
| 690 echo "Build Config:" |
744 echo "Build Config:" |
| 691 echo " PREFIX: $prefix" |
745 echo " prefix: $prefix" |
| 692 echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
746 echo " exec_prefix: $exec_prefix" |
| |
747 if [ "$orig_bindir" != "$bindir" ]; then |
| |
748 echo " bindir: $bindir" |
| |
749 fi |
| |
750 if [ "$orig_sbindir" != "$sbindir" ]; then |
| |
751 echo " sbindir: $sbindir" |
| |
752 fi |
| |
753 if [ "$orig_libdir" != "$libdir" ]; then |
| |
754 echo " libdir: $libdir" |
| |
755 fi |
| |
756 if [ "$orig_libexecdir" != "$libexecdir" ]; then |
| |
757 echo " libexecdir: $libexecdir" |
| |
758 fi |
| |
759 if [ "$orig_datarootdir" != "$datarootdir" ]; then |
| |
760 echo " datarootdir: $datarootdir" |
| |
761 fi |
| |
762 if [ "$orig_datadir" != "$datadir" ]; then |
| |
763 echo " datadir: $datadir" |
| |
764 fi |
| |
765 if [ "$orig_sysconfdir" != "$sysconfdir" ]; then |
| |
766 echo " sysconfdir: $sysconfdir" |
| |
767 fi |
| |
768 if [ "$orig_sharedstatedir" != "$sharedstatedir" ]; then |
| |
769 echo " sharedstatedir: $sharedstatedir" |
| |
770 fi |
| |
771 if [ "$orig_localstatedir" != "$localstatedir" ]; then |
| |
772 echo " localstatedir: $localstatedir" |
| |
773 fi |
| |
774 if [ "$orig_runstatedir" != "$runstatedir" ]; then |
| |
775 echo " runstatedir: $runstatedir" |
| |
776 fi |
| |
777 if [ "$orig_includedir" != "$includedir" ]; then |
| |
778 echo " includedir: $includedir" |
| |
779 fi |
| |
780 if [ "$orig_infodir" != "$infodir" ]; then |
| |
781 echo " infodir: $infodir" |
| |
782 fi |
| |
783 if [ "$orig_mandir" != "$mandir" ]; then |
| |
784 echo " mandir: $mandir" |
| |
785 fi |
| |
786 if [ "$orig_localedir" != "$localedir" ]; then |
| |
787 echo " localedir: $localedir" |
| |
788 fi |
| 693 #if ( $options.size() > 0 ) |
789 #if ( $options.size() > 0 ) |
| |
790 echo |
| 694 echo "Options:" |
791 echo "Options:" |
| 695 cat "$TEMP_DIR/options" |
792 cat "$TEMP_DIR/options" |
| 696 #end |
793 #end |
| 697 #if ( $features.size() > 0 ) |
794 #if ( $features.size() > 0 ) |
| |
795 echo |
| 698 echo "Features:" |
796 echo "Features:" |
| 699 #foreach( $feature in $features ) |
797 #foreach( $feature in $features ) |
| 700 if [ -n "${D}${feature.varName}" ]; then |
798 if [ -n "${D}${feature.varName}" ]; then |
| 701 echo " $feature.name: on" |
799 echo " $feature.name: on" |
| 702 else |
800 else |