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_INIT(src/gramps.py)
|
2002-11-08 09:40:31 +05:30
|
|
|
AM_INIT_AUTOMAKE(gramps, 0.9.0)
|
2003-02-16 04:33:48 +05:30
|
|
|
RELEASE=1
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
VERSIONSTRING=$VERSION
|
|
|
|
if test x"$RELEASE" != "x"
|
|
|
|
then
|
|
|
|
VERSIONSTRING="$VERSION-$RELEASE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(PACKAGE)
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
AC_SUBST(RELEASE)
|
|
|
|
AC_SUBST(VERSIONSTRING)
|
|
|
|
|
|
|
|
AC_PATH_PROG(MSGFMT, msgfmt)
|
|
|
|
AC_SUBST(MSGFMT)
|
|
|
|
|
2003-03-17 07:58:43 +05:30
|
|
|
LANGUAGES="sv pl de fr es it pt_BR ru da_DK cs ro nl"
|
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)
|
2002-11-04 09:48:56 +05:30
|
|
|
AC_PATH_PROG(SWIG, swig)
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
if test "$PYTHON_VERSION" != "2.2"
|
|
|
|
then
|
|
|
|
AC_PATH_PROG(PYTHON22, python2.2)
|
|
|
|
else
|
|
|
|
PYTHON22=$PYTHON
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_PATH_PROG(ZIP, zip)
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(libintl.h)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(c,textdomain,LIBS="",
|
|
|
|
[ AC_CHECK_LIB(intl,textdomain,
|
|
|
|
LIBS="-lintl",
|
|
|
|
AC_MSG_ERROR("Could not find internationalization libraries"))
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Check for programs
|
|
|
|
|
2002-10-29 09:25:19 +05:30
|
|
|
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
|
|
|
|
2002-11-26 09:36:23 +05:30
|
|
|
pygtk_require="try:
|
|
|
|
import pygtk
|
|
|
|
pygtk.require('2.0')
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
"
|
|
|
|
|
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
|
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 gobject
|
2002-10-20 19:55:16 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
2002-11-08 09:40:31 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
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
|
2002-11-08 09:40:31 +05:30
|
|
|
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
|
|
|
|
try:
|
2002-11-08 09:40:31 +05:30
|
|
|
import gnome, gnome.ui
|
2002-10-20 19:55:16 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
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
|
2002-11-08 09:40:31 +05:30
|
|
|
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
|
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
|
2002-10-20 19:55:16 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
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
|
2002-11-08 09:40:31 +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)
|
|
|
|
|
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
|
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 gnome.canvas
|
2002-10-20 19:55:16 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
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
|
2002-11-08 09:40:31 +05:30
|
|
|
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
|
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 gtk.glade
|
2002-10-20 19:55:16 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
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
|
2002-11-08 09:40:31 +05:30
|
|
|
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_MSG_CHECKING(for headers required to compile python extensions)
|
|
|
|
|
|
|
|
if test "$PYTHON22" != ""; then
|
|
|
|
py_prefix=`$PYTHON22 -c "import sys; print sys.prefix"`
|
|
|
|
py_exec_prefix=`$PYTHON22 -c "import sys; print sys.exec_prefix"`
|
|
|
|
P22_INCLUDES="-I${py_prefix}/include/python2.2"
|
|
|
|
if test "$py_prefix" != "$py_exec_prefix"; then
|
|
|
|
P22_INCLUDES="$P22_INCLUDES -I${py_exec_prefix}/include/python2.2"
|
|
|
|
fi
|
|
|
|
if test -f "${py_exec_prefix}/include/python2.2/Python.h"
|
|
|
|
then
|
|
|
|
INTLLIBS="${INTLLIBS}intl22.so "
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
|
|
|
dnl ======================================================
|
|
|
|
dnl == Modern documentation tools (scrollkeeper) checks
|
|
|
|
dnl == We may need a more recent version (GNOME2 will use
|
|
|
|
dnl == scrollkeeper > 0.3) but basic scrollkeeper instructions
|
|
|
|
dnl == use 0.1.4 example so we'll just check for that
|
|
|
|
dnl ======================================================
|
|
|
|
SCROLLKEEPER_REQUIRED=0.1.4
|
|
|
|
AC_SUBST(SCROLLKEEPER_REQUIRED)
|
|
|
|
|
|
|
|
dnl First see that *some* version of scrollkeeper is installed
|
2002-11-08 10:55:53 +05:30
|
|
|
dnl AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no)
|
|
|
|
dnl if test x$SCROLLKEEPER_CONFIG = xno; then
|
|
|
|
dnl AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package.)
|
|
|
|
dnl DISABLE_SCROLLKEEPER=1
|
|
|
|
dnl AC_SUBST(DISABLE_SCROLLKEEPER)
|
|
|
|
dnl fi
|
|
|
|
|
|
|
|
DISABLE_SCROLLKEEPER=1
|
|
|
|
AC_SUBST(DISABLE_SCROLLKEEPER)
|
2002-10-20 19:55:16 +05:30
|
|
|
|
|
|
|
dnl ======================================================
|
|
|
|
dnl == GNOME modified DTD's need jw, not db2html
|
|
|
|
dnl ======================================================
|
|
|
|
AC_PATH_PROG(JW, jw, no)
|
|
|
|
if test x$JW = xno; then
|
|
|
|
HAVE_JW="no"
|
|
|
|
else
|
|
|
|
HAVE_JW="yes"
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_JW)
|
|
|
|
|
|
|
|
dnl ======================================================
|
|
|
|
dnl == end of modern doc tests
|
|
|
|
dnl ======================================================
|
|
|
|
|
|
|
|
AC_SUBST(BINSH)
|
2002-11-04 09:48:56 +05:30
|
|
|
AC_SUBST(SWIG)
|
2002-10-20 19:55:16 +05:30
|
|
|
AC_SUBST(PYTHON)
|
|
|
|
AC_SUBST(PYTHON_VERSION)
|
|
|
|
AC_SUBST(GNOMEHELP)
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
|
|
|
|
AC_SUBST(P15_INCLUDES)
|
|
|
|
AC_SUBST(P20_INCLUDES)
|
|
|
|
AC_SUBST(P21_INCLUDES)
|
|
|
|
AC_SUBST(P22_INCLUDES)
|
2002-10-29 09:25:19 +05:30
|
|
|
AC_SUBST(GNOMEINC)
|
|
|
|
AC_SUBST(GNOMELIB)
|
|
|
|
AC_SUBST(GPREF)
|
2002-10-20 19:55:16 +05:30
|
|
|
AC_SUBST(INTLLIBS)
|
|
|
|
|
|
|
|
AC_OUTPUT([
|
|
|
|
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
|
2003-01-10 10:51:32 +05:30
|
|
|
doc/gramps-manual/C/Makefile
|
2002-10-20 19:55:16 +05:30
|
|
|
doc/extending-gramps/Makefile
|
|
|
|
doc/extending-gramps/C/Makefile
|
|
|
|
omf-install/Makefile
|
|
|
|
gramps.spec
|
|
|
|
gramps.sh])
|