3 dnl Copyright (C) 2002, 2003, 2004, 2005, 2009
4 dnl Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; version 2 and/or 3 of the License.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 AC_DEFUN([ENSC_CXXCOMPILER],
21 AC_REQUIRE([AC_PROG_CXX])
23 AC_CACHE_CHECK([whether $CXX is a C++ compiler], [ensc_cv_cxx_cxxcompiler],
29 [ensc_cv_cxx_cxxcompiler=yes],
30 [ensc_cv_cxx_cxxcompiler=no])
34 AM_CONDITIONAL(ENSC_HAVE_CXX_COMPILER,
35 [test x"$ensc_cv_cxx_cxxcompiler" = xyes])
37 if test x"$ensc_cv_cxx_cxxcompiler" = xno; then
38 AC_MSG_WARN([*** some programs will not be built because a C++ compiler is lacking])
42 AC_DEFUN([ENSC_C99COMPILER],
44 AC_REQUIRE([AC_PROG_CC])
46 AC_CACHE_CHECK([whether $CC is a C99 compiler], [ensc_cv_c99_c99compiler],
50 int main(int argc, char *argv[]) {
51 struct { int x; } a = { .x = argc };
56 [ensc_cv_c99_c99compiler=yes],
57 [ensc_cv_c99_c99compiler=no])
61 AM_CONDITIONAL(ENSC_HAVE_C99_COMPILER,
62 [test x"$ensc_cv_c99_c99compiler" = xyes])
64 if test x"$ensc_cv_c99_c99compiler" = xno; then
65 AC_MSG_WARN([*** some programs will not be built because system is lacking a C99 compiler])