* configure.in: check for dirfd even if it is a macro

(Patch from Timothy Redaelli <drizzt at gufi dot org>)
This commit is contained in:
John (J5) Palmieri 2006-10-11 17:29:01 +00:00
parent c6465198ec
commit 77aab542eb
2 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2006-10-11 John (J5) Palmieri <johnp@redhat.com>
* configure.in: check for dirfd even if it is a macro
(Patch from Timothy Redaelli <drizzt at gufi dot org>)
2006-10-08 John (J5) Palmieri <johnp@redhat.com>
* configure.in: define _POSIX_PTHREAD_SEMANTICS on solaris

View file

@ -510,7 +510,24 @@ fi
AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(nsl,gethostbyname)
AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf dirfd)
AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf)
AC_CACHE_CHECK([for dirfd],
ac_cv_func_dirfd,
[AC_TRY_RUN([
#include <sys/types.h>
#include <dirent.h>
int main () {
DIR *dirp;
dirp = opendir(".");
dirfd(dirp);
closedir(dirp);
}],
ac_cv_func_dirfd=yes,
ac_cv_func_dirfd=no)])
if test "$ac_cv_func_dirfd" = yes; then
AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function])
fi
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])