106 --infodir=DIR info documentation [DATAROOTDIR/info] |
106 --infodir=DIR info documentation [DATAROOTDIR/info] |
107 --mandir=DIR man documentation [DATAROOTDIR/man] |
107 --mandir=DIR man documentation [DATAROOTDIR/man] |
108 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
108 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
109 |
109 |
110 Build Types: |
110 Build Types: |
111 --debug add extra compile flags for debug builds |
111 --debug add extra compile flags for debug builds |
112 --release add extra compile flags for release builds |
112 --release add extra compile flags for release builds |
113 #if( $options.size() > 0 ) |
113 #if( $options.size() > 0 ) |
114 |
114 |
115 Options: |
115 Options: |
116 #foreach( $opt in $options ) |
116 #foreach( $opt in $options ) |
117 --${opt.argument}=${opt.valuesString} |
117 --${opt.argument}=${opt.valuesString} |
242 : ${includedir:='${prefix}/include'} |
242 : ${includedir:='${prefix}/include'} |
243 : ${infodir:='${datarootdir}/info'} |
243 : ${infodir:='${datarootdir}/info'} |
244 : ${mandir:='${datarootdir}/man'} |
244 : ${mandir:='${datarootdir}/man'} |
245 : ${localedir:='${datarootdir}/locale'} |
245 : ${localedir:='${datarootdir}/locale'} |
246 |
246 |
|
247 # remember the above values and compare them later |
|
248 orig_bindir="$bindir" |
|
249 orig_sbindir="$sbindir" |
|
250 orig_libdir="$libdir" |
|
251 orig_libexecdir="$libexecdir" |
|
252 orig_datarootdir="$datarootdir" |
|
253 orig_datadir="$datadir" |
|
254 orig_sysconfdir="$sysconfdir" |
|
255 orig_sharedstatedir="$sharedstatedir" |
|
256 orig_localstatedir="$localstatedir" |
|
257 orig_runstatedir="$runstatedir" |
|
258 orig_includedir="$includedir" |
|
259 orig_infodir="$infodir" |
|
260 orig_mandir="$mandir" |
|
261 orig_localedir="$localedir" |
|
262 |
247 # check if a config.site exists and load it |
263 # check if a config.site exists and load it |
248 if [ -n "$CONFIG_SITE" ]; then |
264 if [ -n "$CONFIG_SITE" ]; then |
249 # CONFIG_SITE may contain space separated file names |
265 # CONFIG_SITE may contain space separated file names |
250 for cs in $CONFIG_SITE; do |
266 for cs in $CONFIG_SITE; do |
251 printf "loading defaults from $cs... " |
267 printf "loading defaults from $cs... " |
483 done |
499 done |
484 break |
500 break |
485 done |
501 done |
486 #end |
502 #end |
487 |
503 |
|
504 # build type |
|
505 if [ "$BUILD_TYPE" = "debug" ]; then |
|
506 TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" |
|
507 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" |
|
508 fi |
|
509 if [ "$BUILD_TYPE" = "release" ]; then |
|
510 TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" |
|
511 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" |
|
512 fi |
|
513 |
488 # add general dependency flags to flags.mk |
514 # add general dependency flags to flags.mk |
489 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
515 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
490 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
516 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
491 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
517 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
492 fi |
518 fi |
659 echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
685 echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
660 fi |
686 fi |
661 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
687 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
662 echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
688 echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
663 fi |
689 fi |
664 if [ "$BUILD_TYPE" = "debug" ]; then |
|
665 if [ -n "$lang_c" ]; then |
|
666 echo '${target.cFlags} += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
667 fi |
|
668 if [ -n "$lang_cpp" ]; then |
|
669 echo '${target.cxxFlags} += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
670 fi |
|
671 fi |
|
672 if [ "$BUILD_TYPE" = "release" ]; then |
|
673 if [ -n "$lang_c" ]; then |
|
674 echo '${target.cFlags} += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
675 fi |
|
676 if [ -n "$lang_cpp" ]; then |
|
677 echo '${target.cxxFlags} += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
678 fi |
|
679 fi |
|
680 if [ -n "${TEMP_LDFLAGS}" ]; then |
690 if [ -n "${TEMP_LDFLAGS}" ]; then |
681 echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
691 echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
682 fi |
692 fi |
683 |
693 |
684 #end |
694 #end |
691 abort_configure |
701 abort_configure |
692 fi |
702 fi |
693 |
703 |
694 echo "configure finished" |
704 echo "configure finished" |
695 echo |
705 echo |
|
706 echo "Toolchain" |
|
707 echo " name: $TOOLCHAIN_NAME" |
|
708 if [ -n "$TOOLCHAIN_CC" ]; then |
|
709 echo " cc: $TOOLCHAIN_CC" |
|
710 fi |
|
711 if [ -n "$TOOLCHAIN_CXX" ]; then |
|
712 echo " cxx: $TOOLCHAIN_CXX" |
|
713 fi |
|
714 if [ -n "$TOOLCHAIN_WSIZE" ]; then |
|
715 echo " word size: $TOOLCHAIN_WSIZE bit" |
|
716 fi |
|
717 if [ -n "$TOOLCHAIN_CSTD" ]; then |
|
718 echo " default C std: $TOOLCHAIN_CSTD" |
|
719 fi |
|
720 echo |
696 echo "Build Config:" |
721 echo "Build Config:" |
697 echo " PREFIX: $prefix" |
722 echo " prefix: $prefix" |
698 echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
723 echo " exec_prefix: $exec_prefix" |
|
724 if [ "$orig_bindir" != "$bindir" ]; then |
|
725 echo " bindir: $bindir" |
|
726 fi |
|
727 if [ "$orig_sbindir" != "$sbindir" ]; then |
|
728 echo " sbindir: $sbindir" |
|
729 fi |
|
730 if [ "$orig_libdir" != "$libdir" ]; then |
|
731 echo " libdir: $libdir" |
|
732 fi |
|
733 if [ "$orig_libexecdir" != "$libexecdir" ]; then |
|
734 echo " libexecdir: $libexecdir" |
|
735 fi |
|
736 if [ "$orig_datarootdir" != "$datarootdir" ]; then |
|
737 echo " datarootdir: $datarootdir" |
|
738 fi |
|
739 if [ "$orig_datadir" != "$datadir" ]; then |
|
740 echo " datadir: $datadir" |
|
741 fi |
|
742 if [ "$orig_sysconfdir" != "$sysconfdir" ]; then |
|
743 echo " sysconfdir: $sysconfdir" |
|
744 fi |
|
745 if [ "$orig_sharedstatedir" != "$sharedstatedir" ]; then |
|
746 echo " sharedstatedir: $sharedstatedir" |
|
747 fi |
|
748 if [ "$orig_localstatedir" != "$localstatedir" ]; then |
|
749 echo " localstatedir: $localstatedir" |
|
750 fi |
|
751 if [ "$orig_runstatedir" != "$runstatedir" ]; then |
|
752 echo " runstatedir: $runstatedir" |
|
753 fi |
|
754 if [ "$orig_includedir" != "$includedir" ]; then |
|
755 echo " includedir: $includedir" |
|
756 fi |
|
757 if [ "$orig_infodir" != "$infodir" ]; then |
|
758 echo " infodir: $infodir" |
|
759 fi |
|
760 if [ "$orig_mandir" != "$mandir" ]; then |
|
761 echo " mandir: $mandir" |
|
762 fi |
|
763 if [ "$orig_localedir" != "$localedir" ]; then |
|
764 echo " localedir: $localedir" |
|
765 fi |
699 #if ( $options.size() > 0 ) |
766 #if ( $options.size() > 0 ) |
|
767 echo |
700 echo "Options:" |
768 echo "Options:" |
701 cat "$TEMP_DIR/options" |
769 cat "$TEMP_DIR/options" |
702 #end |
770 #end |
703 #if ( $features.size() > 0 ) |
771 #if ( $features.size() > 0 ) |
|
772 echo |
704 echo "Features:" |
773 echo "Features:" |
705 #foreach( $feature in $features ) |
774 #foreach( $feature in $features ) |
706 if [ -n "${D}${feature.varName}" ]; then |
775 if [ -n "${D}${feature.varName}" ]; then |
707 echo " $feature.name: on" |
776 echo " $feature.name: on" |
708 else |
777 else |