summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am20
-rw-r--r--configure.ac27
-rwxr-xr-xvalgrind.sh9
3 files changed, 26 insertions, 30 deletions
diff --git a/Makefile.am b/Makefile.am
index c198a5a0..8b0666ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -271,6 +271,12 @@ RegressionTests: $(srcdir)/test/regress.py
echo "python $(srcdir)/test/regress.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/regress" > $@
chmod 755 $@
+if HAVE_VALGRIND
+VALGRIND = valgrind
+else
+VALGRIND =
+endif
+
fullcheck: check
MallocGuardEdges=1 \
MallocScribble=1 \
@@ -278,7 +284,7 @@ fullcheck: check
MallocCheckHeapStart=100 \
MallocCheckHeapEach=100 \
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
- $(srcdir)/valgrind.sh $(top_builddir)/UnitTests$(EXEEXT) --verify
+ $(VALGRIND) $(top_builddir)/UnitTests$(EXEEXT) --verify
######################################################################
@@ -319,10 +325,14 @@ $(top_builddir)/doc/refman.pdf: $(top_builddir)/doc/html/index.html
docs: pdf $(top_builddir)/doc/refman.pdf
-fulltest:
+copy-sources:
rsync -av --delete $(srcdir)/ /tmp/ledger/
- (cd /tmp/ledger; \
- git clean -x -d -f; \
- ./myacprep --release --build -j3 distcheck)
+ (cd /tmp/ledger; git clean -x -d -f)
+
+release: copy-sources
+ (cd /tmp/ledger; ./myacprep --release --build -j3)
+
+release-distcheck: copy-sources
+ (cd /tmp/ledger; ./myacprep --release --build -j3 distcheck)
# Makefile.am ends here
diff --git a/configure.ac b/configure.ac
index 35e85067..18a1dca1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.61)
+AC_PREREQ(2.62)
m4_include([version.m4])
-AC_INIT([ledger],VERSION_NUMBER,[johnw@newartisans.com])
+AC_INIT([ledger],[VERSION_NUMBER],[johnw@newartisans.com])
AC_CONFIG_SRCDIR([src/main.cc])
AC_CONFIG_HEADER([acconf.h])
AM_INIT_AUTOMAKE([dist-bzip2])
@@ -16,6 +16,9 @@ AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
+AC_CHECK_PROG([VALGRIND_TEST], [valgrind], [true], [false])
+AM_CONDITIONAL(HAVE_VALGRIND, test x$VALGRIND_TEST = xtrue)
+
# Checks for emacs lisp path
AM_PATH_LISPDIR
@@ -123,15 +126,11 @@ if [test x$xml = xtrue ]; then
[libexpat_save_libs=$LIBS
LIBS="-lexpat $LIBS"
AC_LANG_PUSH(C++)
- AC_TRY_LINK(
- [#include <stdio.h>
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
extern "C" {
#include <expat.h> // expat XML parser
- }],
- [XML_Parser parser = XML_ParserCreate(NULL);
- return parser != NULL;],
- [libexpat_avail_cv_=true],
- [libexpat_avail_cv_=false])
+ }]], [[XML_Parser parser = XML_ParserCreate(NULL);
+ return parser != NULL;]])],[libexpat_avail_cv_=true],[libexpat_avail_cv_=false])
AC_LANG_POP
LIBS=$libexpat_save_libs])
@@ -153,15 +152,11 @@ if [test x$xml = xtrue ]; then
[libxmlparse_save_libs=$LIBS
LIBS="-lxmlparse -lxmltok $LIBS"
AC_LANG_PUSH(C++)
- AC_TRY_LINK(
- [#include <stdio.h>
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
extern "C" {
#include <xmlparse.h> // expat XML parser
- }],
- [XML_Parser parser = XML_ParserCreate(NULL);
- return parser != NULL;],
- [libxmlparse_avail_cv_=true],
- [libxmlparse_avail_cv_=false])
+ }]], [[XML_Parser parser = XML_ParserCreate(NULL);
+ return parser != NULL;]])],[libxmlparse_avail_cv_=true],[libxmlparse_avail_cv_=false])
AC_LANG_POP
LIBS=$libxmlparse_save_libs])
diff --git a/valgrind.sh b/valgrind.sh
deleted file mode 100755
index fe292f44..00000000
--- a/valgrind.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-VALGRIND=$(which valgrind 2>&1)
-
-if [ -x "$VALGRIND" ]; then
- exec "$VALGRIND" --leak-check=full --show-reachable=yes "$@"
-else
- exec "$@"
-fi