-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
+### DECLARE PROGRAMS ##########################################################
+
+AC_PROG_CC # C compiler
+AM_PROG_CC_C_O # Automake requires this for per-target CFLAGS
+AC_PROG_INSTALL # Install
+LT_INIT # Libtool 2.2.6 and up
+#LT_INIT([dlopen]) # Should call it this way, but
+#LT_PREREQ([2.2.6]) # ...goddamn Fedora 10 still has 1.5
+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
+
+### TYPES #####################################################################
+
+AC_TYPE_INT32_T
+AC_TYPE_UINT32_T
+
+### 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])
-dnl AM_PROG_LIBTOOL
+### CHECK FOR LIBRARIES #######################################################
+
+GTK_REQUIRED_VERSION=2.8
+GLIB_REQUIRED_VERSION=2.6
+
+AC_SUBST(GTK_REQUIRED_VERSION)
+AC_SUBST(GLIB_REQUIRED_VERSION)
-PKG_CHECK_MODULES([CHIMARA], [gtk+-2.0 >= 2.8 gthread-2.0])
-AC_SUBST(CHIMARA_CFLAGS)
+# Libraries needed to build Chimara library
+PKG_CHECK_MODULES([CHIMARA], [
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
+ gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gthread-2.0
+ gmodule-2.0
+ pango
+])
+CHIMARA_LIBS="$CHIMARA_LIBS -lm"
AC_SUBST(CHIMARA_LIBS)
+# Libraries needed to build test programs
+PKG_CHECK_MODULES([TEST], [
+ gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gmodule-2.0
+])
+
+### GTK-DOC ###################################################################
-##################################################
-# 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_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)
-
-AC_OUTPUT([
+# Allow gtkdocize to automatically copy the macro definition for
+# GTK_DOC_CHECK to the project.
+# AC_CONFIG_MACRO_DIR(m4)
+
+### 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
+chimara.pc
+chimara-plugin.pc
src/Makefile
+docs/Makefile
+docs/reference/Makefile
+docs/reference/version.xml
po/Makefile.in
])
+# Do it
+AC_OUTPUT
+