]> git.jsancho.org Git - guile-irrlicht.git/blob - configure.ac
Quit regular expressions
[guile-irrlicht.git] / configure.ac
1 define(GUILE_IRRLICHT_CONFIGURE_COPYRIGHT, [[
2
3 guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
4
5 Copyright (C) 2021 Javier Sancho <jsf@jsancho.org>
6
7 This file is part of guile-irrlicht.
8
9 guile-irrlicht is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 3 of the
12 License, or (at your option) any later version.
13
14 guile-irrlicht is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with guile-irrlicht. If not, see
21 <http://www.gnu.org/licenses/>.
22
23 ]])
24
25 AC_INIT([guile-irrlicht], [0.1], [jsf@jsancho.org])
26 AC_CONFIG_AUX_DIR([build-aux])
27 AC_CONFIG_MACRO_DIR([m4])
28 AC_COPYRIGHT(GUILE_IRRLICHT_CONFIGURE_COPYRIGHT)
29
30 AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-portability foreign])
31 AC_PROG_CXX
32 AC_LANG([C++])
33 LT_INIT
34
35 # Check for 'guile'
36 PKG_CHECK_MODULES([GUILE], [guile-3.0],, [
37         PKG_CHECK_MODULES([GUILE], [guile-2.2])
38 ])
39 GUILE_SITE_DIR
40
41 # Check for 'irrlicht'
42 AC_CHECK_LIB(
43         [Irrlicht],
44         [createDevice],
45         [],
46         AC_MSG_ERROR([Irrlicht is required to build.])
47 )
48 AC_CHECK_HEADERS(
49         [irrlicht/irrlicht.h],
50         [
51                 IRRLICHT_CFLAGS=-I/usr/include/irrlicht
52                 AC_SUBST([IRRLICHT_CFLAGS])
53         ],
54         AC_MSG_ERROR([Irrlicht header files are required to build.])
55 )
56
57 # Find swig executable
58 # http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html
59 AX_PKG_SWIG([], [], [ AC_MSG_ERROR([SWIG is required to build.]) ])
60
61 # Enable SWIG C++ support
62 # https://www.gnu.org/software/autoconf-archive/ax_swig_enable_cxx.html
63 AX_SWIG_ENABLE_CXX
64
65 AC_CONFIG_FILES([Makefile])
66 AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
67
68 AC_OUTPUT