1228060Sbaptdnl autoconf configuration for gperf/src 2228060Sbapt 3228060Sbaptdnl Copyright (C) 1998, 2000, 2002-2003, 2007 Free Software Foundation, Inc. 4228060Sbaptdnl Written by Douglas C. Schmidt <schmidt@ics.uci.edu> 5228060Sbaptdnl and Bruno Haible <bruno@clisp.org>. 6228060Sbaptdnl 7228060Sbaptdnl This file is part of GNU GPERF. 8228060Sbaptdnl 9228060Sbaptdnl GNU GPERF is free software; you can redistribute it and/or modify 10228060Sbaptdnl it under the terms of the GNU General Public License as published by 11228060Sbaptdnl the Free Software Foundation; either version 2, or (at your option) 12228060Sbaptdnl any later version. 13228060Sbaptdnl 14228060Sbaptdnl GNU GPERF is distributed in the hope that it will be useful, 15228060Sbaptdnl but WITHOUT ANY WARRANTY; without even the implied warranty of 16228060Sbaptdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17228060Sbaptdnl GNU General Public License for more details. 18228060Sbaptdnl 19228060Sbaptdnl You should have received a copy of the GNU General Public License 20228060Sbaptdnl along with this program; see the file COPYING. 21228060Sbaptdnl If not, write to the Free Software Foundation, Inc., 22228060Sbaptdnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 23228060Sbapt 24228060SbaptAC_PREREQ([2.60]) 25228060SbaptAC_INIT(main.cc) 26228060SbaptAC_CONFIG_HEADER(config.h) 27228060SbaptAC_PROG_MAKE_SET 28228060Sbaptdnl 29228060Sbaptdnl checks for programs 30228060Sbaptdnl 31228060SbaptAC_PROG_CC 32228060Sbapt dnl sets variable CC 33228060SbaptAC_PROG_CPP 34228060Sbapt dnl sets variable CPP 35228060SbaptAC_PROG_CXX 36228060Sbapt dnl sets variable CXX 37228060SbaptAC_PROG_CXXCPP 38228060Sbapt dnl sets variable CXXCPP 39228060SbaptCL_PROG_INSTALL 40228060Sbapt dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM 41228060Sbaptdnl 42228060Sbaptdnl checks for compiler characteristics 43228060Sbaptdnl 44228060SbaptAC_MSG_CHECKING([for stack-allocated variable-size arrays]) 45228060SbaptAC_CACHE_VAL(gp_cv_cxx_dynamic_array, [ 46228060SbaptAC_LANG_SAVE() 47228060SbaptAC_LANG_CPLUSPLUS() 48228060SbaptAC_TRY_COMPILE([int func (int n) { int dynamic_array[n]; }], [], 49228060Sbaptgp_cv_cxx_dynamic_array=yes, gp_cv_cxx_dynamic_array=no) 50228060SbaptAC_LANG_RESTORE() 51228060Sbapt]) 52228060SbaptAC_MSG_RESULT($gp_cv_cxx_dynamic_array) 53228060Sbaptif test $gp_cv_cxx_dynamic_array = yes; then 54228060Sbapt AC_DEFINE(HAVE_DYNAMIC_ARRAY, 1, 55228060Sbapt [Define if the C++ compiler supports stack-allocated variable-size arrays.]) 56228060Sbaptfi 57228060Sbaptdnl 58228060Sbaptdnl checks for functions and declarations 59228060Sbaptdnl 60228060Sbaptdnl 61228060Sbaptdnl checks for libraries 62228060Sbaptdnl 63228060SbaptAC_CHECK_LIB(m, rand, GPERF_LIBM="-lm", GPERF_LIBM="") 64228060SbaptAC_SUBST(GPERF_LIBM) 65228060Sbaptdnl 66228060Sbaptdnl That's it. 67228060Sbaptdnl 68228060SbaptAC_OUTPUT(Makefile) 69