summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am10
-rw-r--r--Makefile.old (renamed from Makefile)31
-rw-r--r--configure.ac39
3 files changed, 50 insertions, 30 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..872e5bad
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,10 @@
+noinst_LIBRARIES = libledger.a
+libledger_a_SOURCES = account.cc amount.cc autoxact.cc balance.cc binary.cc \
+ config.cc datetime.cc debug.cc format.cc ledger.cc option.cc \
+ parser.cc qif.cc quotes.cc textual.cc valexpr.cc value.cc walk.cc
+
+bin_PROGRAMS = ledger
+ledger_SOURCES = main.cc
+ledger_LDADD = $(LIBOBJS) libledger.a
+
+info_TEXINFOS = ledger.texi
diff --git a/Makefile b/Makefile.old
index 5df8b62b..d0c6bd87 100644
--- a/Makefile
+++ b/Makefile.old
@@ -76,36 +76,7 @@ rebuild: clean deps all
deps: make.deps
-make.deps: Makefile
+make.deps: Makefile.old
cc -M $(INCS) $(CODE) main.cc > $@
include make.deps
-
-# These next rules are for my own use.
-
-install:
- make clean
- make DFLAGS="-O3 -fomit-frame-pointer -DDEBUG_LEVEL=0"
- cp ledger $(HOME)/bin
- strip $(HOME)/bin/ledger
-
-VERSION = $(shell scripts/version)
-
-dist:
- rm -fr /tmp/ledger-$(VERSION)
- rsync -av --exclude=".*" --exclude="TAGS" --exclude="version" \
- --exclude="_darcs/" --exclude="ledger.dat" --exclude="CVS/" \
- --exclude="1.7/" --exclude="*.out" --exclude="*~" \
- $(shell pwd)/ /tmp/ledger-$(VERSION)
- (cd /tmp/ledger-$(VERSION) && \
- make fullclean && make docs && \
- make clean && rm make.deps && \
- cat Makefile | sed 's/\/sw\//\/usr\/local\//g' > t && \
- mv t Makefile && \
- cat Makefile | sed 's/ -I\/usr\/include\/gcc.*//' > t && \
- mv t Makefile && \
- perl -ne 'print if 1 .. /^include make.deps/;' Makefile > t && \
- mv t Makefile && \
- cd /tmp && \
- tar cvzf $(HOME)/Sites/ledger/ledger-$(VERSION).tar.gz \
- ledger-$(VERSION))
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..8fe779ab
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,39 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT(ledger, 2.0, johnw@netartisans.com)
+AM_INIT_AUTOMAKE(ledger, 2.0)
+AC_CONFIG_SRCDIR([main.cc])
+AC_CONFIG_HEADER([acconf.h])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+# Checks for libraries.
+AC_CHECK_LIB([gmp], [__gmpz_add])
+AC_CHECK_LIB([pcre], [pcre_compile])
+AC_CHECK_LIB([xmlparse], [XML_ParserCreate])
+
+# Checks for header files.
+AC_STDC_HEADERS
+AC_HAVE_HEADERS(sys/stat.h)
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+# Checks for library functions.
+#AC_FUNC_ERROR_AT_LINE
+AC_HEADER_STDC
+#AC_FUNC_MALLOC
+#AC_FUNC_MKTIME
+#AC_FUNC_STAT
+#AC_FUNC_STRFTIME
+AC_CHECK_FUNCS([memset strchr strstr])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT