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