Doc: Install instructions for libpng.
[shapes.git] / configure.ac
blobd82961c49b6aedd5642992db5a3137ab16b53225
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.1.1, 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()
62 # Checks for header files.
63 AC_FUNC_ALLOCA
64 AC_HEADER_STDC
65 AC_HEADER_SYS_WAIT
66 AC_CHECK_HEADERS([inttypes.h libintl.h limits.h malloc.h stddef.h stdlib.h string.h sys/time.h unistd.h])
68 # Checks for typedefs, structures, and compiler characteristics.
69 AC_HEADER_STDBOOL
70 AC_C_CONST
71 AC_C_INLINE
72 AC_TYPE_PID_T
73 AC_C_RESTRICT
74 AC_TYPE_SIZE_T
75 AC_HEADER_TIME
76 AC_STRUCT_TM
78 # Checks for library functions.
79 AC_FUNC_ERROR_AT_LINE
80 AC_FUNC_FORK
81 AC_FUNC_MALLOC
82 AC_FUNC_REALLOC
83 AC_FUNC_STAT
84 AC_FUNC_STRFTIME
85 AC_FUNC_STRTOD
86 AC_CHECK_FUNCS([floor memchr memset pow rint sqrt strchr strdup strrchr strtol])
89 htmldir='${pkgdatadir}/doc/html'
90 AC_SUBST(htmldir)
93 AC_CONFIG_FILES([Makefile source/Makefile resources/Makefile
94                  test/Makefile test/text/Makefile test/graphics/Makefile
95                  doc/Makefile doc/tools/Makefile
96                  doc/tools/ssi/Makefile doc/tools/postproc/Makefile
97                  doc/tools/xhtml-deps/Makefile doc/build/Makefile
98                  doc/build/man/Makefile doc/build/html/Makefile doc/build/proj-web/Makefile doc/build/text/Makefile])
100 if test "X$HAVE_FLEX" != "X1"
101 then
102     echo "\
103 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."
106 if test "X$COMPARE" != "Xyes"
107 then
108   echo "\
109 WARNING:  The program \`compare' was not found, or its version too low.  Without it, errors in the tests are less likely to be detected."
112 if test "X$HAVE_SAXON" != "X1"
113 then
114   echo "\
115 WARNING: The program \`Saxon' was not found, without it installed the documentation cannot be rebuilt."
117 AM_CONDITIONAL(HAVE_SAXON, test "X$HAVE_SAXON" = "X1")
119 if test "X$HAVE_LIBPNG" != "Xtrue"
120 then
121   echo "\
122 WARNING:  The library \`libpng' was not found, or its version too low.  Without it, your Shapes compiler will lack some functionality."
125 AC_OUTPUT