2004-08-19 09:03:11 +05:30
|
|
|
dnl $Id$
|
|
|
|
|
2002-10-20 19:55:16 +05:30
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl May need to run automake && aclocal first
|
2003-08-11 04:55:22 +05:30
|
|
|
|
|
|
|
AC_PREREQ(2.57)
|
2005-05-02 08:02:52 +05:30
|
|
|
AC_INIT(gramps, 1.1.99pre2, gramps-bugs@lists.sourceforge.net)
|
2003-08-11 04:55:22 +05:30
|
|
|
AC_CONFIG_SRCDIR(src/gramps.py)
|
|
|
|
AM_INIT_AUTOMAKE(1.6.3)
|
2005-05-02 08:02:52 +05:30
|
|
|
RELEASE=0.CVS$(head -c 10 ${srcdir}/ChangeLog | tr -d '-')
|
|
|
|
dnl RELEASE=1
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
VERSIONSTRING=$VERSION
|
|
|
|
if test x"$RELEASE" != "x"
|
|
|
|
then
|
|
|
|
VERSIONSTRING="$VERSION-$RELEASE"
|
|
|
|
fi
|
|
|
|
|
2004-07-14 10:09:05 +05:30
|
|
|
AM_GCONF_SOURCE_2
|
2005-03-17 22:49:34 +05:30
|
|
|
AM_SHARED_MIME
|
2002-10-20 19:55:16 +05:30
|
|
|
AC_SUBST(RELEASE)
|
|
|
|
AC_SUBST(VERSIONSTRING)
|
|
|
|
|
2004-08-19 09:03:11 +05:30
|
|
|
AC_PATH_PROG(MSGFMT, msgfmt,no)
|
|
|
|
if test x$MSGFMT = xno; then
|
|
|
|
AC_MSG_ERROR(Couldn't find msgfmt program. Please install the GNU gettext package.)
|
|
|
|
fi
|
|
|
|
AC_PATH_PROG(MSGCONV, msgconv,no)
|
|
|
|
if test x$MSGCONV = xno; then
|
|
|
|
AC_MSG_ERROR(Couldn't find msgconv program. Please install the GNU gettext package.)
|
|
|
|
fi
|
|
|
|
AC_PATH_PROG(ICONV, iconv,no)
|
|
|
|
if test x$ICONV = xno; then
|
|
|
|
AC_MSG_ERROR(Couldn't find iconv program.)
|
|
|
|
fi
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2005-04-24 22:39:59 +05:30
|
|
|
LANGUAGES="hu zh_CN cs da de es fr it nb nl no pl pt_BR ro ru sv eo fi"
|
2002-10-20 19:55:16 +05:30
|
|
|
AC_SUBST(LANGUAGES)
|
|
|
|
|
|
|
|
DISTLANGS=
|
|
|
|
POFILES=
|
|
|
|
MOFILES=
|
|
|
|
for lang in $LANGUAGES; do
|
|
|
|
POFILES="$POFILES $lang.po"
|
|
|
|
MOFILES="$MOFILES $lang.mo"
|
|
|
|
done
|
|
|
|
AC_SUBST(POFILES)
|
|
|
|
AC_SUBST(MOFILES)
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
2005-02-22 09:25:34 +05:30
|
|
|
dnl We first only check for python >= 2.3
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2005-02-22 09:25:34 +05:30
|
|
|
AM_PATH_PYTHON(2.3)
|
2002-10-20 19:55:16 +05:30
|
|
|
AC_PATH_PROG(BINSH, sh)
|
|
|
|
|
2003-04-06 20:14:30 +05:30
|
|
|
pygtk_require="
|
|
|
|
try:
|
2002-11-26 09:36:23 +05:30
|
|
|
import pygtk
|
|
|
|
pygtk.require('2.0')
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2003-08-14 09:23:41 +05:30
|
|
|
|
|
|
|
def out(str):
|
|
|
|
f = open('conftest.out', 'w')
|
|
|
|
f.write(str)
|
|
|
|
f.close()
|
2002-11-26 09:36:23 +05:30
|
|
|
"
|
|
|
|
|
2004-08-19 09:03:11 +05:30
|
|
|
AC_MSG_CHECKING(Python bindings for gtk2.4 (pygtk2>=2.3.4))
|
|
|
|
cat > conftest.py <<EOF
|
|
|
|
$pygtk_require
|
|
|
|
try:
|
|
|
|
import gobject
|
|
|
|
version = gobject.pygtk_version
|
|
|
|
if version >= (2,3,4):
|
|
|
|
out("YES")
|
|
|
|
else:
|
|
|
|
out("No")
|
|
|
|
except ImportError:
|
|
|
|
out("No")
|
2004-08-19 18:54:17 +05:30
|
|
|
except AttributeError:
|
|
|
|
out("No")
|
2004-08-19 09:03:11 +05:30
|
|
|
EOF
|
|
|
|
$PYTHON conftest.py
|
|
|
|
has_pygtk=`cat conftest.out`
|
|
|
|
rm -f conftest.out conftest.py
|
|
|
|
if test YES != "$has_pygtk"
|
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
|
|
|
|
**** The python bindings for gtk 2.4 (pygtk2>=2.3.4) could not be found.])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2004-04-04 10:09:52 +05:30
|
|
|
AC_MSG_CHECKING(Python bindings for gnome)
|
2002-10-20 19:55:16 +05:30
|
|
|
cat > conftest.py <<EOF
|
2003-04-06 20:14:30 +05:30
|
|
|
$pygtk_require
|
2002-10-20 19:55:16 +05:30
|
|
|
try:
|
2003-08-14 09:23:41 +05:30
|
|
|
import gnome
|
|
|
|
# Do not import gnome.ui, this can kill python if the
|
|
|
|
# display cannot be opened. Just search it.
|
|
|
|
import imp
|
|
|
|
imp.find_module('gnome/ui')
|
|
|
|
out("YES")
|
2002-10-20 19:55:16 +05:30
|
|
|
except ImportError:
|
2003-08-14 09:23:41 +05:30
|
|
|
out("NO")
|
2002-10-20 19:55:16 +05:30
|
|
|
EOF
|
|
|
|
$PYTHON conftest.py
|
2002-11-08 09:40:31 +05:30
|
|
|
has_pygnome=`cat conftest.out`
|
2002-10-20 19:55:16 +05:30
|
|
|
rm -f conftest.out conftest.py
|
2003-08-14 09:23:41 +05:30
|
|
|
if test YES != "$has_pygnome"
|
2002-10-20 19:55:16 +05:30
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
2004-04-04 10:09:52 +05:30
|
|
|
**** The python bindings for gnome 2.0 (gnome-python2) could not be found.])
|
2002-10-20 19:55:16 +05:30
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2002-11-08 09:40:31 +05:30
|
|
|
AC_MSG_CHECKING(Python bindings for gconf)
|
2002-10-20 19:55:16 +05:30
|
|
|
cat > conftest.py <<EOF
|
2002-11-26 09:36:23 +05:30
|
|
|
$pygtk_require
|
2002-10-20 19:55:16 +05:30
|
|
|
try:
|
2002-11-08 09:40:31 +05:30
|
|
|
import gconf
|
2003-08-14 09:23:41 +05:30
|
|
|
out("YES")
|
2003-12-09 09:44:35 +05:30
|
|
|
except ImportError:
|
|
|
|
import gnome.gconf
|
|
|
|
out("YES")
|
2002-10-20 19:55:16 +05:30
|
|
|
except ImportError:
|
2003-08-14 09:23:41 +05:30
|
|
|
out("NO")
|
2002-10-20 19:55:16 +05:30
|
|
|
EOF
|
|
|
|
$PYTHON conftest.py
|
2002-11-08 09:40:31 +05:30
|
|
|
has_gconf=`cat conftest.out`
|
2002-10-20 19:55:16 +05:30
|
|
|
rm -f conftest.out conftest.py
|
2003-08-14 09:23:41 +05:30
|
|
|
if test YES != "$has_gconf"
|
2002-10-20 19:55:16 +05:30
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
2002-11-08 09:40:31 +05:30
|
|
|
**** The python bindings for gconf (gnome-python2-gconf) could not be found.])
|
2002-10-20 19:55:16 +05:30
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2004-04-04 10:09:52 +05:30
|
|
|
AC_MSG_CHECKING(Python bindings for gnome canvas)
|
2002-10-20 19:55:16 +05:30
|
|
|
cat > conftest.py <<EOF
|
2002-11-26 09:36:23 +05:30
|
|
|
$pygtk_require
|
2002-10-20 19:55:16 +05:30
|
|
|
try:
|
2003-08-14 09:23:41 +05:30
|
|
|
# Do not import gnome.canvas, this can raise a RuntimeError if the
|
|
|
|
# display cannot be opened. Just search it.
|
|
|
|
import imp
|
|
|
|
imp.find_module('gnome/canvas')
|
|
|
|
out("YES")
|
2002-10-20 19:55:16 +05:30
|
|
|
except ImportError:
|
2003-08-14 09:23:41 +05:30
|
|
|
out("NO")
|
2002-10-20 19:55:16 +05:30
|
|
|
EOF
|
|
|
|
$PYTHON conftest.py
|
2002-11-08 09:40:31 +05:30
|
|
|
has_canvas=`cat conftest.out`
|
2002-10-20 19:55:16 +05:30
|
|
|
rm -f conftest.out conftest.py
|
2003-08-14 09:23:41 +05:30
|
|
|
if test YES != "$has_canvas"
|
2002-10-20 19:55:16 +05:30
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
2004-04-04 10:09:52 +05:30
|
|
|
**** The python bindings for gnome canvas (gnome-python2-canvas) could not be found.])
|
2002-10-20 19:55:16 +05:30
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2004-04-04 10:09:52 +05:30
|
|
|
AC_MSG_CHECKING(Python bindings for gnome vfs)
|
2004-01-02 00:40:23 +05:30
|
|
|
cat > conftest.py <<EOF
|
|
|
|
$pygtk_require
|
|
|
|
try:
|
|
|
|
# Do not import gnome.canvas, this can raise a RuntimeError if the
|
|
|
|
# display cannot be opened. Just search it.
|
|
|
|
import imp
|
|
|
|
imp.find_module('gnome/vfs')
|
|
|
|
out("YES")
|
|
|
|
except ImportError:
|
|
|
|
out("NO")
|
|
|
|
EOF
|
|
|
|
$PYTHON conftest.py
|
|
|
|
has_vfs=`cat conftest.out`
|
|
|
|
rm -f conftest.out conftest.py
|
|
|
|
if test YES != "$has_vfs"
|
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
2004-08-19 09:03:11 +05:30
|
|
|
**** The python bindings for GNOME VFS (gnome-python2-vfs) could not be found.])
|
2004-01-02 00:40:23 +05:30
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2004-01-25 13:17:19 +05:30
|
|
|
AC_MSG_CHECKING(Python bindings for glade)
|
2002-10-20 19:55:16 +05:30
|
|
|
cat > conftest.py <<EOF
|
2002-11-26 09:36:23 +05:30
|
|
|
$pygtk_require
|
2002-10-20 19:55:16 +05:30
|
|
|
try:
|
2003-08-14 09:23:41 +05:30
|
|
|
# Do not import gtk.glade, this can raise a RuntimeError if the
|
|
|
|
# display cannot be opened. Just search it.
|
|
|
|
import imp
|
|
|
|
imp.find_module('gtk/glade')
|
|
|
|
out("YES")
|
2002-10-20 19:55:16 +05:30
|
|
|
except ImportError:
|
2003-08-14 09:23:41 +05:30
|
|
|
out("NO")
|
2002-10-20 19:55:16 +05:30
|
|
|
EOF
|
|
|
|
$PYTHON conftest.py
|
2002-11-08 09:40:31 +05:30
|
|
|
has_pygtk=`cat conftest.out`
|
2002-10-20 19:55:16 +05:30
|
|
|
rm -f conftest.out conftest.py
|
2003-08-14 09:23:41 +05:30
|
|
|
if test YES != "$has_pygtk"
|
2002-10-20 19:55:16 +05:30
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
|
2004-03-02 09:13:51 +05:30
|
|
|
**** The python bindings for glade (pygtk2-libglade) could not be found.])
|
2002-10-20 19:55:16 +05:30
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
|
2003-03-27 22:22:40 +05:30
|
|
|
dnl ====================================
|
|
|
|
dnl = Begin tests for scrollkeeper
|
|
|
|
dnl ====================================
|
|
|
|
AC_PATH_PROG(SK_CONFIG,scrollkeeper-config,no)
|
|
|
|
if test x$SK_CONFIG = xno; then
|
|
|
|
AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
|
2002-10-20 19:55:16 +05:30
|
|
|
fi
|
2003-03-27 22:22:40 +05:30
|
|
|
dnl ====================================
|
|
|
|
dnl = End tests for scrollkeeper
|
|
|
|
dnl ====================================
|
|
|
|
|
|
|
|
dnl ===================================
|
|
|
|
dnl Set localstatedir to /var/lib -- this is apparently not used
|
|
|
|
dnl by anything besides scrollkeeper in our setup
|
|
|
|
dnl ==================================
|
|
|
|
localstatedir=/var/lib
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2003-03-31 09:21:01 +05:30
|
|
|
if test ${prefix} = "NONE" ; then
|
|
|
|
GPREFIX="/usr/local"
|
|
|
|
else
|
|
|
|
GPREFIX="${prefix}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ======================================================
|
|
|
|
dnl == end of modern doc tests
|
|
|
|
dnl ======================================================
|
2003-03-27 22:22:40 +05:30
|
|
|
SCROLLKEEPER_BUILD_REQUIRED=0.3.5
|
|
|
|
AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
AC_SUBST(GNOMEHELP)
|
2003-03-31 09:21:01 +05:30
|
|
|
AC_SUBST(GPREFIX)
|
2002-10-20 19:55:16 +05:30
|
|
|
|
2003-08-11 04:55:22 +05:30
|
|
|
AC_CONFIG_FILES([
|
2002-10-20 19:55:16 +05:30
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/const.py
|
|
|
|
src/docgen/Makefile
|
|
|
|
src/plugins/Makefile
|
2004-11-16 09:14:23 +05:30
|
|
|
src/dates/Makefile
|
2002-10-20 19:55:16 +05:30
|
|
|
src/data/Makefile
|
|
|
|
src/data/templates/Makefile
|
|
|
|
src/po/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/gramps-manual/Makefile
|
2003-01-10 10:51:32 +05:30
|
|
|
doc/gramps-manual/C/Makefile
|
2003-12-18 03:59:22 +05:30
|
|
|
doc/gramps-manual/fr/Makefile
|
2004-02-03 04:34:14 +05:30
|
|
|
doc/gramps-manual/ru/Makefile
|
2003-03-31 09:21:01 +05:30
|
|
|
example/Makefile
|
|
|
|
example/gramps/Makefile
|
2002-10-20 19:55:16 +05:30
|
|
|
gramps.spec
|
|
|
|
gramps.sh])
|
2003-08-11 04:55:22 +05:30
|
|
|
AC_OUTPUT
|