$NetBSD: patch-ab,v 1.6 2009/05/18 05:11:50 dholland Exp $ --- configure.in.orig Wed Jun 9 02:26:28 1999 +++ configure.in Tue Jan 18 16:20:01 2000 @@ -59,6 +59,7 @@ AC_HEADER_TIME dnl AC_PATH_XTRA AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h) +AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) AC_HEADER_SYS_WAIT dnl Check for typedefs, structures, and compiler characteristics. @@ -74,7 +75,20 @@ AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"]) AC_CHECK_LIB(nsl, t_accept, [LIBS="$LIBS -lnsl"]) -AC_CHECK_LIB(readline, readline, [RL_LIBS="-lreadline"]) +if test "$ac_cv_header_readline_h" = "yes" || + test "$ac_cv_header_readline_readline_h" = "yes"; then + AC_CHECK_LIB(termcap, tputs, + [AC_CHECK_LIB(edit, readline, + [AC_DEFINE(HAVE_LIBEDIT) + AC_DEFINE(HAVE_READLINE) + RL_LIBS="-ledit -ltermcap"], + [AC_CHECK_LIB(readline, readline, + [AC_DEFINE(HAVE_LIBREADLINE) + AC_DEFINE(HAVE_READLINE) + RL_LIBS="-lreadline"], -ltermcap) + ], -ltermcap) + ]) +fi AC_SUBST(RL_LIBS) AC_CHECK_LIB(gsm, gsm_decode, [HAVE_GSM="yes"]) @@ -209,6 +223,24 @@ AC_MSG_RESULT($is_freebsd) if test $is_freebsd = "yes"; then RPLAY_TARGET="FreeBSD" +fi +fi + + +dnl +dnl Check for NetBSD +dnl +if test -z "$RPLAY_TARGET"; then +AC_MSG_CHECKING(for NetBSD) +AC_EGREP_CPP(yes, +[ +#ifdef __NetBSD__ + yes +#endif +], is_netbsd=yes, is_netbsd=no) +AC_MSG_RESULT($is_netbsd) +if test $is_netbsd = "yes"; then + RPLAY_TARGET="NetBSD" fi fi