wrong Makefile committed in [101]
[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
14 ### DECLARE PROGRAMS ##########################################################
15
16 AC_PROG_CC                 # C compiler
17 AM_PROG_CC_C_O             # Automake requires this for per-target CFLAGS
18 AC_PROG_INSTALL            # Install
19 m4_defun([_LT_AC_LANG_CXX_CONFIG], [:]) # Disable unnecessary Libtool checks
20 m4_defun([_LT_AC_LANG_F77_CONFIG], [:]) # to save time (1.5 only)
21 LT_INIT                    # Libtool 2.2.6 and up
22 #LT_INIT([dlopen])         # Should call it this way, but
23 #LT_PREREQ([2.2.6])        # ...goddamn Fedora 10 still has 1.5
24 AC_PROG_LIBTOOL            # Old way of declaring Libtool
25 AM_GLIB_GNU_GETTEXT        # Use GLib gettext instead of standard
26 IT_PROG_INTLTOOL([0.35.0]) # Intltool
27 PKG_PROG_PKG_CONFIG        # pkg_config
28 GTK_DOC_CHECK(1.9)         # Gtk-Doc
29
30 ### TYPES #####################################################################
31
32 AC_TYPE_INT32_T
33 AC_TYPE_UINT32_T
34
35 ### INTERNATIONALIZATION ######################################################
36
37 GETTEXT_PACKAGE=chimara
38 AC_SUBST(GETTEXT_PACKAGE)
39 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
40
41 ### CHECK FOR LIBRARIES #######################################################
42
43 GTK_REQUIRED_VERSION=2.8
44 GLIB_REQUIRED_VERSION=2.6
45
46 AC_SUBST(GTK_REQUIRED_VERSION)
47 AC_SUBST(GLIB_REQUIRED_VERSION)
48
49 # Libraries needed to build Chimara library
50 PKG_CHECK_MODULES([CHIMARA], [
51         glib-2.0 >= $GLIB_REQUIRED_VERSION
52         gtk+-2.0 >= $GTK_REQUIRED_VERSION
53         gthread-2.0 
54         gmodule-2.0
55         pango
56 ])
57 CHIMARA_LIBS="$CHIMARA_LIBS -lm"
58 AC_SUBST(CHIMARA_LIBS)
59 # Libraries needed to build test programs
60 PKG_CHECK_MODULES([TEST], [
61         gtk+-2.0 >= $GTK_REQUIRED_VERSION 
62         gmodule-2.0
63 ])
64
65 ### GTK-DOC ###################################################################
66
67 # Allow gtkdocize to automatically copy the macro definition for
68 # GTK_DOC_CHECK to the project.
69 # AC_CONFIG_MACRO_DIR(m4)
70
71 ### OUTPUT ####################################################################
72
73 # Output platform-specific definitions to config.h
74 AC_CONFIG_HEADERS([config.h])
75 # List of other files for Autoconf to output
76 AC_CONFIG_FILES([
77 Makefile
78 chimara.pc
79 chimara-plugin.pc
80 libchimara/Makefile
81 interpreters/Makefile
82 interpreters/frotz/Makefile
83 interpreters/nitfol/Makefile
84 tests/Makefile
85 docs/Makefile
86 docs/reference/Makefile
87 docs/reference/version.xml
88 po/Makefile.in
89 ])
90 # Do it
91 AC_OUTPUT
92