]> andersk Git - moira.git/commitdiff
Check to see if -lcurses has the newterm() function.
authordanw <danw>
Tue, 26 Jan 1999 20:07:20 +0000 (20:07 +0000)
committerdanw <danw>
Tue, 26 Jan 1999 20:07:20 +0000 (20:07 +0000)
(SVR4 curses exits if initscr() fails, so use that instead if it's there.)

configure
configure.in

index a74267c6315860dcd65b34724ad1a1d43ea8adaa..d11868dbaf4e58c3cb617cfd5f67bf36cf9b95c9 100755 (executable)
--- a/configure
+++ b/configure
@@ -2398,6 +2398,22 @@ else
 fi
 rm -f conftest*
 fi
+rm -f conftest*
+    cat > conftest.$ac_ext <<EOF
+#line 2404 "configure"
+#include "confdefs.h"
+#include <curses.h>
+int main() {
+newterm(NULL, NULL, NULL);
+; return 0; }
+EOF
+if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  CURSES_CPPFLAGS="$CURSES_CPPFLAGS -DCURSES_HAS_NEWTERM"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
 rm -f conftest*
     LIBS=$OLDLIBS
     CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS"
@@ -2413,12 +2429,12 @@ fi
 for ac_func in getusershell
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2417: checking for $ac_func" >&5
+echo "configure:2433: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2422 "configure"
+#line 2438 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2441,7 +2457,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
index fd3ebf91a9fd7d2a26c4f172cf3eb7053d0c0318..f85ab9e7626c377557315031b3cb23a9bc58cebe 100755 (executable)
@@ -373,6 +373,8 @@ if test -n "$CURSES_LIBS"; then
                AC_TRY_COMPILE([#include <curses.h>],[WINDOW *w; w->_maxx;],
                               [CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'"],
                               [CURSES_CPPFLAGS="-D'getmaxx(w)=w->maxx'"]))
+    AC_TRY_LINK([#include <curses.h>],[newterm(NULL, NULL, NULL);],
+               [CURSES_CPPFLAGS="$CURSES_CPPFLAGS -DCURSES_HAS_NEWTERM"])
     LIBS=$OLDLIBS
     CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS"
     CURSES_SUBDIRS='$(CURSES_SUBDIRS)'
This page took 0.149673 seconds and 5 git commands to generate.