Replaced the AC_TRY_RUN test for the more simple AC_TRY_COMPILE where we check for defines.

This commit is contained in:
gfk
2001-11-01 14:31:08 +00:00
parent faa4861eb3
commit 12016257ff
2 changed files with 4 additions and 22 deletions
+2 -8
View File
@@ -2,14 +2,8 @@ dnl This test is used by the curses driver.
dnl Checks if $1 defined the ACS_S* preprocessor macros.
dnl Example: AC_CHECK_DEFINE_ACS(curses.h)
AC_DEFUN(AC_CHECK_DEFINE_ACS, [
AC_MSG_CHECKING(if $1 defines ACS_S*)
AC_TRY_RUN([
#include <$1>
int main() {
[[char map[] = { ACS_S9, ACS_S7, ACS_S3, ACS_S1 };]]
return 0;
}
], [
AC_MSG_CHECKING(if $1 defines ACS_S3 and ACS_S7)
AC_TRY_COMPILE([#include <$1>], [[[char map[] = { ACS_S9, ACS_S7, ACS_S3, ACS_S1 }]]], [
dnl then
AC_DEFINE(DEFINED_ACS)
AC_MSG_RESULT(yes) ], [
+2 -14
View File
@@ -76,26 +76,14 @@ dnl Checking if sys/utsname.h is present and defines SYS_NMLN or _SYS_NAMELEN
AC_CHECK_HEADER(sys/utsname.h,
AC_MSG_CHECKING(if sys/utsname.h defines SYS_NMLN)
AC_TRY_RUN([[
#include <sys/utsname.h>
int main() {
char kver[SYS_NMLN];
return 0;
}
]], [
AC_TRY_COMPILE([#include <sys/utsname.h>], [[ char kver[SYS_NMLN] ]], [
dnl then
AC_DEFINE(HAVE_SYS_NMLN)
AC_MSG_RESULT(yes) ], [
dnl else
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if sys/utsname.h defines _SYS_NAMELEN)
AC_TRY_RUN([[
#include <sys/utsname.h>
int main() {
char kver[_SYS_NAMELEN];
return 0;
}
]], [
AC_TRY_COMPILE([#include <sys/utsname.h>],[[ char kver[_SYS_NAMELEN] ]], [
dnl then
AC_DEFINE(HAVE__SYS_NAMELEN)
AC_MSG_RESULT(yes) ], [