gramps/configure.in

243 lines
5.5 KiB
Plaintext
Raw Normal View History

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
AC_PREREQ(2.57)
AC_INIT(gramps, 0.9.4, gramps-bugs@lists.sourceforge.net)
AC_CONFIG_SRCDIR(src/gramps.py)
AM_INIT_AUTOMAKE(1.6.3)
RELEASE=0.CVS$(head -c 10 ChangeLog | tr -d '-')
2002-10-20 19:55:16 +05:30
VERSIONSTRING=$VERSION
if test x"$RELEASE" != "x"
then
VERSIONSTRING="$VERSION-$RELEASE"
fi
AC_SUBST(RELEASE)
AC_SUBST(VERSIONSTRING)
AC_PATH_PROG(MSGFMT, msgfmt)
2003-09-03 09:50:11 +05:30
AC_PATH_PROG(MSGCONV, msgconv)
2002-10-20 19:55:16 +05:30
2003-09-21 01:26:27 +05:30
LANGUAGES="hu zh_CN cs da_DK de es fr it nl pl pt_BR ro ru sv"
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.
2002-11-08 09:40:31 +05:30
dnl We first only check for python >= 2.2
2002-10-20 19:55:16 +05:30
AM_PATH_PYTHON(2.2)
dnl override automatic python detection with our own place
pythondir=\${prefix}/share
pyexecdir=\${prefix}/share
pkgpythondir=\${prefix}/share/\${PACKAGE}
pkgpyexecdir=\${prefix}/share/\${PACKAGE}
AC_PATH_PROG(BINSH, sh)
AC_PATH_PROG(SWIG, swig)
2002-10-20 19:55:16 +05:30
AC_PATH_PROG(ZIP, zip)
AC_PROG_CC
dnl Check for programs
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, "YES", "NO")
GNOMEINC=`pkg-config --cflags gnome-vfs-module-2.0`
GNOMELIB=`pkg-config --libs gnome-vfs-module-2.0`
2002-10-20 19:55:16 +05:30
pygtk_require="
try:
import pygtk
pygtk.require('2.0')
except ImportError:
pass
def out(str):
f = open('conftest.out', 'w')
f.write(str)
f.close()
"
2002-10-20 19:55:16 +05:30
dnl Check if python bindings for gtk are installed
2002-11-08 09:40:31 +05:30
AC_MSG_CHECKING(Python bindings for gtk)
2002-10-20 19:55:16 +05:30
cat > conftest.py <<EOF
$pygtk_require
2002-10-20 19:55:16 +05:30
try:
2002-11-08 09:40:31 +05:30
import gobject
out("YES")
2002-10-20 19:55:16 +05:30
except ImportError:
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
if test YES != "$has_pygtk"
2002-10-20 19:55:16 +05:30
then
AC_MSG_ERROR([
2002-11-08 09:40:31 +05:30
**** The python bindings for gtk 2.0 (pygtk2) 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 GNOME)
2002-10-20 19:55:16 +05:30
cat > conftest.py <<EOF
$pygtk_require
2002-10-20 19:55:16 +05:30
try:
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:
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
if test YES != "$has_pygnome"
2002-10-20 19:55:16 +05:30
then
AC_MSG_ERROR([
2002-11-08 09:40:31 +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
$pygtk_require
2002-10-20 19:55:16 +05:30
try:
2002-11-08 09:40:31 +05:30
import gconf
out("YES")
2002-10-20 19:55:16 +05:30
except ImportError:
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
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)
2002-11-08 09:40:31 +05:30
AC_MSG_CHECKING(Python bindings for GNOME canvas)
2002-10-20 19:55:16 +05:30
cat > conftest.py <<EOF
$pygtk_require
2002-10-20 19:55:16 +05:30
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/canvas')
out("YES")
2002-10-20 19:55:16 +05:30
except ImportError:
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
if test YES != "$has_canvas"
2002-10-20 19:55:16 +05:30
then
AC_MSG_ERROR([
2002-11-08 09:40:31 +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)
2002-11-08 09:40:31 +05:30
AC_MSG_CHECKING(Python bindin for glade)
2002-10-20 19:55:16 +05:30
cat > conftest.py <<EOF
$pygtk_require
2002-10-20 19:55:16 +05:30
try:
# 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:
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
if test YES != "$has_pygtk"
2002-10-20 19:55:16 +05:30
then
AC_MSG_ERROR([
2002-11-08 09:40:31 +05:30
**** The python bindings for glade (pytgk2-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.
AC_CACHE_CHECK([for Python include directory],
[gramps_cv_python_inc],
[gramps_cv_python_inc=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()" 2>/dev/null`])
AC_SUBST([PYTHON_CPPFLAGS], ["-I$gramps_cv_python_inc"])
2002-10-20 19:55:16 +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
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 ======================================================
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
AC_SUBST(GNOMEINC)
AC_SUBST(GNOMELIB)
2002-10-20 19:55:16 +05:30
AC_CONFIG_FILES([
2002-10-20 19:55:16 +05:30
Makefile
src/Makefile
src/const.py
src/docgen/Makefile
src/filters/Makefile
src/plugins/Makefile
2003-01-09 10:11:08 +05:30
src/calendars/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
doc/gramps-manual/C/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])
AC_OUTPUT