- Added pkg-config files (.pc.in), so after the library is installed you can
[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 2.2.6 and up
20 #LT_INIT([dlopen])         # Should call it this way, but
21 #LT_PREREQ([2.2.6])        # ...goddamn Fedora 10 still has 1.5
22 AC_PROG_LIBTOOL            # Old way of declaring Libtool
23 AM_GLIB_GNU_GETTEXT        # Use GLib gettext instead of standard
24 IT_PROG_INTLTOOL([0.35.0]) # Intltool
25 PKG_PROG_PKG_CONFIG        # pkg_config
26 GTK_DOC_CHECK(1.9)         # Gtk-Doc
27
28 ### INTERNATIONALIZATION ######################################################
29
30 GETTEXT_PACKAGE=chimara
31 AC_SUBST(GETTEXT_PACKAGE)
32 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
33
34 ### CHECK FOR LIBRARIES #######################################################
35
36 GTK_REQUIRED_VERSION=2.8
37 GLIB_REQUIRED_VERSION=2.6
38
39 AC_SUBST(GTK_REQUIRED_VERSION)
40 AC_SUBST(GLIB_REQUIRED_VERSION)
41
42 # Libraries needed to build Chimara library
43 PKG_CHECK_MODULES([CHIMARA], [
44         glib-2.0 >= $GLIB_REQUIRED_VERSION
45         gtk+-2.0 >= $GTK_REQUIRED_VERSION
46         gthread-2.0 
47         gmodule-2.0
48 ])
49 # Libraries needed to build test programs
50 PKG_CHECK_MODULES([TEST], [
51         gtk+-2.0 >= $GTK_REQUIRED_VERSION 
52         gmodule-2.0
53 ])
54 # GLib CFLAGS for plugins
55 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_REQUIRED_VERSION])
56
57 ### GTK-DOC ###################################################################
58
59 # Allow gtkdocize to automatically copy the macro definition for
60 # GTK_DOC_CHECK to the project.
61 # AC_CONFIG_MACRO_DIR(m4)
62
63 ### OUTPUT ####################################################################
64
65 # Output platform-specific definitions to config.h
66 AC_CONFIG_HEADERS([config.h])
67 # List of other files for Autoconf to output
68 AC_CONFIG_FILES([
69 Makefile
70 chimara.pc
71 chimara-plugin.pc
72 src/Makefile
73 docs/Makefile
74 docs/reference/Makefile
75 docs/reference/version.xml
76 po/Makefile.in
77 ])
78 # Do it
79 AC_OUTPUT
80