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
2005-11-01 21:32:36 -06:00
# Autoconf initialization
2011-06-06 16:02:49 -05:00
AC_PREREQ(2.60)
2013-11-30 21:24:15 -06:00
AC_INIT([GnuCash], [2.5.9], [gnucash-devel@gnucash.org])
2005-11-01 21:32:36 -06:00
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(src/engine/Transaction.h)
2001-10-03 02:08:31 -05:00
2011-01-29 17:38:10 -06:00
#Change this in development versions when changing anything that
#affects stored data structures. Reset to zero when bumping version.
GNUCASH_NANO_VERSION=0
2011-02-01 18:04:29 -06:00
#This should be the earliest version in the form XXMMUUNN (XX=MAJOR,
#MM=MINOR, UU=MICRO, NN=NANO) or SVN revision if before 2.4.1 which is
#storage-compatible with the current version. See the comments in
#src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_load.
GNUCASH_RESAVE_VERSION=19920
2006-02-11 17:24:01 -06:00
# Initialize automake -- make sure we have at least version 1.9
2013-06-25 12:04:30 -05:00
AM_INIT_AUTOMAKE([1.9 dist-bzip2])
1998-10-20 22:42:25 -05:00
2006-02-11 17:24:01 -06:00
# Parse out the version number
GNUCASH_VERSION_STRING=AC_PACKAGE_VERSION
2006-02-11 19:59:02 -06:00
GNUCASH_MAJOR_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\([^.]*\)\.\(.*\)$/\1/' ]`
GNUCASH_MINOR_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\([^.]*\)\.\(.*\)$/\2/' ]`
GNUCASH_MICRO_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\([^.]*\)\.\(.*\)$/\3/' ]`
2010-04-28 08:23:27 -05:00
GNUCASH_LATEST_STABLE_SERIES=$GNUCASH_MAJOR_VERSION.$(($GNUCASH_MINOR_VERSION-($GNUCASH_MINOR_VERSION%2)))
2001-09-07 04:04:31 -05:00
2007-01-30 20:36:53 -06:00
# save any user/environment optimization flags before we muck with them in
# --enable-debug:
USER_OPTIMIZATION=""
for flag in $CFLAGS; do
2008-11-26 07:32:31 -06:00
tmp_flag=`echo $flag | sed -e 's,-O.,,'`
if test -z "$tmp_flag"; then
2012-06-23 21:58:01 -05:00
USER_OPTIMIZATION="$USER_OPTIMIZATION ${flag}"
2007-01-30 20:36:53 -06:00
fi
done
2005-11-01 21:32:36 -06:00
## Do this first, because the other tests depend on it:
# Check for gcc and intltool (somehow breaks the suggested content
# order, doesn't it? Whatever.)
2001-10-03 02:08:31 -05:00
AC_PROG_CC
2007-12-30 12:34:08 -06:00
AM_PROG_CC_C_O
2006-05-10 20:14:12 -05:00
AC_GNU_SOURCE
2005-11-01 21:32:36 -06:00
AC_PROG_INTLTOOL
2001-10-03 02:08:31 -05:00
2001-09-07 04:04:31 -05:00
AC_SUBST(GNUCASH_MAJOR_VERSION)
AC_SUBST(GNUCASH_MINOR_VERSION)
AC_SUBST(GNUCASH_MICRO_VERSION)
2011-01-29 17:38:10 -06:00
AC_SUBST(GNUCASH_NANO_VERSION)
2010-04-28 08:23:27 -05:00
AC_SUBST(GNUCASH_LATEST_STABLE_SERIES)
2001-09-07 04:04:31 -05:00
2003-05-08 19:58:23 -05:00
AC_DEFINE_UNQUOTED(GNUCASH_MAJOR_VERSION, $GNUCASH_MAJOR_VERSION,
2010-08-31 14:55:34 -05:00
[GnuCash Major version number])
2003-05-08 19:58:23 -05:00
AC_DEFINE_UNQUOTED(GNUCASH_MINOR_VERSION, $GNUCASH_MINOR_VERSION,
2010-08-31 14:55:34 -05:00
[GnuCash Minor version number])
2003-05-08 19:58:23 -05:00
AC_DEFINE_UNQUOTED(GNUCASH_MICRO_VERSION, $GNUCASH_MICRO_VERSION,
2010-08-31 14:55:34 -05:00
[GnuCash Micro version number])
2011-01-29 17:38:10 -06:00
AC_DEFINE_UNQUOTED(GNUCASH_NANO_VERSION, $GNUCASH_NANO_VERSION,
[GnuCash Nano version number])
2011-02-01 18:04:29 -06:00
AC_DEFINE_UNQUOTED(GNUCASH_RESAVE_VERSION, $GNUCASH_RESAVE_VERSION,
[GnuCash earliest compatible databaseversion number])
2010-04-28 08:23:27 -05:00
AC_DEFINE_UNQUOTED(GNUCASH_LATEST_STABLE_SERIES, "$GNUCASH_LATEST_STABLE_SERIES",
2010-08-31 14:55:34 -05:00
[Most recent stable GnuCash series])
2001-09-07 04:04:31 -05:00
2001-09-19 03:36:14 -05:00
dnl Set of available languages.
2013-12-11 16:36:02 -06:00
ALL_LINGUAS="ar bg ca cs da de el en_GB es_NI es eu fa fi fr he hu it ja ko lt lv nb ne nl pl pt_BR pt ro ru rw sk sv ta tr uk vi zh_CN zh_TW"
2005-11-01 21:32:36 -06:00
GETTEXT_PACKAGE=gnucash
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
2010-08-31 14:55:34 -05:00
[GetText version number])
2005-11-01 21:32:36 -06:00
AM_GLIB_GNU_GETTEXT
2001-09-19 03:36:14 -05:00
2011-05-23 14:44:24 -05:00
# Enable only when we have autoconf --version >= 2.59
# on all platforms. Note that AC_PREREQ(2.59) may be
# insufficient to actually use v2.59 on OSX
#AC_CONFIG_MACRO_DIR(macros)
1998-10-20 22:42:25 -05:00
AC_PROG_INSTALL
2011-02-18 05:35:34 -06:00
PKG_PROG_PKG_CONFIG
2001-10-10 18:19:41 -05:00
2013-12-02 17:46:22 -06:00
dnl clang wants to check file encodings, and we need to tell it not to
dnl becuase of the unicode currency symbols. But older versions of GCC
dnl don't like the warning suppression option, so we need to set it only
dnl with clang.
AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifndef __clang__
not clang
#endif
]])],
[ac_cv_CLANG=yes], [ac_cv_CLANG=no])
AC_MSG_RESULT([$ac_cv_CLANG])
AM_CONDITIONAL([CLANG], [test "x$ac_cv_CLANG" = "xyes"])
2011-02-18 03:37:24 -06:00
###--------------------------------------------------------
### Optionally enable gtkmm plugin (requires c++ compiler)
###--------------------------------------------------------
2011-02-18 05:35:34 -06:00
enable_GTKMM=false
2011-02-18 03:37:24 -06:00
AC_ARG_ENABLE(gtkmm,
2011-02-18 05:35:34 -06:00
[AS_HELP_STRING([--enable-gtkmm],[enable gtkmm gui])],
2011-02-18 03:37:24 -06:00
[case "${enableval}" in
2011-02-18 05:35:34 -06:00
yes) enable_GTKMM=true ;;
no) enable_GTKMM=false ;;
*) enable_GTKMM=false ;;
2011-02-18 03:37:24 -06:00
esac]
)
2011-02-18 05:35:34 -06:00
AS_IF([test x${enable_GTKMM} = "xtrue"],
2011-02-18 03:37:24 -06:00
[
# We require gtkmm, of course
2012-04-15 13:57:05 -05:00
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.24)
2011-02-18 03:37:24 -06:00
# and also the c++ compiler
AC_PROG_CXXCPP
AC_PROG_CXX
2011-11-17 15:27:40 -06:00
_COMPONENTS="$_COMPONENTS gtkmm"
2011-02-18 03:37:24 -06:00
])
2011-11-17 15:27:40 -06:00
AM_CONDITIONAL([WITH_GTKMM], [test x${enable_GTKMM} = "xtrue"])
2011-02-18 03:37:24 -06:00
# This section must come before AC_PROG_LIBTOOL because libtool
# must know about the c++ compiler.
###--------------------------------------------------------
2001-10-10 18:19:41 -05:00
AC_LIBTOOL_DLOPEN
2008-08-01 17:04:02 -05:00
AC_LIBTOOL_WIN32_DLL
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
2006-03-09 08:28:54 -06:00
AC_PROG_LN_S
2000-04-14 05:42:18 -05:00
AC_HEADER_STDC
2012-04-13 15:43:23 -05:00
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h sys/wait.h pow.h)
2001-07-01 16:09:09 -05:00
AC_CHECK_FUNCS(stpcpy memcpy timegm towupper)
2005-11-01 21:32:36 -06:00
AC_CHECK_FUNCS(setenv,,[
AC_CHECK_FUNCS(putenv,,[
AC_MSG_ERROR([Must have one of the setenv or putenv functions.])
])
])
2001-05-29 17:41:41 -05:00
STRUCT_TM_GMTOFF_CHECK
2001-06-01 23:40:26 -05:00
SCANF_LLD_CHECK
2006-07-13 21:01:50 -05:00
if test x$am_cv_scanf_lld = "xno"; then
2004-07-04 22:24:04 -05:00
SCANF_QD_CHECK
2006-09-05 09:38:27 -05:00
if test x$am_cv_scanf_qd = "xno"; then
2006-09-06 06:46:36 -05:00
SCANF_I64D_CHECK
if test x$am_cv_scanf_i64d = "xno"; then
AC_MSG_ERROR([Cannot continue, no long long conversion support in scanf.])
fi
2004-07-04 22:24:04 -05:00
fi
fi
2001-05-29 17:41:41 -05:00
2012-10-31 16:38:49 -05:00
# test whether we are building directly from svn/svk/git/bzr
2013-05-17 05:10:37 -05:00
AC_MSG_CHECKING(if building from an scm managed directory)
savedir="$PWD"
cd "${srcdir}"
./util/gnc-scm-info -r . >/dev/null 2>&1
2012-11-01 05:35:34 -05:00
if test $? = 0 -o "x${BUILDING_FROM_SCM}" = "xyes" ; then
BUILDING_FROM_SCM=yes
2013-05-17 05:10:37 -05:00
SCM_TYPE=$(./util/gnc-scm-info -t .)
AC_MSG_RESULT($SCM_TYPE)
if test "x${SCM_TYPE}" = "xgit"; then
AC_MSG_CHECKING(git command to use due to detected git repo)
# The windows build uses environment variable $GIT_CMD to invoke git (adding git
# to the PATH in Windows results in a build failure).
# So for platform independence, use GIT_CMD for all
if test -z "${GIT_CMD}" ; then
GIT_CMD=git
fi
AC_MSG_RESULT(${GIT_CMD})
fi
2006-10-15 14:02:05 -05:00
2008-07-15 02:39:21 -05:00
# We need at least version 1.3.31 of SWIG because
# that's when SWIG doesn't barf on the "inline" keyword in C headers anymore
AC_PROG_SWIG(1.3.31)
2006-10-15 14:02:05 -05:00
else
2013-05-17 05:10:37 -05:00
AC_MSG_RESULT(no)
2012-11-01 05:35:34 -05:00
BUILDING_FROM_SCM=no
2013-05-17 05:10:37 -05:00
SCM_TYPE=
2012-11-01 05:35:34 -05:00
# Make sure we've got swig-runtime.h and gnc-scm-info.h
2007-02-08 10:25:54 -06:00
AC_CHECK_FILE(${srcdir}/src/swig-runtime.h, [],
2010-08-31 14:55:34 -05:00
[AC_MSG_ERROR([
2007-02-08 10:03:24 -06:00
2012-10-31 16:38:49 -05:00
It looks like you are NOT building from Subversion, svk, git or bzr
but I cannot find swig-runtime.h. Check your PATH and make sure
2012-11-01 05:35:34 -05:00
we can find gnc-scm-info in your PATH!
2007-02-08 10:03:24 -06:00
Either that or contact gnucash-devel@gnucash.org because
the tarball you downloaded is broken.
2010-08-31 14:55:34 -05:00
])])
2012-11-01 05:35:34 -05:00
AC_CHECK_FILE(${srcdir}/src/core-utils/gnc-scm-info.h, [],
2010-08-31 14:55:34 -05:00
[AC_MSG_ERROR([
2007-02-08 10:03:24 -06:00
2012-10-31 16:38:49 -05:00
It looks like you are NOT building from Subversion, svk, git or bzr
2012-11-01 05:35:34 -05:00
but I cannot find gnc-scm-info.h. Check your PATH and make sure
we can find gnc-scm-info in your PATH!
2007-02-08 10:03:24 -06:00
Either that or contact gnucash-devel@gnucash.org because
the tarball you downloaded is broken.
2010-08-31 14:55:34 -05:00
])])
2006-10-15 14:02:05 -05:00
fi
2013-05-17 05:10:37 -05:00
cd "${savedir}"
2012-11-01 05:35:34 -05:00
AM_CONDITIONAL(BUILDING_FROM_SCM, test "x$BUILDING_FROM_SCM" = "xyes")
2013-05-17 05:10:37 -05:00
AC_SUBST(SCM_TYPE)
AC_SUBST(GIT_CMD)
2006-10-15 14:02:05 -05:00
2007-03-21 15:03:47 -05:00
# Build dir adjustments
AM_CONDITIONAL(GNUCASH_SEPARATE_BUILDDIR, test "x${srcdir}" != "x.")
2006-09-18 15:43:50 -05:00
# Init binreloc
AM_BINRELOC
2006-01-12 16:47:08 -06:00
### --------------------------------------------------------------------------
### See if we have pkg-config
AC_PATH_PROG(PKG_CONFIG,pkg-config)
if test "x$PKG_CONFIG" = x; then
2010-08-31 14:55:34 -05: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
2006-01-12 16:47:08 -06:00
fi
### --------------------------------------------------------------------------
2011-03-26 07:50:06 -05:00
### Glib checks.
2006-01-12 16:47:08 -06:00
2013-05-03 07:04:03 -05:00
# We require glib >= 2.28, released together with gtk-2.24;
# We first check for other versions due to deprecations.
# 2.36 deprecated g_type_init
# 2.32 deprecated some gthread functions
2013-10-07 09:03:22 -05:00
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.38 gio-2.0 >= 2.25 gthread-2.0 gobject-2.0 gmodule-2.0,
2013-05-03 07:04:03 -05:00
[
2013-10-03 16:39:59 -05:00
AC_DEFINE([HAVE_GLIB_2_38], [1], [Configure leading quote around assertions])
2013-05-03 07:04:03 -05:00
AC_DEFINE([HAVE_GLIB_2_36], [1], [Configure g_type_init deprecation])
AC_DEFINE([HAVE_GLIB_2_32], [1], [Configure gthread deprecations])
],
[
PKG_CHECK_MODULES(GLIB,
2013-10-07 09:03:22 -05:00
glib-2.0 >= 2.36 gio-2.0 >= 2.25 gthread-2.0 gobject-2.0 gmodule-2.0,
2013-05-03 07:04:03 -05:00
[
2013-10-03 16:39:59 -05:00
AC_DEFINE([HAVE_GLIB_2_36], [1], [Configure g_type_init deprecation])
2013-05-03 07:04:03 -05:00
AC_DEFINE([HAVE_GLIB_2_32], [1], [Configure gthread deprecations])
],
[
PKG_CHECK_MODULES(GLIB,
2013-10-07 09:03:22 -05:00
glib-2.0 >= 2.32 gio-2.0 >= 2.25 gthread-2.0 gobject-2.0 gmodule-2.0,
2013-10-03 16:39:59 -05:00
[
AC_DEFINE([HAVE_GLIB_2_32], [1], [Configure gthread deprecations])
],
[
PKG_CHECK_MODULES(GLIB,
2013-10-07 09:03:22 -05:00
glib-2.0 >= 2.28 gio-2.0 >= 2.25 gthread-2.0 gobject-2.0 gmodule-2.0)
2013-10-03 16:39:59 -05:00
])
2013-05-03 07:04:03 -05:00
])
])
2010-02-24 11:38:14 -06:00
AC_CHECK_HEADERS(dirent.h dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
2001-02-07 22:08:50 -06:00
2013-10-07 09:03:59 -05:00
GLIB_GSETTINGS
2012-12-15 13:15:23 -06:00
# I'm sure we (used to?) require this in various places, 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"
GNC_OLDLDFLAGS="$LDFLAGS"
2012-12-15 13:15:31 -06:00
CFLAGS="${CFLAGS} ${GLIB_CFLAGS}"
2012-12-15 13:15:23 -06:00
LDFLAGS="${LDFLAGS} ${GLIB_LIBS}"
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.)
],[
AC_MSG_RESULT(assuming yes)
])
CFLAGS="$GNC_OLDCFLAGS"
LDFLAGS="$GNC_OLDLDFLAGS"
2006-03-10 05:04:02 -06:00
# Gnucash replaced dlopen/dlsym by the g_module functions; dlsym
# is needed optionally in one place for BSD linkers, though.
2001-02-07 22:08:50 -06:00
DL_LIB=
2006-03-10 05:04:02 -06:00
AC_CHECK_FUNCS(dlsym,,[
AC_CHECK_LIB(dl, dlsym, DL_LIB="-ldl",[
2001-05-08 21:42:48 -05:00
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
2006-03-10 05:04:02 -06:00
AC_CHECK_FUNCS(dlsym, DL_LIB="")
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)
2010-04-04 15:11:18 -05:00
##################################################
# OS dependent checks
##################################################
2005-11-06 07:18:07 -06:00
AC_SUBST(SED)
2010-04-04 15:11:18 -05:00
# Set some defaults, they may be overridden below
REGEX_LIBS=""
AC_MSG_CHECKING(operating system)
2002-10-05 10:59:23 -05:00
case $host_os in
2010-08-31 14:55:34 -05:00
rhapsody* | darwin[1567].*)
AC_MSG_RESULT([darwin, but too old])
AC_MSG_ERROR([This platform is not supported, please
2002-10-05 10:59:23 -05:00
update to latest darwin])
2010-08-31 14:55:34 -05:00
;;
darwin*)
platform=darwin
2013-11-29 00:24:13 -06:00
AC_DEFINE(PLATFORM_OSX,1,[Running on OSX, either X11 or Quartz])
2010-08-31 14:55:34 -05:00
AC_MSG_RESULT($platform)
AC_MSG_CHECKING(For GDK-Quartz)
platform=osx
_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
2011-01-07 08:04:55 -06:00
if test "x$_gdk_tgt" = xquartz; then
2010-08-31 14:55:34 -05:00
platform=darwin/quartz
AC_MSG_RESULT(yes)
AC_DEFINE(GDK_QUARTZ,,[Using GDK Quartz (not X11)])
2011-10-08 14:14:01 -05:00
PKG_CHECK_MODULES([GTK_MAC], gtk-mac-integration,
[_gtk_mac=yes], [_gtk_mac=no])
if test "x$_gtk_mac" = xyes; then
2013-05-02 16:01:30 -05:00
GTK_MAC_LIBS="${GTK_MAC_LIBS} -lobjc -framework Cocoa"
2011-10-08 14:14:01 -05:00
GTK_MAC_CFLAGS="${GTK_MAC_CFLAGS} -xobjective-c"
2010-08-31 14:55:34 -05:00
fi
2011-10-08 14:14:01 -05:00
AC_MSG_RESULT(${_gtk_mac})
AC_SUBST(GTK_MAC_LIBS)
AC_SUBST(GTK_MAC_CFLAGS)
2010-08-31 14:55:34 -05:00
else
AC_MSG_RESULT(no)
fi
;;
mingw*|cygwin*)
platform=win32
AC_MSG_RESULT($platform)
LT_PROG_RC
AC_MSG_CHECKING(for native win32)
case $host_os in
mingw*)
native_win32=yes
AC_MSG_RESULT(yes)
HTMLHELP_LIBS=
AC_MSG_CHECKING(for HtmlHelpW)
saved_LIBS="${LIBS}"
LIBS="${LIBS} -lhtmlhelp"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <windows.h>
#include <htmlhelp.h>]],
[HtmlHelpW(0, (wchar_t*)"", HH_HELP_CONTEXT, 0);])],
[AC_MSG_RESULT(yes)
HTMLHELP_LIBS=-lhtmlhelp
AC_DEFINE(HAVE_HTMLHELPW,1,[System has HtmlHelpW])
], [AC_MSG_RESULT(no)])
LIBS="${saved_LIBS}"
AC_SUBST(HTMLHELP_LIBS)
;;
*)
AC_MSG_RESULT(no)
;;
esac
REGEX_LIBS="-lregex"
# Adjust CFLAGS and LDFLAGS on Windows
CFLAGS="${CFLAGS} -mms-bitfields"
LDFLAGS="${LDFLAGS} -no-undefined -mwindows"
;;
*)
platform=linux/other
AC_MSG_RESULT($platform)
;;
2002-10-05 10:59:23 -05:00
esac
2010-04-04 15:11:18 -05:00
AC_SUBST(REGEX_LIBS)
2010-04-05 09:48:22 -05:00
AM_CONDITIONAL(PLATFORM_LINUX, test "x$platform" = "xlinux/other")
AM_CONDITIONAL(PLATFORM_OSX, test "x$platform" = "xdarwin")
2010-04-05 13:08:26 -05:00
AM_CONDITIONAL(PLATFORM_OSX_QUARTZ, test "x$platform" = "xdarwin/quartz")
2010-04-05 09:48:22 -05:00
AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform" = "xwin32")
2010-04-04 15:11:18 -05:00
AM_CONDITIONAL(OS_WIN32, test "x$native_win32" = "xyes")
2009-07-13 15:34:42 -05:00
# These are unavailable on windows/mingw32 and X11 isn't desired or
# required for MacOSX Quartz
2011-01-07 08:04:55 -06:00
if test "x$_gdk_tgt" = xquartz;
then
2009-07-13 15:34:42 -05:00
AC_CHECK_HEADERS(glob.h)
else
AC_CHECK_HEADERS(X11/Xlib.h glob.h)
fi
AM_CONDITIONAL(HAVE_X11_XLIB_H, test "x$ac_cv_header_X11_Xlib_h" = "xyes")
AC_CHECK_FUNCS(chown gethostname getppid getuid gettimeofday gmtime_r)
AC_CHECK_FUNCS(gethostid link)
2010-04-04 15:11:18 -05:00
##################################################
2011-01-07 08:04:55 -06:00
2002-10-05 10:59:23 -05:00
2001-12-05 11:22:32 -06:00
### --------------------------------------------------------------------------
2013-11-13 09:51:24 -06:00
### Guile version checks
2001-12-05 11:22:32 -06:00
2013-11-13 09:50:59 -06:00
# - check minimum version
# - determine GUILE_CFLAGS and GUILE_LIBS
# - test if guile module (www main) is present on the system
# Note: systems that install both guile 1.8 and guile 2 use different
# names for the 1.8 and 2.0 autoconf macros to avoid conflicts.
# So the tests below will check for known macro names in the order
# that we assume will always result in the proper macros being called
# for the guile version that has been detected.
2013-12-14 10:40:42 -06:00
gnc_have_guile_2=no
2013-11-13 09:50:59 -06:00
gnc_have_guile_www=no
PKG_CHECK_MODULES(GUILE,
[guile-1.8 >= 1.8.5],
[m4_ifdef([GUILE1_8_PROGS],
[ GUILE1_8_PROGS
GUILE1_8_MODULE_AVAILABLE(gnc_have_guile_www,[(www main)]) ],
[ GUILE_PROGS
GUILE_MODULE_AVAILABLE(gnc_have_guile_www,[(www main)]) ])
], [
PKG_CHECK_MODULES(GUILE,
[guile-2.0 >= 2.0.0],
[m4_ifdef([GUILE_PROGS],
[ GUILE_PROGS
2013-12-14 10:40:42 -06:00
gnc_have_guile_2=yes
2013-11-13 09:50:59 -06:00
GUILE_MODULE_AVAILABLE(gnc_have_guile_www,[(www main)]) ],
[ AC_MSG_ERROR([ guile 2 is found on your system, but appears
to export different autoconf macros than what we expected. Please report this as a bug
in GnuCash, so we can fix this for your platform.]) ])
],
[AC_MSG_ERROR([
2011-11-08 06:31:33 -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? Gnucash requires at least version 1.8.5 to build.
])])
])
2011-04-22 14:43:39 -05:00
2013-12-14 10:40:42 -06:00
AM_CONDITIONAL(GNC_HAVE_GUILE_2, test "${gnc_have_guile_2}" = yes)
2006-02-15 22:07:31 -06:00
AM_CONDITIONAL(GNC_HAVE_GUILE_WWW, test "${gnc_have_guile_www}" = yes)
2001-12-05 11:22:32 -06:00
### --------------------------------------------------------------------------
2006-02-15 22:07:31 -06:00
### LIBXML -- GNOME_XML_LIB is defined by GNOME_XML_CHECK
2001-12-05 11:22:32 -06:00
2005-11-01 21:32:36 -06:00
LIBXML2_REQUIRED=2.5.10
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
2006-02-15 22:07:31 -06:00
AS_SCRUB_INCLUDE(LIBXML2_CFLAGS)
2005-11-01 21:32:36 -06:00
AC_SUBST(LIBXML2_CFLAGS)
AC_SUBST(LIBXML2_LIBS)
2001-12-05 11:22:32 -06:00
oLIBS="$LIBS"
2006-02-15 22:31:37 -06:00
LIBS="$LIBS $LIBXML2_LIBS"
2005-11-01 21:32:36 -06:00
# Compile a test program to verify that the xml2 library works.
AC_CHECK_LIB(xml2, xmlElemDump, [:], [
AC_MSG_ERROR([libxml2 is required for GnuCash])
2001-12-05 11:22:32 -06:00
])
LIBS="$oLIBS"
2001-01-17 00:53:18 -06:00
2013-10-07 09:32:02 -05:00
### --------------------------------------------------------------------------
### LIBXSLT
PKG_CHECK_MODULES(LIBXSLT, libxslt)
AS_SCRUB_INCLUDE(LIBXLT_CFLAGS)
AC_SUBST(LIBXSLT_CFLAGS)
AC_SUBST(LIBXSLT_LIBS)
2013-10-24 07:27:26 -05:00
# xsltproc is not included in libxslt on all distributions
# so check for it separately
AC_PATH_PROG(XSLTPROC, xsltproc, [""])
if test -z "$XSLTPROC"; then
AC_MSG_ERROR([xsltproc is required to build GnuCash])
fi
2008-11-07 15:21:15 -06:00
### --------------------------------------------------------------------------
### Zlib
ZLIB_LIBS=-lz
AC_SUBST(ZLIB_LIBS)
oLIBS="$LIBS"
LIBS="$LIBS $ZLIB_LIBS"
AC_CHECK_LIB(z, gzopen, [:], [
AC_MSG_ERROR([zlib is required for GnuCash])
])
LIBS="$oLIBS"
2006-02-15 22:07:31 -06:00
### --------------------------------------------------------------------------
2011-03-12 18:02:38 -06:00
### Internal code part which is called "qof"
2006-01-12 15:44:08 -06:00
2011-03-12 18:02:38 -06:00
LIBQOF_LIBRARY_VERSION=1:4:0
AC_SUBST(LIBQOF_LIBRARY_VERSION)
2006-01-12 15:44:08 -06:00
2011-03-12 18:02:38 -06:00
QOF_CFLAGS='-I${top_builddir}/src/libqof/qof -I${top_srcdir}/src/libqof/qof'
QOF_LIBS='${top_builddir}/src/libqof/qof/libgnc-qof.la'
2005-11-01 21:32:36 -06:00
AC_SUBST(QOF_CFLAGS)
AC_SUBST(QOF_LIBS)
2008-08-01 11:02:07 -05:00
### ----------------------
### LIBDBI
2010-04-18 13:08:42 -05:00
2008-08-01 11:02:07 -05:00
AC_ARG_ENABLE(dbi,
2010-04-18 13:08:42 -05:00
[AS_HELP_STRING([--disable-dbi],[don't build with the libdbi backend])],
2008-08-01 11:02:07 -05:00
[case "${enableval}" in
yes) want_dbi=true ;;
no) want_dbi=false ;;
*) want_dbi=false ;;
esac],
2010-04-18 13:08:42 -05:00
[want_dbi=true])
2008-08-01 11:02:07 -05:00
if test x${want_dbi} = xtrue
then
2013-09-21 19:56:23 -05:00
EXTRA_SEARCH_LIBS=""
2008-08-01 11:02:07 -05:00
AC_CHECK_HEADERS(dbi/dbi.h)
if test "x$ac_cv_header_dbi_dbi_h" != xno; then
2013-09-24 15:59:13 -05:00
save_libs=$LIBS
2008-08-01 11:02:07 -05:00
AC_ARG_WITH( dbi-dbd-dir,
2010-05-20 15:16:47 -05:00
[AS_HELP_STRING([--with-dbi-dbd-dir=PATH],[specify location of libdbi drivers @<:@default=${libdir}/dbd@:>@])],
2013-09-21 19:56:23 -05:00
[[GNC_DBD_DIR="$with_dbi_dbd_dir"
EXTRA_SEARCH_LIBS=$GNC_DBD_DIR]],
[[GNC_DBD_DIR=""
EXTRA_SEARCH_LIBS="/usr/lib/dbd:/usr/lib64/dbd:${libdir}/dbd"]]
)
case $host_os in
win32*|mingw*)
LDINC="#include <windows.h>"
LDFUNCARGS=""
LDEXT=dll
;;
*)
LDINC="#include <dlfcn.h>"
LDFUNCARGS=", RTLD_NOW"
LDEXT=so
2013-09-24 15:59:13 -05:00
export LIBS="$lt_cv_dlopen_libs $LIBS"
2013-09-21 19:56:23 -05:00
;;
2013-09-21 11:29:34 -05:00
esac
2013-09-21 19:56:23 -05:00
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SEARCH_LIBS"
2013-09-21 11:29:34 -05:00
AC_MSG_CHECKING([Looking for at least one supported DBD module])
AC_RUN_IFELSE([AC_LANG_PROGRAM([$LDINC],
2013-09-21 19:56:23 -05:00
[[if (!$lt_cv_dlopen("libdbdsqlite3.$LDEXT"$LDFUNCARGS)) return -1;
2013-09-21 11:29:34 -05:00
]])],AC_MSG_RESULT([SQLite3]),
AC_RUN_IFELSE([AC_LANG_PROGRAM([$LDINC],
2013-09-21 19:56:23 -05:00
[[if (!$lt_cv_dlopen("libdbdmysql.$LDEXT"$LDFUNCARGS)) return -1;
2013-09-21 11:29:34 -05:00
]])],AC_MSG_RESULT([MySql]),
AC_RUN_IFELSE([AC_LANG_PROGRAM([$LDINC],
2013-09-21 19:56:23 -05:00
[[if (!$lt_cv_dlopen("libdbdpgsql.$LDEXT"$LDFUNCARGS)) return -1;
2013-09-21 11:29:34 -05:00
]])],AC_MSG_RESULT([Postgresql]),
2013-09-21 19:56:23 -05:00
AC_MSG_ERROR([
Unable to find any of the supported dbd modules
(libdbdsqlite3, libdbdmysql, or libdbdpgsql) needed to actually use the SQL
backend.
If you do have them installed the problem is either that dlopen cannot
find them or that dlopen itself is not getting linked. Check config.log
to find out which. You can add the option --with-dbi-dbd-dir pointing to
the directory in which they are located.
If you do not actually want to build with libdi add --disable-dbi
to the configure argument list and run it again.
]))))
2008-08-01 11:02:07 -05:00
LIBDBI_LIBS=-ldbi
2011-11-17 15:27:40 -06:00
_COMPONENTS="$_COMPONENTS dbi"
2013-09-24 15:59:13 -05:00
LIBS=$saved_libs
2008-08-01 11:02:07 -05:00
else
2011-03-14 00:39:49 -05:00
AC_MSG_ERROR([
Unable to find <dbi/dbi.h>. Either install the libdbi development
package (such as libdbi0-dev), or switch off the database backend of
gnucash by --disable-dbi.
Note: If you install libdbi, you should also install its database
drivers (such as libdbd-sqlite3 libdbd-mysql libdbd-pgsql).
])
2008-08-01 11:02:07 -05:00
fi
fi
AC_SUBST(LIBDBI_LIBS)
AC_SUBST(GNC_DBD_DIR)
2010-05-20 15:16:47 -05:00
AM_CONDITIONAL(CUSTOM_GNC_DBD_DIR, [test x"$GNC_DBD_DIR" != "x"])
2012-10-27 18:29:32 -05:00
AM_CONDITIONAL(WITH_DBI, [test "x$ac_cv_header_dbi_dbi_h" = xyes])
2008-08-01 11:02:07 -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...
2006-02-15 08:58:34 -06:00
GNC_CONFIGDIR='${sysconfdir}/gnucash'
2011-06-06 16:02:49 -05:00
GNC_DOC_INSTALL_DIR='${docdir}'
2006-02-15 08:58:34 -06:00
GNC_INCLUDE_DIR='${includedir}/gnucash'
GNC_SCM_INSTALL_DIR='${pkgdatadir}/scm'
GNC_SHAREDIR='${pkgdatadir}'
GNC_LIBEXECDIR='${libexecdir}/gnucash'
2000-06-02 04:00:31 -05:00
2002-01-30 18:00:23 -06:00
GNC_ACCOUNTS_DIR='${GNC_SHAREDIR}/accounts'
2007-03-12 22:43:24 -05:00
GNC_CHECKS_DIR='${GNC_SHAREDIR}/checks'
2011-04-05 14:55:25 -05:00
GNC_GTKBUILDER_DIR='${GNC_SHAREDIR}/gtkbuilder'
2005-11-01 21:32:36 -06:00
GNC_UI_DIR='${GNC_SHAREDIR}/ui'
GNC_PIXMAP_DIR='${GNC_SHAREDIR}/pixmaps'
2000-12-07 04:44:33 -06:00
2001-09-06 01:43:43 -05:00
AC_SUBST(GNC_ACCOUNTS_DIR)
2007-03-12 22:43:24 -05:00
AC_SUBST(GNC_CHECKS_DIR)
2000-06-02 04:00:31 -05:00
AC_SUBST(GNC_CONFIGDIR)
AC_SUBST(GNC_DOC_INSTALL_DIR)
2011-04-05 14:55:25 -05:00
AC_SUBST(GNC_GTKBUILDER_DIR)
2005-11-01 21:32:36 -06:00
AC_SUBST(GNC_UI_DIR)
2001-09-06 01:43:43 -05:00
AC_SUBST(GNC_INCLUDE_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,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-debug],[compile with debugging flags set])],
2008-11-26 07:32:31 -06:00
[
2010-08-31 14:55:34 -05:00
# remove any optimization flags...
CFLAGS=`echo ${CFLAGS} | sed -e 's,-O.,,g'`
# ...except for those the user wants.
CFLAGS="${CFLAGS} -g ${USER_OPTIMIZATION}"
LDFLAGS="${LDFLAGS} -g"
AC_DEFINE(DEBUG_MEMORY,1,[Enable debug memory])
2012-05-21 10:32:52 -05:00
],
[ AC_DEFINE(DEBUG_MEMORY,0,[Enable debug memory])
2010-08-31 14:55:34 -05:00
])
1999-01-19 02:29:46 -06:00
2000-05-12 04:47:17 -05:00
AC_ARG_ENABLE( profile,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-profile],[compile with profiling set])],
2010-08-31 14:55:34 -05:00
CFLAGS="${CFLAGS} -pg"
LDFLAGS="${LDFLAGS} -pg")
2000-05-12 04:47:17 -05:00
2013-10-25 14:02:43 -05:00
### --------------------------------------------------------------------------
### Register2
AC_ARG_ENABLE( register2,
[AS_HELP_STRING([--enable-register2],[compile with register2 enabled])],
if test x$enableval = xyes; then
AC_DEFINE(REGISTER2_ENABLED,1,We are using Register2)
else
AC_DEFINE(REGISTER2_ENABLED,0,We are not using Register2)
fi)
2002-06-20 19:46:36 -05:00
### --------------------------------------------------------------------------
### OFX
2006-02-17 20:49:47 -06:00
want_ofx=auto
2013-10-23 09:25:32 -05:00
have_ofx=no
2002-06-20 19:46:36 -05:00
AC_ARG_ENABLE( ofx,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-ofx],[compile with ofx support (needs LibOFX)])],
2006-02-17 20:49:47 -06:00
[ case "$enableval" in
yes) want_ofx=yes ;;
no) want_ofx=no ;;
esac[]dnl
] )
AC_MSG_CHECKING(whether to use OFX)
case "${want_ofx}" in
yes) AC_MSG_RESULT(yes -- failure is fatal) ;;
no) AC_MSG_RESULT(no) ;;
auto) AC_MSG_RESULT(yes -- automatic test) ;;
esac
2013-10-16 10:22:56 -05:00
2011-03-12 18:02:38 -06:00
if test x${want_ofx} != xno ; then
2013-10-23 09:25:32 -05:00
PKG_CHECK_MODULES(LIBOFX, libofx, [have_ofx="yes"], [ have_ofx="no" ])
fi
if test x${want_ofx} = xyes && test x${have_ofx} = xno; then
AC_MSG_ERROR([
OFX support wanted, but libofx development libraries not found.
Either install the libofx development package (such as libofx-dev or
libofx-devel), or drop ofx support. You can do tis by removing
--enable-dbi from the configure parameters.])
fi
MIGRATABLE_PREFS_OFX="/dev/null"
if test x${have_ofx} = xyes ; then
2011-11-17 15:27:40 -06:00
_COMPONENTS="$_COMPONENTS ofx"
2013-10-16 10:22:56 -05:00
MIGRATABLE_PREFS_OFX="$srcdir/src/import-export/ofx/migratable-prefs-ofx.xml"
2006-02-17 20:49:47 -06:00
fi
2013-10-23 09:25:32 -05:00
AM_CONDITIONAL([WITH_OFX], [test "x${have_ofx}" = xyes])
2013-10-16 10:22:56 -05:00
AC_SUBST_FILE([MIGRATABLE_PREFS_OFX])
2003-09-26 13:52:56 -05:00
### --------------------------------------------------------------------------
### MT940
AC_ARG_ENABLE( mt940,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-mt940],[obsolete, included in --enable-aqbanking])],
2003-09-26 13:52:56 -05:00
if test "x$enableval" != "xno" ; then
2008-07-08 15:35:50 -05:00
AC_MSG_ERROR([--enable-mt940 is obsolete -- all functionality is already included in --enable-aqbanking])
2003-09-26 13:52:56 -05:00
fi)
2000-03-22 22:26:59 -06:00
### --------------------------------------------------------------------------
2008-07-08 15:35:50 -05:00
### AqBanking
AC_ARG_ENABLE( aqbanking,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-aqbanking],[compile with AqBanking support])],
2008-07-08 15:35:50 -05:00
if test "x$enableval" != "xno" ; then
want_aqbanking=yes
fi)
2002-07-27 12:13:49 -05:00
AC_ARG_ENABLE( hbci,
2011-01-15 03:52:41 -06:00
[AS_HELP_STRING([--enable-hbci],[obsolete, replaced by --enable-aqbanking])],
2003-05-03 15:58:45 -05:00
if test "x$enableval" != "xno" ; then
2011-01-15 03:52:41 -06:00
AC_MSG_ERROR([--enable-hbci is obsolete -- the option has been renamed into --enable-aqbanking])
2003-05-03 15:58:45 -05:00
fi)
2013-10-16 10:22:56 -05:00
MIGRATABLE_PREFS_AQBANKING="/dev/null"
2008-07-08 15:35:50 -05:00
if test x${want_aqbanking} = xyes ;
2002-10-18 10:51:27 -05:00
then
2008-07-08 15:35:50 -05:00
# Check for Aqbanking library
2011-01-15 03:52:41 -06:00
# We require aqbanking-4.0.0 because our implementation doesn't run
# with earlier version anymore. (libaqbanking ships with a pkgconfig
# file since its version 1.6.1.)
2011-11-17 15:27:40 -06:00
PKG_CHECK_MODULES(AQBANKING, aqbanking >= 4.0.0 gwenhywfar, , [
AC_MSG_ERROR([Could not find aqbanking >= 4.0.0. If you use --enable-aqbanking, you MUST have aqbanking installed!])
2008-07-08 15:35:50 -05:00
])
2010-08-17 16:30:17 -05:00
# For libgwenhywfar > 3.99.20, look for its library gwengui-gtk2.
PKG_CHECK_MODULES([GWENGUI_GTK2], [gwengui-gtk2 gwenhywfar], [has_gwengui_gtk2=1], [has_gwengui_gtk2=0])
2002-10-18 10:51:27 -05:00
2008-07-08 15:35:50 -05:00
# also check for ktoblzcheck
AC_CHECK_HEADERS(ktoblzcheck.h)
if test "x$ac_cv_header_ktoblzcheck_h" != xno; then
AQBANKING_LIBS="${AQBANKING_LIBS} -lktoblzcheck"
fi
2003-06-09 04:42:27 -05:00
2008-07-08 15:35:50 -05:00
AS_SCRUB_INCLUDE(AQBANKING_CFLAGS)
AC_SUBST(AQBANKING_LIBS)
AC_SUBST(AQBANKING_CFLAGS)
2011-11-17 15:27:40 -06:00
_COMPONENTS="$_COMPONENTS aqbanking"
2013-10-16 10:22:56 -05:00
MIGRATABLE_PREFS_AQBANKING="$srcdir/src/import-export/aqbanking/migratable-prefs-aqbanking.xml"
2002-10-18 10:51:27 -05:00
fi
2011-11-17 15:27:40 -06:00
AM_CONDITIONAL([WITH_AQBANKING], [test x${want_aqbanking} = xyes])
2013-10-16 10:22:56 -05:00
AC_SUBST_FILE([MIGRATABLE_PREFS_AQBANKING])
2003-09-16 16:50:24 -05:00
2013-10-27 16:57:42 -05:00
AC_ARG_WITH(xdg-data-dirs,
[AS_HELP_STRING([--with-xdg-data-dirs],
[search path for system XDG data directories [default /usr/local/share/;/usr/share/]])],
[GNC_SYSTEM_XDG_DATA_DIRS=$withval],
[GNC_SYSTEM_XDG_DATA_DIRS="/usr/local/share;/usr/share"])
AC_SUBST(GNC_SYSTEM_XDG_DATA_DIRS)
2013-10-27 16:57:32 -05:00
AC_ARG_WITH(qt3-wizard-package,
2011-03-12 18:02:38 -06:00
[AS_HELP_STRING([--with-qt3-wizard-package=name],[name of package containing qt3-wizard (aqbanking)])],
[QT3_WIZARD_PACKAGE=$withval], [QT3_WIZARD_PACKAGE=aqbanking])
AC_DEFINE_UNQUOTED([QT3_WIZARD_PACKAGE],["$QT3_WIZARD_PACKAGE"],[Name of package containing qt3-wizard.])
2002-07-27 12:13:49 -05:00
### --------------------------------------------------------------------------
2000-03-22 22:26:59 -06:00
### i18n
2001-12-05 11:22:32 -06:00
2006-11-24 07:14:41 -06:00
# This variable is set by GLIB_WITH_NLS, called through
2006-11-24 08:04:43 -06:00
# AM_GLIB_GNU_GETTEXT above. Usually it is "share", but on some
# platforms it is "lib". Make sure it is set.
2006-11-24 07:14:41 -06:00
if test "x$DATADIRNAME" = "x"; then
DATADIRNAME="share"
AC_SUBST(DATADIRNAME)
fi
2007-05-12 11:50:49 -05:00
dnl check for nl_langinfo(D_FMT) which is missing on FreeBSD
LANGINFO_D_FMT_CHECK
2005-01-29 06:54:31 -06:00
dnl Enable locale-specific tax-related information in the accounts
AC_ARG_ENABLE( locale-specific-tax,
2012-08-22 03:36:15 -05:00
[AS_HELP_STRING([--enable-locale-specific-tax],[enable localized tax categories (experimental, but used by the german SKR04 account chart)])],
2005-01-29 06:54:31 -06:00
AC_DEFINE(LOCALE_SPECIFIC_TAX,1,Enable the experimental locale-specific tax categories) )
2007-09-12 10:56:04 -05:00
dnl Make sure we have a proper gettext installed
AC_MSG_CHECKING(for a valid gettext/gmsgfmt installation)
if test "$gt_cv_have_gettext" != "yes" || test "x$GMSGFMT" = "x"; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Cannot find Glib Gettext. Maybe you need to install the gettext package?])
else
AC_MSG_RESULT(yes - $GMSGFMT)
fi
2009-09-04 19:35:40 -05:00
# -------------------------------------------------------------------------
# URLs for MySQL and PostgreSQL testing
AC_ARG_WITH(test-mysql-url,
AS_HELP_STRING([--with-test-mysql-url=URL],
[MySQL database URL for testing [default=none]]),
[],[with_test_mysql_url=""])
TEST_MYSQL_URL=$with_test_mysql_url
AC_SUBST(TEST_MYSQL_URL)
AC_ARG_WITH(test-pgsql-url,
AS_HELP_STRING([--with-test-pgsql-url=URL],
[PgSQL database URL for testing [default=none]]),
[],[with_test_pgsql_url=""])
TEST_PGSQL_URL=$with_test_pgsql_url
AC_SUBST(TEST_PGSQL_URL)
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,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--with-help-prefix=PATH],[specify where to store the help files])],
2005-11-01 21:32:36 -06:00
GNC_HELPDIR="$with_help_prefix",
GNC_HELPDIR="\${datadir}")
2000-09-09 05:25:53 -05:00
AC_SUBST(GNC_HELPDIR)
2001-02-24 18:42:44 -06:00
### --------------------------------------------------------------------------
### Check for etags
2001-03-27 19:00:25 -06:00
AC_ARG_ENABLE( etags,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-etags],[enable automatic create of TAGS file])],
2006-07-13 21:01:50 -05:00
if test x$enableval = xyes; then
2001-03-27 19:00:25 -06:00
USE_ETAGS=1
fi,
USE_ETAGS=0)
2006-07-13 21:01:50 -05:00
if test x${USE_ETAGS} = x1; 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,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--enable-ctags],[enable automatic create of tags file])],
2006-07-13 21:01:50 -05:00
if test x$enableval = xyes; then
2002-11-30 02:59:19 -06:00
USE_CTAGS=1
fi,
USE_CTAGS=0)
2006-07-13 21:01:50 -05:00
if test x${USE_CTAGS} = x1; then
2002-11-30 02:59:19 -06:00
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,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--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
2010-08-31 14:55:34 -05:00
:
1999-01-13 03:11:02 -06:00
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
2010-08-31 14:55:34 -05:00
### ----------------------------------------------------------------------------
### Check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/
1998-10-20 22:42:25 -05:00
2005-07-17 08:28:57 -05:00
AC_DEFUN([BB_ENABLE_DOXYGEN],
2010-08-31 14:55:34 -05:00
[
AC_ARG_ENABLE(doxygen, [AS_HELP_STRING([--enable-doxygen],[enable documentation generation with doxygen (auto)])])
AC_ARG_ENABLE(dot, [AS_HELP_STRING([--enable-dot],[use 'dot' to generate graphs in doxygen (auto)])])
2011-01-07 08:04:55 -06:00
AC_ARG_ENABLE(html-docs, [AS_HELP_STRING([--enable-html-docs],[enable HTML generation with doxygen (yes)])], [], [ enable_html_docs=yes])
AC_ARG_ENABLE(latex-docs, [AS_HELP_STRING([--enable-latex-docs],[enable LaTeX documentation generation with doxygen (no)])], [], [ enable_latex_docs=no])
2010-08-31 14:55:34 -05:00
if test "x$enable_doxygen" = xno; then
enable_doc=no
2011-01-07 08:04:55 -06:00
else
2010-08-31 14:55:34 -05:00
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])
2002-11-27 16:49:10 -06:00
fi
2010-08-31 14:55:34 -05:00
enable_doc=no
else
enable_doc=yes
AC_PATH_PROG(DOT, dot, , $PATH)
fi
fi
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
2002-11-27 16:49:10 -06:00
2010-08-31 14:55:34 -05:00
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)
])
2002-11-27 16:49:10 -06:00
# 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
1999-05-29 18:46:49 -05:00
### --------------------------------------------------------------------------
2006-02-15 22:07:31 -06:00
### Whether or not to build the GTK GUI components.
### When disabled, we don't even need to check for them!
2000-12-13 19:49:10 -06:00
### --------------------------------------------------------------------------
1998-09-14 01:05:10 -05:00
2011-01-07 08:04:55 -06:00
AC_ARG_ENABLE(gui,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--disable-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
2006-02-15 22:07:31 -06:00
### --------------------------------------------------------------------------
### GNOME gui components -- built by default, but not if --enable-gui=no
2011-01-07 08:04:55 -06:00
### or --disable-gui is passed to autogen
2006-02-15 22:07:31 -06:00
### --------------------------------------------------------------------------
2001-12-05 11:22:32 -06:00
if test x${gnc_build_gui} = xtrue ;
then
2010-08-31 14:55:34 -05:00
if test x${enable_compile_warnings} = x ;
then
enable_compile_warnings="yes"
fi
GNOME_COMPILE_WARNINGS
2005-11-01 21:32:36 -06:00
2012-04-15 13:57:05 -05:00
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24.0)
2010-08-31 14:55:34 -05:00
AS_SCRUB_INCLUDE(GTK_CFLAGS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
2007-04-05 20:15:15 -05:00
2012-09-05 05:45:04 -05:00
PKG_CHECK_MODULES(GNOMECANVAS, libgnomecanvas-2.0)
AS_SCRUB_INCLUDE(GNOMECANVAS_CFLAGS)
AC_SUBST(GNOMECANVAS_CFLAGS)
AC_SUBST(GNOMECANVAS_LIBS)
2010-08-31 14:55:34 -05:00
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
AS_SCRUB_INCLUDE(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
2005-11-01 21:32:36 -06:00
2010-08-31 14:55:34 -05:00
# checks for goffice
2013-11-26 07:53:33 -06:00
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.8 >= 0.7.0, [goffice=1], [AC_MSG_ERROR([Cannot find libgoffice.>= 0.7.0])])
2010-08-31 14:55:34 -05:00
AS_SCRUB_INCLUDE(GOFFICE_CFLAGS)
AC_SUBST(GOFFICE_CFLAGS)
AC_SUBST(GOFFICE_LIBS)
### --------------------------------------------------------------------------
### determine the HTML engine
AC_MSG_CHECKING([the html engine])
AC_ARG_WITH(html_engine,
2011-03-26 03:59:07 -05:00
AS_HELP_STRING([--with-html-engine=@<:@webkit@:>@],
[Obsolete: Only webkit is used as HTML engine now]),
[],[with_html_engine="webkit"])
2010-08-31 14:55:34 -05:00
AC_MSG_RESULT([$with_html_engine])
case "$with_html_engine" in
gtkhtml)
2011-03-26 03:59:07 -05:00
# No more gtkhtml in gnucash-2.5.0
AC_MSG_ERROR([gtkhtml is no longer sufficient for gnucash, as we now require the CSS/javascript features using webkit. Please remove your --with-html-engine argument from configure.])
2010-08-31 14:55:34 -05:00
;;
webkit)
PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= "1.0")
case "$platform" in
win32)
# 1.1.90 has both functions
AC_DEFINE(HAVE_WEBKIT_WEB_VIEW_LOAD_URI,1,[webkit_web_view_load_uri exists])
AC_DEFINE(HAVE_WEBKIT_WEB_FRAME_PRINT_FULL,1,[webkit_web_frame_print_full exists])
;;
*)
# Unsure - check functions exist
oLIBS="$LIBS"
2011-03-18 14:40:00 -05:00
LIBS="$LIBS ${WEBKIT_LIBS}"
2010-08-31 14:55:34 -05:00
AC_CHECK_FUNCS(webkit_web_view_load_uri)
LIBS="$oLIBS"
AC_MSG_CHECKING(for webkit_web_frame_print_full)
saved_CFLAGS="${CFLAGS}"
saved_LIBS="${LIBS}"
CFLAGS="${CFLAGS} ${WEBKIT_CFLAGS}"
LIBS="${LIBS} ${WEBKIT_LIBS}"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <webkit/webkit.h>]],
[[webkit_web_frame_print_full( 0, 0, 0, 0 );]])],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WEBKIT_WEB_FRAME_PRINT_FULL,1,[webkit_web_frame_print_full exists])],
[AC_MSG_RESULT(no)])
CFLAGS="${saved_CFLAGS}"
LIBS="${saved_LIBS}"
;;
esac
;;
2009-09-25 21:21:05 -05:00
2011-03-26 03:59:07 -05:00
*) AC_MSG_ERROR([Invalid HTML engine: must be webkit]) ;;
2010-08-31 14:55:34 -05:00
esac
2010-02-21 12:30:32 -06:00
2010-08-31 14:55:34 -05:00
AC_SUBST(WEBKIT_CFLAGS)
AC_SUBST(WEBKIT_LIBS)
2005-11-01 21:32:36 -06:00
2010-08-31 14:55:34 -05:00
dnl if Mac OSX, also scrub /sw/include
dnl GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
Use a normalized uri format internally to refer to data stores.
Data stores for GC can be a file (xml or sqlite3) or a database
one some server (mysql or postgres).
Wherever it makes sense internally, data stores will be referred to
via a normalized uri:
protocol://user:password@host:port/path
Depending on the context and story type some of these parts are optional or unused.
To achieve this, a new utility interface has been setup:
gnc_uri_<xxx>_<yyy>
that can be used to manipulate the uris or convert from non-normalized
formats to normalized and back.
For example, when the user selects a file in the Open or Save As dialog,
gnc_uri_get_normalized_uri will convert the file into a normalized uri.
Or when the actual filename is needed this can be extracted with
gnc_uri_get_path.
You can also test if a uri defines a file or something else with
gnc_uri_is_file_uri.
For the complete documentation, see src/core-utils/gnc-uri-uitls.h
This commit installs gnc-uri-utils and modifies the source where it makes
sense to use its convenience functions. This concerns all functions that
had to deal with file access in some way or another, the history module
and the functions that generate the history menu list and the window titles.
Note that gnc-uri-utils replaces xaccResolveFilePath and xaccResolveUrl in all cases.
xaccResolveUrl has been removed, because gnc-uri-utils fully replaces its functionality.
xaccResolveFilePath is used internally in gnc-uri-utils to ensure an absolute path
is always returned (in case of a file uri, not for db uris). But it has been renamed to
gnc_resolve_file_path to be more consistent with the other functions.
Lastly, this commit also adds a first implementation to work with a keyring to
store and retrieve passwords, althoug
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18842 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 14:15:31 -06:00
2010-08-31 14:55:34 -05:00
###-----------------------------------------------------------------------
## Find a suitable password store
case $host_os in
2010-04-05 21:19:25 -05:00
darwin*)
2010-08-31 14:55:34 -05:00
AC_DEFINE(HAVE_OSX_KEYCHAIN,1,[System has an OS X Key chain])
;;
2010-04-05 21:19:25 -05:00
*)
2010-08-31 14:55:34 -05:00
PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= "0.6",
[AC_DEFINE(HAVE_GNOME_KEYRING,1,[System has gnome-keyring 0.6 or better])],
[AC_DEFINE(HAVE_NO_KEYRING,1,[System has no suitable keyring service])])
esac
### ----------------------------------------------------------------------
2011-01-07 08:04:55 -06:00
2010-08-31 14:55:34 -05:00
AC_ARG_ENABLE( efence,
[AS_HELP_STRING([--enable-efence],[link using efence])],
if test x$enableval = xyes; then
EFENCE_LIBS="-lefence"
USE_EFENCE=1
AC_DEFINE(USE_EFENCE,,We are using EFence)
fi,
USE_EFENCE=0
EFENCE_LIBS="")
AC_SUBST(EFENCE_LIBS)
### ----------------------------------------------------------------------
## 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...
2011-01-07 08:04:55 -06:00
2010-08-31 14:55:34 -05:00
GNOME=1
AC_DEFINE(GNOME,,using 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
2010-08-31 14:55:34 -05:00
# We should always see these errors...
CFLAGS="${CFLAGS} -Wall"
2002-10-19 10:51:06 -05:00
fi
2001-10-12 14:43:02 -05:00
2006-02-15 22:07:31 -06:00
fi
### End of gui-only checks
2005-12-27 11:20:19 -06:00
###-------------------------------------------------------------------------
### Selectively disable deprecated bits of glib/gdk/gtk/gnome
###-------------------------------------------------------------------------
2011-03-26 07:50:06 -05:00
allow_deprecated=true
2005-12-27 11:20:19 -06:00
AC_ARG_ENABLE(deprecated-glib,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--disable-deprecated-glib],[don't use deprecated glib functions])],
2005-12-27 11:20:19 -06:00
[case "${enableval}" in
2010-08-31 14:55:34 -05:00
no) allow_deprecated=false ;;
*) allow_deprecated=true ;;
esac]
2005-12-27 11:20:19 -06:00
)
if test x${allow_deprecated} != "xtrue"
then
2011-03-26 07:50:06 -05:00
# FIXME: This define is unused; this block can be removed
2005-12-27 11:20:19 -06:00
AC_DEFINE(G_DISABLE_DEPRECATED,1, [Don't use deprecated glib functions])
fi
2011-03-26 07:50:06 -05:00
# default: Allow deprecated gtk functions
allow_deprecated=true
2005-12-27 11:20:19 -06:00
AC_ARG_ENABLE(deprecated-gtk,
2010-02-21 12:30:32 -06:00
[AS_HELP_STRING([--disable-deprecated-gtk],[don't use deprecated gtk, gdk or gdk-pixbuf functions])],
2005-12-27 11:20:19 -06:00
[case "${enableval}" in
2010-08-31 14:55:34 -05:00
no) allow_deprecated=false ;;
*) allow_deprecated=true ;;
esac]
2005-12-27 11:20:19 -06:00
)
if test x${allow_deprecated} != "xtrue"
then
2011-03-26 07:50:06 -05:00
# FIXME: This define is unused; this block can be removed
2005-12-27 11:20:19 -06:00
AC_DEFINE(GTK_DISABLE_DEPRECATED,1, [Don't use deprecated gtk functions])
2010-02-21 12:30:32 -06:00
AC_DEFINE(GDK_DISABLE_DEPRECATED,1, [Don't use deprecated gdk functions])
AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1, [Don't use deprecated gdk-pixbuf functions])
2005-12-27 11:20:19 -06:00
fi
2011-03-26 07:50:06 -05:00
allow_deprecated=true
2005-12-27 11:20:19 -06:00
AC_ARG_ENABLE(deprecated-gnome,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--disable-deprecated-gnome],[don't use deprecated gnome functions])],
2005-12-27 11:20:19 -06:00
[case "${enableval}" in
2010-08-31 14:55:34 -05:00
no) allow_deprecated=false ;;
*) allow_deprecated=true ;;
esac]
2005-12-27 11:20:19 -06:00
)
if test x${allow_deprecated} != "xtrue"
then
2011-03-26 07:50:06 -05:00
# FIXME: This define is unused; this block can be removed
2005-12-27 11:20:19 -06:00
AC_DEFINE(GNOME_DISABLE_DEPRECATED,1, [Don't use deprecated gnome functions])
fi
2002-05-07 18:22:24 -05:00
###-------------------------------------------------------------------------
### Stuff from Mac OS X Port
###-------------------------------------------------------------------------
AC_CHECK_FUNCS(pthread_mutex_init)
2010-08-21 18:52:27 -05:00
case $host_os in
2010-08-31 14:55:34 -05:00
darwin*)
AC_REPLACE_FUNCS(localtime_r gmtime_r)
AC_LIBOBJ(strptime)
;;
*)
AC_REPLACE_FUNCS(strptime localtime_r gmtime_r)
;;
2010-08-21 18:52:27 -05:00
esac
2006-07-13 21:01:50 -05:00
if test x$am_cv_val_LC_MESSAGES = "xno"; then
2002-05-07 18:22:24 -05:00
LC_MESSAGES_ENUM="LC_ALL"
else
LC_MESSAGES_ENUM="LC_MESSAGES"
fi
AC_SUBST(LC_MESSAGES_ENUM)
2008-07-07 14:18:26 -05:00
###--------------------------------------------------------
2011-03-24 14:47:47 -05:00
### Make Python plugin and bindings optional
2008-07-07 14:18:26 -05:00
###--------------------------------------------------------
2011-03-24 14:47:47 -05:00
AC_ARG_ENABLE(python,
[AS_HELP_STRING([--enable-python],[enable python plugin and bindings])],
2008-07-07 14:18:26 -05:00
[case "${enableval}" in
2010-08-31 14:55:34 -05:00
yes) enable_python=true ;;
no) enable_python=false ;;
2011-03-25 02:57:15 -05:00
*) enable_python=false # default: false
esac],
[enable_python=false] # default: false
2008-07-07 14:18:26 -05:00
)
if test x${enable_python} = "xtrue"
then
2013-04-09 18:00:51 -05:00
# Check for Python. We require python-2.4
AM_PATH_PYTHON(2.4,,[
AC_MSG_ERROR([Could not find python >= 2.4. If you use --enable-python, you MUST have python installed!])
2012-08-09 17:44:53 -05:00
])
2008-07-07 14:18:26 -05:00
AC_PYTHON_DEVEL(>= '2.4')
2013-05-05 16:57:35 -05:00
if test "x${PYTHON}" = "x"
2013-04-09 18:00:51 -05:00
then
AC_MSG_ERROR([Could not find Python development files. Make sure that the correct python-devel package is installed.])
fi
2008-07-07 14:18:26 -05:00
SWIG_PYTHON
2011-11-17 15:27:40 -06:00
_COMPONENTS="$_COMPONENTS python"
2008-07-07 14:18:26 -05:00
fi
2011-03-24 14:47:32 -05:00
AM_CONDITIONAL(WITH_PYTHON, [test x${enable_python} = xtrue])
2008-07-07 14:18:26 -05:00
2011-03-24 14:47:47 -05:00
AC_ARG_ENABLE(python-bindings,
[AS_HELP_STRING([--enable-python-bindings],[obsolete: replaced by --enable-python])],
if test "x$enableval" != "xno" ; then
AC_MSG_ERROR([--enable-python-bindings is obsolete: The option has been renamed into --enable-python])
fi)
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=
2007-04-11 08:27:41 -05:00
CFLAGS="${CFLAGS} -Wno-unused"
2003-02-02 10:35:49 -06:00
# 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
2006-04-28 21:04:57 -05:00
# error-on-warning should not be active in (stable) release tarballs
2012-11-01 05:35:34 -05:00
if test "x$BUILDING_FROM_SCM" = "xyes"
2006-04-28 21:04:57 -05:00
then
2012-10-31 16:38:49 -05:00
# This code is from svn/svk/git/bzr, so enable error-on-warning
2006-04-28 21:04:57 -05:00
error_on_warning_as_default="yes"
else
# This is from a tarball, so disable error-on-warning
error_on_warning_as_default="no"
fi
2005-11-01 21:32:36 -06:00
2003-02-02 10:35:49 -06:00
# Enable error-on-warning by default -- I'm tired of fixing other
# people's missing #includes, etc.
AC_ARG_ENABLE(error-on-warning,
2009-04-06 07:15:18 -05:00
[AS_HELP_STRING([--disable-error-on-warning],[disable treating compile warnings as errors])],
2003-02-02 10:35:49 -06:00
[case "${enableval}" in
2006-03-05 13:33:00 -06:00
yes) warnFLAGS="${warnFLAGS} -Werror" ; gnc_error_on_warning=yes ;;
2006-03-03 09:57:51 -06:00
no) gnc_error_on_warning=no ;;
2003-02-02 10:35:49 -06:00
*) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
esac],
2010-08-31 14:55:34 -05:00
[ if test "${error_on_warning_as_default}" = "yes"; then
2011-01-07 08:04:55 -06:00
warnFLAGS="${warnFLAGS} -Werror";
2010-08-31 14:55:34 -05:00
gnc_error_on_warning=auto
else
gnc_error_on_warning=no
fi
2006-04-28 21:04:57 -05:00
])
2003-02-02 10:35:49 -06:00
2004-05-08 05:00:52 -05:00
# For gcc >= 3.4.x, specifically enable the new warning switch
# -Wdeclaration-after-statement in order to preserve source code
# compatibility to gcc 2.95 and other compilers.
GCC_VERSION=`${CC} -dumpversion`
2006-07-13 21:01:50 -05:00
if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 3; then
2010-08-31 14:55:34 -05:00
# This is gcc >= 3.x.x
if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 4; then
# This is gcc >= 3.4.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
# This is gcc == 4.x.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
fi
fi
2004-05-08 05:00:52 -05:00
fi
2006-10-15 14:02:05 -05:00
CFLAGS="${warnFLAGS} ${CFLAGS}"
2003-02-02 10:35:49 -06:00
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/bin/generate-gnc-script
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
2012-05-06 13:03:41 -05:00
# Don't add empty lines in the following macro, they
# will cause the Windows build to fail if using a git repo as source
2010-08-31 14:55:34 -05:00
AC_CONFIG_FILES(
po/Makefile.in
dnl # Makefiles
Makefile
accounts/Makefile
accounts/C/Makefile
accounts/cs/Makefile
accounts/da/Makefile
accounts/de_AT/Makefile
accounts/de_CH/Makefile
accounts/de_DE/Makefile
accounts/el_GR/Makefile
accounts/en_GB/Makefile
accounts/es_ES/Makefile
accounts/es_MX/Makefile
accounts/fi_FI/Makefile
accounts/fr_CA/Makefile
accounts/fr_CH/Makefile
accounts/fr_FR/Makefile
accounts/hu_HU/Makefile
accounts/it/Makefile
accounts/ja/Makefile
accounts/ko/Makefile
accounts/lv/Makefile
accounts/nl/Makefile
accounts/nb/Makefile
accounts/pl/Makefile
accounts/pt_BR/Makefile
accounts/pt_PT/Makefile
accounts/ru/Makefile
accounts/sk/Makefile
2012-02-12 14:29:01 -06:00
accounts/sv_SE/Makefile
2010-08-31 14:55:34 -05:00
accounts/tr_TR/Makefile
accounts/zh_CN/Makefile
checks/Makefile
doc/Makefile
doc/examples/Makefile
intl-scm/Makefile
lib/Makefile
lib/guile-www/Makefile
lib/libc/Makefile
lib/stf/Makefile
packaging/Makefile
packaging/win32/Makefile
src/Makefile
src/app-utils/Makefile
src/app-utils/test/Makefile
src/backend/Makefile
src/backend/dbi/Makefile
src/backend/dbi/test/Makefile
src/backend/xml/Makefile
src/backend/xml/test/Makefile
src/backend/xml/test/test-files/Makefile
src/backend/xml/test/test-files/xml2/Makefile
src/backend/sql/Makefile
src/backend/sql/test/Makefile
src/bin/Makefile
src/bin/overrides/Makefile
src/bin/test/Makefile
src/core-utils/Makefile
src/core-utils/test/Makefile
src/debug/Makefile
2011-01-07 08:04:55 -06:00
src/debug/valgrind/Makefile
2010-08-31 14:55:34 -05:00
src/doc/Makefile
2010-11-06 16:35:20 -05:00
src/doc/design/Makefile
2010-08-31 14:55:34 -05:00
src/doc/xml/Makefile
src/engine/Makefile
src/engine/test/Makefile
src/engine/test-core/Makefile
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
src/gnome/Makefile
2011-04-05 14:55:25 -05:00
src/gnome/gtkbuilder/Makefile
2013-10-07 09:03:59 -05:00
src/gnome/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/gnome/ui/Makefile
src/gnome-utils/Makefile
2011-06-15 11:31:03 -05:00
src/gnome-utils/gtkbuilder/Makefile
2013-10-07 09:03:59 -05:00
src/gnome-utils/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/gnome-utils/test/Makefile
src/gnome-utils/ui/Makefile
src/gnome-search/Makefile
src/html/Makefile
src/import-export/Makefile
src/import-export/test/Makefile
2013-10-07 09:07:00 -05:00
src/import-export/ofx/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/import-export/qif-import/Makefile
src/import-export/qif/Makefile
src/import-export/qif/test/Makefile
2013-10-07 09:03:59 -05:00
src/import-export/qif-import/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/import-export/qif-import/test/Makefile
2013-10-07 09:03:59 -05:00
src/import-export/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/import-export/ofx/Makefile
src/import-export/ofx/test/Makefile
2012-03-16 15:26:22 -05:00
src/import-export/csv-import/Makefile
2013-10-07 09:07:00 -05:00
src/import-export/csv-import/gschemas/Makefile
2012-03-16 15:26:04 -05:00
src/import-export/csv-export/Makefile
2013-10-07 09:03:59 -05:00
src/import-export/csv-export/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/import-export/log-replay/Makefile
src/import-export/aqbanking/Makefile
2013-10-07 09:03:59 -05:00
src/import-export/aqbanking/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/libqof/Makefile
src/libqof/qof/Makefile
2011-01-15 13:11:42 -06:00
src/libqof/qof/test/Makefile
2010-08-31 14:55:34 -05:00
src/optional/Makefile
2011-02-18 03:37:24 -06:00
src/optional/gtkmm/Makefile
2011-10-17 15:10:56 -05:00
src/optional/gtkmm/test/Makefile
2010-08-31 14:55:34 -05:00
src/optional/python-bindings/Makefile
src/optional/python-bindings/tests/Makefile
src/pixmaps/Makefile
2011-03-24 14:47:47 -05:00
src/python/Makefile
2011-03-24 15:10:45 -05:00
src/python/pycons/Makefile
2010-08-31 14:55:34 -05:00
src/quotes/Makefile
src/register/Makefile
src/register/ledger-core/Makefile
src/register/ledger-core/test/Makefile
src/register/register-core/Makefile
src/register/register-core/test/Makefile
src/register/register-gnome/Makefile
src/register/register-gnome/test/Makefile
src/report/Makefile
src/report/report-gnome/Makefile
src/report/report-gnome/test/Makefile
src/report/report-system/Makefile
src/report/report-system/test/Makefile
src/report/standard-reports/Makefile
src/report/standard-reports/test/Makefile
src/report/business-reports/Makefile
src/report/locale-specific/Makefile
src/report/locale-specific/us/Makefile
src/report/locale-specific/us/test/Makefile
src/report/stylesheets/Makefile
src/report/stylesheets/test/Makefile
src/report/utility-reports/Makefile
src/report/utility-reports/test/Makefile
2011-03-24 16:30:09 -05:00
src/report/jqplot/Makefile
2010-08-31 14:55:34 -05:00
src/scm/Makefile
src/scm/gnumeric/Makefile
src/tax/Makefile
src/tax/us/Makefile
src/tax/us/test/Makefile
src/test-core/Makefile
src/business/Makefile
src/business/business-gnome/Makefile
2011-10-27 13:33:10 -05:00
src/business/business-gnome/gtkbuilder/Makefile
2013-10-07 09:03:59 -05:00
src/business/business-gnome/gschemas/Makefile
2010-08-31 14:55:34 -05:00
src/business/business-gnome/ui/Makefile
src/business/business-ledger/Makefile
2011-01-07 08:04:55 -06:00
dnl # Stuff for bill/invoice import plugin
src/plugins/Makefile
src/plugins/bi_import/Makefile
2012-01-21 06:20:49 -06:00
src/plugins/bi_import/gtkbuilder/Makefile
2011-01-07 08:04:55 -06:00
src/plugins/bi_import/ui/Makefile
New plugin to import customers and vendors from a csv type file.
From a patch by Sebastian Held.
Again the CSV file is of fixed number of fields, similar to invoice/bill importer.
Please test this.
Field list:
id, company, name, addr1, addr2, addr3, addr4, phone, fax, email, notes, shipname, shipaddr1, shipaddr2, shipaddr3, shipaddr4, shipphone shipfax, shipemail
Vendors don't have shipping information so even though the fields have to exist, leave them empty.
The id field is optional, if empty a new id will be chosen. If an id is used this will UPDATE
a vendor/customer with the same id. This may not be what the user wants. Maybe this should
be optional/selectable behaviour.
To enable the plugin, add the line:
(gnc:module-load "gnucash/plugins/customer_import" 0)
to ~/.gnucash/config.user
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22065 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-28 12:38:26 -06:00
dnl # Stuff for customer import.
src/plugins/customer_import/Makefile
src/plugins/customer_import/gtkbuilder/Makefile
src/plugins/customer_import/ui/Makefile
2010-08-31 14:55:34 -05:00
dnl # non-makefiles
2013-06-02 05:55:13 -05:00
packaging/win32/gnucash.iss
src/bin/gnucash.rc
2013-10-16 10:22:56 -05:00
src/app-utils/migratable-prefs.xml
2013-11-13 09:51:44 -06:00
src/engine/iso-currencies-to-c
2013-06-02 05:55:13 -05:00
src/gnome/gnucash.desktop.in
2013-11-05 12:37:45 -06:00
dnl # GSettings schema files
src/business/business-gnome/gschemas/org.gnucash.dialogs.business.gschema.xml.in
src/gnome/gschemas/org.gnucash.dialogs.checkprinting.gschema.xml.in
src/gnome/gschemas/org.gnucash.dialogs.commodities.gschema.xml.in
src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in
src/gnome/gschemas/org.gnucash.dialogs.reconcile.gschema.xml.in
src/gnome/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in
src/gnome/gschemas/org.gnucash.dialogs.totd.gschema.xml.in
src/gnome/gschemas/org.gnucash.gschema.xml.in
src/gnome/gschemas/org.gnucash.window.pages.account.tree.gschema.xml.in
src/gnome/gschemas/org.gnucash.window.pages.gschema.xml.in
src/gnome-utils/gschemas/org.gnucash.history.gschema.xml.in
src/gnome-utils/gschemas/org.gnucash.warnings.gschema.xml.in
src/import-export/aqbanking/gschemas/org.gnucash.dialogs.import.hbci.gschema.xml.in
src/import-export/csv-export/gschemas/org.gnucash.dialogs.export.csv.gschema.xml.in
src/import-export/csv-import/gschemas/org.gnucash.dialogs.import.csv.gschema.xml.in
src/import-export/gschemas/org.gnucash.dialogs.import.generic.gschema.xml.in
src/import-export/ofx/gschemas/org.gnucash.dialogs.import.ofx.gschema.xml.in
src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in
2010-08-31 14:55:34 -05:00
dnl # Please read doc/build-system before adding *anything* here
,
2013-11-13 09:51:44 -06:00
dnl # init-commands go here
2005-11-01 21:32:36 -06:00
)
2013-11-13 09:51:44 -06:00
# A few files need extra actions at creation time
AC_CONFIG_FILES([src/gnc-test-env], [chmod u+x src/gnc-test-env])
AC_CONFIG_FILES([src/bin/overrides/gnucash-make-guids], [chmod u+x src/bin/overrides/gnucash-make-guids])
2005-11-01 21:32:36 -06:00
AC_OUTPUT
2003-01-01 22:21:00 -06:00
2006-03-24 16:14:00 -06:00
2005-11-01 21:32:36 -06:00
AC_MSG_RESULT([
Options detected/selected
-------------------------
gnucash version ...... : $VERSION
Build for host ....... : $host
2011-11-17 15:27:40 -06:00
Optional components... : $_COMPONENTS
2005-11-01 21:32:36 -06:00
Extra Warnings ....... : $warnFLAGS
CPPFLAGS ............. : $CPPFLAGS
CFLAGS ............... : $CFLAGS
LDFLAGS .............. : $LDFLAGS
2009-08-01 22:00:28 -05:00
prefix................ : ${prefix}
2005-12-04 15:27:17 -06:00
2005-11-01 21:32:36 -06:00
])