2001-05-13 07:26:57 +05:30
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2002-07-02 00:25:23 +05:30
|
|
|
dnl May need to run automake && aclocal first
|
2001-05-13 07:26:57 +05:30
|
|
|
AC_INIT(src/gramps.py)
|
2002-07-23 23:17:04 +05:30
|
|
|
AM_INIT_AUTOMAKE(gramps, 0.8.0)
|
2002-11-11 19:00:24 +05:30
|
|
|
RELEASE=pl4
|
2001-05-13 07:26:57 +05:30
|
|
|
|
2002-07-02 00:25:23 +05:30
|
|
|
VERSIONSTRING=$VERSION
|
2002-07-24 08:49:06 +05:30
|
|
|
if test x"$RELEASE" != "x"
|
|
|
|
then
|
|
|
|
VERSIONSTRING="$VERSION-$RELEASE"
|
|
|
|
fi
|
2001-05-13 07:26:57 +05:30
|
|
|
|
2002-07-02 00:25:23 +05:30
|
|
|
AC_SUBST(PACKAGE)
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
AC_SUBST(RELEASE)
|
|
|
|
AC_SUBST(VERSIONSTRING)
|
|
|
|
|
|
|
|
AC_PATH_PROG(MSGFMT, msgfmt)
|
|
|
|
AC_SUBST(MSGFMT)
|
|
|
|
|
2002-11-11 19:03:51 +05:30
|
|
|
LANGUAGES="sv de fr es it pt_BR ru da_DK cs po"
|
2002-07-02 00:25:23 +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.
|
|
|
|
dnl We first only check for python >= 1.5
|
|
|
|
AM_PATH_PYTHON(1.5)
|
|
|
|
|
|
|
|
dnl override automatic python detection with our own place
|
|
|
|
pythondir=\${prefix}/share
|
|
|
|
pyexecdir=\${prefix}/share
|
|
|
|
pkgpythondir=\${prefix}/share/\${PACKAGE}
|
|
|
|
pkgpyexecdir=\${prefix}/share/\${PACKAGE}
|
2001-05-13 07:26:57 +05:30
|
|
|
|
2002-03-30 09:20:08 +05:30
|
|
|
AC_PATH_PROG(BINSH, sh)
|
2001-05-13 07:26:57 +05:30
|
|
|
|
2001-05-23 21:11:40 +05:30
|
|
|
changequote(<<, >>)dnl
|
|
|
|
PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
|
|
|
|
changequote([, ])dnl
|
|
|
|
|
2001-12-19 07:32:59 +05:30
|
|
|
if test "$PYTHON_VERSION" != "1.5"
|
|
|
|
then
|
|
|
|
AC_PATH_PROG(PYTHON15, python1.5)
|
|
|
|
else
|
|
|
|
PYTHON15=$PYTHON
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$PYTHON_VERSION" != "2.0"
|
|
|
|
then
|
|
|
|
AC_PATH_PROG(PYTHON20, python2.0)
|
|
|
|
else
|
|
|
|
PYTHON20=$PYTHON
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$PYTHON_VERSION" != "2.1"
|
|
|
|
then
|
|
|
|
AC_PATH_PROG(PYTHON21, python2.1)
|
|
|
|
else
|
|
|
|
PYTHON21=$PYTHON
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$PYTHON_VERSION" != "2.2"
|
|
|
|
then
|
|
|
|
AC_PATH_PROG(PYTHON22, python2.2)
|
|
|
|
else
|
|
|
|
PYTHON22=$PYTHON
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_PATH_PROG(ZIP, zip)
|
|
|
|
|
2001-05-13 07:26:57 +05:30
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
2001-05-14 01:12:15 +05:30
|
|
|
AC_PROG_CC
|
|
|
|
|
2001-09-19 05:13:53 +05:30
|
|
|
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"))
|
|
|
|
])
|
|
|
|
|
2001-05-13 07:26:57 +05:30
|
|
|
dnl Check for programs
|
|
|
|
|
|
|
|
AC_CHECK_PROG(HAVE_GNOME_CONFIG, gnome-config, "YES", "NO")
|
2001-09-05 10:27:05 +05:30
|
|
|
GNOMEHELP=`gnome-config --prefix`
|
2001-05-13 07:26:57 +05:30
|
|
|
|
|
|
|
dnl Check if python bindings for gtk are installed
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Python bindings for sax/xml)
|
|
|
|
changequote(,)
|
|
|
|
cat > conftest.py <<EOF
|
|
|
|
try:
|
2001-07-02 03:03:51 +05:30
|
|
|
from xml.sax import make_parser, handler
|
2001-05-13 07:26:57 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
2001-06-22 04:44:01 +05:30
|
|
|
|
|
|
|
try:
|
2001-07-02 03:03:51 +05:30
|
|
|
from _xmlplus.sax import make_parser, handler
|
2001-06-22 04:44:01 +05:30
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
2001-05-13 07:26:57 +05:30
|
|
|
EOF
|
|
|
|
changequote([, ])
|
|
|
|
$PYTHON conftest.py
|
|
|
|
has_sax=`cat conftest.out`
|
|
|
|
rm -f conftest.out conftest.py
|
|
|
|
if test "YES" != $has_sax
|
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
|
|
|
|
**** The python interpreter can't find the SAX/XML bindings.])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Python bindings for gtk+)
|
|
|
|
changequote(,)
|
|
|
|
cat > conftest.py <<EOF
|
|
|
|
try:
|
|
|
|
import gtk
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
EOF
|
|
|
|
changequote([, ])
|
|
|
|
$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 interpreter can't find the python bindings for gtk.])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Python bindings for GNOME)
|
|
|
|
changequote(,)
|
|
|
|
cat > conftest.py <<EOF
|
|
|
|
try:
|
2001-07-02 03:03:51 +05:30
|
|
|
import gnome, gnome.ui
|
2001-05-13 07:26:57 +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
|
|
|
|
changequote([, ])
|
|
|
|
$PYTHON conftest.py
|
|
|
|
has_pygnome=`cat conftest.out`
|
|
|
|
rm -f conftest.out conftest.py
|
|
|
|
if test "YES" != $has_pygnome
|
|
|
|
then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
|
|
|
|
**** The python interpreter can't find the python bindings for GNOME.])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2001-09-03 23:15:04 +05:30
|
|
|
AC_MSG_CHECKING(Python/libglade bindings)
|
|
|
|
changequote(,)
|
|
|
|
cat > conftest.py <<EOF
|
|
|
|
try:
|
|
|
|
import libglade
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
EOF
|
|
|
|
changequote([, ])
|
|
|
|
$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 interpreter can't find the python bindings for libglade.])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Python/GNOME bindings for libglade)
|
|
|
|
changequote(,)
|
|
|
|
cat > conftest.py <<EOF
|
|
|
|
try:
|
|
|
|
import _gladegnome
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("YES")
|
|
|
|
f.close()
|
|
|
|
except ImportError:
|
|
|
|
f = open("conftest.out", "w")
|
|
|
|
f.write("NO")
|
|
|
|
f.close()
|
|
|
|
EOF
|
|
|
|
changequote([, ])
|
|
|
|
$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 interpreter can't find the GNOME bindings for libglade.])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2001-05-13 07:26:57 +05:30
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
|
2001-05-23 21:11:40 +05:30
|
|
|
AC_MSG_CHECKING(for headers required to compile python extensions)
|
2001-11-26 06:05:45 +05:30
|
|
|
|
|
|
|
if test "$PYTHON15" != ""; then
|
|
|
|
py_prefix=`$PYTHON15 -c "import sys; print sys.prefix"`
|
|
|
|
py_exec_prefix=`$PYTHON15 -c "import sys; print sys.exec_prefix"`
|
|
|
|
P15_INCLUDES="-I${py_prefix}/include/python1.5"
|
|
|
|
if test -f "${py_exec_prefix}/include/python1.5/Python.h"
|
|
|
|
then
|
|
|
|
INTLLIBS="intl15.so "
|
|
|
|
fi
|
2001-05-23 21:11:40 +05:30
|
|
|
fi
|
2001-11-26 06:05:45 +05:30
|
|
|
|
|
|
|
if test "$PYTHON20" != ""; then
|
|
|
|
py_prefix=`$PYTHON20 -c "import sys; print sys.prefix"`
|
|
|
|
py_exec_prefix=`$PYTHON20 -c "import sys; print sys.exec_prefix"`
|
|
|
|
P20_INCLUDES="-I${py_prefix}/include/python2.0"
|
|
|
|
if test -f "${py_exec_prefix}/include/python2.0/Python.h"
|
|
|
|
then
|
|
|
|
INTLLIBS="${INTLLIBS}intl20.so "
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$PYTHON21" != ""; then
|
|
|
|
py_prefix=`$PYTHON21 -c "import sys; print sys.prefix"`
|
|
|
|
py_exec_prefix=`$PYTHON21 -c "import sys; print sys.exec_prefix"`
|
|
|
|
P21_INCLUDES="-I${py_prefix}/include/python2.1"
|
|
|
|
if test "$py_prefix" != "$py_exec_prefix"; then
|
|
|
|
P21_INCLUDES="$P21_INCLUDES -I${py_exec_prefix}/include/python2.1"
|
|
|
|
fi
|
|
|
|
if test -f "${py_exec_prefix}/include/python2.1/Python.h"
|
|
|
|
then
|
|
|
|
INTLLIBS="${INTLLIBS}intl21.so "
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
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
|
2001-05-23 21:11:40 +05:30
|
|
|
fi
|
|
|
|
|
2001-11-26 06:05:45 +05:30
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
2002-07-02 00:25:23 +05:30
|
|
|
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
|
|
|
|
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no)
|
|
|
|
if test x$SCROLLKEEPER_CONFIG = xno; then
|
|
|
|
AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package.)
|
|
|
|
DISABLE_SCROLLKEEPER=1
|
|
|
|
AC_SUBST(DISABLE_SCROLLKEEPER)
|
2002-04-05 04:00:23 +05:30
|
|
|
fi
|
|
|
|
|
2002-07-02 00:25:23 +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 ======================================================
|
|
|
|
|
|
|
|
|
2002-04-19 04:45:35 +05:30
|
|
|
AC_SUBST(BINSH)
|
|
|
|
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)
|
|
|
|
AC_SUBST(INTLLIBS)
|
2001-05-13 07:26:57 +05:30
|
|
|
|
2002-07-02 00:25:23 +05:30
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/const.py
|
|
|
|
src/docgen/Makefile
|
|
|
|
src/filters/Makefile
|
|
|
|
src/plugins/Makefile
|
|
|
|
src/data/Makefile
|
|
|
|
src/data/templates/Makefile
|
|
|
|
src/po/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/gramps-manual/Makefile
|
|
|
|
doc/gramps-manual/C/Makefile
|
|
|
|
doc/extending-gramps/Makefile
|
|
|
|
doc/extending-gramps/C/Makefile
|
|
|
|
omf-install/Makefile
|
|
|
|
gramps.spec
|
|
|
|
gramps.sh])
|