From a8059c5962ba5695b3622fe0cf7b5e2eb383db1f Mon Sep 17 00:00:00 2001 From: David Adam Date: Sun, 7 Dec 2014 16:41:15 +0800 Subject: Solaris build fixes: pick the right curses more of the time --- configure.ac | 68 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 30 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6c0e32e9..a1716636 100644 --- a/configure.ac +++ b/configure.ac @@ -301,35 +301,6 @@ case $target_os in ;; 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 - #include - ], - [ - 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 # @@ -390,7 +361,7 @@ fi # 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 AC_CHECK_HEADERS([libintl.h]) @@ -748,6 +719,43 @@ else AC_MSG_RESULT(no) 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 + #else + #include + #endif + + #if HAVE_TERM_H + #include + #elif HAVE_NCURSES_TERM_H + #include + #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 AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- cgit v1.2.3