mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Solaris build fixes: pick the right curses more of the time
This commit is contained in:
parent
381404c4f4
commit
a8059c5962
12 changed files with 91 additions and 31 deletions
|
@ -11,8 +11,13 @@ Functions used for implementing the set_color builtin.
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
|
@ -45,11 +45,15 @@ parts of fish.
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
68
configure.ac
68
configure.ac
|
@ -301,35 +301,6 @@ case $target_os in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check for Solaris curses tputs having fixed length parameter list.
|
|
||||||
AC_MSG_CHECKING([if we are using non varargs tparm.])
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[
|
|
||||||
AC_LANG_PROGRAM(
|
|
||||||
[
|
|
||||||
#include <curses.h>
|
|
||||||
#include <term.h>
|
|
||||||
],
|
|
||||||
[
|
|
||||||
tparm( "" );
|
|
||||||
]
|
|
||||||
)
|
|
||||||
],
|
|
||||||
[tparm_solaris_kludge=no],
|
|
||||||
[tparm_solaris_kludge=yes]
|
|
||||||
)
|
|
||||||
if test "x$tparm_solaris_kludge" = "xyes"; then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(
|
|
||||||
[TPARM_SOLARIS_KLUDGE],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if tparm accepts a fixed amount of paramters.]
|
|
||||||
)
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BSD-specific flags go here
|
# BSD-specific flags go here
|
||||||
#
|
#
|
||||||
|
@ -390,7 +361,7 @@ fi
|
||||||
# Check presense of various header files
|
# Check presense of various header files
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h])
|
AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h ncurses/curses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h])
|
||||||
|
|
||||||
if test x$local_gettext != xno; then
|
if test x$local_gettext != xno; then
|
||||||
AC_CHECK_HEADERS([libintl.h])
|
AC_CHECK_HEADERS([libintl.h])
|
||||||
|
@ -748,6 +719,43 @@ else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check for Solaris curses tputs having fixed length parameter list.
|
||||||
|
AC_MSG_CHECKING([if we are using non varargs tparm.])
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[
|
||||||
|
AC_LANG_PROGRAM(
|
||||||
|
[
|
||||||
|
#if HAVE_NCURSES_H
|
||||||
|
#include <ncurses.h>
|
||||||
|
#else
|
||||||
|
#include <curses.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_TERM_H
|
||||||
|
#include <term.h>
|
||||||
|
#elif HAVE_NCURSES_TERM_H
|
||||||
|
#include <ncurses/term.h>
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[
|
||||||
|
tparm( "" );
|
||||||
|
]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
[tparm_solaris_kludge=no],
|
||||||
|
[tparm_solaris_kludge=yes]
|
||||||
|
)
|
||||||
|
if test "x$tparm_solaris_kludge" = "xyes"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(
|
||||||
|
[TPARM_SOLARIS_KLUDGE],
|
||||||
|
[1],
|
||||||
|
[Define to 1 if tparm accepts a fixed amount of paramters.]
|
||||||
|
)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
# Tell the world what we know
|
# Tell the world what we know
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
5
env.cpp
5
env.cpp
|
@ -21,8 +21,13 @@
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
|
@ -32,8 +32,13 @@
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
|
@ -24,8 +24,13 @@
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
5
io.cpp
5
io.cpp
|
@ -24,8 +24,13 @@ Utilities for io redirection.
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
|
@ -61,6 +61,9 @@
|
||||||
/* Define to 1 if you have the nan function */
|
/* Define to 1 if you have the nan function */
|
||||||
#define HAVE_NAN 1
|
#define HAVE_NAN 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ncurses/curses.h> header file. */
|
||||||
|
/* #undef HAVE_NCURSES_CURSES_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <ncurses.h> header file. */
|
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||||
#define HAVE_NCURSES_H 1
|
#define HAVE_NCURSES_H 1
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,13 @@
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
5
proc.cpp
5
proc.cpp
|
@ -33,8 +33,13 @@ Some of the code in this file is based on code from the Glibc manual.
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
|
@ -45,8 +45,13 @@ commence.
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
|
@ -20,8 +20,13 @@ efficient way for transforming that to the desired screen content.
|
||||||
|
|
||||||
#if HAVE_NCURSES_H
|
#if HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
|
// Solaris curses defines lots of unneeded macros which conflict with C++
|
||||||
|
#define NOMACROS
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
#undef NOMACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_TERM_H
|
#if HAVE_TERM_H
|
||||||
|
|
Loading…
Reference in a new issue