Dear Maintainer,

I've tried a bit solving the problem, here's a patch that builds. Mostly adding
explicit includes for implicit ones that used to get away.

Though I'm not at all familiar with autoconf, so some things might not follow
best practices.

The last hunk, including pty.h, is probably placed in a wrong spot. Please let
me know, and where to put it correctly, if it's the case ;)

--- a/examples/rlfe/configure.in
+++ b/examples/rlfe/configure.in
@@ -30,7 +30,7 @@
 AC_PROG_GCC_TRADITIONAL
 AC_ISC_POSIX

-AC_TRY_RUN(main(){exit(0);},,[
+AC_TRY_RUN(int main(){return 0;},,[
 if test $CC != cc ; then
 AC_NOTE(Your $CC failed - restarting with CC=cc)
 AC_NOTE()
@@ -40,7 +40,7 @@
 fi
 ])

-AC_TRY_RUN(main(){exit(0);},,
+AC_TRY_RUN(int main(){return 0;},,
 exec 5>&2
 eval $ac_link
 AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
@@ -84,10 +84,10 @@
 dnl

 AC_CHECKING(select)
-AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],,
+AC_TRY_LINK([sys/select.h],[select(0, 0, 0, 0, 0);],,
 LIBS="$LIBS -lnet -lnsl"
 AC_CHECKING(select with $LIBS)
-AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],,
+AC_TRY_LINK([sys/select.h],[select(0, 0, 0, 0, 0);],,
 AC_MSG_ERROR(!!! no select - no screen))
 )
 dnl
@@ -216,10 +216,10 @@
 AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
 LIBS="-ltermlib $olibs"
 AC_CHECKING(libtermlib)
-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+AC_TRY_LINK([term.h],tgetent((char *)0, (char *)0);,,
 LIBS="-lncurses $olibs"
 AC_CHECKING(libncurses)
-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+AC_TRY_LINK([term.h],tgetent((char *)0, (char *)0);,,
 AC_MSG_ERROR(!!! no tgetent - no screen))))))

 AC_TRY_RUN([
--- a/examples/rlfe/configure
+++ b/examples/rlfe/configure
@@ -3258,7 +3258,7 @@
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-main(){exit(0);}
+int main(){return 0;}
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :

@@ -3288,7 +3288,7 @@
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-main(){exit(0);}
+int main(){return 0;}
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :

@@ -3425,6 +3425,7 @@
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

+#include <sys/select.h>
 int
 main ()
 {
@@ -3442,6 +3443,7 @@
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

+#include <sys/select.h>
 int
 main ()
 {
@@ -3648,6 +3650,7 @@
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

+#include <term.h>
 int
 main ()
 {
@@ -3665,6 +3668,7 @@
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

+#include <term.h>
 int
 main ()
 {
--- a/examples/rlfe/pty.c
+++ b/examples/rlfe/pty.c
@@ -48,6 +48,8 @@
 # include <sys/tty.h>
 # include <sys/sioctl.h>
 # include <sys/pty.h>
+#else
+# include <pty.h>
 #endif

 #ifdef sgi


-- 
Sdrager,
Blair Noctis

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to