Conditional curses detection
Make the whole extra curses/ncurses/ncursesw only check if we didn't find tinfo the "old" way.
This commit is contained in:
committed by
Anton Lundin
parent
eeb8ae99d7
commit
dd5a69bc70
+17
-17
@@ -224,24 +224,24 @@ AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses=DIR], [Where curses is install
|
||||
CURSES_CPPFLAGS="-I${cv_curses}/include"
|
||||
fi])
|
||||
|
||||
# save away old LDFLAGS/CPPFLAGS and check for curses with cv_curses
|
||||
old_LDFLAGS="$LDFLAGS"
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $CURSES_LDFLAGS"
|
||||
CPPFLAGS="$LDFLAGS $CURSES_CPPFLAGS"
|
||||
|
||||
AX_WITH_CURSES
|
||||
# restore old LDFLAGS/CPPFLAGS
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
|
||||
if test "x$ax_cv_have_TINFO" = xno ; then
|
||||
if test "x$ax_cv_curses_which" = xno ; then
|
||||
AC_MSG_ERROR([requires either tinfo, NcursesW or Ncurses library])
|
||||
else
|
||||
AC_SUBST([TINFO_LIBS], ["$CURSES_LDFLAGS $CURSES_LIB"])
|
||||
AC_SUBST([TINFO_CFLAGS], ["$CURSES_CPPFLAGS"])
|
||||
fi
|
||||
# save away old LDFLAGS/CPPFLAGS and check for curses with cv_curses
|
||||
old_LDFLAGS="$LDFLAGS"
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $CURSES_LDFLAGS"
|
||||
CPPFLAGS="$LDFLAGS $CURSES_CPPFLAGS"
|
||||
|
||||
AX_WITH_CURSES
|
||||
# restore old LDFLAGS/CPPFLAGS
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
|
||||
if test "x$ax_cv_curses_which" = xno ; then
|
||||
AC_MSG_ERROR([requires either tinfo, NcursesW or Ncurses library])
|
||||
else
|
||||
AC_SUBST([TINFO_LIBS], ["$CURSES_LDFLAGS $CURSES_LIB"])
|
||||
AC_SUBST([TINFO_CFLAGS], ["$CURSES_CPPFLAGS"])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_DECL([forkpty],
|
||||
|
||||
Reference in New Issue
Block a user