Added additional checks on gitlog-to-committers script
[distributed.git] / configure.ac.in
blob8aca8f2d310e360698c31d3e6c5c3ded2e7480b7
1 # Process this file with autoconf to produce a configure script.
4 # configure.ac for distributed
6 # Copyright (C) 2008 Francesco Salvestrini
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 AC_INIT([Distributed],[@VERSION@],[salvestrini@gmail.com],[distributed])
25 # Check for a recent version of autoconf
26 AC_PREREQ([2.61])
28 # Place/find all autotools related files in the following directories
29 AC_CONFIG_AUX_DIR([tools/autotools])
30 AC_CONFIG_MACRO_DIR([tools/autotools/m4])
31 AC_CONFIG_SRCDIR([AUTHORS])
32 AC_CONFIG_HEADERS([src/autoconfig.h])
35 # For automake options (AM_INIT_AUTOMAKE options) see Makefile.am
36 # file, AUTOMAKE_OPTIONS variable
38 AM_INIT_AUTOMAKE([1.10 foreign -Wall])
41 # Build related programs
43 AC_PROG_INSTALL
44 AC_PROG_MAKE_SET
45 AC_PROG_LN_S
46 AC_PROG_GREP
47 AC_PROG_SED
49 AC_PROG_CPP
50 AC_PROG_CC
51 AC_PROG_CXX
52 AC_PROG_CC_C_O
53 AC_PROG_CXX_C_O
54 AC_PROG_CXXCPP
55 AC_PROG_RANLIB
57 # Check for lua support (libraries and programs)
58 AC_PATH_PROG([LUAC],[luac])
59 PKG_CHECK_MODULES([LUA],[lua],[ lua_available=1 ],[ lua_available=0 ])
61 # Handle lua related option
62 AC_ARG_ENABLE(lua,[AS_HELP_STRING([--disable-lua],[disable lua support])],[
63         AS_IF([test "$enable_lua" = "no"],[
64                     lua_available=0
65         ])
68 # Finally output
69 AS_IF([ test "$lua_available" = 1 ],[
70         AC_DEFINE_UNQUOTED(HAVE_LUA,[1],[ Define to 1 if lua is available ])
72 AM_CONDITIONAL([ENABLE_LUA],[test "$lua_available" = "1"])
75 # Maintainer-side related program checks
77 AX_PATH_MISSING([WGET],     [wget])
78 AX_PATH_MISSING([PERL],     [perl])
79 AX_PATH_MISSING([ASCIIDOC], [asciidoc])
82 # User-side related program checks
86 # Headers and functions check
88 AC_CHECK_HEADERS([unistd.h getopt.h execinfo.h])
89 AC_CHECK_FUNCS([backtrace backtrace_symbols])
92 # Footer at last
94 AC_CONFIG_FILES([
95         Makefile
97         src/Makefile
99         docs/Makefile
100         docs/design/Makefile
102         tools/Makefile
103         tools/autotools/Makefile
104         tools/autotools/m4/Makefile
105         tools/maint/Makefile
107         tests/Makefile
110 AC_CONFIG_FILES([tools/maint/fetch],               [chmod +x tools/maint/fetch])
111 AC_CONFIG_FILES([tools/maint/gitlog-to-committers],[chmod +x tools/maint/gitlog-to-committers])
113 AC_OUTPUT