]> git.street.me.uk Git - andy/viking.git/blobdiff - configure.ac
Only perform man page generation when scrollkeeper is also installed.
[andy/viking.git] / configure.ac
index 66fa53baa25acfb634cb89b9e98003278a70a4ac..4738656506aebde65ba6f8a7d21ee99730e7efb2 100644 (file)
@@ -6,7 +6,13 @@ AC_INIT(viking, 1.6, , viking, http://viking.sf.net/)
 AM_INIT_AUTOMAKE([dist-bzip2 dist-zip subdir-objects])
 dnl AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADERS([src/config.h])
-GTK_DOC_CHECK(1.0)
+
+# check for gtk-doc
+m4_ifdef([GTK_DOC_CHECK], [
+GTK_DOC_CHECK([1.0],[--flavour no-tmpl])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+])
 
 AC_PROG_CC
 AC_PROG_CC_STDC
@@ -420,14 +426,8 @@ DB2MAN_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
 AC_SUBST(DB2MAN_XSL)
 AC_PATH_PROG(XP,xsltproc)
 AM_CONDITIONAL([HAVE_XSLTPROC],[test "x$XP" != "x"])
-AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"])
-
-dnl This will cause the automake generated makefiles to pass the
-dnl correct flags to aclocal.
-ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
-AC_SUBST(ACLOCAL_AMFLAGS)
-
-AM_CONDITIONAL([VIKING_DOC], test x${enable_gtk_doc} = xyes)
+AC_CHECK_PROG([HAVE_SCROLLKEEPER],scrollkeeper-config,"yes")
+AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"] && test "${HAVE_SCROLLKEEPER}" == "yes" )
 
 # Configuration
 AC_CONFIG_FILES([
@@ -439,15 +439,14 @@ AC_CONFIG_FILES([
                tools/Makefile
                test/Makefile
                help/Makefile
+               help/viking.xml
                win32/Makefile
                win32/installer/Makefile
                win32/installer/pixmaps/Makefile
-               win32/installer/translations/Makefile])
-AM_COND_IF([VIKING_DOC],
-       [AC_CONFIG_FILES([
+               win32/installer/translations/Makefile
                doc/Makefile
                doc/reference/Makefile
-               doc/examples/Makefile])])
+               doc/examples/Makefile])
 
 AC_OUTPUT([
           viking.spec
@@ -475,6 +474,8 @@ echo "MBTiles Support (SQLite3)        : $ac_cv_enable_mbtiles"
 echo "Mapnik Rendering Support (C++)   : $ac_cv_enable_mapnik"
 echo "Size of map cache (in memory)    : ${VIK_CONFIG_MAPCACHE_SIZE}"
 echo "Age of tiles (in seconds)        : ${VIK_CONFIG_DEFAULT_TILE_AGE}"
+echo -n "Man page generation              : "
+AM_COND_IF([GEN_MANPAGES], [echo "yes"], [echo "no"])
 echo "Documentation (+HTML)            : ${enable_gtk_doc} (HTML: ${enable_gtk_doc_html})"
 echo "-------------------------------------------"
 echo ""