dnl dnl Copyright (c) 2004 - 2010 The Xfce development team dnl dnl dnl *************************** dnl *** Version information *** dnl *************************** m4_define([xfce4_docs_version_major], [4]) m4_define([xfce4_docs_version_minor], [7]) m4_define([xfce4_docs_version_micro], [0]) m4_define([xfce4_docs_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_docs_version_build], [@REVISION@]) m4_define([xfce4_docs_version_tag], [git]) m4_define([xfce4_docs_version], [xfce4_docs_version_major().xfce4_docs_version_minor().xfce4_docs_version_micro()ifelse(xfce4_docs_version_nano(), [], [], [.xfce4_docs_version_nano()])ifelse(xfce4_docs_version_tag(), [git], [xfce4_docs_version_tag()-xfce4_docs_version_build()], [xfce4_docs_version_tag()])]) dnl *************************** dnl *** Initialize autoconf *** dnl *************************** AC_COPYRIGHT([Copyright (c) 2002 - 2010 The Xfce development team. All rights reserved.]) AC_INIT([xfce4-docs], [xfce4_docs_version], [http://bugzilla.xfce.org/], [xfce4-docs]) AC_PREREQ([2.50]) AC_REVISION([xfce4_docs_version_build]) dnl *************************** dnl *** Initialize automake *** dnl *************************** AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar]) AM_MAINTAINER_MODE() m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl ******************************** dnl *** Check for basic programs *** dnl ******************************** AC_PROG_INSTALL() dnl ************************** dnl *** Substitute version *** dnl ************************** XFCE4_DOCS_VERSION=xfce4_docs_version() XFCE4_DOCS_VERSION_MAJOR=xfce4_docs_version_major() XFCE4_DOCS_VERSION_MINOR=xfce4_docs_version_minor() XFCE4_DOCS_VERSION_MICRO=xfce4_docs_version_micro() AC_SUBST([XFCE4_DOCS_VERSION]) AC_SUBST([XFCE4_DOCS_VERSION_API]) AC_SUBST([XFCE4_DOCS_VERSION_MAJOR]) AC_SUBST([XFCE4_DOCS_VERSION_MINOR]) AC_SUBST([XFCE4_DOCS_VERSION_MICRO]) dnl *************************************************** dnl *** Check if we need to build the documentation *** dnl *************************************************** AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc], [Generate HTML documentation (requires gnome-doc-utils) [default=no]])],, [enable_gen_doc=no]) if test x"$enable_gen_doc" = x"yes"; then XDT_CHECK_PACKAGE([GNOME_DOC_UTILS], [gnome-doc-utils], [0.19.2], [ AC_PATH_PROG([XML2PO], [xml2po], [no]) if test x"$XML2PO" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([GNOME_DOC_TOOL], [gnome-doc-tool], [no]) if test x"$GNOME_DOC_TOOL" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([XMLLINT], [xmllint], [no]) if test x"$XMLLINT" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) if test x"$XSLTPROC" = x"no"; then enable_gen_doc=no fi ], [ enable_gen_doc=no ]) if test x"$enable_gen_doc" = x"no"; then AC_MSG_ERROR([Compiling with --enable-gen-doc but one of xml2po, xsltproc, xmllint or gnome-doc-utils package is missing.]) fi elif test ! -d "${srcdir}/xfce-users-guide/html"; then AC_MSG_ERROR([No precompiled HTML found in this packages, please retry with --enable-gen-doc.]) fi AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"]) dnl ********************************* dnl *** Substitute platform flags *** dnl ********************************* AC_MSG_CHECKING([PLATFORM_CPPFLAGS]) AC_MSG_RESULT([$PLATFORM_CPPFLAGS]) AC_SUBST([PLATFORM_CPPFLAGS]) AC_MSG_CHECKING([PLATFORM_CFLAGS]) AC_MSG_RESULT([$PLATFORM_CFLAGS]) AC_SUBST([PLATFORM_CFLAGS]) AC_MSG_CHECKING([PLATFORM_LDFLAGS]) AC_MSG_RESULT([$PLATFORM_LDFLAGS]) AC_SUBST([PLATFORM_LDFLAGS]) AC_OUTPUT([ Makefile xfce-user-guide/Makefile xfce-user-guide/images/Makefile xfce-user-guide/images/el/Makefile xfce-user-guide/po/Makefile ]) dnl *************************** dnl *** Print configuration *** dnl *************************** echo echo "Build Configuration:" echo if test x"$enable_gen_doc" = x"yes"; then echo "* Documentation: yes (generate)" elif test -d "${srcdir}/xfce-users-guide/html"; then echo "* Documentation: yes (in tarball)" else echo "* Documentation: no" fi echo