summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in239
1 files changed, 103 insertions, 136 deletions
diff --git a/configure.in b/configure.in
index a4459c80..28f174ca 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@ AC_INIT([ledger],[3.0],[johnw@newartisans.com])
AC_CONFIG_SRCDIR(ledger)
AM_INIT_AUTOMAKE([dist-bzip2])
-AC_CONFIG_SRCDIR([src/main.cc])
+AC_CONFIG_SRCDIR([src/driver/main.cc])
AC_CONFIG_HEADER([acconf.h])
AC_CONFIG_SUBDIRS([gdtoa])
@@ -17,14 +17,6 @@ AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
-#AC_PROG_YACC
-#AC_PROG_LEX
-#if test "$LEX" != flex; then
-# LEX="$SHELL $missing_dir/missing flex"
-# AC_SUBST(LEX_OUTPUT_ROOT, lex.yy)
-# AC_SUBST(LEXLIB, '')
-#fi
-
# Checks for emacs lisp path
AM_PATH_LISPDIR
@@ -61,30 +53,35 @@ AC_CACHE_CHECK(
[if pipes can be used],
[pipes_avail],
[AC_LANG_PUSH(C++)
- 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];
- status = pipe(pfd);
- status = fork();
- if (status < 0) {
- ;
- } else if (status == 0) {
- char *arg0;
-
- status = dup2(pfd[0], STDIN_FILENO);
-
- close(pfd[1]);
- close(pfd[0]);
-
- execlp("", arg0, (char *)0);
- perror("execl");
- exit(1);
- } else {
- close(pfd[0]);
- }]])],[pipes_avail=true],[pipes_avail=false])
+ 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];
+ status = pipe(pfd);
+ status = fork();
+ if (status < 0) {
+ ;
+ } else if (status == 0) {
+ char *arg0;
+
+ status = dup2(pfd[0], STDIN_FILENO);
+
+ close(pfd[1]);
+ close(pfd[0]);
+
+ execlp("", arg0, (char *)0);
+ perror("execl");
+ exit(1);
+ } else {
+ close(pfd[0]);
+ }]])],
+ [pipes_avail=true],
+ [pipes_avail=false])
AC_LANG_POP])
if [test x$pipes_avail = xtrue ]; then
@@ -98,7 +95,12 @@ AC_CACHE_CHECK(
[boost_regex_save_libs=$LIBS
LIBS="-lboost_regex$BOOST_SUFFIX $LIBS"
AC_LANG_PUSH(C++)
- 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_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])
@@ -115,25 +117,30 @@ AC_CACHE_CHECK(
[boost_date_time_save_libs=$LIBS
LIBS="-lboost_date_time$BOOST_SUFFIX $LIBS"
AC_LANG_PUSH(C++)
- 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>
-
- using namespace boost::posix_time;
- using namespace boost::date_time;
-
- #include <ctime>
-
- 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::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])
+ 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>
+
+ using namespace boost::posix_time;
+ using namespace boost::date_time;
+
+ #include <ctime>
+
+ 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::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])
AC_LANG_POP
LIBS=$boost_date_time_save_libs])
@@ -150,7 +157,12 @@ AC_CACHE_CHECK(
[boost_filesystem_save_libs=$LIBS
LIBS="-lboost_filesystem$BOOST_SUFFIX $LIBS"
AC_LANG_PUSH(C++)
- 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_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])
@@ -167,7 +179,12 @@ fi
# [boost_signals_save_libs=$LIBS
# LIBS="-lboost_signals$BOOST_SUFFIX $LIBS"
# AC_LANG_PUSH(C++)
-# 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_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])
#
@@ -196,71 +213,6 @@ else
AC_MSG_FAILURE("Could not find gmp library (set CPPFLAGS and LDFLAGS?)")
fi
-## check for expat or xmlparse
-#AC_ARG_ENABLE(xml,
-# [ --enable-xml Turn on support for XML parsing],
-# [case "${enableval}" in
-# yes) xml=true ;;
-# no) xml=false ;;
-# *) AC_MSG_ERROR(bad value ${enableval} for --enable-xml) ;;
-# esac],[xml=true])
-#
-#AM_CONDITIONAL(USE_XML, test x$xml = xtrue)
-#
-#if [test x$xml = xtrue ]; then
-# AC_CACHE_CHECK(
-# [if libexpat is available],
-# [libexpat_avail],
-# [libexpat_save_libs=$LIBS
-# LIBS="-lexpat $LIBS"
-# AC_LANG_PUSH(C++)
-# 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])
-# AC_LANG_POP
-# LIBS=$libexpat_save_libs])
-#
-# if [test x$libexpat_avail = xtrue ]; then
-# AM_CONDITIONAL(HAVE_EXPAT, true)
-# LIBS="-lexpat $LIBS"
-# else
-# AM_CONDITIONAL(HAVE_EXPAT, false)
-# fi
-#else
-# AM_CONDITIONAL(HAVE_EXPAT, false)
-#fi
-#
-#if [test x$xml = xtrue ]; then
-# if [test x$libexpat_avail = xfalse ]; then
-# AC_CACHE_CHECK(
-# [if libxmlparse is available],
-# [libxmlparse_avail],
-# [libxmlparse_save_libs=$LIBS
-# LIBS="-lxmlparse -lxmltok $LIBS"
-# AC_LANG_PUSH(C++)
-# 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])
-# AC_LANG_POP
-# LIBS=$libxmlparse_save_libs])
-#
-# if [test x$libxmlparse_avail = xtrue ]; then
-# AM_CONDITIONAL(HAVE_XMLPARSE, true)
-# LIBS="-lxmlparse -lxmltok $LIBS"
-# else
-# AM_CONDITIONAL(HAVE_XMLPARSE, false)
-# fi
-# else
-# AM_CONDITIONAL(HAVE_XMLPARSE, false)
-# fi
-#else
-# AM_CONDITIONAL(HAVE_XMLPARSE, false)
-#fi
-
# check for libofx
AC_ARG_ENABLE(ofx,
[ --enable-ofx Turn on support for OFX/OCF parsing],
@@ -279,7 +231,12 @@ if [test x$ofx = xtrue ]; then
[libofx_save_libs=$LIBS
LIBS="-lofx $LIBS"
AC_LANG_PUSH(C++)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#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])
@@ -313,12 +270,17 @@ 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_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])
+ 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])
AC_LANG_POP
LIBS=$boost_python_save_libs])
@@ -342,15 +304,20 @@ AC_CACHE_CHECK(
[cppunit_save_libs=$LIBS
LIBS="-lcppunit $LIBS"
AC_LANG_PUSH(C++)
- 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])
+ 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])
AC_LANG_POP
LIBS=$cppunit_save_libs])