#! /usr/bin/env bash # file : build/import/libboost/configure # author : Boris Kolpackov # copyright : Copyright (c) 2005-2009 Boris Kolpackov # license : GNU GPL v2; see accompanying LICENSE file # $1 - out config file # # bld_root - build root # project_name - project name # source $bld_root/dialog.bash $echo $echo "Configuring external dependency on 'boost libraries' for '$project_name'." $echo $echo $echo "Would you like to configure dependency on the installed version" $echo "of 'boost libraries' as opposed to the development build?" $echo installed=`read_y_n y` path= type= if [ "$installed" = "n" ]; then version= while [ -z "$version" ]; do $echo $echo "Please enter the 'boost' root directory." $echo root=`read_path --directory --exist` version=`sed -e 's/^#define BOOST_LIB_VERSION "\(.*\)"[ ]*$/\1/' -e t -e d \ $root/boost/version.hpp 2>/dev/null` if [ $? != 0 -o -z "$version" ]; then version= echo "Unable to read version information from $root/boost/version.hpp" fi done $echo $echo "Please select the library type you would like to use:" $echo $echo "(1) archive" $echo "(2) shared object" $echo type=`read_option "archive shared" "shared"` $echo $echo "For boost 1.34.0 and later, please enter the toolset version" $echo "that is embedded into the library names. For example, for" $echo "gcc34 enter 34. For previous versions of boost leave this" $echo "field blank." $echo toolset= read -e -p "[]: " toolset fi echo libboost_installed := $installed >$1 if [ "$installed" = "n" ]; then echo libboost_root := $root >>$1 echo libboost_type := $type >>$1 echo libboost_version := $version >>$1 echo libboost_toolset := $toolset >>$1 fi