+dnl
+dnl Check for module support
+dnl
+ol_link_modules=no
+if test $ol_enable_modules != no ; then
+ AC_PATH_PROG(GLIBCONFIG, glib-config)
+
+ if test "no$GLIBCONFIG" = "no" ; then
+ if test $ol_enable_modules = yes ; then
+ AC_MSG_ERROR([could not locate glib-config])
+ fi
+
+ else
+ SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
+ SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
+ SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
+
+ dnl should check glib version
+ ol_link_modules=yes
+ fi
+else
+ ol_with_bdb2_module=static
+ ol_with_ldap_module=static
+ ol_with_ldbm_module=static
+ ol_with_passwd_module=static
+ ol_with_perl_module=static
+ ol_with_shell_module=static
+ ol_with_tcl_module=static
+fi
+
+dnl ----------------------------------------------------------------
+dnl Checks for header files.
+OL_HEADER_STDC
+
+if test $ol_cv_header_stdc != yes; then
+ AC_MSG_WARN([could not locate Standard C compliant headers])
+fi
+
+AC_HEADER_DIRENT
+AC_HEADER_SYS_WAIT
+AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
+if test $am_cv_sys_posix_termios = yes ; then
+ AC_DEFINE(HAVE_POSIX_TERMIOS,1,
+ [define if you have POSIX termios])
+fi
+
+AC_CHECK_HEADERS( \
+ arpa/inet.h \
+ arpa/nameser.h \
+ assert.h \
+ crypt.h \
+ errno.h \
+ fcntl.h \
+ filio.h \
+ getopt.h \
+ grp.h \
+ libutil.h \
+ limits.h \
+ locale.h \
+ netinet/tcp.h \
+ malloc.h \
+ memory.h \
+ psap.h \
+ pwd.h \
+ resolv.h \
+ sgtty.h \
+ shadow.h \
+ stdarg.h \
+ stddef.h \
+ string.h \
+ strings.h \
+ sysexits.h \
+ sys/file.h \
+ sys/filio.h \
+ sys/errno.h \
+ sys/ioctl.h \
+ sys/param.h \
+ sys/resource.h \
+ sys/select.h \
+ sys/socket.h \
+ sys/syslog.h \
+ sys/time.h \
+ sys/types.h \
+ syslog.h \
+ termios.h \
+ unistd.h \
+)
+
+dnl ----------------------------------------------------------------