summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-26 20:29:58 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-26 20:29:58 -0400
commitf0238fdd065ace9edbb65a45875f2f47a7a932d6 (patch)
tree7d6ec764907624d3439b9e36dfe93f4f0effd3d8
parent84e01c3b21435241e36350e0198ef7b88b698612 (diff)
downloadfork-ledger-f0238fdd065ace9edbb65a45875f2f47a7a932d6.tar.gz
fork-ledger-f0238fdd065ace9edbb65a45875f2f47a7a932d6.tar.bz2
fork-ledger-f0238fdd065ace9edbb65a45875f2f47a7a932d6.zip
use libtool, for making shared libraries
-rw-r--r--Makefile.am13
-rwxr-xr-xacprep5
-rw-r--r--configure.in (renamed from configure.ac)5
3 files changed, 13 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index a9466e9a..c9f64685 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,18 +1,19 @@
-noinst_LIBRARIES = libledger.a
-libledger_a_SOURCES = account.cc amount.cc autoxact.cc balance.cc binary.cc \
+lib_LTLIBRARIES = libledger.la
+libledger_la_SOURCES = account.cc amount.cc autoxact.cc balance.cc binary.cc \
config.cc datetime.cc format.cc ledger.cc option.cc parser.cc qif.cc \
quotes.cc textual.cc valexpr.cc value.cc walk.cc
if DEBUG
-libledger_a_CXXFLAGS = -DDEBUG_LEVEL=4
-libledger_a_SOURCES += debug.cc
+libledger_la_CXXFLAGS = -DDEBUG_LEVEL=4
+libledger_la_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
+libledger_la_SOURCES += gnucash.cc
endif
+libledger_la_LDFLAGS = -version-info 2:0
bin_PROGRAMS = ledger
if DEBUG
@@ -23,6 +24,6 @@ ledger_CXXFLAGS = -DSGI_STL_USE_SINGLE_CLIENT_ALLOCATOR=1
endif
endif
ledger_SOURCES = main.cc
-ledger_LDADD = $(LIBOBJS) libledger.a
+ledger_LDADD = $(LIBOBJS) libledger.la
info_TEXINFOS = ledger.texi
diff --git a/acprep b/acprep
index e5520514..f2652dfd 100755
--- a/acprep
+++ b/acprep
@@ -1,5 +1,6 @@
#!/bin/sh
+libtoolize -f
aclocal
autoheader
touch AUTHORS ChangeLog
@@ -15,10 +16,10 @@ autoconf
INCDIRS="-I/sw/include -I/usr/include/httpd/xml"
if [ "$1" = "--debug" ]; then
./configure CPPFLAGS="$INCDIRS" LDFLAGS=-L/sw/lib \
- CXXFLAGS="-g" --enable-debug
+ CXXFLAGS="-g" --enable-debug --disable-shared
elif [ "$1" = "--opt" ]; then
./configure CPPFLAGS="$INCDIRS" LDFLAGS=-L/sw/lib \
- CXXFLAGS="-fomit-frame-pointer -fastf -mcpu=7450" --enable-standalone
+ CXXFLAGS="-fomit-frame-pointer -fastf -mcpu=7450 -fPIC" --enable-standalone
elif [ "$1" = "--perf" ]; then
./configure CPPFLAGS="$INCDIRS" LDFLAGS=-L/sw/lib \
CXXFLAGS="-g -pg"
diff --git a/configure.ac b/configure.in
index 4f3492b6..3faa10fe 100644
--- a/configure.ac
+++ b/configure.in
@@ -10,7 +10,8 @@ AC_CONFIG_HEADER([acconf.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_MAKE_SET
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_LIBTOOL
# Checks for libraries.
AC_CHECK_LIB([gmp], [__gmpz_add], [],
@@ -27,7 +28,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 ;;