ledger/acprep

39 lines
1.2 KiB
Bash
Executable file

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