X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=configure.ac;h=855619ae3e79302779b1cee424866ddf40597385;hb=db0f0fc8ee25926da8d34b826a3fc80d6186adbb;hp=fbeacd2533e5bdc87923b2fd7fead4997b64bcbf;hpb=fb6cf2af0f2318aceaea82d02acc961df0f9811d;p=rodin%2Fchimara.git diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 index fbeacd2..855619a --- a/configure.ac +++ b/configure.ac @@ -1,70 +1,68 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Created by Anjuta application wizard. +# configure.ac with sensible comments -AC_INIT(chimara, 0.1) +### INITIALIZATION ############################################################ -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AM_CONFIG_HEADER(config.h) -AM_MAINTAINER_MODE +# Initialize Autoconf +# Args: (human-readable package name, package version, bug report address, +# tarballname) +AC_INIT([chimara], [0.1]) +# Sanity check to make sure we are running Autoconf from the right directory +AC_CONFIG_SRCDIR(src/chimara-glk.c) +# Initialize Automake +AM_INIT_AUTOMAKE([-Wall]) -AC_ISC_POSIX -AC_PROG_CC -AM_PROG_CC_STDC -AC_HEADER_STDC -AM_PROG_LIBTOOL -AC_PROG_LIBTOOL +### DECLARE PROGRAMS ########################################################## + +AC_PROG_CC # C compiler +AC_PROG_INSTALL # Install +LT_INIT # Libtool +AC_PROG_LIBTOOL # Old way of declaring Libtool +AM_GLIB_GNU_GETTEXT # Use GLib gettext instead of standard +IT_PROG_INTLTOOL([0.35.0]) # Intltool +PKG_PROG_PKG_CONFIG # pkg_config +GTK_DOC_CHECK(1.9) # Gtk-Doc + +### INTERNATIONALIZATION ###################################################### -dnl *************************************************************************** -dnl Internatinalization -dnl *************************************************************************** GETTEXT_PACKAGE=chimara AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) -AM_GLIB_GNU_GETTEXT -IT_PROG_INTLTOOL([0.35.0]) -PKG_CHECK_MODULES([CHIMARA], [gtk+-2.0 >= 2.8 gthread-2.0 gmodule-2.0]) +### CHECK FOR LIBRARIES ####################################################### + +# Libraries needed to build Chimara library +PKG_CHECK_MODULES([CHIMARA], [ + glib-2.0 >= 2.6 + gtk+-2.0 >= 2.8 + gthread-2.0 + gmodule-2.0 +]) AC_SUBST(CHIMARA_CFLAGS) AC_SUBST(CHIMARA_LIBS) -PKG_CHECK_MODULES([TEST], [gtk+-2.0 >= 2.8 gmodule-2.0]) +# Libraries needed to build test programs +PKG_CHECK_MODULES([TEST], [ + gtk+-2.0 >= 2.8 + gmodule-2.0 +]) AC_SUBST(TEST_CFLAGS) AC_SUBST(TEST_LIBS) -################################################## -# 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) +### GTK-DOC ################################################################### + +# Allow gtkdocize to automatically copy the macro definition for +# GTK_DOC_CHECK to the project. +# AC_CONFIG_MACRO_DIR(m4) -gtk_doc_min_version=1.0 -AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) -if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then - AC_MSG_RESULT(yes) - GTKDOC=true -else - AC_MSG_RESULT(no) - GTKDOC=false -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) +### OUTPUT #################################################################### -AC_OUTPUT([ +# Output platform-specific definitions to config.h +AC_CONFIG_HEADERS([config.h]) +# List of other files for Autoconf to output +AC_CONFIG_FILES([ Makefile src/Makefile po/Makefile.in ]) +# Do it +AC_OUTPUT +