2000-06-02 04:00:31 -05:00
|
|
|
## -*-m4-*-
|
|
|
|
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
1999-01-19 02:29:46 -06:00
|
|
|
# FILE:
|
|
|
|
# configure.in
|
|
|
|
#
|
|
|
|
# FUNCTION:
|
2001-09-07 18:26:42 -05:00
|
|
|
# implements checks for a variety of system-specific functions
|
1999-01-19 02:29:46 -06:00
|
|
|
#
|
|
|
|
# Contents:
|
|
|
|
# Headers - Autoconf header stuff
|
|
|
|
# Variables - Hardcoded variables
|
|
|
|
# Programs - Check for programs binaries
|
|
|
|
# Functions - Check for functions
|
|
|
|
# With - Check for --with/without options
|
|
|
|
# Enable - Check for --enable/disable options
|
|
|
|
# Libraries - Check for libraries
|
|
|
|
# Footer - Autoconf footer stuff
|
|
|
|
|
2001-10-03 02:08:31 -05:00
|
|
|
|
|
|
|
## Do this first, because the other tests depend on it:
|
|
|
|
|
1999-01-21 01:55:18 -06:00
|
|
|
### --------------------------------------------------------------------------
|
1999-01-19 02:29:46 -06:00
|
|
|
### Headers
|
1998-10-20 22:42:25 -05:00
|
|
|
### check for various programs, and stuff (do this first because later
|
|
|
|
### commands depend on them):
|
|
|
|
|
2001-11-28 17:21:43 -06:00
|
|
|
AC_INIT(src/engine/Transaction.h)
|
2003-05-08 19:29:11 -05:00
|
|
|
AC_PREREQ(2.53)
|
2001-09-07 04:04:31 -05:00
|
|
|
|
2001-10-03 02:08:31 -05:00
|
|
|
AC_PROG_CC
|
|
|
|
|
2001-09-07 04:04:31 -05:00
|
|
|
GNUCASH_MAJOR_VERSION=1
|
2003-05-03 15:58:45 -05:00
|
|
|
GNUCASH_MINOR_VERSION=8
|
|
|
|
GNUCASH_MICRO_VERSION=2
|
2001-09-07 04:04:31 -05:00
|
|
|
GNUCASH_VERSION=$GNUCASH_MAJOR_VERSION.$GNUCASH_MINOR_VERSION.$GNUCASH_MICRO_VERSION
|
|
|
|
|
|
|
|
AC_SUBST(GNUCASH_MAJOR_VERSION)
|
|
|
|
AC_SUBST(GNUCASH_MINOR_VERSION)
|
|
|
|
AC_SUBST(GNUCASH_MICRO_VERSION)
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE(gnucash,$GNUCASH_VERSION)
|
2001-10-10 18:19:41 -05:00
|
|
|
|
|
|
|
AC_PROG_INTLTOOL
|
|
|
|
|
2000-06-02 04:00:31 -05:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2000-01-09 21:33:23 -06:00
|
|
|
|
2001-09-07 04:04:31 -05:00
|
|
|
AC_DEFINE_UNQUOTED(GNUCASH_MAJOR_VERSION, $GNUCASH_MAJOR_VERSION)
|
|
|
|
AC_DEFINE_UNQUOTED(GNUCASH_MINOR_VERSION, $GNUCASH_MINOR_VERSION)
|
|
|
|
AC_DEFINE_UNQUOTED(GNUCASH_MICRO_VERSION, $GNUCASH_MICRO_VERSION)
|
|
|
|
|
2001-09-19 03:36:14 -05:00
|
|
|
dnl Set of available languages.
|
2003-05-03 15:58:45 -05:00
|
|
|
ALL_LINGUAS="da de el en_GB es es_NI fr hu it ja nb nl pl pt pt_BR ru sk sv ta uk zh_CN zh_TW"
|
2002-05-16 16:59:52 -05:00
|
|
|
AM_GNU_GETTEXT([use-libtool])
|
2001-09-19 03:36:14 -05:00
|
|
|
|
|
|
|
|
2001-09-30 22:24:33 -05:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
AM_ACLOCAL_INCLUDE(macros)
|
|
|
|
|
1998-10-20 22:42:25 -05:00
|
|
|
AC_PROG_INSTALL
|
2001-10-10 18:19:41 -05:00
|
|
|
|
|
|
|
AC_LIBTOOL_DLOPEN
|
2003-01-06 01:15:30 -06:00
|
|
|
AM_DISABLE_STATIC
|
2001-10-10 20:31:20 -05:00
|
|
|
AM_PROG_LIBTOOL
|
2000-09-13 17:33:15 -05:00
|
|
|
|
2003-01-06 01:15:30 -06:00
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
|
1998-10-20 22:42:25 -05:00
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
AC_PROG_MAKE_SET
|
2000-04-14 05:42:18 -05:00
|
|
|
AC_HEADER_STDC
|
|
|
|
|
2000-11-07 02:27:08 -06:00
|
|
|
AC_CHECK_HEADERS(limits.h)
|
2001-07-01 16:09:09 -05:00
|
|
|
AC_CHECK_FUNCS(stpcpy memcpy timegm towupper)
|
1998-10-20 22:42:25 -05:00
|
|
|
|
2001-05-29 17:41:41 -05:00
|
|
|
STRUCT_TM_GMTOFF_CHECK
|
2001-06-01 23:40:26 -05:00
|
|
|
SCANF_LLD_CHECK
|
2001-05-29 17:41:41 -05:00
|
|
|
|
2002-10-02 14:43:58 -05:00
|
|
|
AC_CHECK_HEADERS(ltdl.h)
|
|
|
|
if test "x$ac_cv_header_ltdl_h" = xno; then
|
|
|
|
AC_MSG_ERROR([Cannot find ltdl.h -- libtool-devel not installed?])
|
|
|
|
fi
|
|
|
|
|
2000-09-13 17:33:15 -05:00
|
|
|
AM_PATH_GLIB
|
|
|
|
|
2000-09-19 02:33:09 -05:00
|
|
|
if test ${no_glib}x = yesx
|
|
|
|
then
|
2001-06-20 03:11:10 -05:00
|
|
|
AC_MSG_ERROR([Cannot find glib. Check config.log])
|
2000-09-19 02:33:09 -05:00
|
|
|
fi
|
|
|
|
|
2001-07-09 06:20:22 -05:00
|
|
|
AC_CHECK_HEADERS(dlfcn.h dl.h ghttp_ssl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
|
2001-02-07 22:08:50 -06:00
|
|
|
|
|
|
|
DL_LIB=
|
|
|
|
AC_CHECK_FUNCS(dlopen,,[
|
2001-05-08 21:42:48 -05:00
|
|
|
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
|
|
|
|
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
|
|
|
|
AC_CHECK_FUNCS(dlopen, DL_LIB="",
|
|
|
|
AC_MSG_ERROR(Dynamic linking is not available on this platform. Some apps,
|
2001-02-07 22:08:50 -06:00
|
|
|
like panel, will not run properly.))
|
2001-05-08 21:42:48 -05:00
|
|
|
])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2001-02-07 22:08:50 -06:00
|
|
|
oLIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $DL_LIB"
|
|
|
|
AC_CHECK_FUNCS(dlerror,,)
|
|
|
|
LIBS="$oLIBS"
|
|
|
|
AC_SUBST(DL_LIB)
|
|
|
|
|
2002-10-05 10:59:23 -05:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### MacOS 10.x requires some special handling...
|
|
|
|
|
2002-10-05 09:49:53 -05:00
|
|
|
# Some systems (MacOS) require -lintl
|
|
|
|
AC_SEARCH_LIBS(gettext, intl, ,[
|
|
|
|
AC_MSG_ERROR([Cannot find gettext -- do you need to build -lintl?])], )
|
2000-09-13 17:33:15 -05:00
|
|
|
|
2002-10-05 10:59:23 -05:00
|
|
|
AC_MSG_CHECKING(for darwin)
|
|
|
|
case $host_os in
|
|
|
|
rhapsody* | darwin1*)
|
|
|
|
AC_MSG_RESULT([yes, but too old])
|
|
|
|
AC_MSG_ERROR([This platform is not supported, please
|
|
|
|
update to latest darwin])
|
|
|
|
;;
|
|
|
|
darwin*)
|
|
|
|
AC_MSG_RESULT([yes, patching libtool to always build dylibs])
|
|
|
|
mv libtool libtool.old
|
|
|
|
sed -e 's/^deplibs_check_method.*/deplibs_check_method=pass_all/g' \
|
2002-10-05 11:32:00 -05:00
|
|
|
-e 's|^archive_cmds.*|archive_cmds="$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs\\$linker_flags -install_name \\$rpath/\\$soname \\$verstring"|g' \
|
|
|
|
-e 's|^library_names_spec.*|library_names_spec="\\$libname\\$release\\$versuffix.dylib \\$libname\\$release\\${major}.dylib \\$libname.dylib"|g' \
|
|
|
|
-e 's|^soname_spec.*|soname_spec="\\$libname\\$release\\$major.dylib"|g' \
|
2002-10-05 10:59:23 -05:00
|
|
|
< libtool.old > libtool
|
|
|
|
rm libtool.old
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### Guile and g-wrap version checks (should this be something other than
|
|
|
|
### the Gnome check?)
|
|
|
|
|
2000-09-13 17:33:15 -05:00
|
|
|
GNOME_CHECK_GUILE
|
2002-11-17 18:59:52 -06:00
|
|
|
AS_SCRUB_INCLUDE(GUILE_INCS)
|
2000-09-13 17:33:15 -05:00
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### G-wrap (libraries and executable)
|
|
|
|
|
|
|
|
G_WRAP_COMPILE_ARGS=""
|
|
|
|
G_WRAP_LINK_ARGS=""
|
|
|
|
|
2003-01-16 01:42:20 -06:00
|
|
|
AM_GUILE_VERSION_CHECK(1.3.4, , , [AC_MSG_ERROR([
|
2002-08-11 17:55:43 -05:00
|
|
|
|
2002-12-11 23:14:01 -06:00
|
|
|
guile does not appear to be installed correctly, or is not in the
|
|
|
|
correct version range. Perhaps you have not installed the guile
|
|
|
|
development packages? Right now gnucash requires at least version
|
2003-01-16 01:42:20 -06:00
|
|
|
1.3.4 to build.
|
2002-08-11 17:55:43 -05:00
|
|
|
])])
|
|
|
|
|
2002-12-11 23:14:01 -06:00
|
|
|
AM_PATH_GWRAP(1.3.3, , , [AC_MSG_ERROR([
|
2001-12-05 11:22:32 -06:00
|
|
|
|
|
|
|
g-wrap does not appear to be installed correctly, or is not new
|
2002-12-11 23:14:01 -06:00
|
|
|
enough. Right now gnucash requires at least version 1.3.3 to build
|
|
|
|
as there were major changes between version 1.3.1 and 1.3.2, and
|
|
|
|
extra support added between 1.3.2 and 1.3.3 that is now required
|
|
|
|
by gnucash.
|
2001-12-05 11:22:32 -06:00
|
|
|
If you need to install g-wrap, you can find it at
|
2002-06-19 09:47:09 -05:00
|
|
|
http://www.gnucash.org/pub/g-wrap.
|
2001-12-05 11:22:32 -06:00
|
|
|
])])
|
|
|
|
|
|
|
|
# Find out what the g-wrap compile and link flags are.
|
|
|
|
AC_MSG_CHECKING(for g-wrap compile args)
|
|
|
|
G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
|
|
|
|
AC_MSG_RESULT($G_WRAP_COMPILE_ARGS)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for g-wrap link args)
|
|
|
|
G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-link-args guile`
|
|
|
|
AC_MSG_RESULT($G_WRAP_LINK_ARGS)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for g-wrap module directory)
|
|
|
|
G_WRAP_MODULE_DIR=`${G_WRAP_CONFIG} --guile-module-directory`
|
2002-04-18 22:14:56 -05:00
|
|
|
G_WRAP_LIB_DIR=`echo $G_WRAP_MODULE_DIR | sed -e 's|share/guile|lib|'`
|
2001-12-05 11:22:32 -06:00
|
|
|
AC_MSG_RESULT($G_WRAP_MODULE_DIR)
|
|
|
|
|
|
|
|
AC_GWRAP_CHECK_GUILE
|
|
|
|
|
|
|
|
AC_SUBST(G_WRAP_CONFIG)
|
|
|
|
AC_SUBST(G_WRAP_COMPILE_ARGS)
|
|
|
|
AC_SUBST(G_WRAP_LINK_ARGS)
|
|
|
|
AC_SUBST(G_WRAP_MODULE_DIR)
|
2002-04-18 22:14:56 -05:00
|
|
|
AC_SUBST(G_WRAP_LIB_DIR)
|
2001-12-05 11:22:32 -06:00
|
|
|
|
2002-11-17 18:59:52 -06:00
|
|
|
AS_SCRUB_INCLUDE(CFLAGS)
|
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
### Check size of long_long - some guile's are broken.
|
|
|
|
AC_MSG_CHECKING(if guile long_long is at least as big as gint64)
|
|
|
|
GNC_OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <glib.h>
|
|
|
|
#include <libguile/__scm.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
return(!(sizeof(long_long) >= sizeof(gint64)));
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_CHECK_LIB(guile, scm_long_long2num,
|
|
|
|
AC_DEFINE(GUILE_LONG_LONG_OK,1,is sizeof(long_long) >=
|
|
|
|
sizeof(gint64)))
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
CFLAGS="$GNC_OLDCFLAGS"
|
|
|
|
|
|
|
|
# One of the places this is critical is in gnc_scm_to_gint64 and inverse.
|
|
|
|
# However, I'm sure we require this elsewhere, so don't remove this test
|
|
|
|
# unless you've done sufficient code review/testing.
|
|
|
|
AC_MSG_CHECKING(if unsigned long is at least as big as guint32)
|
|
|
|
GNC_OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <glib.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
return(!(sizeof(unsigned long) >= sizeof(guint32)));
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(cannot continue, size of unsigned long too small.)
|
|
|
|
])
|
|
|
|
CFLAGS="$GNC_OLDCFLAGS"
|
|
|
|
|
2001-11-07 16:41:56 -06:00
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### Check which SRFIs we need.
|
2001-11-07 16:41:56 -06:00
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
GNC_ADD_ON_SRFIS=""
|
|
|
|
|
2003-01-06 01:15:30 -06:00
|
|
|
for f in ${srcdir}/lib/srfi/srfi-*.scm
|
2001-12-05 11:22:32 -06:00
|
|
|
do
|
2003-01-06 01:15:30 -06:00
|
|
|
srfi=`echo $f | sed 's%.*/%%' | sed 's/.scm//'`
|
2001-12-05 11:22:32 -06:00
|
|
|
AC_MSG_CHECKING(if guile needs our copy of ${srfi})
|
2002-01-12 19:48:58 -06:00
|
|
|
if ${GUILE} -c "(use-modules (srfi ${srfi}))" > /dev/null 2>&1
|
2001-12-05 11:22:32 -06:00
|
|
|
then
|
2002-01-12 19:48:58 -06:00
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
2001-12-05 11:22:32 -06:00
|
|
|
GNC_ADD_ON_SRFIS="${GNC_ADD_ON_SRFIS} ${srfi}.scm"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
AC_SUBST(GNC_ADD_ON_SRFIS)
|
2003-01-16 01:42:20 -06:00
|
|
|
if test "x${GNC_ADD_ON_SRFIS}" != "x"
|
|
|
|
then
|
|
|
|
GNC_SRFI_LOAD_PATH="\${top_srcdir}/lib/"
|
2003-02-18 21:55:44 -06:00
|
|
|
GNC_TEST_SRFI_LOAD_CMD="--guile-load-dir \${top_srcdir}/lib/"
|
2003-01-16 01:42:20 -06:00
|
|
|
else
|
|
|
|
GNC_SRFI_LOAD_PATH=""
|
2003-02-18 21:55:44 -06:00
|
|
|
GNC_TEST_SRFI_LOAD_CMD=""
|
2003-01-16 01:42:20 -06:00
|
|
|
fi
|
|
|
|
AC_SUBST(GNC_SRFI_LOAD_PATH)
|
2003-02-18 21:55:44 -06:00
|
|
|
AC_SUBST(GNC_TEST_SRFI_LOAD_CMD)
|
2001-12-05 11:22:32 -06:00
|
|
|
|
2002-01-09 15:18:27 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### See if we need guile-www
|
|
|
|
|
|
|
|
gnc_have_guile_www=no
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([if guile needs our copy of (guile www)])
|
2002-01-12 19:48:58 -06:00
|
|
|
if ${GUILE} -c "(use-modules (www main))" > /dev/null 2>&1
|
2002-01-09 15:18:27 -06:00
|
|
|
then
|
|
|
|
gnc_have_guile_www=yes
|
2002-01-12 19:48:58 -06:00
|
|
|
AC_MSG_RESULT(no)
|
2002-01-09 15:18:27 -06:00
|
|
|
else
|
|
|
|
gnc_have_guile_www=no
|
2002-01-12 19:48:58 -06:00
|
|
|
AC_MSG_RESULT(yes)
|
2002-01-09 15:18:27 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(GNC_HAVE_GUILE_WWW, test "${gnc_have_guile_www}" = yes)
|
2001-12-05 11:22:32 -06:00
|
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### Gnome XML -- GNOME_XML_LIB is defined by GNOME_XML_CHECK
|
|
|
|
|
|
|
|
GNOME_XML_CHECK
|
|
|
|
GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml`
|
2003-01-21 14:32:51 -06:00
|
|
|
AS_SCRUB_INCLUDE(GNOME_XML_CFLAGS)
|
2001-12-05 11:22:32 -06:00
|
|
|
|
|
|
|
AC_SUBST(GNOME_XML_CFLAGS)
|
|
|
|
|
|
|
|
oLIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $GNOME_XML_LIB"
|
|
|
|
AC_CHECK_LIB(xml, xmlElemDump, [:], [
|
|
|
|
AC_MSG_ERROR([libxml 1.8.3 or newer required for GnuCash])
|
|
|
|
])
|
|
|
|
LIBS="$oLIBS"
|
2001-01-17 00:53:18 -06:00
|
|
|
|
2000-09-13 17:33:15 -05:00
|
|
|
|
1999-01-21 01:55:18 -06:00
|
|
|
### --------------------------------------------------------------------------
|
1999-01-19 02:29:46 -06:00
|
|
|
### Variables
|
|
|
|
### Set up all the initial variable values...
|
|
|
|
|
2000-06-02 04:00:31 -05:00
|
|
|
AC_ARG_ENABLE(opt-style-install,
|
|
|
|
[ --enable-opt-style-install install everything in subdirs of --prefix],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) gnc_opt_style_install=true ;;
|
|
|
|
no) gnc_opt_style_install=false ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-opt-style-install) ;;
|
|
|
|
esac],
|
|
|
|
[gnc_opt_style_install=false])
|
|
|
|
|
|
|
|
if test x${gnc_opt_style_install} = xtrue
|
|
|
|
then
|
|
|
|
GNC_CONFIGDIR='${sysconfdir}'
|
2001-09-06 01:43:43 -05:00
|
|
|
GNC_DOC_INSTALL_DIR='${datadir}/doc'
|
2002-01-30 18:00:23 -06:00
|
|
|
GNC_INCLUDE_DIR='${includedir}'
|
2000-06-02 04:00:31 -05:00
|
|
|
GNC_LIBDIR='${libdir}'
|
|
|
|
GNC_SCM_INSTALL_DIR='${datadir}/scm'
|
2001-09-06 01:43:43 -05:00
|
|
|
GNC_SHAREDIR='${datadir}'
|
2001-11-21 13:34:17 -06:00
|
|
|
GNC_LIBEXECDIR='${libexecdir}'
|
2000-06-02 04:00:31 -05:00
|
|
|
else
|
|
|
|
GNC_CONFIGDIR='${sysconfdir}/gnucash'
|
2001-09-06 01:43:43 -05:00
|
|
|
GNC_DOC_INSTALL_DIR='${pkgdatadir}/doc'
|
2002-01-30 18:00:23 -06:00
|
|
|
GNC_INCLUDE_DIR='${includedir}/gnucash'
|
2000-06-02 04:00:31 -05:00
|
|
|
GNC_LIBDIR='${pkglibdir}'
|
|
|
|
GNC_SCM_INSTALL_DIR='${pkgdatadir}/scm'
|
2001-09-06 01:43:43 -05:00
|
|
|
GNC_SHAREDIR='${pkgdatadir}'
|
2001-11-21 13:34:17 -06:00
|
|
|
GNC_LIBEXECDIR='${libexecdir}/gnucash'
|
2000-06-02 04:00:31 -05:00
|
|
|
fi
|
|
|
|
|
2002-01-30 18:00:23 -06:00
|
|
|
GNC_ACCOUNTS_DIR='${GNC_SHAREDIR}/accounts'
|
|
|
|
GNC_GLADE_DIR='${GNC_SHAREDIR}/glade'
|
2001-09-15 01:09:43 -05:00
|
|
|
GNC_GWRAP_LIBDIR='${GNC_SHAREDIR}/guile-modules/g-wrapped'
|
2001-09-06 17:30:14 -05:00
|
|
|
GNC_MODULE_DIR='${pkglibdir}'
|
2001-03-04 20:10:44 -06:00
|
|
|
GNC_PIXMAP_DIR='${datadir}/pixmaps/gnucash'
|
2000-12-07 04:44:33 -06:00
|
|
|
|
2001-09-06 01:43:43 -05:00
|
|
|
AC_SUBST(GNC_ACCOUNTS_DIR)
|
2000-06-02 04:00:31 -05:00
|
|
|
AC_SUBST(GNC_CONFIGDIR)
|
|
|
|
AC_SUBST(GNC_DOC_INSTALL_DIR)
|
2001-06-12 05:22:42 -05:00
|
|
|
AC_SUBST(GNC_GLADE_DIR)
|
2001-09-15 01:09:43 -05:00
|
|
|
AC_SUBST(GNC_GWRAP_LIBDIR)
|
2001-09-06 01:43:43 -05:00
|
|
|
AC_SUBST(GNC_INCLUDE_DIR)
|
|
|
|
AC_SUBST(GNC_LIBDIR)
|
2001-09-06 17:30:14 -05:00
|
|
|
AC_SUBST(GNC_MODULE_DIR)
|
2001-03-04 20:10:44 -06:00
|
|
|
AC_SUBST(GNC_PIXMAP_DIR)
|
2001-09-06 01:43:43 -05:00
|
|
|
AC_SUBST(GNC_SCM_INSTALL_DIR)
|
|
|
|
AC_SUBST(GNC_SHAREDIR)
|
2001-11-21 13:34:17 -06:00
|
|
|
AC_SUBST(GNC_LIBEXECDIR)
|
2000-06-02 04:00:31 -05:00
|
|
|
|
1999-01-19 02:29:46 -06:00
|
|
|
AC_ARG_ENABLE( debug,
|
2001-01-09 14:25:29 -06:00
|
|
|
[ --enable-debug compile with debugging flags set],
|
2000-06-02 04:00:31 -05:00
|
|
|
CFLAGS="${CFLAGS} -g"
|
|
|
|
LDFLAGS="${LDFLAGS} -g"
|
2000-07-10 02:45:00 -05:00
|
|
|
AC_DEFINE(DEBUG_MEMORY,1),
|
|
|
|
AC_DEFINE(DEBUG_MEMORY,0) )
|
1999-01-19 02:29:46 -06:00
|
|
|
|
2000-05-12 04:47:17 -05:00
|
|
|
AC_ARG_ENABLE( profile,
|
2001-01-09 14:25:29 -06:00
|
|
|
[ --enable-profile compile with profiling set],
|
2000-05-12 04:47:17 -05:00
|
|
|
CFLAGS="${CFLAGS} -pg"
|
|
|
|
LDFLAGS="${LDFLAGS} -pg")
|
|
|
|
|
2000-09-13 17:33:15 -05:00
|
|
|
|
2001-02-02 01:04:15 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### SQL
|
2001-05-08 21:42:48 -05:00
|
|
|
# Check to see if the user wants to have Postgres support
|
2001-09-05 10:47:13 -05:00
|
|
|
#
|
|
|
|
# hack alert ... we should use 'pg_config --includedir' and
|
|
|
|
# 'pg_config --libdir' to find paths; unfortunately pg_config itself
|
|
|
|
# is hard to find :-(
|
2001-05-08 21:42:48 -05:00
|
|
|
|
2001-02-02 01:04:15 -06:00
|
|
|
AC_ARG_ENABLE( sql,
|
|
|
|
[ --enable-sql compile with sql support],
|
2001-05-08 21:42:48 -05:00
|
|
|
[
|
2001-11-12 11:00:50 -06:00
|
|
|
PG_CONFIG=`which pg_config`
|
|
|
|
|
|
|
|
if test "x$PG_CONFIG" = "x" ; then
|
|
|
|
PG_CONFIG="/usr/lib/postgresql/bin/pg_config"
|
|
|
|
fi
|
|
|
|
|
2001-05-08 21:42:48 -05:00
|
|
|
if test "x$enableval" != "xno" ; then
|
2001-09-05 10:47:13 -05:00
|
|
|
|
2001-11-12 11:00:50 -06:00
|
|
|
PGSQL_CFLAGS=`${PG_CONFIG} --includedir`
|
2001-09-05 10:47:13 -05:00
|
|
|
if test "x$PGSQL_CFLAGS" != x; then
|
2003-01-28 23:08:17 -06:00
|
|
|
PGSQL_CFLAGS="-I${PGSQL_CFLAGS}"
|
2001-09-05 10:47:13 -05:00
|
|
|
fi
|
|
|
|
|
2003-02-19 09:58:08 -06:00
|
|
|
AS_SCRUB_INCLUDE(PGSQL_CFLAGS)
|
|
|
|
|
2003-01-28 23:08:17 -06:00
|
|
|
saved_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
CPPFLAGS="${CPPFLAGS} ${PGSQL_CFLAGS}"
|
2001-09-05 10:47:13 -05:00
|
|
|
AC_CHECK_HEADERS(pgsql/libpq-fe.h postgresql/libpq-fe.h libpq-fe.h)
|
|
|
|
if test "x$ac_cv_header_pgsql_libpq_fe_h$ac_cv_header_postgresql_libpq_fe_h$ac_cv_header_libpq_fe_h" = xnonono; then
|
2001-06-24 14:58:56 -05:00
|
|
|
AC_MSG_ERROR([Cannot find PostgreSQL headers; won't build sql backend])
|
2001-05-08 21:42:48 -05:00
|
|
|
else
|
2001-06-24 14:58:56 -05:00
|
|
|
master_dirs="/usr/include /usr/local/include"
|
2001-05-08 21:42:48 -05:00
|
|
|
if test "x$ac_cv_header_pgsql_libpq_fe_h" != xno; then
|
2001-06-24 14:58:56 -05:00
|
|
|
for dir in $master_dirs; do
|
|
|
|
if test -f "$dir/pgsql/libpq-fe.h"; then
|
|
|
|
CFLAGS="${CFLAGS} -I$dir/pgsql"
|
|
|
|
break
|
2001-09-05 10:47:13 -05:00
|
|
|
fi
|
2001-06-24 14:58:56 -05:00
|
|
|
done
|
|
|
|
elif test "x$ac_cv_header_postgresql_libpq_fe_h" != xno; then
|
|
|
|
for dir in $master_dirs; do
|
|
|
|
if test -f "$dir/postgresql/libpq-fe.h"; then
|
|
|
|
CFLAGS="${CFLAGS} -I$dir/postgresql"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2001-05-08 21:42:48 -05:00
|
|
|
fi
|
2001-11-12 11:00:50 -06:00
|
|
|
|
2003-02-19 09:58:08 -06:00
|
|
|
AS_SCRUB_INCLUDE(CFLAGS)
|
|
|
|
|
2001-11-12 11:00:50 -06:00
|
|
|
PGSQL_LIBS=`${PG_CONFIG} --libdir`
|
2001-09-05 10:47:13 -05:00
|
|
|
if test "x$PGSQL_LIBS" != x; then
|
2003-01-28 23:08:17 -06:00
|
|
|
PGSQL_LIBS="-L${PGSQL_LIBS}"
|
2001-09-05 10:47:13 -05:00
|
|
|
fi
|
2003-01-28 23:08:17 -06:00
|
|
|
|
|
|
|
saved_LIBS="$LIBS"
|
|
|
|
LIBS="${PGSQL_LIBS} -lpq $LIBS"
|
2001-05-08 21:42:48 -05:00
|
|
|
AC_MSG_CHECKING(for libpq)
|
|
|
|
AC_TRY_LINK(
|
|
|
|
[
|
|
|
|
#include <libpq-fe.h>
|
|
|
|
],
|
|
|
|
[
|
|
|
|
PQconnectdb("asdf");
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(yes)
|
2001-08-07 18:29:04 -05:00
|
|
|
SQL_DIR=postgres
|
2001-05-08 21:42:48 -05:00
|
|
|
],
|
|
|
|
[
|
2001-06-24 14:58:56 -05:00
|
|
|
AC_MSG_ERROR([Cannot find PostgreSQL libraries; will not build sql backend])
|
2001-05-08 21:42:48 -05:00
|
|
|
]
|
|
|
|
)
|
2001-06-09 20:59:10 -05:00
|
|
|
LIBS="$saved_LIBS"
|
2001-05-08 21:42:48 -05:00
|
|
|
fi
|
2003-01-28 23:08:17 -06:00
|
|
|
CPPFLAGS="$saved_CPPFLAGS"
|
2001-05-08 21:42:48 -05:00
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
2001-02-02 01:04:15 -06:00
|
|
|
|
2003-01-28 23:08:17 -06:00
|
|
|
AC_SUBST(PGSQL_CFLAGS)
|
|
|
|
AC_SUBST(PGSQL_LIBS)
|
2001-02-02 01:04:15 -06:00
|
|
|
AC_SUBST(SQL_DIR)
|
|
|
|
|
2001-06-09 20:59:10 -05:00
|
|
|
|
2001-03-19 15:49:54 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### RPC
|
|
|
|
AC_ARG_ENABLE( rpc,
|
|
|
|
[ --enable-rpc compile with rpc support],
|
2003-01-01 22:21:00 -06:00
|
|
|
[
|
|
|
|
AC_MSG_WARN([
|
|
|
|
|
|
|
|
The RPC Backend is depricated. You should not use it.
|
|
|
|
It may go away in the future. If you need it, please
|
|
|
|
contact gnucash-devel@gnucash.org and let the developers
|
|
|
|
know.
|
|
|
|
])
|
|
|
|
RPC_DIR=rpc
|
|
|
|
])
|
2001-03-19 15:49:54 -06:00
|
|
|
|
|
|
|
AC_SUBST(RPC_DIR)
|
|
|
|
|
2002-06-20 19:46:36 -05:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### OFX
|
|
|
|
AC_ARG_ENABLE( ofx,
|
2002-07-29 16:15:33 -05:00
|
|
|
[ --enable-ofx compile with ofx support (needs LibOFX)],
|
2003-05-03 15:58:45 -05:00
|
|
|
if test "x$enableval" != "xno" ; then
|
|
|
|
OFX_DIR=ofx
|
|
|
|
fi)
|
2002-10-30 11:50:39 -06:00
|
|
|
if test x${OFX_DIR} = xofx ;
|
|
|
|
then
|
|
|
|
AC_ARG_WITH( ofx-prefix,
|
|
|
|
[ --with-ofx-prefix=DIR specify where to look for libOFX],
|
|
|
|
OFXPREFIX="$with_ofx_prefix" )
|
2001-03-19 15:49:54 -06:00
|
|
|
|
2002-10-30 11:50:39 -06:00
|
|
|
if test x${OFXPREFIX} != x ; then
|
|
|
|
LIBOFX_LIBS="-L${OFXPREFIX}/lib"
|
|
|
|
LIBOFX_CFLAGS="-I${OFXPREFIX}/include"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for libofx/libofx.h)
|
2003-02-19 09:58:08 -06:00
|
|
|
AS_SCRUB_INCLUDE(LIBOFX_CFLAGS)
|
2002-10-30 11:50:39 -06:00
|
|
|
save_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
CPPFLAGS="${CPPFLAGS} ${LIBOFX_CFLAGS}"
|
2002-11-18 20:54:52 -06:00
|
|
|
AC_TRY_CPP( [#include <libofx/libofx.h>], AC_MSG_RESULT(yes), OFXfound=no )
|
|
|
|
|
|
|
|
if test x${OFXPREFIX} = x -a x${OFXfound} = no ; then
|
|
|
|
LIBOFX_LIBS="-L$/usr/local/lib"
|
|
|
|
LIBOFX_CFLAGS="-I$/usr/local/include"
|
2003-02-19 09:58:08 -06:00
|
|
|
AS_SCRUB_INCLUDE(LIBOFX_CFLAGS)
|
2002-11-18 20:54:52 -06:00
|
|
|
CPPFLAGS="${CPPFLAGS} ${LIBOFX_CFLAGS}"
|
2002-10-30 11:50:39 -06:00
|
|
|
|
2002-11-18 20:54:52 -06:00
|
|
|
AC_TRY_CPP( [#include <libofx/libofx.h>], AC_MSG_RESULT([yes (in /usr/local)]),
|
|
|
|
[ AC_MSG_ERROR([cannot find libofx header, needed for OFX support.]) ] )
|
|
|
|
fi
|
|
|
|
|
|
|
|
LIBOFX_LIBS="${LIBOFX_LIBS} -lofx -lstdc++"
|
2002-10-30 11:50:39 -06:00
|
|
|
AC_MSG_CHECKING(for libofx)
|
|
|
|
save_LIBS="${LIBS}"
|
|
|
|
LIBS="${LIBS} ${LIBOFX_LIBS}"
|
|
|
|
AC_TRY_LINK( [
|
2003-02-02 06:59:47 -06:00
|
|
|
#include <libofx/libofx.h>
|
|
|
|
int ofx_proc_status_cb(const struct OfxStatusData data) { return 0; }
|
|
|
|
int ofx_proc_account_cb(const struct OfxAccountData data) { return 0; }
|
|
|
|
int ofx_proc_security_cb(const struct OfxSecurityData data) { return 0; }
|
|
|
|
int ofx_proc_transaction_cb(const struct OfxTransactionData data) { return 0; }
|
|
|
|
int ofx_proc_statement_cb(const struct OfxStatementData data) { return 0; }
|
2002-10-30 11:50:39 -06:00
|
|
|
], [
|
2003-02-02 06:59:47 -06:00
|
|
|
ofx_proc_file(0, NULL);
|
2002-10-30 11:50:39 -06:00
|
|
|
], AC_MSG_RESULT(yes),
|
2003-02-02 06:59:47 -06:00
|
|
|
[ AC_MSG_ERROR([*** Cannot compile test program for libofx library. Please check config.log for the exact error.]) ] )
|
2002-10-30 11:50:39 -06:00
|
|
|
|
|
|
|
LIBS="${save_LIBS}"
|
|
|
|
CPPFLAGS="${save_CPPFLAGS}"
|
|
|
|
AC_SUBST(LIBOFX_CFLAGS)
|
|
|
|
AC_SUBST(LIBOFX_LIBS)
|
|
|
|
fi
|
2002-06-20 19:46:36 -05:00
|
|
|
AC_SUBST(OFX_DIR)
|
2002-10-30 11:50:39 -06:00
|
|
|
|
2000-03-22 22:26:59 -06:00
|
|
|
### --------------------------------------------------------------------------
|
2002-07-27 12:13:49 -05:00
|
|
|
### HBCI
|
|
|
|
AC_ARG_ENABLE( hbci,
|
2002-07-29 16:15:33 -05:00
|
|
|
[ --enable-hbci compile with HBCI support (needs OpenHBCI)],
|
2003-05-03 15:58:45 -05:00
|
|
|
if test "x$enableval" != "xno" ; then
|
|
|
|
HBCI_DIR=hbci
|
|
|
|
fi)
|
2002-10-18 10:51:27 -05:00
|
|
|
if test x${HBCI_DIR} = xhbci ;
|
|
|
|
then
|
2003-05-03 15:58:45 -05:00
|
|
|
AM_PATH_OPENHBCI(0.9.6)
|
2002-10-18 10:51:27 -05:00
|
|
|
HBCI_LIBS="${OPENHBCI_LIBS}"
|
|
|
|
HBCI_CFLAGS="${OPENHBCI_CXXFLAGS}"
|
|
|
|
|
2003-01-21 14:32:51 -06:00
|
|
|
AS_SCRUB_INCLUDE(HBCI_CFLAGS)
|
2002-10-18 10:51:27 -05:00
|
|
|
AC_SUBST(HBCI_LIBS)
|
|
|
|
AC_SUBST(HBCI_CFLAGS)
|
|
|
|
fi
|
2002-07-27 12:13:49 -05:00
|
|
|
AC_SUBST(HBCI_DIR)
|
|
|
|
### --------------------------------------------------------------------------
|
2000-03-22 22:26:59 -06:00
|
|
|
### i18n
|
2001-12-05 11:22:32 -06:00
|
|
|
|
2000-03-22 22:26:59 -06:00
|
|
|
AC_ARG_WITH( locale-dir,
|
|
|
|
[ --with-locale-dir=PATH specify where to look for locale-specific information],
|
|
|
|
LOCALE_DIR="$with_locale_dir",
|
2000-06-26 00:05:13 -05:00
|
|
|
LOCALE_DIR="\${prefix}/share/locale")
|
2000-03-31 03:41:07 -06:00
|
|
|
|
2000-03-22 22:26:59 -06:00
|
|
|
AC_SUBST(LOCALE_DIR)
|
|
|
|
|
2001-05-29 10:20:23 -05:00
|
|
|
dnl check for nl_langinfo(D_FMT) which is missing on FreeBSD
|
|
|
|
LANGINFO_D_FMT_CHECK
|
2000-09-13 17:33:15 -05:00
|
|
|
|
2000-09-09 05:25:53 -05:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### help files
|
2001-12-05 11:22:32 -06:00
|
|
|
|
2001-12-11 10:27:44 -06:00
|
|
|
# Used to initialize doc-path.
|
2000-09-09 05:25:53 -05:00
|
|
|
AC_ARG_WITH( help-prefix,
|
2001-01-09 14:25:29 -06:00
|
|
|
[ --with-help-prefix=PATH specify where to store the help files],
|
2000-09-09 05:25:53 -05:00
|
|
|
GNC_HELPDIR="$with_help_prefix/gnome/help/gnucash",
|
|
|
|
GNC_HELPDIR="\${datadir}/gnome/help/gnucash")
|
|
|
|
|
|
|
|
AC_SUBST(GNC_HELPDIR)
|
|
|
|
|
2001-03-27 19:00:25 -06:00
|
|
|
|
2001-02-24 18:42:44 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### Check for etags
|
|
|
|
|
2001-03-27 19:00:25 -06:00
|
|
|
AC_ARG_ENABLE( etags,
|
|
|
|
[ --enable-etags enable automatic create of TAGS file],
|
|
|
|
if test $enableval = yes; then
|
|
|
|
USE_ETAGS=1
|
|
|
|
fi,
|
|
|
|
USE_ETAGS=0)
|
|
|
|
|
|
|
|
if test ${USE_ETAGS} = 1; then
|
2002-11-30 02:59:19 -06:00
|
|
|
AC_CHECK_PROG(GNC_ETAGS_FILE, etags, TAGS)
|
2001-03-27 19:00:25 -06:00
|
|
|
fi
|
|
|
|
|
2002-11-30 02:59:19 -06:00
|
|
|
AM_CONDITIONAL(GNC_ETAGS_FILE, test x${GNC_ETAGS_FILE} = xTAGS)
|
|
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### Check for ctags
|
|
|
|
|
|
|
|
AC_ARG_ENABLE( ctags,
|
|
|
|
[ --enable-ctags enable automatic create of tags file],
|
|
|
|
if test $enableval = yes; then
|
|
|
|
USE_CTAGS=1
|
|
|
|
fi,
|
|
|
|
USE_CTAGS=0)
|
|
|
|
|
|
|
|
if test ${USE_CTAGS} = 1; then
|
|
|
|
AC_CHECK_PROG(GNC_CTAGS_FILE, ctags, tags)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(GNC_CTAGS_FILE, test x${GNC_CTAGS_FILE} = xtags)
|
2000-06-25 23:38:31 -05:00
|
|
|
|
1999-01-21 01:55:18 -06:00
|
|
|
### --------------------------------------------------------------------------
|
2000-04-05 16:59:56 -05:00
|
|
|
### Check for perl
|
1999-01-19 02:29:46 -06:00
|
|
|
|
|
|
|
# Check for perl, force version 5
|
|
|
|
AC_ARG_WITH(perl,
|
2001-01-09 14:25:29 -06:00
|
|
|
[ --with-perl=FILE which perl executable to use ],
|
1999-01-19 02:29:46 -06:00
|
|
|
PERL="${with_perl}")
|
1999-01-13 03:11:02 -06:00
|
|
|
|
2000-06-16 13:12:54 -05:00
|
|
|
# If the user didn't specify a perl, then go fetch.
|
|
|
|
if test x"$PERL" = x;
|
|
|
|
then
|
|
|
|
AC_PATH_PROG(PERL, perl)
|
|
|
|
fi
|
|
|
|
|
1999-01-13 03:11:02 -06:00
|
|
|
# Make sure Perl was found
|
|
|
|
if test x"$PERL" = x; then
|
1999-01-19 02:29:46 -06:00
|
|
|
AC_MSG_ERROR([Cannot find Perl. Try using the --with-perl flag.])
|
1999-01-13 03:11:02 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Make sure it's version 5 or later
|
|
|
|
if "$PERL" -e 'exit 1 if $] < 5.0'; then
|
|
|
|
:
|
|
|
|
else
|
1999-01-19 02:29:46 -06:00
|
|
|
AC_MSG_ERROR([Found ${PERL} reports version ]
|
|
|
|
[`${PERL} -e 'print $]'`, need version 5.*])
|
1999-01-13 03:11:02 -06:00
|
|
|
fi
|
1999-01-19 02:29:46 -06:00
|
|
|
AC_SUBST(PERL)
|
1999-01-13 03:11:02 -06:00
|
|
|
|
1999-01-19 02:29:46 -06:00
|
|
|
# Now check for perl headers
|
|
|
|
# This appears to be what Perl's ExtUtils::MakeMaker module does, so
|
|
|
|
# I'm reasonably sure it's correct.
|
|
|
|
# PERLINCL="/usr/lib/perl5/i386-linux/5.00404"
|
|
|
|
#
|
2000-01-09 21:33:23 -06:00
|
|
|
PERLINCL=`$PERL -MConfig -e 'print $Config{"archlibexp"}'`
|
1999-01-19 02:29:46 -06:00
|
|
|
AC_ARG_WITH( perl-includes,
|
2001-01-09 14:25:29 -06:00
|
|
|
[ --with-perl-includes=DIR specify where to look for perl includes],
|
1999-01-19 02:29:46 -06:00
|
|
|
PERLINCL="$with_perl_includes" )
|
|
|
|
AC_SUBST(PERLINCL)
|
1998-10-20 22:42:25 -05:00
|
|
|
|
2002-11-27 16:49:10 -06:00
|
|
|
# check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
AC_DEFUN(BB_ENABLE_DOXYGEN,
|
|
|
|
[
|
|
|
|
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
|
|
|
|
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
|
|
|
|
AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
|
|
|
|
AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
|
|
|
|
if test "x$enable_doxygen" = xno; then
|
|
|
|
enable_doc=no
|
|
|
|
else
|
|
|
|
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
|
|
|
|
if test x$DOXYGEN = x; then
|
|
|
|
if test "x$enable_doxygen" = xyes; then
|
|
|
|
AC_MSG_ERROR([could not find doxygen])
|
|
|
|
fi
|
|
|
|
enable_doc=no
|
|
|
|
else
|
|
|
|
enable_doc=yes
|
|
|
|
AC_PATH_PROG(DOT, dot, , $PATH)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
|
|
|
|
|
|
|
|
if test x$DOT = x; then
|
|
|
|
if test "x$enable_dot" = xyes; then
|
|
|
|
AC_MSG_ERROR([could not find dot])
|
|
|
|
fi
|
|
|
|
enable_dot=no
|
|
|
|
else
|
|
|
|
enable_dot=yes
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue)
|
|
|
|
AC_SUBST(enable_dot)
|
|
|
|
AC_SUBST(enable_html_docs)
|
|
|
|
AC_SUBST(enable_latex_docs)
|
|
|
|
])
|
|
|
|
|
|
|
|
# check for doxygen
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
BB_ENABLE_DOXYGEN
|
|
|
|
|
1999-12-30 18:05:41 -06:00
|
|
|
|
1999-01-21 01:55:18 -06:00
|
|
|
### --------------------------------------------------------------------------
|
1999-01-19 02:29:46 -06:00
|
|
|
### Libraries
|
|
|
|
LIBS="$LIBS -lm"
|
1998-03-18 00:08:12 -06:00
|
|
|
|
2000-04-21 05:49:15 -05:00
|
|
|
|
2000-12-20 18:35:47 -06:00
|
|
|
### --------------------------------------------------------------------------
|
2000-12-21 17:36:41 -06:00
|
|
|
### Berkeley db
|
2001-12-05 11:22:32 -06:00
|
|
|
|
2001-01-09 14:25:29 -06:00
|
|
|
AC_ARG_ENABLE(prefer-db1,
|
|
|
|
[ --enable-prefer-db1 Prefer Berkeley DB 1.x],[prefer_db1="$enableval"],[prefer_db1=yes])
|
2000-12-21 17:36:41 -06:00
|
|
|
|
|
|
|
DB_LIBS=
|
|
|
|
AC_CHECK_FUNC(dbopen, [],
|
|
|
|
if test "$prefer_db1" = "yes"; then
|
|
|
|
AC_CHECK_LIB(db1, dbopen, DB_LIBS="-ldb1",
|
|
|
|
AC_CHECK_LIB(db, dbopen, DB_LIBS="-ldb",
|
2002-03-05 17:28:33 -06:00
|
|
|
AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
|
2003-01-23 15:04:44 -06:00
|
|
|
AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
|
|
|
|
AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
|
|
|
|
)
|
2001-08-31 13:56:40 -05:00
|
|
|
)
|
2000-12-21 17:36:41 -06:00
|
|
|
)
|
|
|
|
)
|
|
|
|
else
|
|
|
|
AC_CHECK_LIB(db, dbopen, DB_LIBS="-ldb",
|
|
|
|
AC_CHECK_LIB(db1, dbopen, DB_LIBS="-ldb1",
|
2002-03-05 17:28:33 -06:00
|
|
|
AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
|
2003-01-23 15:04:44 -06:00
|
|
|
AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
|
|
|
|
AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
|
|
|
|
)
|
2001-08-31 13:56:40 -05:00
|
|
|
)
|
2000-12-21 17:36:41 -06:00
|
|
|
)
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
)
|
|
|
|
|
|
|
|
dnl look for db headers
|
|
|
|
if test "$prefer_db1" = "yes"; then
|
2003-01-23 15:04:44 -06:00
|
|
|
AC_CHECK_HEADERS(db_185.h db1/db.h db4/db_185.h)
|
|
|
|
if test "$ac_cv_header_db_185_h$ac_cv_header_db1_db_h$ac_cv_header_db4_db_185_h" = nonono; then
|
2000-12-21 17:36:41 -06:00
|
|
|
AC_MSG_ERROR([Berkeley db library required for GnuCash])
|
|
|
|
fi
|
|
|
|
AC_DEFINE(PREFER_DB1)
|
|
|
|
else
|
2003-01-23 15:04:44 -06:00
|
|
|
AC_CHECK_HEADERS(db.h db_185.h db1/db.h db4/db_185.h)
|
2000-12-20 18:35:47 -06:00
|
|
|
|
2003-01-23 15:04:44 -06:00
|
|
|
if test "$ac_cv_header_db_h$ac_cv_header_db_185_h$ac_cv_header_db1_db_h$ac_cv_header_db4_db_185_h" = nononono; then
|
2000-12-21 17:36:41 -06:00
|
|
|
AC_MSG_ERROR([Berkeley db library required for GnuCash])
|
|
|
|
fi
|
|
|
|
fi
|
2000-12-20 18:35:47 -06:00
|
|
|
|
2000-12-21 17:36:41 -06:00
|
|
|
AC_SUBST(DB_LIBS)
|
2000-12-20 18:35:47 -06:00
|
|
|
|
2000-12-27 17:37:52 -06:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### popt
|
|
|
|
|
2001-02-24 18:42:44 -06:00
|
|
|
AC_CHECK_LIB(popt, poptStrippedArgv,, [AC_MSG_ERROR([
|
2000-12-27 17:37:52 -06:00
|
|
|
|
|
|
|
popt 1.5 or newer is required to build gnucash. You can download
|
2001-02-24 18:42:44 -06:00
|
|
|
the latest version from ftp://people.redhat.com/sopwith/popt/, or if
|
2001-06-20 03:11:10 -05:00
|
|
|
you're running Debian, install the libpopt-dev package.
|
2001-02-24 18:42:44 -06:00
|
|
|
])])
|
2000-12-27 17:37:52 -06:00
|
|
|
|
1999-01-19 02:29:46 -06:00
|
|
|
|
1999-05-29 18:46:49 -05:00
|
|
|
### --------------------------------------------------------------------------
|
2001-12-05 11:22:32 -06:00
|
|
|
### GNOME gui components -- built by default, but not if --enable-gui=no
|
|
|
|
### or --disable-gui is passed to autogen
|
2000-12-13 19:49:10 -06:00
|
|
|
### --------------------------------------------------------------------------
|
1998-09-14 01:05:10 -05:00
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
AC_ARG_ENABLE(gui,
|
2003-02-19 09:58:08 -06:00
|
|
|
[ --diable-gui build without the GNOME GUI components of Gnucash],
|
2001-12-05 11:22:32 -06:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) gnc_build_gui=true ;;
|
|
|
|
no) gnc_build_gui=false ;;
|
|
|
|
*) gnc_build_gui=true ;;
|
|
|
|
esac],
|
|
|
|
[gnc_build_gui=true])
|
2001-09-06 17:30:14 -05:00
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
AM_CONDITIONAL(GNUCASH_ENABLE_GUI, test x${gnc_build_gui} = xtrue)
|
2001-10-12 14:43:02 -05:00
|
|
|
|
2001-12-05 11:22:32 -06:00
|
|
|
if test x${gnc_build_gui} = xtrue ;
|
|
|
|
then
|
|
|
|
GNOME_INIT
|
|
|
|
GNOME_COMPILE_WARNINGS
|
|
|
|
GNOME_CHECK_GDK_PIXBUF
|
|
|
|
GNOME_PRINT_CHECK
|
|
|
|
|
|
|
|
# gnome-print-check appears tobe sort of b0rked for the time being
|
|
|
|
GNOME_PRINT_CFLAGS=`${GNOME_CONFIG} --cflags print`
|
2003-01-19 19:08:26 -06:00
|
|
|
AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
|
2001-12-05 11:22:32 -06:00
|
|
|
|
|
|
|
### ----------------------------------------------------------------------
|
|
|
|
### Check for glade
|
|
|
|
|
|
|
|
AM_PATH_LIBGLADE
|
|
|
|
|
|
|
|
GLADE_LIBS="$LIBGLADE_LIBS"
|
|
|
|
GLADE_CFLAGS="$LIBGLADE_CFLAGS"
|
|
|
|
|
2003-01-21 14:32:51 -06:00
|
|
|
AS_SCRUB_INCLUDE(GLADE_CFLAGS)
|
2001-12-05 11:22:32 -06:00
|
|
|
AC_SUBST(GLADE_LIBS)
|
|
|
|
AC_SUBST(GLADE_CFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
### ----------------------------------------------------------------------
|
|
|
|
AC_CHECK_LIB(gal, main, true,
|
|
|
|
[AC_MSG_ERROR([gal library not found. See the README and config.log for more info.])],
|
|
|
|
`$GNOME_CONFIG --libs gal`)
|
|
|
|
|
2002-11-18 01:19:56 -06:00
|
|
|
AC_MSG_CHECKING([for gtkhtml < 1.1])
|
|
|
|
GTKHTML_LIBS=`$GNOME_CONFIG --libs gtkhtml`
|
|
|
|
GTKHTML_CFLAGS=`$GNOME_CONFIG --cflags gtkhtml`
|
2003-02-19 09:58:08 -06:00
|
|
|
AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
|
2002-11-18 01:19:56 -06:00
|
|
|
if test "x$GTKHTML_LIBS" != x; then
|
|
|
|
# check for gtkhtml and enable it via HAVE_LIBGTKHTML
|
|
|
|
# if found
|
|
|
|
AC_CHECK_LIB(gtkhtml, gtk_html_new,
|
|
|
|
GNOMEBUILDLIBS="${GNOMEBUILDLIBS}"
|
|
|
|
AC_DEFINE(HAVE_LIBGTKHTML),
|
|
|
|
AC_MSG_ERROR([Cannot find gtkhtml. See the README and config.log for more info.]),
|
|
|
|
$GTKHTML_LIBS)
|
|
|
|
else
|
2002-12-23 22:29:36 -06:00
|
|
|
AC_PATH_PROG(PKG_CONFIG,pkg-config)
|
2002-11-18 01:19:56 -06:00
|
|
|
if test "x$PKG_CONFIG" = x; then
|
2002-12-23 22:29:36 -06:00
|
|
|
# @*%&$ Ximian programmers renamed this application
|
|
|
|
AC_PATH_PROG(PKG_CONFIG,pkgconfig)
|
|
|
|
if test "x$PKG_CONFIG" = x; then
|
|
|
|
AC_MSG_ERROR([Could not find the pkg-config (or pkgconfig) program.],)
|
|
|
|
fi
|
2002-11-18 01:19:56 -06:00
|
|
|
fi
|
|
|
|
GTKHTML_LIBS=`$PKG_CONFIG --libs gtkhtml-1.1`
|
|
|
|
GTKHTML_CFLAGS=`$PKG_CONFIG --cflags gtkhtml-1.1`
|
2003-02-19 09:58:08 -06:00
|
|
|
AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
|
2002-11-18 01:19:56 -06:00
|
|
|
# check for gtkhtml and enable it via HAVE_LIBGTKHTML
|
|
|
|
# if found
|
2002-12-23 22:29:36 -06:00
|
|
|
AC_MSG_CHECKING([for gtkhtml >= 1.1])
|
2002-11-18 01:19:56 -06:00
|
|
|
AC_CHECK_LIB(gtkhtml-1.1, gtk_html_new,
|
|
|
|
GNOMEBUILDLIBS="${GNOMEBUILDLIBS} $GTKHTML_TEST_LIB"
|
|
|
|
AC_DEFINE(HAVE_LIBGTKHTML),
|
|
|
|
AC_MSG_ERROR([Cannot find gtkhtml-1.1. See the README and config.log for more info.]),
|
|
|
|
$GTKHTML_LIBS)
|
|
|
|
fi
|
2001-12-05 11:22:32 -06:00
|
|
|
|
|
|
|
GHTTP_LIBS=`$GNOME_CONFIG --libs ghttp`
|
|
|
|
GHTTP_CFLAGS=`$GNOME_CONFIG --cflags ghttp`
|
|
|
|
|
|
|
|
# Note: this doesn't croak if GHTTP_LIBS is empty! (e.g. on RH6.2)
|
|
|
|
AC_CHECK_LIB(ghttp, ghttp_request_new,
|
|
|
|
GNOMEBUILDLIBS="${GNOMEBUILDLIBS} ghttp"
|
|
|
|
AC_DEFINE(HAVE_LIBGHTTP)
|
|
|
|
if test "x$GHTTP_LIBS" = "x" ; then
|
|
|
|
GHTTP_LIBS=-lghttp
|
|
|
|
fi,
|
|
|
|
AC_MSG_ERROR([Cannot find ghttp. See the README and config.log for more info.]),
|
|
|
|
$GHTTP_LIBS)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(ghttp, ghttp_enable_ssl,
|
|
|
|
AC_DEFINE(HAVE_OPENSSL),
|
|
|
|
AC_MSG_WARN([****** ghttp does not have SSL support.]),
|
|
|
|
$GHTTP_LIBS)
|
|
|
|
|
2002-11-17 18:59:52 -06:00
|
|
|
AS_SCRUB_INCLUDE(GHTTP_CFLAGS)
|
2001-12-05 11:22:32 -06:00
|
|
|
AC_SUBST(GTKHTML_LIBS)
|
|
|
|
AC_SUBST(GTKHTML_CFLAGS)
|
|
|
|
AC_SUBST(GHTTP_LIBS)
|
|
|
|
AC_SUBST(GHTTP_CFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
### ----------------------------------------------------------------------
|
|
|
|
### guppi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE( guppi,
|
|
|
|
[ --disable-guppi compile without guppi support],
|
|
|
|
if test $enableval = no; then
|
|
|
|
USE_GUPPI=0
|
|
|
|
else
|
|
|
|
USE_GUPPI=1
|
|
|
|
fi,
|
|
|
|
USE_GUPPI=1 )
|
|
|
|
|
|
|
|
if test ${USE_GUPPI} = 0; then
|
|
|
|
AC_MSG_WARN([Compiling without guppi support])
|
|
|
|
else
|
|
|
|
AC_DEFINE(USE_GUPPI)
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE( efence,
|
|
|
|
[ --enable-efence link using efence],
|
|
|
|
if test $enableval = yes; then
|
|
|
|
EFENCE_LIBS="-lefence"
|
|
|
|
USE_EFENCE=1
|
2002-01-06 20:41:09 -06:00
|
|
|
AC_DEFINE(USE_EFENCE)
|
2001-12-05 11:22:32 -06:00
|
|
|
fi,
|
|
|
|
USE_EFENCE=0
|
|
|
|
EFENCE_LIBS="")
|
|
|
|
AC_SUBST(EFENCE_LIBS)
|
|
|
|
|
|
|
|
## Things guppi needs (actually are these guppi dependencies or gtkhtml's?)
|
|
|
|
|
|
|
|
# LAME: if you ask gnome-config for the zvt libs, it doesn't include
|
|
|
|
# imlib, though it needs it so we'll just steal gtkhtml's which does.
|
|
|
|
AC_CHECK_LIB(zvt, main, true,
|
|
|
|
[AC_MSG_ERROR([libzvt development files not found. See config.log.])],
|
2003-01-27 11:54:15 -06:00
|
|
|
`$GNOME_CONFIG --libs zvt` $GTKHTML_LIBS)
|
2001-12-05 11:22:32 -06:00
|
|
|
|
|
|
|
#AC_CHECK_LIB(bonobo, main, true,
|
|
|
|
# [AC_MSG_ERROR([libbonobo development files not found. See config.log.])
|
|
|
|
#],
|
|
|
|
# `$GNOME_CONFIG --libs bonobo`)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(oaf, main, true,
|
|
|
|
[AC_MSG_ERROR([liboaf development files not found. See config.log.])],
|
|
|
|
`$GNOME_CONFIG --libs oaf`)
|
|
|
|
|
|
|
|
## guppi itself.
|
|
|
|
|
|
|
|
GUPPI_LIBS=`$GNOME_CONFIG --libs libguppi`
|
|
|
|
GUPPI_CFLAGS=`$GNOME_CONFIG --cflags libguppi`
|
2002-11-17 18:59:52 -06:00
|
|
|
AS_SCRUB_INCLUDE(GUPPI_CFLAGS)
|
2002-12-14 13:25:58 -06:00
|
|
|
LIBGUPPI_CHECK
|
2001-12-05 11:22:32 -06:00
|
|
|
AC_SUBST(GUPPI_LIBS)
|
|
|
|
AC_SUBST(GUPPI_CFLAGS)
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
### ----------------------------------------------------------------------
|
|
|
|
### XIM
|
|
|
|
AC_ARG_ENABLE(xim,
|
|
|
|
[ --enable-xim support XIM [default=yes]],
|
|
|
|
, enable_xim="yes")
|
|
|
|
|
|
|
|
if test "x$enable_xim" = "xyes"; then
|
|
|
|
GTK_XIM_FLAGS="-DUSE_XIM"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(GTK_XIM_FLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
### ----------------------------------------------------------------------
|
|
|
|
## For now, we just presume you're using the GNOME version. The other
|
|
|
|
## UI's haven't been carried over during the automake transition. At
|
|
|
|
## some point, if it's deemed worthwhile, they can be resurrected...
|
|
|
|
|
|
|
|
GNOME=1
|
|
|
|
AC_DEFINE(GNOME)
|
2002-10-19 10:51:06 -05:00
|
|
|
else
|
|
|
|
# GNOME_COMPILE_WARNINGS will add -Wall; no need to set it again.
|
|
|
|
# also, only add it for GCC.
|
|
|
|
if test ${GCC}x = yesx
|
|
|
|
then
|
|
|
|
# We should always see these errors...
|
|
|
|
CFLAGS="${CFLAGS} -Wall"
|
|
|
|
fi
|
2001-12-05 11:22:32 -06:00
|
|
|
fi
|
2001-10-12 14:43:02 -05:00
|
|
|
|
2002-05-07 18:22:24 -05:00
|
|
|
###-------------------------------------------------------------------------
|
|
|
|
### Stuff from Mac OS X Port
|
|
|
|
###-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(pthread_mutex_init)
|
|
|
|
AC_REPLACE_FUNCS(strptime localtime_r)
|
|
|
|
#AC_REPLACE_FUNCS(scm_strptime)
|
|
|
|
|
|
|
|
if test $am_cv_val_LC_MESSAGES = "no"; then
|
|
|
|
LC_MESSAGES_ENUM="LC_ALL"
|
|
|
|
else
|
|
|
|
LC_MESSAGES_ENUM="LC_MESSAGES"
|
|
|
|
fi
|
|
|
|
AC_SUBST(LC_MESSAGES_ENUM)
|
|
|
|
|
2002-05-08 00:01:48 -05:00
|
|
|
if test $am_cv_scanf_lld = "no"; then
|
2002-05-07 18:22:24 -05:00
|
|
|
AC_MSG_CHECKING(if scanf supports %qd conversion)
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
long long int d;
|
|
|
|
d = 0;
|
|
|
|
if ((sscanf ("10000000000", "%qd", &d) != 1) || (d != 10000000000))
|
|
|
|
exit (1);
|
|
|
|
exit (0);
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
AC_DEFINE(HAVE_SCANF_QD, 1,
|
|
|
|
[Define if scanf supports %qd conversions.])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
2002-05-08 00:01:48 -05:00
|
|
|
AC_MSG_ERROR([cannot continue, no long long conversion support in scanf])
|
2002-05-07 18:22:24 -05:00
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
2001-10-12 14:43:02 -05:00
|
|
|
|
2001-09-06 17:30:14 -05:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### GnuCash flags and libs configuration
|
|
|
|
|
2001-12-11 10:27:44 -06:00
|
|
|
GNUCASH_ENGINE_BASE_LIBS="${GLIB_LIBS}"
|
2002-01-09 15:18:27 -06:00
|
|
|
GNUCASH_ENGINE_LIBS="-L${GNC_MODULE_DIR} -L${GNC_GWRAP_LIBDIR} ${GNUCASH_ENGINE_BASE_LIBS} ${GUILE_LIBS} -lgncmod-engine -lgw-engine -lgw-kvp -lgncmodule"
|
2001-09-06 17:30:14 -05:00
|
|
|
|
2001-12-11 10:27:44 -06:00
|
|
|
GNUCASH_ENGINE_BASE_CFLAGS="${GLIB_CFLAGS} ${G_WRAP_COMPILE_ARGS}"
|
2003-03-20 22:28:21 -06:00
|
|
|
GNUCASH_ENGINE_CFLAGS="${GNUCASH_ENGINE_BASE_CFLAGS} ${GUILE_INCS}"
|
2001-09-06 17:30:14 -05:00
|
|
|
|
|
|
|
AC_SUBST(GNUCASH_ENGINE_BASE_LIBS)
|
|
|
|
AC_SUBST(GNUCASH_ENGINE_LIBS)
|
|
|
|
AC_SUBST(GNUCASH_ENGINE_BASE_CFLAGS)
|
|
|
|
AC_SUBST(GNUCASH_ENGINE_CFLAGS)
|
|
|
|
|
2001-09-15 01:09:43 -05:00
|
|
|
GNUCASH_APP_UTILS_CFLAGS="${GNUCASH_ENGINE_CFLAGS}"
|
|
|
|
GNUCASH_APP_UTILS_LIBS="${GNUCASH_ENGINE_LIBS} -lgncmod-calculation -lgncmod-app-utils"
|
|
|
|
|
|
|
|
AC_SUBST(GNUCASH_APP_UTILS_CFLAGS)
|
|
|
|
AC_SUBST(GNUCASH_APP_UTILS_LIBS)
|
|
|
|
|
2001-09-18 03:38:21 -05:00
|
|
|
GNUCASH_NETWORK_UTILS_CFLAGS="${GLIB_CFLAGS} ${GHTTP_CFLAGS} ${GNOME_INCLUDEDIR}"
|
|
|
|
GNUCASH_NETWORK_UTILS_LIBS="${GHTTP_LIBS} ${GNOME_LIBDIR} ${GNOME_LIBS} ${GNOMEUI_LIBS} -lgncmod-network-utils"
|
|
|
|
|
|
|
|
AC_SUBST(GNUCASH_NETWORK_UTILS_CFLAGS)
|
|
|
|
AC_SUBST(GNUCASH_NETWORK_UTILS_LIBS)
|
|
|
|
|
2001-11-07 16:41:56 -06:00
|
|
|
GNUCASH_GNOME_UTILS_CFLAGS="${GNUCASH_APP_UTILS_CFLAGS} ${GNUCASH_NETWORK_UTILS_CFLAGS} ${GNOME_PRINT_CFLAGS} ${GNOME_INCLUDEDIR} ${GUPPI_CFLAGS} ${GDK_PIXBUF_CFLAGS}"
|
|
|
|
GNUCASH_GNOME_UTILS_LIBS="${GNUCASH_APP_UTILS_LIBS} ${GNUCASH_NETWORK_UTILS_LIBS} ${GNOME_LIBDIR} ${GNOMEUI_LIBS} ${GNOME_PRINT_LIBS} ${GTKHTML_LIBS} ${GLADE_LIBS} ${GUPPI_LIBS} ${GDK_PIXBUF_LIBS} -lgncmod-gnome-utils"
|
2001-09-18 03:38:21 -05:00
|
|
|
|
|
|
|
AC_SUBST(GNUCASH_GNOME_UTILS_CFLAGS)
|
|
|
|
AC_SUBST(GNUCASH_GNOME_UTILS_LIBS)
|
|
|
|
|
2001-09-19 03:36:14 -05:00
|
|
|
GNUCASH_REGISTER_CORE_CFLAGS="${GNUCASH_GNOME_UTILS_CFLAGS}"
|
|
|
|
GNUCASH_REGISTER_CORE_LIBS="${GNUCASH_GNOME_UTILS_LIBS} -lgncmod-register-core"
|
|
|
|
|
|
|
|
AC_SUBST(GNUCASH_REGISTER_CORE_CFLAGS)
|
|
|
|
AC_SUBST(GNUCASH_REGISTER_CORE_LIBS)
|
|
|
|
|
2002-02-28 02:31:32 -06:00
|
|
|
AM_CONDITIONAL(GNUCASH_SEPARATE_BUILDDIR, test "x${srcdir}" != "x.")
|
2003-01-15 18:48:17 -06:00
|
|
|
AM_CONDITIONAL(GNC_FALSE, false)
|
2001-09-06 17:30:14 -05:00
|
|
|
|
2003-02-02 10:35:49 -06:00
|
|
|
###-------------------------------------------------------------------------
|
|
|
|
### Additional compiler warnings (or not) if we're running GCC
|
|
|
|
###-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# This has to come after AC_PROG_CC _AND_ GNOME_COMPILE_WARNINGS
|
|
|
|
AC_MSG_CHECKING(what extra warning flags to pass to the C compiler)
|
|
|
|
if test ${GCC}x = yesx
|
|
|
|
then
|
|
|
|
warnFLAGS=
|
|
|
|
# These two are because of g-wrap -- it can't avoid unused and uninitialized.
|
|
|
|
#warnFLAGS="${warnFLAGS} -Wno-uninitialized"
|
|
|
|
#warnFLAGS="${warnFLAGS} -Wno-unused"
|
|
|
|
# other flags...
|
|
|
|
# These next two are included in the GNOME_COMPILE_WARNINGS
|
|
|
|
#warnFLAGS="${warnFLAGS} -Wmissing-prototypes"
|
|
|
|
#warnFLAGS="${warnFLAGS} -Wmissing-declarations"
|
|
|
|
#warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall
|
|
|
|
|
|
|
|
|
|
|
|
## Disable error-on-warning by default again because this seriously
|
|
|
|
## breaks quite a number of configure tests (due to, like, 'warning:
|
|
|
|
## unused variable some_variable') -- cstim, 02/02/2003
|
|
|
|
#
|
|
|
|
# Re-enabled and moved to later in the build process. This should allow
|
|
|
|
# us to keep it turned on, but also not break configure proceses.
|
|
|
|
# -- warlord, 02/02/2003
|
|
|
|
|
|
|
|
# Enable error-on-warning by default -- I'm tired of fixing other
|
|
|
|
# people's missing #includes, etc.
|
|
|
|
AC_ARG_ENABLE(error-on-warning,
|
2003-02-19 09:58:08 -06:00
|
|
|
[ --disable-error-on-warning disable treating compile warnings as errors],
|
2003-02-02 10:35:49 -06:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) warnFLAGS="${warnFLAGS} -Werror" ;;
|
|
|
|
no) ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
|
|
|
|
esac],
|
|
|
|
[ warnFLAGS="${warnFLAGS} -Werror" ])
|
|
|
|
|
|
|
|
CFLAGS="${CFLAGS} ${warnFLAGS}"
|
|
|
|
|
|
|
|
else
|
|
|
|
warnFLAGS=none
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($warnFLAGS)
|
|
|
|
|
2001-11-12 16:27:52 -06:00
|
|
|
### --------------------------------------------------------------------------
|
2001-11-28 17:21:43 -06:00
|
|
|
### Adjustments -- especially executables that aren't generated via
|
|
|
|
### makefiles, so that we don't have an opportunity to adjust them
|
|
|
|
### there.
|
2001-11-12 16:27:52 -06:00
|
|
|
|
2003-01-06 01:15:30 -06:00
|
|
|
chmod u+x ${srcdir}/src/gnc-test-env
|
|
|
|
chmod u+x ${srcdir}/src/bin/generate-gnc-script
|
|
|
|
chmod u+x ${srcdir}/src/bin/overrides/gnucash
|
|
|
|
chmod u+x ${srcdir}/src/bin/overrides/gnucash-run-script
|
|
|
|
chmod u+x ${srcdir}/src/bin/overrides/gnucash-make-guids
|
2001-11-12 16:27:52 -06:00
|
|
|
|
2000-09-13 17:33:15 -05:00
|
|
|
### --------------------------------------------------------------------------
|
|
|
|
### Makefile creation
|
1997-11-30 20:33:00 -06:00
|
|
|
|
2002-05-18 15:32:22 -05:00
|
|
|
# This is necessary so that .o files in LIBOBJS are also built via
|
|
|
|
# the ANSI2KNR-filtering rules.
|
2002-10-05 09:24:10 -05:00
|
|
|
LIBOBJS_SEDSCRIPT="s,\.[[^.]]* ,$U&,g;s,\.[[^.]]*\$\$,$U&,"
|
|
|
|
AC_SUBST(LIBOBJS_SEDSCRIPT)
|
2002-05-18 15:32:22 -05:00
|
|
|
|
2003-01-06 01:15:30 -06:00
|
|
|
AC_OUTPUT( m4/Makefile intl/Makefile po/Makefile.in
|
2000-05-08 18:59:45 -05:00
|
|
|
dnl # Makefiles
|
|
|
|
Makefile
|
2000-12-07 04:44:33 -06:00
|
|
|
accounts/Makefile
|
|
|
|
accounts/C/Makefile
|
2001-09-09 02:24:40 -05:00
|
|
|
accounts/da/Makefile
|
2001-06-08 16:59:31 -05:00
|
|
|
accounts/de_DE/Makefile
|
2002-12-11 16:47:15 -06:00
|
|
|
accounts/el_GR/Makefile
|
2001-09-06 15:07:02 -05:00
|
|
|
accounts/es_ES/Makefile
|
2002-07-01 17:24:28 -05:00
|
|
|
accounts/fr_FR/Makefile
|
2002-11-27 14:52:59 -06:00
|
|
|
accounts/pt_BR/Makefile
|
2001-06-07 18:29:53 -05:00
|
|
|
accounts/pt_PT/Makefile
|
2001-10-22 01:56:25 -05:00
|
|
|
accounts/sk/Makefile
|
2000-06-05 00:51:39 -05:00
|
|
|
debian/Makefile
|
2000-06-02 04:00:31 -05:00
|
|
|
doc/Makefile
|
|
|
|
doc/examples/Makefile
|
2001-09-18 05:12:50 -05:00
|
|
|
intl-scm/Makefile
|
2000-06-05 00:51:39 -05:00
|
|
|
lib/Makefile
|
2001-04-17 16:37:38 -05:00
|
|
|
lib/guile-www/Makefile
|
2001-05-15 10:50:35 -05:00
|
|
|
lib/srfi/Makefile
|
2002-05-07 18:22:24 -05:00
|
|
|
lib/libc/Makefile
|
2000-09-13 17:33:15 -05:00
|
|
|
macros/Makefile
|
2000-05-08 18:59:45 -05:00
|
|
|
rpm/Makefile
|
1998-10-27 23:55:38 -06:00
|
|
|
src/Makefile
|
2001-09-19 21:38:15 -05:00
|
|
|
src/app-file/Makefile
|
2001-11-07 16:41:56 -06:00
|
|
|
src/app-file/test/Makefile
|
2001-09-21 18:32:20 -05:00
|
|
|
src/app-file/gnome/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/app-utils/Makefile
|
|
|
|
src/app-utils/test/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/backend/Makefile
|
2001-10-10 18:19:41 -05:00
|
|
|
src/backend/net/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/backend/file/Makefile
|
|
|
|
src/backend/file/test/Makefile
|
|
|
|
src/backend/file/test/test-files/Makefile
|
|
|
|
src/backend/file/test/test-files/xml2/Makefile
|
|
|
|
src/backend/postgres/Makefile
|
|
|
|
src/backend/postgres/test/Makefile
|
|
|
|
src/backend/rpc/Makefile
|
2001-11-21 13:34:17 -06:00
|
|
|
src/bin/Makefile
|
2001-11-28 17:21:43 -06:00
|
|
|
src/bin/overrides/Makefile
|
|
|
|
src/bin/test/Makefile
|
2001-11-20 20:37:11 -06:00
|
|
|
src/core-utils/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/calculation/Makefile
|
2001-11-07 16:41:56 -06:00
|
|
|
src/calculation/test/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/doc/Makefile
|
|
|
|
src/doc/design/Makefile
|
2001-08-31 16:30:22 -05:00
|
|
|
src/doc/xml/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/engine/Makefile
|
|
|
|
src/engine/test/Makefile
|
2001-08-17 19:13:45 -05:00
|
|
|
src/engine/test-core/Makefile
|
2000-06-05 00:51:39 -05:00
|
|
|
src/experimental/Makefile
|
|
|
|
src/experimental/cbb/Makefile
|
|
|
|
src/experimental/cbb/cbb-engine/Makefile
|
2001-01-05 19:00:40 -06:00
|
|
|
src/experimental/cgi-bin/Makefile
|
2000-06-05 00:51:39 -05:00
|
|
|
src/experimental/gg/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/gnc-module/Makefile
|
|
|
|
src/gnc-module/test/Makefile
|
|
|
|
src/gnc-module/test/mod-foo/Makefile
|
|
|
|
src/gnc-module/test/mod-bar/Makefile
|
|
|
|
src/gnc-module/test/mod-baz/Makefile
|
|
|
|
src/gnc-module/test/misc-mods/Makefile
|
1998-10-27 23:55:38 -06:00
|
|
|
src/gnome/Makefile
|
2001-06-12 05:22:42 -05:00
|
|
|
src/gnome/glade/Makefile
|
2001-09-10 02:01:57 -05:00
|
|
|
src/gnome-utils/Makefile
|
2001-09-10 06:12:41 -05:00
|
|
|
src/gnome-utils/test/Makefile
|
2002-02-07 23:09:52 -06:00
|
|
|
src/gnome-search/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/import-export/Makefile
|
2002-06-20 19:46:36 -05:00
|
|
|
src/import-export/test/Makefile
|
2001-09-18 18:45:29 -05:00
|
|
|
src/import-export/binary-import/Makefile
|
2001-09-19 03:36:14 -05:00
|
|
|
src/import-export/binary-import/test/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/import-export/qif-import/Makefile
|
2001-11-07 16:41:56 -06:00
|
|
|
src/import-export/qif-import/test/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/import-export/qif-io-core/Makefile
|
|
|
|
src/import-export/qif-io-core/test/Makefile
|
2002-06-20 19:46:36 -05:00
|
|
|
src/import-export/ofx/Makefile
|
|
|
|
src/import-export/ofx/test/Makefile
|
2002-06-04 18:11:33 -05:00
|
|
|
src/import-export/hbci/Makefile
|
2002-07-27 12:13:49 -05:00
|
|
|
src/import-export/hbci/glade/Makefile
|
2002-06-04 18:11:33 -05:00
|
|
|
src/import-export/hbci/test/Makefile
|
2001-09-11 03:41:44 -05:00
|
|
|
src/network-utils/Makefile
|
|
|
|
src/network-utils/test/Makefile
|
2000-06-02 04:00:31 -05:00
|
|
|
src/optional/Makefile
|
2001-07-27 02:14:09 -05:00
|
|
|
src/optional/swig/Makefile
|
2001-10-29 12:38:19 -06:00
|
|
|
src/optional/swig/examples/Makefile
|
2000-06-02 04:00:31 -05:00
|
|
|
src/pixmaps/Makefile
|
2000-05-08 18:59:45 -05:00
|
|
|
src/quotes/Makefile
|
1998-10-27 23:55:38 -06:00
|
|
|
src/register/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/register/ledger-core/Makefile
|
2001-09-15 02:03:32 -05:00
|
|
|
src/register/ledger-core/test/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/register/register-core/Makefile
|
2001-09-14 04:31:23 -05:00
|
|
|
src/register/register-core/test/Makefile
|
2001-08-07 18:29:04 -05:00
|
|
|
src/register/register-gnome/Makefile
|
2001-09-15 01:26:23 -05:00
|
|
|
src/register/register-gnome/test/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/report/Makefile
|
2001-12-07 02:49:57 -06:00
|
|
|
src/report/report-gnome/Makefile
|
2001-12-12 03:49:54 -06:00
|
|
|
src/report/report-gnome/test/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/report/report-system/Makefile
|
2003-01-06 01:15:30 -06:00
|
|
|
src/report/report-system/test/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/report/standard-reports/Makefile
|
2003-01-06 01:15:30 -06:00
|
|
|
src/report/standard-reports/test/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/report/locale-specific/Makefile
|
|
|
|
src/report/locale-specific/us/Makefile
|
|
|
|
src/report/locale-specific/us/test/Makefile
|
|
|
|
src/report/stylesheets/Makefile
|
2003-01-06 01:15:30 -06:00
|
|
|
src/report/stylesheets/test/Makefile
|
2001-08-16 19:44:01 -05:00
|
|
|
src/report/utility-reports/Makefile
|
|
|
|
src/report/utility-reports/test/Makefile
|
2000-05-08 18:59:45 -05:00
|
|
|
src/scm/Makefile
|
2000-06-02 04:00:31 -05:00
|
|
|
src/scm/gnumeric/Makefile
|
|
|
|
src/scm/printing/Makefile
|
2001-08-19 20:57:37 -05:00
|
|
|
src/tax/Makefile
|
|
|
|
src/tax/us/Makefile
|
|
|
|
src/tax/us/test/Makefile
|
2001-08-17 17:49:17 -05:00
|
|
|
src/test-core/Makefile
|
2001-11-16 19:17:06 -06:00
|
|
|
src/business/Makefile
|
|
|
|
src/business/business-core/Makefile
|
|
|
|
src/business/business-core/test/Makefile
|
2002-03-04 13:34:52 -06:00
|
|
|
src/business/business-core/file/Makefile
|
2003-01-18 17:36:53 -06:00
|
|
|
src/business/business-utils/Makefile
|
2002-06-16 14:07:18 -05:00
|
|
|
src/business/dialog-tax-table/Makefile
|
2001-11-16 19:17:06 -06:00
|
|
|
src/business/business-gnome/Makefile
|
2002-06-16 14:07:18 -05:00
|
|
|
src/business/business-gnome/glade/Makefile
|
2001-11-26 17:30:33 -06:00
|
|
|
src/business/business-ledger/Makefile
|
2002-06-16 14:07:18 -05:00
|
|
|
src/business/business-reports/Makefile
|
2001-06-13 12:59:48 -05:00
|
|
|
|
2000-05-08 18:59:45 -05:00
|
|
|
dnl # non-makefiles
|
|
|
|
dnl # Please read doc/build-system before adding *anything* here
|
2001-10-25 18:31:44 -05:00
|
|
|
|
|
|
|
dnl # we configure gnucash-config here because we *don't*
|
|
|
|
dnl # want variables to be fully expanded
|
|
|
|
gnucash-config
|
2000-05-08 18:59:45 -05:00
|
|
|
,
|
2000-06-02 04:00:31 -05:00
|
|
|
dnl # commands go here, but we don't have any right now
|
2002-11-30 02:59:19 -06:00
|
|
|
)
|
2003-01-01 22:21:00 -06:00
|
|
|
|
|
|
|
if test x$RPC_DIR = xrpc ; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
|
|
|
|
The RPC Backend is depricated. You should not use it.
|
|
|
|
It may go away in the future. If you need it, please
|
|
|
|
contact gnucash-devel@gnucash.org and let the developers
|
|
|
|
know.
|
|
|
|
])
|
|
|
|
fi
|