Commit 7ac71954 authored by Per Cederqvist's avatar Per Cederqvist

(CMOD_COMPILER_CC_ACCEPTS): Removed.

(CMOD_CHECK_CC_OPT): New macro.
parent e8072599
dnl $Id: acinclude.m4,v 1.3 1999/05/24 09:38:13 ceder Exp $
dnl $Id: acinclude.m4,v 1.4 2001/09/23 16:20:36 ceder Exp $
dnl Copyright (C) 1994-1995, 1998-1999 Lysator Academic Computer Association.
dnl
dnl This file is part of the LysKOM server.
......@@ -24,22 +24,21 @@ dnl
dnl
dnl Check if an option is acceptable to the C compiler in use.
dnl (This is taken verbatim from cmod 1.0. Please don't make even a
dnl (This is taken verbatim from cmod 1.2. Please don't make even a
dnl tiny change to it unless you change the name of all variables!
dnl See the cmod source code for more information.)
dnl
AC_DEFUN(CMOD_COMPILER_CC_ACCEPTS,
[cmod_safe=`echo "cmod_cv_compiler_${CC}_accepts_$1" | tr '+./=\055' 'X____'`
AC_MSG_CHECKING([whether ${CC} accepts $1])
AC_CACHE_VAL($cmod_safe,
AC_DEFUN([CMOD_CHECK_CC_OPT],
[AC_MSG_CHECKING([whether ${CC} accepts $1])
AC_CACHE_VAL([cmod_cv_compiler_]$2,
[[cmod_oldflags=$CFLAGS
CFLAGS="$CFLAGS $1"]
AC_TRY_LINK(,,
[eval "$cmod_safe=yes"],
[eval "$cmod_safe=no"])
[cmod_cv_compiler_]$2[=yes],
[cmod_cv_compiler_]$2[=no])
[CFLAGS=$cmod_oldflags]])dnl
AC_MSG_RESULT([`eval echo '$'$cmod_safe`])
if test `eval echo '$'$cmod_safe` = yes; then
AC_MSG_RESULT([$cmod_cv_compiler_]$2)
if test [$cmod_cv_compiler_]$2 = yes; then
CFLAGS="$CFLAGS $1"
fi])dnl
dnl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment