Updating the changelog in the VERSION file, and version_sync.
[shapes.git] / configure.ac
blob0d8e2ff6ee38491267b3d823dd7f28d9a6db3769
1 # This file is part of Shapes.
3 # Shapes is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # any later version.
8 # Shapes is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with Shapes.  If not, see <http://www.gnu.org/licenses/>.
16 # Copyright 2008, 2009 Gustaf Hendeby
18 #                                               -*- Autoconf -*-
19 # Process this file with autoconf to produce a configure script.
21 AC_PREREQ(2.59)
22 AC_INIT(Shapes, 0.5.2, tidefelt@isy.liu.se)
23 AC_CONFIG_AUX_DIR([config])
24 AM_INIT_AUTOMAKE([foreign])
26 AC_CONFIG_SRCDIR([source/Shapes_Kernel_decls.h])
27 AM_CONFIG_HEADER([config.h])
29 # Checks for programs.
30 AC_PROG_CXX
31 AC_PROG_CC
32 AC_PROG_FLEX(2.5.33)
33 AC_PROG_BISON(2.3)
34 AC_PROG_COMPARE(6.4.0)
35 AM_PATH_SAXON(9)
36 AC_PROG_LIBTOOL
38 # Set compiler options
39 AC_DEBUG
40 AC_PROFILE
41 AC_OPTIMIZATION
43 # Checks for libraries.
44 AM_ICONV()
45 if test "X$HAVE_ICONV" != "Xyes"
46 then
47   AC_MSG_ERROR(Missing iconv.  Consider installing GNU libiconv.)
49 AH_VERBATIM([ICONV_CAST],
50 [/* Macro to handle different const convention in iconv calls */
51 #define ICONV_CAST( ptr ) const_cast< ICONV_CONST char ** > ( ptr )
53 AC_CHECK_LIB([c], [close])
54 AM_PATH_GSL([1.9],, AC_MSG_ERROR(GSL not found))
55 AC_CHECK_LIB([m], [cos])
56 AM_PATH_ZLIB()
57 AC_CHECK_NANSIGNAL()
59 # Check optional dependencies
60 AM_PATH_LIBPNG()
61 AM_PATH_LIBJPEG()
63 # Allow configuration of operator dispatch implementation.
64 AM_DISPATCH_STYLE()
66 # Checks for header files.
67 AC_FUNC_ALLOCA
68 AC_HEADER_STDC
69 AC_HEADER_SYS_WAIT
70 AC_CHECK_HEADERS([inttypes.h libintl.h limits.h malloc.h stddef.h stdlib.h string.h sys/time.h unistd.h])
72 # Checks for typedefs, structures, and compiler characteristics.
73 AC_HEADER_STDBOOL
74 AC_C_CONST
75 AC_C_INLINE
76 AC_TYPE_PID_T
77 AC_C_RESTRICT
78 AC_TYPE_SIZE_T
79 AC_HEADER_TIME
80 AC_STRUCT_TM
82 # Checks for library functions.
83 AC_FUNC_ERROR_AT_LINE
84 AC_FUNC_FORK
85 AC_FUNC_MALLOC
86 AC_FUNC_REALLOC
87 AC_FUNC_STAT
88 AC_FUNC_STRFTIME
89 AC_FUNC_STRTOD
90 AC_CHECK_FUNCS([floor memchr memset pow rint sqrt strchr strdup strrchr strtol])
93 htmldir='${pkgdatadir}/doc/html'
94 AC_SUBST(htmldir)
97 AC_CONFIG_FILES([Makefile source/Makefile resources/Makefile
98                  test/Makefile test/text/Makefile test/graphics/Makefile
99                  doc/Makefile doc/tools/Makefile
100                  doc/tools/ssi/Makefile doc/tools/postproc/Makefile
101                  doc/tools/xhtml-deps/Makefile doc/build/Makefile
102                  doc/build/man/Makefile doc/build/html/Makefile doc/build/proj-web/Makefile doc/build/text/Makefile])
104 if test "X$HAVE_FLEX" != "X1"
105 then
106     echo "\
107 WARNING: \`flex' is missing on your system.  You should only need it if you modified a \`.ll' file, but due to problems with the build process it may be needed otherwise as well.  You can get directions for how to obtaion a recent \`Flex' from any GNU archive site."
110 if test "X$COMPARE" != "Xyes"
111 then
112   echo "\
113 WARNING:  The program \`compare' was not found, or its version too low.  Without it, errors in the tests are less likely to be detected."
116 if test "X$HAVE_SAXON" != "X1"
117 then
118   echo "\
119 WARNING: The program \`Saxon' was not found, without it installed the documentation cannot be rebuilt."
121 AM_CONDITIONAL(HAVE_SAXON, test "X$HAVE_SAXON" = "X1")
123 if test "X$HAVE_LIBPNG" != "Xtrue"
124 then
125   echo "\
126 WARNING:  The library \`libpng' was not found, or its version too low.  Without it, your Shapes compiler will lack some functionality."
129 if test "X$HAVE_LIBJPEG" != "Xtrue"
130 then
131   echo "\
132 WARNING:  The library \`libjpeg' was not found.  Without it, your Shapes compiler will lack some functionality."
135 AC_OUTPUT