Port max. card. search alg. from svn -r3512 (#397) and (#56)
3 # This file is a part of LEMON, a generic C++ optimization library.
5 # Copyright (C) 2003-2009
6 # Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 # (Egervary Research Group on Combinatorial Optimization, EGRES).
9 # Permission to use, modify and distribute this software is granted
10 # provided that this copyright notice appears in all copies. For
11 # precise terms see the accompanying LICENSE file.
13 # This software is provided "AS IS" with no warranty of any kind,
14 # express or implied, and with no claim as to its suitability for any
18 if [ ! -f ~/.lemon-bootstrap ]; then
19 echo 'Create ~/.lemon-bootstrap'.
20 cat >~/.lemon-bootstrap <<EOF
22 # Default settings for bootstraping the LEMON source code repository
27 source ~/.lemon-bootstrap
28 if [ -f ../../../.lemon-bootstrap ]; then source ../../../.lemon-bootstrap; fi
29 if [ -f ../../.lemon-bootstrap ]; then source ../../.lemon-bootstrap; fi
30 if [ -f ../.lemon-bootstrap ]; then source ../.lemon-bootstrap; fi
31 if [ -f ./.lemon-bootstrap ]; then source ./.lemon-bootstrap; fi
34 function augment_config() {
35 if [ "x${!1}" == "x" ]; then
37 echo Add "'$1'" to '~/.lemon-bootstrap'.
38 echo >>~/.lemon-bootstrap
39 echo $3 >>~/.lemon-bootstrap
40 echo $1=$2 >>~/.lemon-bootstrap
44 augment_config LEMON_INSTALL_PREFIX /usr/local \
45 "# LEMON installation prefix"
47 augment_config GLPK_PREFIX /usr/local/ \
48 "# GLPK installation root prefix"
50 augment_config COIN_OR_PREFIX /usr/local/coin-or \
51 "# COIN-OR installation root prefix (used for CLP/CBC)"
53 augment_config SOPLEX_PREFIX /usr/local/soplex \
54 "# Soplex build prefix"
60 if [ "x$_an" == "x" ]; then
69 while [ "$ret" != "y" -a "$ret" != "n" -a "$ret" != "yes" -a "$ret" != "no" ]; do
72 if [ "$ret" != "y" -a "$ret" != "yes" ]; then
79 if yesorno "External build" "n"
84 if yesorno "Autoreconf" "y"
92 if yesorno "Optimize" "n"
99 if yesorno "Stop on warning" "y"
101 werror_flags=' -Werror'
106 cxx_flags="CXXFLAGS=-ggdb$opt_flags$werror_flags"
108 if yesorno "Check with valgrind" "n"
110 valgrind_flags=' --enable-valgrind'
115 if [ -f ${GLPK_PREFIX}/include/glpk.h ]; then
116 if yesorno "Use GLPK" "y"
118 glpk_flag="--with-glpk=$GLPK_PREFIX"
120 glpk_flag="--without-glpk"
123 glpk_flag="--without-glpk"
126 if [ -f ${COIN_OR_PREFIX}/include/coin/config_coinutils.h ]; then
127 if yesorno "Use COIN-OR (CBC/CLP)" "n"
129 coin_flag="--with-coin=$COIN_OR_PREFIX"
131 coin_flag="--without-coin"
134 coin_flag="--without-coin"
137 if [ -f ${SOPLEX_PREFIX}/src/soplex.h ]; then
138 if yesorno "Use Soplex" "n"
140 soplex_flag="--with-soplex=$SOPLEX_PREFIX"
142 soplex_flag="--without-soplex"
145 soplex_flag="--without-soplex"
148 if [ "x$AUTORE" == "xyes" ]; then
151 ${CONFIGURE_PATH}/configure --prefix=$LEMON_INSTALL_PREFIX \