Automake tweaking
[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(src/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 LT_INIT                    # Libtool
20 AC_PROG_LIBTOOL            # Old way of declaring Libtool
21 AM_GLIB_GNU_GETTEXT        # Use GLib gettext instead of standard
22 IT_PROG_INTLTOOL([0.35.0]) # Intltool
23 PKG_PROG_PKG_CONFIG        # pkg_config
24 GTK_DOC_CHECK(1.9)         # Gtk-Doc
25
26 ### INTERNATIONALIZATION ######################################################
27
28 GETTEXT_PACKAGE=chimara
29 AC_SUBST(GETTEXT_PACKAGE)
30 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
31
32 ### CHECK FOR LIBRARIES #######################################################
33
34 # Libraries needed to build Chimara library
35 PKG_CHECK_MODULES([CHIMARA], [
36         glib-2.0 >= 2.6
37         gtk+-2.0 >= 2.8 
38         gthread-2.0 
39         gmodule-2.0
40 ])
41 AC_SUBST(CHIMARA_CFLAGS)
42 AC_SUBST(CHIMARA_LIBS)
43 # Libraries needed to build test programs
44 PKG_CHECK_MODULES([TEST], [
45         gtk+-2.0 >= 2.8 
46         gmodule-2.0
47 ])
48 AC_SUBST(TEST_CFLAGS)
49 AC_SUBST(TEST_LIBS)
50
51 ### GTK-DOC ###################################################################
52
53 # Allow gtkdocize to automatically copy the macro definition for
54 # GTK_DOC_CHECK to the project.
55 # AC_CONFIG_MACRO_DIR(m4)
56
57 ### OUTPUT ####################################################################
58
59 # Output platform-specific definitions to config.h
60 AC_CONFIG_HEADERS([config.h])
61 # List of other files for Autoconf to output
62 AC_CONFIG_FILES([
63 Makefile
64 src/Makefile
65 docs/Makefile
66 docs/reference/Makefile
67 docs/reference/version.xml
68 po/Makefile.in
69 ])
70 # Do it
71 AC_OUTPUT
72