gramps/configure.in
Tim Waugh eaa712585c 2003-08-10 Tim Waugh <twaugh@redhat.com>
* configure.in: Use 0.CVS[date] for RELEASE.  '-' is not allowed in
        RPM release strings, and prefixing with '0.' allows the final version
        to be version-compared as newer.


svn: r1977
2003-08-10 10:28:03 +00:00

287 lines
6.2 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
dnl May need to run automake && aclocal first
AC_INIT(src/gramps.py)
AM_INIT_AUTOMAKE(gramps, 0.9.3)
RELEASE=0.CVS$(date +%G%m%d)
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)
LANGUAGES="cs da_DK de es fr it nl pl pt_BR ro ru sv"
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 >= 2.2
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)
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
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`
pygtk_require="
try:
import pygtk
pygtk.require('2.0')
except ImportError:
pass
"
dnl Check if python bindings for gtk are installed
AC_MSG_CHECKING(Python bindings for gtk)
cat > conftest.py <<EOF
$pygtk_require
try:
import gobject
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
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.0 (pygtk2) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_CHECKING(Python bindings for GNOME)
cat > conftest.py <<EOF
$pygtk_require
try:
import gnome, gnome.ui
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
has_pygnome=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_pygnome
then
AC_MSG_ERROR([
**** The python bindings for GNOME 2.0 (gnome-python2) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_CHECKING(Python bindings for gconf)
cat > conftest.py <<EOF
$pygtk_require
try:
import gconf
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
has_gconf=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_gconf
then
AC_MSG_ERROR([
**** The python bindings for gconf (gnome-python2-gconf) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_CHECKING(Python bindings for GNOME canvas)
cat > conftest.py <<EOF
$pygtk_require
try:
import gnome.canvas
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
has_canvas=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_canvas
then
AC_MSG_ERROR([
**** The python bindings for GNOME canvas (gnome-python2-canvas) could not be found.])
fi
AC_MSG_RESULT(ok)
AC_MSG_CHECKING(Python bindin for glade)
cat > conftest.py <<EOF
$pygtk_require
try:
import gtk.glade
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
has_pygtk=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_pygtk
then
AC_MSG_ERROR([
**** The python bindings for glade (pytgk2-libglade) could not be found.])
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 = 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)
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
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)
AC_SUBST(BINSH)
AC_SUBST(SWIG)
AC_SUBST(PYTHON)
AC_SUBST(PYTHON_VERSION)
AC_SUBST(GNOMEHELP)
AC_SUBST(LIBS)
AC_SUBST(GPREFIX)
AC_SUBST(P15_INCLUDES)
AC_SUBST(P20_INCLUDES)
AC_SUBST(P21_INCLUDES)
AC_SUBST(P22_INCLUDES)
AC_SUBST(GNOMEINC)
AC_SUBST(GNOMELIB)
AC_SUBST(GPREF)
AC_SUBST(INTLLIBS)
AC_OUTPUT([
Makefile
src/Makefile
src/const.py
src/docgen/Makefile
src/filters/Makefile
src/plugins/Makefile
src/calendars/Makefile
src/data/Makefile
src/data/templates/Makefile
src/po/Makefile
doc/Makefile
doc/gramps-manual/Makefile
doc/gramps-manual/C/Makefile
example/Makefile
example/gramps/Makefile
gramps.spec
gramps.sh])