+ol_link_wt=no
+if test $ol_enable_wt != no ; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKGCONFIG"; then
+ ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PKGCONFIG="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "$PKGCONFIG" != yes ; then
+ as_fn_error "could not locate pkg-config" "$LINENO" 5
+ fi
+ WT_INCS=`pkg-config --cflags wiredtiger`
+ WT_LIBS=`pkg-config --libs wiredtiger`
+
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$WT_INCS"
+ CPPFLAGS="$WT_INCS"
+ LDFLAGS="$WT_LIBS"
+ for ac_header in wiredtiger.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "wiredtiger.h" "ac_cv_header_wiredtiger_h" "$ac_includes_default"
+if test "x$ac_cv_header_wiredtiger_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_WIREDTIGER_H 1
+_ACEOF
+
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger_version in -lwiredtiger" >&5
+$as_echo_n "checking for wiredtiger_version in -lwiredtiger... " >&6; }
+if test "${ac_cv_lib_wiredtiger_wiredtiger_version+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwiredtiger $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wiredtiger_version ();
+int
+main ()
+{
+return wiredtiger_version ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_wiredtiger_wiredtiger_version=yes
+else
+ ac_cv_lib_wiredtiger_wiredtiger_version=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiredtiger_wiredtiger_version" >&5
+$as_echo "$ac_cv_lib_wiredtiger_wiredtiger_version" >&6; }
+if test "x$ac_cv_lib_wiredtiger_wiredtiger_version" = x""yes; then :
+ : ok
+else
+
+ as_fn_error "could not locate wiredtiger library" "$LINENO" 5
+
+fi
+
+ CFLAGS="$save_CFLAGS"
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ SLAPD_LIBS="$SLAPD_LIBS \$(WT_LIBS)"
+ ol_link_wt=yes
+fi
+