1dnl autoconf configuration for gperf/src
2
3dnl Copyright (C) 1998, 2000, 2002-2003, 2007 Free Software Foundation, Inc.
4dnl Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
5dnl and Bruno Haible <bruno@clisp.org>.
6dnl
7dnl This file is part of GNU GPERF.
8dnl
9dnl GNU GPERF is free software; you can redistribute it and/or modify
10dnl it under the terms of the GNU General Public License as published by
11dnl the Free Software Foundation; either version 2, or (at your option)
12dnl any later version.
13dnl
14dnl GNU GPERF is distributed in the hope that it will be useful,
15dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
16dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17dnl GNU General Public License for more details.
18dnl
19dnl You should have received a copy of the GNU General Public License
20dnl along with this program; see the file COPYING.
21dnl If not, write to the Free Software Foundation, Inc.,
22dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
24AC_PREREQ([2.60])
25AC_INIT(main.cc)
26AC_CONFIG_HEADER(config.h)
27AC_PROG_MAKE_SET
28dnl
29dnl           checks for programs
30dnl
31AC_PROG_CC
32                      dnl sets variable CC
33AC_PROG_CPP
34                      dnl sets variable CPP
35AC_PROG_CXX
36                      dnl sets variable CXX
37AC_PROG_CXXCPP
38                      dnl sets variable CXXCPP
39CL_PROG_INSTALL
40                      dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
41dnl
42dnl           checks for compiler characteristics
43dnl
44AC_MSG_CHECKING([for stack-allocated variable-size arrays])
45AC_CACHE_VAL(gp_cv_cxx_dynamic_array, [
46AC_LANG_SAVE()
47AC_LANG_CPLUSPLUS()
48AC_TRY_COMPILE([int func (int n) { int dynamic_array[n]; }], [],
49gp_cv_cxx_dynamic_array=yes, gp_cv_cxx_dynamic_array=no)
50AC_LANG_RESTORE()
51])
52AC_MSG_RESULT($gp_cv_cxx_dynamic_array)
53if test $gp_cv_cxx_dynamic_array = yes; then
54  AC_DEFINE(HAVE_DYNAMIC_ARRAY, 1,
55    [Define if the C++ compiler supports stack-allocated variable-size arrays.])
56fi
57dnl
58dnl           checks for functions and declarations
59dnl
60dnl
61dnl           checks for libraries
62dnl
63AC_CHECK_LIB(m, rand, GPERF_LIBM="-lm", GPERF_LIBM="")
64AC_SUBST(GPERF_LIBM)
65dnl
66dnl           That's it.
67dnl
68AC_OUTPUT(Makefile)
69