dnl Process this file with autoconf to produce a configure script. AC_INIT(src/gramps.py) dnl Checks for programs. PACKAGE=gramps AC_PATH_PROG(PYTHON, python) AC_PATH_PROG(BINSH, sh) changequote(<<, >>)dnl PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` changequote([, ])dnl 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) AC_SUBST(BINSH) AC_SUBST(PYTHON) AC_SUBST(PYTHON_VERSION) AC_SUBST(PACKAGE) AC_SUBST(GNOMEHELP) AC_SUBST(DOCBOOKHTML) AC_SUBST(LIBS) 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_GNOME_CONFIG, gnome-config, "YES", "NO") GNOMEHELP=`gnome-config --prefix` dnl Check if python bindings for gtk are installed AC_MSG_CHECKING(Python bindings for sax/xml) changequote(,) cat > conftest.py < conftest.py < conftest.py < conftest.py < conftest.py < conftest.sgml < ]>
Test A Test This is a test.
EOF $DOCBOOKHTML conftest.sgml -o conftest >&5 2>dbconf.err testresult=`cat dbconf.err | wc | awk '{print $1}'` changequote([, ]) if test $testresult = "0"; then rm -f dbconf.err AC_MSG_RESULT(ok) else AC_MSG_RESULT([ ******** I had some problem with the gnome-doc DTD. Please install gnome-doc-tools from http://people.redhat.com/dcm/software.html. Refer to dbconf.err for details. I will not create documentation. ********]) DOCBOOKHTML= fi rm -rf conftest else AC_MSG_RESULT([******** Failed to find docbook (db2html) so will not create documentation. ********]) fi dnl Checks for library functions. AC_OUTPUT(Makefile \ Makefile.comm\ src/Makefile\ src/plugins/Makefile\ src/docgen/Makefile\ src/filters/Makefile\ src/data/Makefile\ doc/gramps-manual/C/Makefile\ doc/extending-gramps/C/Makefile\ gramps.sh)