diff --git a/configure b/configure
index 584b4b4..d3d105b 100755
--- a/configure
+++ b/configure
@@ -3170,7 +3170,11 @@ then
 	HAVE_HESIOD=0
 	echo "$as_me:$LINENO: checking for libhesiod" >&5
 echo $ECHO_N "checking for libhesiod... $ECHO_C" >&6
-LIBS="$LIBHESIOD -lhesiod -lresolv"
+
+# save current ldflags
+af_check_hesiod_save_ldflags="$LDFLAGS"
+LDFLAGS="$LDFLAGS -lhesiod -lresolv"
+
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3222,6 +3226,9 @@ fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
+# restore ldflags
+LDFLAGS="$af_check_hesiod_save_ldflags"
+
 	if test "$HAVE_HESIOD" == "1"; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -3895,9 +3902,9 @@ fi;
 if test -z "$HAVE_LDAP"; then
 	HAVE_LDAP=0
 	LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1"
-	echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
-echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6
-if test "${ac_cv_lib_ldap_ldap_init+set}" = set; then
+	echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -3915,11 +3922,11 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char ldap_init ();
+char ldap_initialize ();
 int
 main ()
 {
-ldap_init ();
+ldap_initialize ();
   ;
   return 0;
 }
@@ -3946,20 +3953,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_ldap_ldap_init=yes
+  ac_cv_lib_ldap_ldap_initialize=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_ldap_ldap_init=no
+ac_cv_lib_ldap_ldap_initialize=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_init" >&5
-echo "${ECHO_T}$ac_cv_lib_ldap_ldap_init" >&6
-if test $ac_cv_lib_ldap_ldap_init = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
   HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap_r -llber -lresolv"
 fi
 
@@ -4915,7 +4922,8 @@ else
   enableval=yes
 fi;
 if test x$enable_mount_locking = xyes -o x$enableval = xyes; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define ENABLE_MOUNT_LOCKING 1
 _ACEOF
 
@@ -4932,7 +4940,8 @@ else
   enableval=no
 fi;
 if test x$enable_forced_shutdown = xyes -o x$enableval = xyes; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define ENABLE_FORCED_SHUTDOWN 1
 _ACEOF
 
@@ -4949,7 +4958,8 @@ else
   enableval=no
 fi;
 if test x$enable_ignore_busy_mounts = xyes -o x$enableval = xyes; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define ENABLE_IGNORE_BUSY_MOUNTS 1
 _ACEOF
 
diff --git a/configure.in b/configure.in
index 1494403..3fa4e6c 100644
--- a/configure.in
+++ b/configure.in
@@ -180,7 +180,7 @@ AC_ARG_WITH(openldap,
 if test -z "$HAVE_LDAP"; then
 	HAVE_LDAP=0
 	LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1"
-	AC_CHECK_LIB(ldap, ldap_init, HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap_r -llber -lresolv", ,
+	AC_CHECK_LIB(ldap, ldap_initialize, HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap_r -llber -lresolv", ,
 		     -llber -lresolv $LIBS)
 	if test "$HAVE_LDAP" == "1"; then
 		AC_DEFINE(WITH_LDAP,1,
diff --git a/include/config.h.in b/include/config.h.in
index f26087c..942694c 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -1,45 +1,118 @@
-/* -*- c -*-
- *
- * config.h.in: Pattern file for autofs to be filled in by configure
- *
- */
+/* include/config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Program paths */
+/* leave this alone */
+#undef ENABLE_EXT_ENV
+
+/* Enable forced shutdown on USR1 signal */
+#undef ENABLE_FORCED_SHUTDOWN
+
+/* Enable exit, ignoring busy mounts */
+#undef ENABLE_IGNORE_BUSY_MOUNTS
+
+/* Disable use of locking when spawning mount command */
+#undef ENABLE_MOUNT_LOCKING
+
+/* define if you have E2FSCK */
+#undef HAVE_E2FSCK
+
+/* define if you have E3FSCK */
+#undef HAVE_E3FSCK
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the Linux /proc filesystem. */
+#undef HAVE_LINUX_PROCFS
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* define if you have MODPROBE */
+#undef HAVE_MODPROBE
+
+/* define if you have MOUNT */
 #undef HAVE_MOUNT
-#undef PATH_MOUNT
 
+/* define if the mount command supports the -s option */
+#undef HAVE_SLOPPY_MOUNT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* define if you have UMOUNT */
 #undef HAVE_UMOUNT
-#undef PATH_UMOUNT
 
-#undef HAVE_MODPROBE
-#undef PATH_MODPROBE
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
 
-#undef HAVE_SMBMOUNT
-#undef PATH_SMBMOUNT
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
 
-#undef HAVE_E2FSCK
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* define if you have E2FSCK */
 #undef PATH_E2FSCK
 
-#undef HAVE_E3FSCK
+/* define if you have E3FSCK */
 #undef PATH_E3FSCK
 
-/* Define this option if mount(8) supports the -s (sloppy) option */
-#undef HAVE_SLOPPY_MOUNT
+/* define if you have LEX */
+#undef PATH_LEX
 
-#undef HAVE_LINUX_PROCFS
+/* define if you have MODPROBE */
+#undef PATH_MODPROBE
 
-#undef ENABLE_EXT_ENV
+/* define if you have MOUNT */
+#undef PATH_MOUNT
 
-#undef ENABLE_MOUNT_LOCKING
+/* define if you have RANLIB */
+#undef PATH_RANLIB
+
+/* define if you have RPCGEN */
+#undef PATH_RPCGEN
+
+/* define if you have UMOUNT */
+#undef PATH_UMOUNT
 
+/* define if you have YACC */
+#undef PATH_YACC
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if using the dmalloc debugging malloc package */
 #undef WITH_DMALLOC
 
+/* Define if using Hesiod as a source of automount maps */
 #undef WITH_HESIOD
 
+/* Define if using LDAP as a source of automount maps */
 #undef WITH_LDAP
 
+/* Define if using SASL authentication with the LDAP module */
 #undef WITH_SASL
-
-#undef ENABLE_FORCED_SHUTDOWN
-
-#undef ENABLE_IGNORE_BUSY_MOUNTS