Added AM_SILENT_RULES option to configure, so you can now do './configure --enable...
[rodin/chimara.git] / configure.ac
1 # configure.ac with sensible comments
2
3 ### INITIALIZATION ############################################################
4
5 # Initialize Autoconf 
6 # Args: (human-readable package name, package version, bug report address, 
7 # tarballname)
8 AC_INIT([chimara], [0.1])
9 # Sanity check to make sure we are running Autoconf from the right directory
10 AC_CONFIG_SRCDIR(libchimara/chimara-glk.c)
11 # Initialize Automake
12 AM_INIT_AUTOMAKE([-Wall])
13 # Configure with --enable-silent-rules to cut down on clutter
14 AM_SILENT_RULES
15
16 ### DECLARE PROGRAMS ##########################################################
17
18 AC_PROG_CC                 # C compiler
19 AM_PROG_CC_C_O             # Automake requires this for per-target CFLAGS
20 AC_PROG_INSTALL            # Install
21 m4_defun([_LT_AC_LANG_CXX_CONFIG], [:]) # Disable unnecessary Libtool checks
22 m4_defun([_LT_AC_LANG_F77_CONFIG], [:]) # to save time (1.5 only)
23 LT_INIT                    # Libtool 2.2.6 and up
24 #LT_INIT([dlopen])         # Should call it this way, but
25 #LT_PREREQ([2.2.6])        # ...goddamn Fedora 10 still has 1.5
26 AC_PROG_LIBTOOL            # Old way of declaring Libtool
27 AM_GLIB_GNU_GETTEXT        # Use GLib gettext instead of standard
28 IT_PROG_INTLTOOL([0.35.0]) # Intltool
29 PKG_PROG_PKG_CONFIG        # pkg_config
30 GTK_DOC_CHECK(1.9)         # Gtk-Doc
31
32 ### TYPES #####################################################################
33
34 AC_TYPE_INT32_T
35 AC_TYPE_UINT32_T
36
37 ### INTERNATIONALIZATION ######################################################
38
39 GETTEXT_PACKAGE=chimara
40 AC_SUBST(GETTEXT_PACKAGE)
41 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
42
43 ### CHECK FOR LIBRARIES #######################################################
44
45 GTK_REQUIRED_VERSION=2.8
46 GLIB_REQUIRED_VERSION=2.6
47
48 AC_SUBST(GTK_REQUIRED_VERSION)
49 AC_SUBST(GLIB_REQUIRED_VERSION)
50
51 # Libraries needed to build Chimara library
52 PKG_CHECK_MODULES([CHIMARA], [
53         glib-2.0 >= $GLIB_REQUIRED_VERSION
54         gtk+-2.0 >= $GTK_REQUIRED_VERSION
55         gthread-2.0 
56         gmodule-2.0
57         pango
58 ])
59 CHIMARA_LIBS="$CHIMARA_LIBS -lm"
60 AC_SUBST(CHIMARA_LIBS)
61 # Libraries needed to build test programs
62 PKG_CHECK_MODULES([TEST], [
63         gtk+-2.0 >= $GTK_REQUIRED_VERSION 
64         gmodule-2.0
65 ])
66
67 ### GTK-DOC ###################################################################
68
69 # Allow gtkdocize to automatically copy the macro definition for
70 # GTK_DOC_CHECK to the project.
71 # AC_CONFIG_MACRO_DIR(m4)
72
73 ### OUTPUT ####################################################################
74
75 # Output platform-specific definitions to config.h
76 AC_CONFIG_HEADERS([config.h])
77 # List of other files for Autoconf to output
78 AC_CONFIG_FILES([
79 Makefile
80 chimara.pc
81 chimara-plugin.pc
82 libchimara/Makefile
83 interpreters/Makefile
84 interpreters/frotz/Makefile
85 interpreters/nitfol/Makefile
86 tests/Makefile
87 docs/Makefile
88 docs/reference/Makefile
89 docs/reference/version.xml
90 po/Makefile.in
91 ])
92 # Do it
93 AC_OUTPUT
94