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