+dnl ------ GNU Readline
+AC_CHECK_LIB(readline, readline, [LIBS="$LIBS -lreadline"])
+AC_CHECK_LIB(history, add_history, [LIBS="$LIBS -lhistory"])
+if test "$ac_cv_lib_readline_readline" = "yes"; then
+ AC_CHECK_HEADERS(readline/readline.h readline/history.h)
+fi
+dnl
+dnl ------ tcpd
+AC_CHECK_LIB(wrap, main, [LIBS="$LIBS -lwrap"])
+AC_CHECK_HEADERS(tcpd.h)
+dnl
+dnl ------ Headers
+AC_STDC_HEADERS
+if test "$ac_cv_header_stdc" = "no"; then
+ AC_MSG_WARN(Your system doesn't seem to support ANSI C)
+fi
+dnl