diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-11 07:23:22 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:44 -0400 |
commit | f397ef9cbc021e73db66cd93cff6ebd622678a0f (patch) | |
tree | 025cd4b3cb3558c2bdc7fe2cdfdaed6c11b99323 | |
parent | a1c225eeb6206195ddafebba9b5b4db1caf90f65 (diff) | |
download | fork-ledger-f397ef9cbc021e73db66cd93cff6ebd622678a0f.tar.gz fork-ledger-f397ef9cbc021e73db66cd93cff6ebd622678a0f.tar.bz2 fork-ledger-f397ef9cbc021e73db66cd93cff6ebd622678a0f.zip |
Upgraded automake file.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | Makefile.in | 68 | ||||
-rwxr-xr-x | acprep | 15 | ||||
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | configure.in | 98 | ||||
-rwxr-xr-x | verify.sh | 12 |
7 files changed, 92 insertions, 122 deletions
@@ -7,6 +7,7 @@ *.lo *.o .gdb_history +/configure.in~ Makefile UnitTests acconf.h @@ -15,8 +16,8 @@ autom4te.cache config.log config.status elc-stamp +ledger libtool pending stamp-h1 utils -ledger diff --git a/Makefile.am b/Makefile.am index 99e86a74..58457657 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ ESC_srcdir=`echo "$(srcdir)" | sed 's/\//\\\\\//g'` ESC_builddir=`echo "$(top_builddir)" | sed 's/\//\\\\\//g'` ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'` -EXTRA_DIST = docs tests +EXTRA_DIST = docs docs/ledger.pdf tests #(cd $(distdir)/docs; zip -r doxygen-html.zip html; rm -fr html) dist-hook: @@ -237,18 +237,18 @@ UnitTests_LDADD = $(lib_LTLIBRARIES) gdtoa/libgdtoa.la -lcppunit PyUnitTests_SOURCES = tests/python/PyUnitTests.py -PyUnitTests: $(srcdir)/tests/python/PyUnitTests.py +PyUnitTests): $(srcdir)/tests/python/PyUnitTests.py cat $(srcdir)/tests/python/PyUnitTests.py \ | sed "s/%srcdir%/$(ESC_srcdir)/g" \ | sed "s/%builddir%/$(ESC_builddir)/g" > $@ chmod 755 $@ fullcheck: check - MallocGuardEdges=1 \ - MallocScribble=1 \ - MallocPreScribble=1 \ + MallocGuardEdges=1 \ + MallocScribble=1 \ + MallocPreScribble=1 \ MallocCheckHeapStart=100 \ - MallocCheckHeapEach=100 \ + MallocCheckHeapEach=100 \ DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \ $(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify diff --git a/Makefile.in b/Makefile.in index 6f349752..112502ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,7 +55,7 @@ bin_PROGRAMS = ledger$(EXEEXT) @HAVE_BOOST_PYTHON_TRUE@@HAVE_XMLPARSE_TRUE@am__append_16 = xmlparse xmltok @HAVE_BOOST_PYTHON_TRUE@@HAVE_LIBOFX_TRUE@am__append_17 = ofx TESTS = UnitTests$(EXEEXT) $(am__EXEEXT_1) -@HAVE_BOOST_PYTHON_TRUE@am__append_18 = PyUnitTests +@HAVE_BOOST_PYTHON_TRUE@am__append_18 = PyUnitTests.py check_PROGRAMS = $(am__EXEEXT_2) subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_lisp_LISP) \ @@ -126,12 +126,12 @@ libpyledger_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(CXXFLAGS) $(libpyledger_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_BOOST_PYTHON_TRUE@am_libpyledger_la_rpath = -rpath $(libdir) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -@HAVE_BOOST_PYTHON_TRUE@am__EXEEXT_1 = PyUnitTests$(EXEEXT) +@HAVE_BOOST_PYTHON_TRUE@am__EXEEXT_1 = PyUnitTests.py$(EXEEXT) am__EXEEXT_2 = UnitTests$(EXEEXT) $(am__EXEEXT_1) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am_PyUnitTests_OBJECTS = -PyUnitTests_OBJECTS = $(am_PyUnitTests_OBJECTS) -PyUnitTests_LDADD = $(LDADD) +PyUnitTests_py_SOURCES = PyUnitTests.c +PyUnitTests_py_OBJECTS = PyUnitTests.$(OBJEXT) +PyUnitTests_py_LDADD = $(LDADD) nodist_UnitTests_OBJECTS = UnitTests-UnitTests.$(OBJEXT) \ UnitTests-t_utils.$(OBJEXT) UnitTests-t_times.$(OBJEXT) \ UnitTests-t_commodity.$(OBJEXT) UnitTests-t_amount.$(OBJEXT) \ @@ -159,15 +159,6 @@ ledger_so_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -177,13 +168,22 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libledger_la_SOURCES) $(nodist_libledger_la_SOURCES) \ - $(libpyledger_la_SOURCES) $(PyUnitTests_SOURCES) \ + $(libpyledger_la_SOURCES) PyUnitTests.c \ $(nodist_UnitTests_SOURCES) $(ledger_SOURCES) \ $(ledger_so_SOURCES) DIST_SOURCES = $(am__libledger_la_SOURCES_DIST) \ - $(libpyledger_la_SOURCES) $(PyUnitTests_SOURCES) \ - $(ledger_SOURCES) $(am__ledger_so_SOURCES_DIST) + $(libpyledger_la_SOURCES) PyUnitTests.c $(ledger_SOURCES) \ + $(am__ledger_so_SOURCES_DIST) am__dirstamp = $(am__leading_dot)dirstamp INFO_DEPS = $(srcdir)/docs/ledger.info am__TEXINFO_TEX_DIR = $(srcdir) @@ -469,7 +469,7 @@ all: $(BUILT_SOURCES) acconf.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .cc .dvi .lo .o .obj .ps +.SUFFIXES: .c .cc .dvi .lo .o .obj .ps am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -609,6 +609,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PyUnitTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnitTests-UnitTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnitTests-t_amount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnitTests-t_balance.Po@am__quote@ @@ -654,6 +655,27 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/py_utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyledger.Po@am__quote@ +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -1885,18 +1907,18 @@ dist-hook: @HAVE_BOOST_PYTHON_TRUE@ PYLIBS="$(PYLIBS)" SRCDIR="$(srcdir)" \ @HAVE_BOOST_PYTHON_TRUE@ python $(srcdir)/setup.py install --prefix=$(prefix) -PyUnitTests: $(srcdir)/tests/python/PyUnitTests.py +PyUnitTests.py: $(srcdir)/tests/python/PyUnitTests.py cat $(srcdir)/tests/python/PyUnitTests.py \ | sed "s/%srcdir%/$(ESC_srcdir)/g" \ | sed "s/%builddir%/$(ESC_builddir)/g" > $@ chmod 755 $@ fullcheck: check - MallocGuardEdges=1 \ - MallocScribble=1 \ - MallocPreScribble=1 \ + MallocGuardEdges=1 \ + MallocScribble=1 \ + MallocPreScribble=1 \ MallocCheckHeapStart=100 \ - MallocCheckHeapEach=100 \ + MallocCheckHeapEach=100 \ DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \ $(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify @@ -11,18 +11,11 @@ PYTHON_HOME="/Library/Frameworks/Python.framework/Versions/2.5" # linker flags for all the various build permutations I use for # testing and profiling. -LIBTOOLIZE=$(which glibtoolize 2>&1) - -if [ -x "$LIBTOOLIZE" ]; then - "$LIBTOOLIZE" --automake -f -c -else - libtoolize --automake -f -c +cmd=$(which glibtoolize 2>&1) +if [ -x "$cmd" ]; then + export LIBTOOLIZE="$cmd" fi - -aclocal -autoheader -automake -a -c -f -autoconf +autoreconf --install INCDIRS="-I/usr/local/include" @@ -19761,11 +19761,7 @@ fi # [boost_signals_save_libs=$LIBS # LIBS="-lboost_signals$BOOST_SUFFIX $LIBS" # AC_LANG_PUSH(C++) -# AC_TRY_LINK( -# [#include <boost/signal.hpp>], -# [boost::signal<void (void)> this_signal;], -# [boost_signals_cpplib_avail=true], -# [boost_signals_cpplib_avail=false]) +# AC_LINK_IFELSE([AC_LANG_PROGRAM([[# #include <boost/signal.hpp>]], [[# boost::signal<void (void)> this_signal;]])],[# boost_signals_cpplib_avail=true],[# boost_signals_cpplib_avail=false]) # AC_LANG_POP # LIBS=$boost_signals_save_libs]) # diff --git a/configure.in b/configure.in index 38521907..decaf635 100644 --- a/configure.in +++ b/configure.in @@ -1,9 +1,9 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59) +AC_PREREQ(2.61) -AC_INIT(ledger, 3.0-git, johnw@newartisans.com) +AC_INIT([ledger],[3.0-git],[johnw@newartisans.com]) AC_CONFIG_SRCDIR(ledger) AM_INIT_AUTOMAKE @@ -61,14 +61,12 @@ AC_CACHE_CHECK( [if pipes can be used], [pipes_avail], [AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <sys/types.h> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <stdlib.h> #include <string.h> - #include <stdio.h>], - [int status, pfd[2]; + #include <stdio.h>]], [[int status, pfd[2]; status = pipe(pfd); status = fork(); if (status < 0) { @@ -86,9 +84,7 @@ AC_CACHE_CHECK( exit(1); } else { close(pfd[0]); - }], - [pipes_avail=true], - [pipes_avail=false]) + }]])],[pipes_avail=true],[pipes_avail=false]) AC_LANG_POP]) if [test x$pipes_avail = xtrue ]; then @@ -102,11 +98,7 @@ AC_CACHE_CHECK( [boost_regex_save_libs=$LIBS LIBS="-lboost_regex$BOOST_SUFFIX $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <boost/regex.hpp>], - [boost::regex foo_regexp("Hello, world!");], - [boost_regex_avail=true], - [boost_regex_avail=false]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/regex.hpp>]], [[boost::regex foo_regexp("Hello, world!");]])],[boost_regex_avail=true],[boost_regex_avail=false]) AC_LANG_POP LIBS=$boost_regex_save_libs]) @@ -123,8 +115,7 @@ AC_CACHE_CHECK( [boost_date_time_save_libs=$LIBS LIBS="-lboost_date_time$BOOST_SUFFIX $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <boost/date_time/posix_time/posix_time.hpp> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/gregorian/gregorian.hpp> #include <boost/date_time/local_time_adjustor.hpp> #include <boost/date_time/time_duration.hpp> @@ -137,15 +128,12 @@ AC_CACHE_CHECK( inline ptime time_to_system_local(const ptime& when) { struct std::tm tm_gmt = to_tm(when); return from_time_t(mktime(&tm_gmt)); - }], - [ptime t10 = ptime(boost::gregorian::from_string("2007-01-15"), + }]], [[ptime t10 = ptime(boost::gregorian::from_string("2007-01-15"), ptime::time_duration_type()); ptime t12 = time_to_system_local(t10); - return t10 != t12;], - [boost_date_time_cpplib_avail=true], - [boost_date_time_cpplib_avail=false]) + return t10 != t12;]])],[boost_date_time_cpplib_avail=true],[boost_date_time_cpplib_avail=false]) AC_LANG_POP LIBS=$boost_date_time_save_libs]) @@ -162,11 +150,7 @@ AC_CACHE_CHECK( [boost_filesystem_save_libs=$LIBS LIBS="-lboost_filesystem$BOOST_SUFFIX $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <boost/filesystem/path.hpp>], - [boost::filesystem::path this_path("Hello");], - [boost_filesystem_cpplib_avail=true], - [boost_filesystem_cpplib_avail=false]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/filesystem/path.hpp>]], [[boost::filesystem::path this_path("Hello");]])],[boost_filesystem_cpplib_avail=true],[boost_filesystem_cpplib_avail=false]) AC_LANG_POP LIBS=$boost_filesystem_save_libs]) @@ -183,11 +167,7 @@ fi # [boost_signals_save_libs=$LIBS # LIBS="-lboost_signals$BOOST_SUFFIX $LIBS" # AC_LANG_PUSH(C++) -# AC_TRY_LINK( -# [#include <boost/signal.hpp>], -# [boost::signal<void (void)> this_signal;], -# [boost_signals_cpplib_avail=true], -# [boost_signals_cpplib_avail=false]) +# AC_LINK_IFELSE([AC_LANG_PROGRAM([[# #include <boost/signal.hpp>]], [[# boost::signal<void (void)> this_signal;]])],[# boost_signals_cpplib_avail=true],[# boost_signals_cpplib_avail=false]) # AC_LANG_POP # LIBS=$boost_signals_save_libs]) # @@ -204,13 +184,9 @@ AC_CACHE_CHECK( [libgmp_save_libs=$LIBS LIBS="-lgmp $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <gmp.h>], - [mpz_t bar; + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>]], [[mpz_t bar; mpz_init(bar); - mpz_clear(bar);], - [libgmp_avail=true], - [libgmp_avail=false]) + mpz_clear(bar);]])],[libgmp_avail=true],[libgmp_avail=false]) AC_LANG_POP LIBS=$libgmp_save_libs]) @@ -238,15 +214,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=true], - [libexpat_avail=false]) + }]], [[XML_Parser parser = XML_ParserCreate(NULL); + return parser != NULL;]])],[libexpat_avail=true],[libexpat_avail=false]) AC_LANG_POP LIBS=$libexpat_save_libs]) @@ -268,15 +240,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=true], - [libxmlparse_avail=false]) + }]], [[XML_Parser parser = XML_ParserCreate(NULL); + return parser != NULL;]])],[libxmlparse_avail=true],[libxmlparse_avail=false]) AC_LANG_POP LIBS=$libxmlparse_save_libs]) @@ -311,11 +279,7 @@ if [test x$ofx = xtrue ]; then [libofx_save_libs=$LIBS LIBS="-lofx $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <libofx.h>], - [ LibofxContextPtr libofx_context = libofx_get_new_context();], - [libofx_avail=true], - [libofx_avail=false]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libofx.h>]], [[ LibofxContextPtr libofx_context = libofx_get_new_context();]])],[libofx_avail=true],[libofx_avail=false]) AC_LANG_POP LIBS=$libofx_save_libs]) @@ -349,16 +313,12 @@ if [test x$python = xtrue ]; then [boost_python_save_libs=$LIBS LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <boost/python.hpp> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/python.hpp> using namespace boost::python; class foo {}; BOOST_PYTHON_MODULE(samp) { class_< foo > ("foo") ; - }], - [return 0], - [boost_python_cpplib_avail=true], - [boost_python_cpplib_avail=false]) + }]], [[return 0]])],[boost_python_cpplib_avail=true],[boost_python_cpplib_avail=false]) AC_LANG_POP LIBS=$boost_python_save_libs]) @@ -382,19 +342,15 @@ AC_CACHE_CHECK( [cppunit_save_libs=$LIBS LIBS="-lcppunit $LIBS" AC_LANG_PUSH(C++) - AC_TRY_LINK( - [#include <cppunit/CompilerOutputter.h> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cppunit/CompilerOutputter.h> #include <cppunit/TestResult.h> #include <cppunit/TestResultCollector.h> #include <cppunit/TestRunner.h> #include <cppunit/TextTestProgressListener.h> #include <cppunit/BriefTestProgressListener.h> #include <cppunit/XmlOutputter.h> - #include <cppunit/extensions/TestFactoryRegistry.h>], - [CPPUNIT_NS::TestResult controller; - CPPUNIT_NS::TestResultCollector result;], - [cppunit_avail=true], - [cppunit_avail=false]) + #include <cppunit/extensions/TestFactoryRegistry.h>]], [[CPPUNIT_NS::TestResult controller; + CPPUNIT_NS::TestResultCollector result;]])],[cppunit_avail=true],[cppunit_avail=false]) AC_LANG_POP LIBS=$cppunit_save_libs]) @@ -405,8 +361,8 @@ else fi # Checks for header files. -AC_STDC_HEADERS -AC_HAVE_HEADERS(sys/stat.h langinfo.h) +AC_HEADER_STDC +AC_CHECK_HEADERS([sys/stat.h langinfo.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL @@ -1,6 +1,10 @@ #!/bin/bash -TMPDIR=$HOME/tmp +if [ -d $HOME/tmp ]; then + TMPDIR=$HOME/tmp +else + TMPDIR=/tmp +fi if [ -d $TMPDIR/ledger ]; then sudo rm -fr $TMPDIR/ledger || exit 1 @@ -12,11 +16,9 @@ else LEDGER_GIT=http://newartisans.com/ledger.git fi -cd $TMPDIR - +cd $TMPDIR || exit 1 mkdir ledger || exit 1 - -cd ledger +cd ledger || exit 1 git clone $LEDGER_GIT local_git || exit 1 git clone -l local_git distcheck || exit 1 |