[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reported bad code in Emacs configure file
From: |
Akim Demaille |
Subject: |
Re: Reported bad code in Emacs configure file |
Date: |
02 May 2002 09:43:15 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
| That code comes from configure.in:
| dnl Check for speed_t typedef.
| AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
| AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;],
| emacs_cv_speed_t=yes, emacs_cv_speed_t=no))
| if test $emacs_cv_speed_t = yes; then
| AC_DEFINE(HAVE_SPEED_T, 1, [Define to 1 if `speed_t' is declared by
<termios.h>.])
| fi
This is code is fragile. It should read
# Check for speed_t typedef.
AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
[AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;],
emacs_cv_speed_t=yes, emacs_cv_speed_t=no)])
if test $emacs_cv_speed_t = yes; then
AC_DEFINE(HAVE_SPEED_T, 1,
[Define to 1 if `speed_t' is declared by <termios.h>.])
fi
The important being the quotes around AC_TRY_COMPILE.
Please, use address@hidden