# LICENSE: Please view LICENSE file in the home dir of this Program
#********************************************************************
-SAT=minisat
-
while [ $# -gt 0 ]; do
case "$1" in
--with-prefix=*)
- arg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- PREFIX=$arg;;
+ PREFIX=${1#*=};;
+ --with-gcc=*)
+ CC=${1#*=};;
--with-g++=*)
- arg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- CXX=$arg
- echo "Using g++ instead of gcc";;
- --with-minisat-core)
- SAT=minisat;;
- --with-cryptominisat2)
- SAT=cryptominisat2;;
+ CXX=${1#*=};;
+ --with-fpic)
+ CFLAGS_FPIC=-fpic;;
*)
echo "Usage: $0 [options]"
echo " --with-prefix=/prefix/path Install STP at the specified path"
+ echo " --with-gcc=/path/to/gcc Use gcc at the specified path"
echo " --with-g++=/path/to/g++ Use g++ at the specified path"
- echo " --with-minisat-core Use core MiniSAT solver (default), runtime option to use simplifying"
- echo " --with-cryptominisat2 Use CRYPTOMiniSAT 2.x solver"
+ echo " --with-pic Required to build 64-bit shared libraries."
echo "$0 failed"
exit 1;;
esac
shift
done
-# check for an option --with-prefix=/path/to/prefix and use that as the
+# check for an option --with-prefix=/path/to/prefix and use that as the
# prefix, otherwise use /usr/local
PREFIX=${PREFIX:-/usr/local}
-echo "PREFIX=$PREFIX" > scripts/config.info
+echo "export PREFIX=$PREFIX" > scripts/config.info
echo "Setting prefix to... $PREFIX"
-if [ $CXX ]
-then echo "CXX=$CXX" >> scripts/config.info
-export CXX="$CXX"
-echo "Setting CXX to... $CXX"
-fi
-
-if [ ! -d $PREFIX/include ]
-then mkdir -p $PREFIX/include
+if [ -n "$CC" ]; then
+ echo "export CC=$CC" >> scripts/config.info
+ echo "Setting CC to... $CC"
fi
-
-if [ ! -d $PREFIX/bin ]
-then mkdir -p $PREFIX/bin
+if [ -n "$CXX" ]; then
+ echo "export CXX=$CXX" >> scripts/config.info
+ echo "Setting CXX to... $CXX"
fi
-
-if [ ! -d $PREFIX/lib ]
-then mkdir $PREFIX/lib
-fi
-
-if [ ! -d $PREFIX/include/stp ]
-then mkdir $PREFIX/include/stp
+if [ -n "$CFLAGS_FPIC" ]; then
+ echo "export CFLAGS_FPIC=$CFLAGS_FPIC" >> scripts/config.info
+ echo "Setting CFLAGS_FPIC to... $CFLAGS_FPIC"
fi
echo "STP is configured successfully."