1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(ledger, 2.0b, johnw@netartisans.com)
AM_INIT_AUTOMAKE(ledger, 2.0b)
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_MSG_FAILURE("Could not find gmp (GNU multi-precision) library"))
AC_CHECK_LIB([pcre], [pcre_compile], [],
AC_MSG_FAILURE("Could not find pcre (Perl regular expression) library"))
AC_CHECK_LIB([xmlparse], [XML_ParserCreate],
[AC_DEFINE([READ_GNUCASH], [1], [Support reading gnucash files])
AM_CONDITIONAL(READ_GNUCASH, true)
AC_SUBST(LIBS, "-lxmlparse -lxmltok $LIBS")],
[AC_MSG_NOTICE([Could not find xmlparse library: Gnucash support disabled])
AM_CONDITIONAL(READ_GNUCASH, false)],
[-lxmltok])
# Check for options
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debugging],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
# 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
|