mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
instead of a compile-time option. Implement the 'thin blue line' separating past transactions from future transactions. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2975 57a11ea4-9604-0410-9ed3-97b8803252fd
343 lines
9.0 KiB
Plaintext
343 lines
9.0 KiB
Plaintext
## -*-m4-*-
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
# FILE:
|
|
# configure.in
|
|
#
|
|
# FUNCTION:
|
|
# implements checks vfor a variety of system-specific functions
|
|
#
|
|
# 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
|
|
|
|
### --------------------------------------------------------------------------
|
|
### Headers
|
|
### check for various programs, and stuff (do this first because later
|
|
### commands depend on them):
|
|
|
|
AC_INIT(src/guile/gnucash.h)
|
|
AM_INIT_AUTOMAKE(gnucash,1.5.2)
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
AM_MAINTAINER_MODE
|
|
AM_ACLOCAL_INCLUDE(macros)
|
|
|
|
AC_PROG_INSTALL
|
|
AC_PROG_CC
|
|
AM_PROG_LIBTOOL
|
|
|
|
AC_ARG_PROGRAM
|
|
|
|
AC_ISC_POSIX
|
|
AC_C_BIGENDIAN
|
|
AC_PROG_MAKE_SET
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(limits.h ieeefp.h)
|
|
AC_CHECK_FUNCS(stpcpy memcpy)
|
|
|
|
AM_PATH_GLIB
|
|
|
|
if test ${no_glib}x = yesx
|
|
then
|
|
AC_MSG_ERROR([Cannot find glib.])
|
|
fi
|
|
|
|
GNOME_INIT
|
|
|
|
GNOME_COMPILE_WARNINGS
|
|
GNOME_CHECK_GDK_PIXBUF
|
|
GNOME_CHECK_GUILE
|
|
GNOME_PRINT_CHECK
|
|
GNOME_XML_CHECK
|
|
|
|
dnl Set of available languages.
|
|
ALL_LINGUAS="de en_GB es fr it ja ru sv"
|
|
AM_GNU_GETTEXT
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### Variables
|
|
### Set up all the initial variable values...
|
|
|
|
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}'
|
|
GNC_LIBDIR='${libdir}'
|
|
GNC_SHAREDIR='${datadir}'
|
|
GNC_SCM_INSTALL_DIR='${datadir}/scm'
|
|
GNC_DOC_INSTALL_DIR='${datadir}/doc'
|
|
else
|
|
GNC_CONFIGDIR='${sysconfdir}/gnucash'
|
|
GNC_LIBDIR='${pkglibdir}'
|
|
GNC_SHAREDIR='${pkgdatadir}'
|
|
GNC_SCM_INSTALL_DIR='${pkgdatadir}/scm'
|
|
GNC_DOC_INSTALL_DIR='${pkgdatadir}/doc'
|
|
fi
|
|
|
|
AC_SUBST(GNC_CONFIGDIR)
|
|
AC_SUBST(GNC_LIBDIR)
|
|
AC_SUBST(GNC_SHAREDIR)
|
|
AC_SUBST(GNC_SCM_INSTALL_DIR)
|
|
AC_SUBST(GNC_DOC_INSTALL_DIR)
|
|
|
|
|
|
# We should always see these errors...
|
|
CFLAGS="${CFLAGS} -Wall"
|
|
|
|
# This has to come after AC_PROG_CC
|
|
if test ${GCC}x = yesx
|
|
then
|
|
CFLAGS="${CFLAGS} -Werror-implicit-function-declaration"
|
|
fi
|
|
|
|
AC_ARG_ENABLE( debug,
|
|
[ --enable-debug compile with debugging flags set],
|
|
CFLAGS="${CFLAGS} -g"
|
|
LDFLAGS="${LDFLAGS} -g"
|
|
AC_DEFINE(DEBUG_MEMORY,1),
|
|
AC_DEFINE(DEBUG_MEMORY,0) )
|
|
|
|
AC_ARG_ENABLE( profile,
|
|
[ --enable-profile compile with profiling set],
|
|
CFLAGS="${CFLAGS} -pg"
|
|
LDFLAGS="${LDFLAGS} -pg")
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### i18n
|
|
AC_ARG_WITH( locale-dir,
|
|
[ --with-locale-dir=PATH specify where to look for locale-specific information],
|
|
LOCALE_DIR="$with_locale_dir",
|
|
LOCALE_DIR="\${prefix}/share/locale")
|
|
|
|
AC_SUBST(LOCALE_DIR)
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### help files
|
|
AC_ARG_WITH( help-prefix,
|
|
[ --with-help-prefix=PATH specify where to store the help files],
|
|
GNC_HELPDIR="$with_help_prefix/gnome/help/gnucash",
|
|
GNC_HELPDIR="\${datadir}/gnome/help/gnucash")
|
|
|
|
AC_SUBST(GNC_HELPDIR)
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### Check for glade
|
|
|
|
# Check for glade
|
|
AC_ARG_WITH(glade,
|
|
[ --with-glade=FILE which glade executable to use ],
|
|
GLADE="${with_glade}")
|
|
|
|
# If the user didn't specify a glade, then go fetch.
|
|
if test x"$GLADE" = x;
|
|
then
|
|
AC_PATH_PROG(GLADE, glade)
|
|
fi
|
|
|
|
# Make sure glade was found
|
|
#if test x"$GLADE" = x; then
|
|
# AC_MSG_ERROR([Cannot find Glade.])
|
|
#fi
|
|
|
|
AC_SUBST(GLADE)
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### Check for perl
|
|
|
|
# Check for perl, force version 5
|
|
AC_ARG_WITH(perl,
|
|
[ --with-perl=FILE which perl executable to use ],
|
|
PERL="${with_perl}")
|
|
|
|
# If the user didn't specify a perl, then go fetch.
|
|
if test x"$PERL" = x;
|
|
then
|
|
AC_PATH_PROG(PERL, perl)
|
|
fi
|
|
|
|
# Make sure Perl was found
|
|
if test x"$PERL" = x; then
|
|
AC_MSG_ERROR([Cannot find Perl. Try using the --with-perl flag.])
|
|
fi
|
|
|
|
# Make sure it's version 5 or later
|
|
if "$PERL" -e 'exit 1 if $] < 5.0'; then
|
|
:
|
|
else
|
|
AC_MSG_ERROR([Found ${PERL} reports version ]
|
|
[`${PERL} -e 'print $]'`, need version 5.*])
|
|
fi
|
|
AC_SUBST(PERL)
|
|
|
|
# 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"
|
|
#
|
|
PERLINCL=`$PERL -MConfig -e 'print $Config{"archlibexp"}'`
|
|
AC_ARG_WITH( perl-includes,
|
|
[ --with-perl-includes=DIR specify where to look for perl includes],
|
|
PERLINCL="$with_perl_includes" )
|
|
|
|
if test ! -d ${PERLINCL}/CORE; then
|
|
AC_MSG_ERROR([Missing directory ${PERLINCL}/CORE in the perl include directory])
|
|
fi
|
|
AC_SUBST(PERLINCL)
|
|
|
|
|
|
### -------------------------------------------------------------------
|
|
|
|
# Check for 'swig'
|
|
AC_PATH_PROG(SWIG,swig,no) # Sets @SWIG@
|
|
AC_ARG_WITH(swig,
|
|
[ --with-swig=FILE which swig executable to use ],
|
|
SWIG="${with_swig}")
|
|
|
|
if test x"$SWIG" = xno; then
|
|
AC_MSG_ERROR([Cannot find Swig. Try using the --with-swig flag.])
|
|
fi
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### Libraries
|
|
LIBS="$LIBS -lm"
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
GTKHTML_LIBS=`$GNOME_CONFIG --libs gtkhtml`
|
|
GTKHTML_CFLAGS=`$GNOME_CONFIG --cflags gtkhtml`
|
|
|
|
# check for gtkhtml and enable it via HAVE_LIBGTKHTML
|
|
# if found
|
|
AC_CHECK_LIB(gtkhtml, gtk_html_new,
|
|
GNOMEBUILDLIBS="${GNOMEBUILDLIBS} gtkhtml"
|
|
AC_DEFINE(HAVE_LIBGTKHTML),
|
|
AC_MSG_ERROR([Cannot find gtkhtml. See the README for more info.]),
|
|
$GTKHTML_LIBS)
|
|
|
|
AC_SUBST(GTKHTML_LIBS)
|
|
AC_SUBST(GTKHTML_CFLAGS)
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
## 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)
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### G-wrap (libraries and executable)
|
|
|
|
G_WRAP_COMPILE_ARGS=""
|
|
G_WRAP_LINK_ARGS=""
|
|
|
|
# Find the configure script
|
|
AC_PATH_PROG(G_WRAP_CONFIG,g-wrap-config)
|
|
|
|
if test -x "${G_WRAP_CONFIG}";
|
|
then
|
|
# Find out what the g-wrap compile and link flags are.
|
|
G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
|
|
G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile`
|
|
fi
|
|
|
|
# Find the tool
|
|
AC_PATH_PROG(G_WRAP, g-wrap)
|
|
|
|
if test x"${G_WRAP_COMPILE_ARGS}" = x || \
|
|
test x"${G_WRAP_LINK_ARGS}" = x || \
|
|
test ! -x "${G_WRAP}";
|
|
then
|
|
AC_MSG_ERROR([
|
|
|
|
g-wrap does not appear to be installed. It must be installed and
|
|
its binary directory must be in your PATH. If you need to install
|
|
g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap.])
|
|
fi
|
|
|
|
AC_SUBST(G_WRAP)
|
|
AC_SUBST(G_WRAP_CONFIG)
|
|
AC_SUBST(G_WRAP_COMPILE_ARGS)
|
|
AC_SUBST(G_WRAP_LINK_ARGS)
|
|
|
|
|
|
### --------------------------------------------------------------------------
|
|
### Makefile creation
|
|
|
|
AC_OUTPUT(
|
|
dnl # Makefiles
|
|
Makefile
|
|
debian/Makefile
|
|
doc/Makefile
|
|
doc/examples/Makefile
|
|
doc/html/Makefile
|
|
doc/html/fr/Makefile
|
|
doc/html/fr/image/Makefile
|
|
doc/sgml/Makefile
|
|
doc/sgml/C/Makefile
|
|
doc/sgml/C/image/Makefile
|
|
intl/Makefile
|
|
lib/Makefile
|
|
macros/Makefile
|
|
po/Makefile.in
|
|
rpm/Makefile
|
|
src/Makefile
|
|
src/calculation/Makefile
|
|
src/doc/Makefile
|
|
src/doc/design/Makefile
|
|
src/engine/Makefile
|
|
src/engine/sql/Makefile
|
|
src/experimental/Makefile
|
|
src/experimental/cbb/Makefile
|
|
src/experimental/cbb/cbb-engine/Makefile
|
|
src/experimental/gg/Makefile
|
|
src/experimental/ofx/Makefile
|
|
src/experimental/ofx/dtd/Makefile
|
|
src/experimental/ofx/explore/Makefile
|
|
src/experimental/ofx/parser/Makefile
|
|
src/gnome/Makefile
|
|
src/guile/Makefile
|
|
src/optional/Makefile
|
|
src/optional/swig/Makefile
|
|
src/pixmaps/Makefile
|
|
src/quotes/Makefile
|
|
src/register/Makefile
|
|
src/register/gnome/Makefile
|
|
src/scm/Makefile
|
|
src/scm/gnumeric/Makefile
|
|
src/scm/printing/Makefile
|
|
src/scm/qif-import/Makefile
|
|
src/scm/report/Makefile
|
|
src/scm/srfi/Makefile
|
|
dnl # non-makefiles
|
|
dnl # Please read doc/build-system before adding *anything* here
|
|
,
|
|
dnl # commands go here, but we don't have any right now
|
|
)
|