Add a test for fchdir().
This is part of SF feature #536796.
diff --git a/configure b/configure
index 9d3fb08..6bd6eca 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.307 .
+# From configure.in Revision: 1.309 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53.
 #
@@ -11270,8 +11270,9 @@
 
 
 
+
 for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
- flock fork fsync fdatasync fpathconf ftime ftruncate \
+ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
  gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
  hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
  nice pathconf pause plock poll pthread_init \
diff --git a/configure.in b/configure.in
index d3211a0..7aef29a 100644
--- a/configure.in
+++ b/configure.in
@@ -1580,7 +1580,7 @@
 
 # checks for library functions
 AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \
- flock fork fsync fdatasync fpathconf ftime ftruncate \
+ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
  gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
  hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
  nice pathconf pause plock poll pthread_init \
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 0bd5485..cb8b1b5 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -86,6 +86,9 @@
 /* Define to 1 if you have the `execv' function. */
 #undef HAVE_EXECV
 
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H