$OpenBSD: patch-configure_in,v 1.2 2003/02/26 15:54:17 danh Exp $
--- configure.in.orig	Thu Feb 13 01:28:32 2003
+++ configure.in	Tue Feb 25 23:34:59 2003
@@ -223,23 +223,17 @@ AC_CHECK_LIB(kvm, main)		dnl We already 
 AC_CHECK_LIB(ld, nlist)
 AC_CHECK_LIB(mld, nlist)
 AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
+AC_CHECK_FUNCS(getifaddrs freeifaddrs)
 AC_CHECK_FUNC(openlog, , 
   AC_CHECK_LIB(gen, openlog, , 
   AC_CHECK_LIB(syslog, openlog, , , -lsocket)))
-dnl HMS: What a hack...
-AC_CHECK_HEADERS(readline/history.h readline/readline.h)
-case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
- *no*) ;;
- *) AC_CHECK_LIB(readline, readline, ,
-     AC_MSG_NOTICE([Trying again with -lcurses])
-     unset ac_cv_lib_readline_readline
-     AC_CHECK_LIB(readline, readline,
-      LIBS="-lreadline -lcurses $LIBS"
-      AC_DEFINE(HAVE_LIBREADLINE)
-      AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
-      , , -lcurses))
-    ;;
-esac
+AC_CHECK_LIB(readline, readline, [cat >>confdefs.h <<EOF
+#define HAVE_LIBREADLINE 1
+EOF
+
+  LIBS="-lreadline -ltermcap $LIBS"
+], , -ltermcap)
+
 
 dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
 dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
@@ -665,6 +659,7 @@ case "$host" in
  *-pc-cygwin*)
     ;;
  *) AC_CHECK_FUNCS(getuid)
+    AC_CHECK_FUNCS(geteuid)
     ;;
 esac
 AC_CHECK_FUNCS(hstrerror K_open kvm_open memcpy memmove memset)
@@ -682,6 +677,8 @@ case "$host" in
     ;;
  *-*-irix[[45]]*)
     # Just a stub in "old" Irix.  Idiots.
+    ;;
+ *-*-openbsd*)
     ;;
  *-*-qnx*)
     # Apparently there but not working in QNX.  Idiots?
