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
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
19 # Process this file with autoconf to produce a configure script.
22 AC_INIT(Shapes, 0.5.0, 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.
34 AC_PROG_COMPARE(6.4.0)
38 # Set compiler options
43 # Checks for libraries.
45 if test "X$HAVE_ICONV" != "Xyes"
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])
60 # Checks for header files.
64 AC_CHECK_HEADERS([inttypes.h libintl.h limits.h malloc.h stddef.h stdlib.h string.h sys/time.h unistd.h])
66 # Checks for typedefs, structures, and compiler characteristics.
76 # Checks for library functions.
84 AC_CHECK_FUNCS([floor memchr memset pow rint sqrt strchr strdup strrchr strtol])
87 htmldir='${pkgdatadir}/doc/html'
91 AC_CONFIG_FILES([Makefile source/Makefile resources/Makefile
92 test/Makefile test/text/Makefile test/graphics/Makefile
93 doc/Makefile doc/tools/Makefile
94 doc/tools/ssi/Makefile doc/tools/postproc/Makefile
95 doc/tools/xhtml-deps/Makefile doc/build/Makefile
96 doc/build/man/Makefile doc/build/html/Makefile doc/build/proj-web/Makefile doc/build/text/Makefile])
98 if test "X$HAVE_FLEX" != "X1"
101 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."
104 if test "X$COMPARE" != "Xyes"
107 WARNING: The program \`compare' was not found, or its version too low. Without it, errors in the tests are less likely to be detected."
110 if test "X$HAVE_SAXON" != "X1"
113 WARNING: The program \`Saxon' was not found, without it installed the documentation cannot be rebuilt."
115 AM_CONDITIONAL(HAVE_SAXON, test "X$HAVE_SAXON" = "X1")