AC_INIT AC_CONFIG_SRCDIR([src/libstree.h]) AM_INIT_AUTOMAKE(libstree, 0.4.2) AM_CONFIG_HEADER(config.h) dnl Commands for funkier shtool output: BLD_ON=`./shtool echo -n -e %B` BLD_OFF=`./shtool echo -n -e %b` AC_PROG_CC AC_PROG_MAKE_SET AM_PROG_LIBTOOL AC_CANONICAL_HOST dnl ################################################## dnl # Debugging enable/disable switch dnl ################################################## AC_ARG_ENABLE(debugging, AC_HELP_STRING([--enable-debugging], [Use debugging macros to produce helpful output (disabled by default)]), debugging="yes", debugging="no") if test x$debugging = xyes; then AC_DEFINE_UNQUOTED(LST_DEBUG, 1, [Enable debugging output]) fi ################################################## # Check for gtk-doc. ################################################## AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) if test "x$with_html_dir" = "x" ; then HTML_DIR='${datadir}/gtk-doc/html' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) gtk_doc_min_version_maj=0 gtk_doc_min_version_min=6 if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version_maj.$gtk_doc_min_version_min]) if perl < "$gtk_doc_min_version_maj") || (("\$1" == "$gtk_doc_min_version_maj") && ("\$2" >= "$gtk_doc_min_version_min")))) ? 0 : 1); EOF AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) GTKDOC=false fi fi dnl Let people disable the gtk-doc stuff. AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) if test x$enable_gtk_doc = xauto ; then if test x$GTKDOC = xtrue ; then enable_gtk_doc=yes else enable_gtk_doc=no fi fi AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) AC_CONFIG_FILES([ Makefile src/Makefile test/Makefile docs/Makefile ]) AC_OUTPUT echo echo " "${BLD_ON}"libstree Configuration Summary"${BLD_OFF} echo "====================================================" echo echo " Setup finished. Now run:" echo echo " $ "${BLD_ON}"make"${BLD_OFF} echo " # "${BLD_ON}"make install"${BLD_OFF} echo echo " (or use "${BLD_ON}"gmake"${BLD_OFF}" when make on your platform isn't GNU make)" echo