Commit 6d34310b authored by John Palmieri's avatar John Palmieri

* configure.in: use AC_TRY_COMPILE for dirfd instead of AC_TRY_RUN

parent 2db06dbf
2006-10-11 John (J5) Palmieri <johnp@redhat.com>
* configure.in: use AC_TRY_COMPILE for dirfd instead of AC_TRY_RUN
2006-10-11 John (J5) Palmieri <johnp@redhat.com>
* test/name-test/Makefile.am: don't link against both libdbus and
......
......@@ -512,20 +512,19 @@ AC_CHECK_LIB(nsl,gethostbyname)
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([
AC_MSG_CHECKING(for dirfd)
AC_TRY_COMPILE([
#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
],[
DIR *dirp;
dirp = opendir(".");
dirfd(dirp);
closedir(dirp);
],
dbus_have_dirfd=yes, dbus_have_dirfd=no)
AC_MSG_RESULT($dbus_have_dirfd)
if test "$dbus_have_dirfd" = yes; then
AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function])
fi
......
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