autoconf: quiet warning by using AC_LANG_PROGRAM

e4b6007f33 introduced the following warning:

configure.ac:327: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call
detected in body

Fix by using the right autoconf macros for the job.
This commit is contained in:
David Adam 2019-01-01 22:09:57 +08:00
parent ea6631641f
commit 63e70d601d

View File

@ -325,17 +325,16 @@ AC_CHECK_FUNCS( getpwent flock )
AC_MSG_CHECKING([dirfd])
AC_LINK_IFELSE([
#include <dirent.h>
DIR *dirp;
int
main(void)
{
return dirfd(dirp);
}
], [ AC_MSG_RESULT([yes])
AC_LANG_PROGRAM(
[
#include <dirent.h>
DIR *dirp;
], [
return dirfd(dirp);
]
)
]
, [ AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_DIRFD], 1, [ Define to 1 if you have the `dirfd' function or macro. ])
],
[ AC_MSG_RESULT([no])]