ledger/acprep
2008-04-13 02:41:33 -04:00

47 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
touch AUTHORS COPYING
if which glibtoolize > /dev/null 2>&1; then
glibtoolize --automake -f -c
else
libtoolize --automake -f -c
fi
aclocal
autoheader
if [ "$1" = "--dist" ]; then
shift 1
automake -a -c -f -i
else
automake -a -c -f
fi
autoconf
INCDIRS="-I/sw/include -I/sw/include/boost -I/usr/include/httpd/xml"
#INCDIRS="$INCDIRS -I/sw/include/libofx"
INCDIRS="$INCDIRS -I/usr/include/python2.3"
INCDIRS="$INCDIRS -Wno-long-double"
LIBDIRS="-L/sw/lib -L/usr/local/lib -L/usr/lib/python2.3/config"
if [ "$1" = "--debug" ]; then
shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" \
--enable-debug --enable-python "$@"
elif [ "$1" = "--opt" ]; then
shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@"
elif [ "$1" = "--flat-opt" ]; then
shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450" "$@"
elif [ "$1" = "--safe-opt" ]; then
shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@"
elif [ "$1" = "--perf" ]; then
shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g -pg" "$@"
fi
rm AUTHORS COPYING