diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 82 |
1 files changed, 67 insertions, 15 deletions
@@ -66,6 +66,10 @@ do ICU_ROOT=`expr "x$option" : "x-*with-icu=\(.*\)"` ;; + -without-icu | --without-icu ) + flag_icu=no + ;; + -with-libraries=* | --with-libraries=* ) library_list=`expr "x$option" : "x-*with-libraries=\(.*\)"` if test "$library_list" != "all"; then @@ -150,9 +154,12 @@ Configuration: library names or "all" [all] --without-libraries=list build all libraries except the ones listed [] - --with-icu enable Unicode/ICU support in Regex [disabled] + --with-icu enable Unicode/ICU support in Regex + [automatically detected] + --without-icu disable Unicode/ICU support in Regex --with-icu=DIR specify the root of the ICU library installation - and enable Unicode/ICU support in Regex [disabled] + and enable Unicode/ICU support in Regex + [automatically detected] --with-python=PYTHON specify the Python executable [python] --with-python-root=DIR specify the root of the Python installation [automatically detected] @@ -229,6 +236,13 @@ fi # Find Python if test "x$flag_no_python" = x; then + result=`$PYTHON -c "exit" > /dev/null 2>&1` + if [ "$?" -ne "0" ]; then + flag_no_python=yes + fi +fi + +if test "x$flag_no_python" = x; then if test "x$PYTHON_VERSION" = x; then echo -n "Detecting Python version... " PYTHON_VERSION=`$PYTHON -c "import sys; print (\"%d.%d\" % (sys.version_info[0], sys.version_info[1]))"` @@ -240,31 +254,69 @@ if test "x$flag_no_python" = x; then PYTHON_ROOT=`$PYTHON -c "import sys; print sys.prefix"` echo $PYTHON_ROOT fi - - BJAM_CONFIG="$BJAM_CONFIG -sPYTHON_ROOT=$PYTHON_ROOT -sPYTHON_VERSION=$PYTHON_VERSION" fi # Configure ICU echo -n "Unicode/ICU support for Boost.Regex?... " -if test "x$flag_icu" = xyes; then +if test "x$flag_icu" != xno; then if test "x$ICU_ROOT" = x; then - BJAM_CONFIG="$BJAM_CONFIG -sHAVE_ICU=1" - echo "yes." + COMMON_ICU_PATHS="/usr /usr/local /sw" + for p in $COMMON_ICU_PATHS; do + if test -r $p/include/unicode/utypes.h; then + ICU_ROOT=$p + fi + done + + if test "x$ICU_ROOT" = x; then + echo "not found." + else + BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT" + echo "$ICU_ROOT" + fi else BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT" echo "$ICU_ROOT" fi else - echo "no." + echo "disabled." fi +# Backup the user's existing user-config.jam +JAM_CONFIG_OUT="$HOME/user-config.jam" +if test -r "$HOME/user-config.jam"; then + counter=1 + + while test -r "$HOME/user-config.jam.$counter"; do + counter=`expr $counter + 1` + done + + echo "Backing up existing Boost.Build configuration in $HOME/user-config.jam.$counter" + mv "$HOME/user-config.jam" "$HOME/user-config.jam.$counter" +fi + +# Generate user-config.jam +echo "Generating Boost.Build configuration in $HOME/user-config.jam..." +cat > $HOME/user-config.jam <<EOF +# Boost.Build Configuration +# Automatically generated by Boost configure + +# Compiler configuration +using $TOOLSET ; +EOF + +# - Python configuration +if test "x$flag_no_python" = x; then + cat >> $HOME/user-config.jam <<EOF +# Python configuration +using python : $PYTHON_VERSION : $PYTHON_ROOT ; +EOF +fi # Generate the Makefile echo "Generating Makefile..." cat > Makefile <<EOF BJAM=$BJAM -TOOLSET=$TOOLSET BJAM_CONFIG=$BJAM_CONFIG PREFIX=$PREFIX EPREFIX=$EPREFIX @@ -273,22 +325,22 @@ INCLUDEDIR=$INCLUDEDIR LIBS=$LIBS all: .dummy - @echo "\$(BJAM) \$(BJAM_CONFIG) -sTOOLS=\$(TOOLSET) \$(LIBS)" - @\$(BJAM) \$(BJAM_CONFIG) -sTOOLS=\$(TOOLSET) \$(LIBS) || \\ + @echo "\$(BJAM) \$(BJAM_CONFIG) \$(LIBS)" + @\$(BJAM) \$(BJAM_CONFIG) \$(LIBS) || \\ echo "Not all Boost libraries built properly." clean: .dummy - rm -rf bin + rm -rf bin.v1 distclean: clean rm -rf Makefile config.log check: .dummy - @cd status && ../\$(BJAM) \$(BJAM_CONFIG) -sTOOLS=\$(TOOLSET) test || echo "Some Boost regression tests failed. This is normal." + @cd status && ../\$(BJAM) \$(BJAM_CONFIG) test || echo "Some Boost regression tests failed. This is normal." install: .dummy - @echo "\$(BJAM) \$(BJAM_CONFIG) --prefix=\$(PREFIX) --exec-prefix=\$(EPREFIX) --libdir=\$(LIBDIR) --includedir=\$(INCLUDEDIR) -sTOOLS=\$(TOOLSET) \$(LIBS) install" - @\$(BJAM) \$(BJAM_CONFIG) --prefix=\$(PREFIX) --exec-prefix=\$(EPREFIX) --libdir=\$(LIBDIR) --includedir=\$(INCLUDEDIR) -sTOOLS=\$(TOOLSET) \$(LIBS) install || echo "Not all Boost libraries built properly." + @echo "\$(BJAM) \$(BJAM_CONFIG) --prefix=\$(PREFIX) --exec-prefix=\$(EPREFIX) --libdir=\$(LIBDIR) --includedir=\$(INCLUDEDIR) \$(LIBS) install" + @\$(BJAM) \$(BJAM_CONFIG) --prefix=\$(PREFIX) --exec-prefix=\$(EPREFIX) --libdir=\$(LIBDIR) --includedir=\$(INCLUDEDIR) \$(LIBS) install || echo "Not all Boost libraries built properly." .dummy: |