summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-04-26 16:06:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-04-26 16:06:31 +0200
commitd2f6b7e6f7ce7725d84c4f62bb04138fa5ed7b47 (patch)
tree53f1289039e4dce01ee6a85bcee044401bf505b0
parent9c453f5f71d52bf66da20ea4d1e7259991c7c57d (diff)
Add ability to specify C++ compiler1.4.0
-rwxr-xr-xdist.sh32
1 files changed, 24 insertions, 8 deletions
diff --git a/dist.sh b/dist.sh
index 932b1c5..41b4781 100755
--- a/dist.sh
+++ b/dist.sh
@@ -6,7 +6,9 @@
# -complete package/build libcutl and the ODB compiler; implies -rebuild
# -test
# -db <database>
-# -odb
+# -odb <odb-compiler-path>
+# -cxx <c++-compiler>
+# -cxxp <g++-plugin-compiler>
#
trap 'exit 1' ERR
@@ -25,6 +27,8 @@ rebuild=n
complete=n
db=
odb=$src_root/odb/odb/odb
+cxx=g++
+cxxp=g++-4.5
CXXFLAGS="-W -Wall -Wno-unknown-pragmas"
@@ -53,6 +57,16 @@ while [ $# -gt 0 ]; do
odb=$1
shift
;;
+ -cxx)
+ shift
+ cxx=$1
+ shift
+ ;;
+ -cxxp)
+ shift
+ cxxp=$1
+ shift
+ ;;
*)
error "unknown option: $1"
exit 1
@@ -114,7 +128,7 @@ if [ $complete = y ]; then
cd $out_root/odb
./bootstrap
- ./configure --with-libcutl=../libcutl CXX=g++-4.5 CXXFLAGS="$CXXFLAGS"
+ ./configure --with-libcutl=../libcutl CXX=$cxxp CXXFLAGS="$CXXFLAGS"
make -j 8
make dist
@@ -136,7 +150,7 @@ cd $out_root/libodb
if [ $rebuild = y ]; then
./bootstrap
- ./configure CXXFLAGS="$CXXFLAGS"
+ ./configure CXX=$cxx CXXFLAGS="$CXXFLAGS"
fi
make -j 8
@@ -156,7 +170,7 @@ cd $out_root/libodb-sqlite
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXXFLAGS="$CXXFLAGS"
+ ./configure --with-libodb=../libodb CXX=$cxx CXXFLAGS="$CXXFLAGS"
fi
make -j 8
@@ -176,7 +190,7 @@ cd $out_root/libodb-mysql
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXXFLAGS="$CXXFLAGS"
+ ./configure --with-libodb=../libodb CXX=$cxx CXXFLAGS="$CXXFLAGS"
fi
make -j 8
@@ -196,7 +210,7 @@ cd $out_root/libodb-tracer
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXXFLAGS="$CXXFLAGS"
+ ./configure --with-libodb=../libodb CXX=$cxx CXXFLAGS="$CXXFLAGS"
fi
make -j 8
@@ -216,7 +230,7 @@ cd $out_root/libodb-boost
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXXFLAGS="$CXXFLAGS"
+ ./configure --with-libodb=../libodb CXX=$cxx CXXFLAGS="$CXXFLAGS"
fi
make -j 8
@@ -236,7 +250,7 @@ cd $out_root/libodb-qt
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXXFLAGS="$CXXFLAGS"
+ ./configure --with-libodb=../libodb CXX=$cxx CXXFLAGS="$CXXFLAGS"
fi
make -j 8
@@ -275,6 +289,7 @@ for d in $db; do
--with-libodb-$d=../libodb-$d \
--with-libodb-boost=../libodb-boost \
--with-libodb-qt=../libodb-qt \
+CXX=$cxx \
CXXFLAGS="$CXXFLAGS" \
ODB=$odb
fi
@@ -322,6 +337,7 @@ for d in $db; do
--with-libodb-$d=../libodb-$d \
--with-libodb-boost=../libodb-boost \
--with-libodb-qt=../libodb-qt \
+CXX=$cxx \
CXXFLAGS="$CXXFLAGS" \
ODB=$odb
fi