summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rwxr-xr-xacprep18
-rw-r--r--configure.ac11
3 files changed, 29 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 2b8c6c1f..a9466e9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,10 @@ libledger_a_SOURCES = account.cc amount.cc autoxact.cc balance.cc binary.cc \
if DEBUG
libledger_a_CXXFLAGS = -DDEBUG_LEVEL=4
libledger_a_SOURCES += debug.cc
+else
+if STANDALONE
+libledger_a_CXXFLAGS = -DSGI_STL_USE_SINGLE_CLIENT_ALLOCATOR=1
+endif
endif
if READ_GNUCASH
libledger_a_SOURCES += gnucash.cc
@@ -13,6 +17,10 @@ endif
bin_PROGRAMS = ledger
if DEBUG
ledger_CXXFLAGS = -DDEBUG_LEVEL=4
+else
+if STANDALONE
+ledger_CXXFLAGS = -DSGI_STL_USE_SINGLE_CLIENT_ALLOCATOR=1
+endif
endif
ledger_SOURCES = main.cc
ledger_LDADD = $(LIBOBJS) libledger.a
diff --git a/acprep b/acprep
index 87bcdb25..e5520514 100755
--- a/acprep
+++ b/acprep
@@ -1,6 +1,8 @@
#!/bin/sh
aclocal
+autoheader
+touch AUTHORS ChangeLog
if [ "$1" = "--dist" ]; then
automake -acfi
@@ -8,16 +10,18 @@ else
automake -acf
fi
-autoheader
autoconf
+INCDIRS="-I/sw/include -I/usr/include/httpd/xml"
if [ "$1" = "--debug" ]; then
- ./configure CPPFLAGS="-I/sw/include -I/usr/include/httpd/xml" \
- LDFLAGS=-L/sw/lib CXXFLAGS="-g" --enable-debug
+ ./configure CPPFLAGS="$INCDIRS" LDFLAGS=-L/sw/lib \
+ CXXFLAGS="-g" --enable-debug
elif [ "$1" = "--opt" ]; then
- ./configure CPPFLAGS="-I/sw/include -I/usr/include/httpd/xml" \
- LDFLAGS=-L/sw/lib CXXFLAGS="-fomit-frame-pointer -fastf -mcpu=7450"
+ ./configure CPPFLAGS="$INCDIRS" LDFLAGS=-L/sw/lib \
+ CXXFLAGS="-fomit-frame-pointer -fastf -mcpu=7450" --enable-standalone
elif [ "$1" = "--perf" ]; then
- ./configure CPPFLAGS="-I/sw/include -I/usr/include/httpd/xml" \
- LDFLAGS=-L/sw/lib CXXFLAGS="-g -pg"
+ ./configure CPPFLAGS="$INCDIRS" LDFLAGS=-L/sw/lib \
+ CXXFLAGS="-g -pg"
fi
+
+rm AUTHORS ChangeLog
diff --git a/configure.ac b/configure.ac
index d2430126..4f3492b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ AC_CHECK_LIB([xmlparse], [XML_ParserCreate],
# Check for options
AC_ARG_ENABLE(debug,
- [ --enable-debug Turn on debugging],
+ [ --enable-debug Turn on debugging],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
@@ -35,6 +35,15 @@ AC_ARG_ENABLE(debug,
esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
+AC_ARG_ENABLE(standalone,
+ [ --enable-standalone Build standalone on OS/X (see README)],
+ [case "${enableval}" in
+ yes) standalone=true ;;
+ no) standalone=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-standalone) ;;
+ esac],[standalone=false])
+AM_CONDITIONAL(STANDALONE, test x$standalone = xtrue)
+
# Checks for header files.
AC_STDC_HEADERS
AC_HAVE_HEADERS(sys/stat.h)