Remove nitfol.info from SCM, it's a generated file
[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 # Put m4 macros in their own directory
12 AC_CONFIG_MACRO_DIR(m4)
13 # Initialize Automake
14 AM_INIT_AUTOMAKE([-Wall])
15 # Configure with --enable-silent-rules to cut down on clutter
16 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
17
18 ### LIBRARY VERSIONING ########################################################
19 # Only update immediately before a public release
20
21 CHIMARA_CURRENT=0  # Increment if interface changes
22 CHIMARA_REVISION=0 # Increment if source changes; set 0 if interface changes
23 CHIMARA_AGE=0 # Increment if interfaces added; set 0 if removed
24 LT_VERSION_INFO="$CHIMARA_CURRENT:$CHIMARA_REVISION:$CHIMARA_AGE"
25 AC_SUBST(LT_VERSION_INFO)
26
27 ### DECLARE COMPILERS #########################################################
28
29 AC_USE_SYSTEM_EXTENSIONS     # Define _GNU_SOURCE if using GCC
30 AC_PROG_CC                   # C compiler
31 AM_PROG_CC_C_O               # Automake requires this for per-target CFLAGS
32 AC_C_INLINE                  # Define inline keyword 
33 AC_PROG_YACC                 # Building nitfol requires yacc
34
35 ### DECLARE PROGRAMS ##########################################################
36
37 AC_PROG_INSTALL              # Install
38 m4_defun([_LT_AC_LANG_CXX_CONFIG], [:]) # Disable unnecessary Libtool checks
39 m4_defun([_LT_AC_LANG_F77_CONFIG], [:]) # to save time (1.5 only)
40 LT_INIT                      # Libtool 2.2.6 and up
41 #LT_INIT([dlopen])           # Should call it this way, but
42 #LT_PREREQ([2.2.6])          # ...goddamn Debian still has 1.5
43 AC_PROG_LIBTOOL              # Old way of declaring Libtool
44 AM_GNU_GETTEXT([external])   # Gettext, link to system libintl
45 IT_PROG_INTLTOOL    # Intltool
46 PKG_PROG_PKG_CONFIG          # pkg_config
47 GTK_DOC_CHECK(1.11)          # Gtk-Doc 1.11 required
48 # Other utilities used in this package's various make scripts
49 AC_PROG_AWK
50 AC_PATH_PROG([PERL], [perl]) # Perl
51 AC_PATH_PROG([TEST], [test]) # Test
52
53 ### TYPES #####################################################################
54
55 AC_TYPE_UINT8_T
56 AC_TYPE_UINT16_T
57 AC_TYPE_INT32_T
58 AC_TYPE_UINT32_T
59
60 ### INTERNATIONALIZATION ######################################################
61
62 AM_GNU_GETTEXT_VERSION([0.17])
63 GETTEXT_PACKAGE=chimara
64 AC_SUBST(GETTEXT_PACKAGE)
65 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
66
67 ### ILIAD #####################################################################
68 AC_ARG_ENABLE([iliad],
69   [AS_HELP_STRING([--enable-iliad],[Compiles Chimara for the iLiad])],
70   [AS_CASE([${enableval}],
71            [yes], [iliad=true],
72            [no], [iliad=false],
73            [AC_MSG_ERROR([bad value ${enableval} for --enable-iliad])]
74    )],
75    [iliad=false]
76 )
77
78 AM_CONDITIONAL([TARGET_ILIAD], [$TEST "x$iliad" = xtrue])
79
80
81 ### CHECK FOR LIBRARIES #######################################################
82
83 # Libraries needed to build Chimara library
84 PKG_CHECK_MODULES([CHIMARA], [
85         glib-2.0 
86         gtk+-2.0
87         gthread-2.0 
88         gmodule-2.0
89         pango
90 ])
91 CHIMARA_LIBS="$CHIMARA_LIBS -lm"
92 AC_SUBST(CHIMARA_LIBS)
93 # Libraries needed to build test programs
94 PKG_CHECK_MODULES([TEST], [
95         gtk+-2.0 
96         gmodule-2.0
97 ])
98
99 # Plugin flags; include '-module' in each Makefile.am, because AC_SUBSTed
100 # variables are black boxes to Automake, so it has to know about it being a
101 # module in the makefile itself.
102 PLUGIN_LIBTOOL_FLAGS='-avoid-version -shared -export-symbols-regex "^glk"'
103 AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
104
105 ### OUTPUT ####################################################################
106
107 # Output platform-specific definitions to config.h
108 AC_CONFIG_HEADERS([config.h])
109 # List of other files for Autoconf to output
110 AC_CONFIG_FILES([
111 Makefile
112 chimara.pc
113 chimara-plugin.pc
114 libchimara/Makefile
115 interpreters/Makefile
116 interpreters/frotz/Makefile
117 interpreters/nitfol/Makefile
118 interpreters/glulxe/Makefile
119 interpreters/git/Makefile
120 tests/Makefile
121 docs/Makefile
122 docs/reference/Makefile
123 docs/reference/version.xml
124 docs/reference/build-selector-table.pl
125 po/Makefile.in
126 ])
127
128 # Do it
129 AC_OUTPUT
130