Add extra checks in configure.ac for different locations of (n)curses.h

This commit is contained in:
Hisham Muhammad 2013-02-26 17:10:11 +00:00
parent 43a7231615
commit a0810561f3
3 changed files with 12 additions and 4 deletions

View File

@ -21,6 +21,8 @@ in the source distribution for its full text.
#include <ncursesw/curses.h> #include <ncursesw/curses.h>
#elif HAVE_NCURSES_NCURSES_H #elif HAVE_NCURSES_NCURSES_H
#include <ncurses/ncurses.h> #include <ncurses/ncurses.h>
#elif HAVE_NCURSES_CURSES_H
#include <ncurses/curses.h>
#elif HAVE_NCURSES_H #elif HAVE_NCURSES_H
#include <ncurses.h> #include <ncurses.h>
#elif HAVE_CURSES_H #elif HAVE_CURSES_H

View File

@ -19,6 +19,8 @@ in the source distribution for its full text.
#include <ncursesw/curses.h> #include <ncursesw/curses.h>
#elif HAVE_NCURSES_NCURSES_H #elif HAVE_NCURSES_NCURSES_H
#include <ncurses/ncurses.h> #include <ncurses/ncurses.h>
#elif HAVE_NCURSES_CURSES_H
#include <ncurses/curses.h>
#elif HAVE_NCURSES_H #elif HAVE_NCURSES_H
#include <ncurses.h> #include <ncurses.h>
#elif HAVE_CURSES_H #elif HAVE_CURSES_H

View File

@ -27,7 +27,7 @@ AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"])
# Checks for header files. # Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h curses.h],[:],[ AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h],[:],[
missing_headers="$missing_headers $ac_header" missing_headers="$missing_headers $ac_header"
]) ])
AC_CHECK_HEADERS([execinfo.h],[:],[:]) AC_CHECK_HEADERS([execinfo.h],[:],[:])
@ -94,11 +94,15 @@ if test "x$enable_unicode" = xyes; then
AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.]) AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
]) ])
AC_CHECK_HEADERS([ncursesw/curses.h],[:], AC_CHECK_HEADERS([ncursesw/curses.h],[:],
[AC_CHECK_HEADERS([ncurses/ncurses.h],[:], [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
[AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])]) [AC_CHECK_HEADERS([ncurses/curses.h],[:],
[AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
else else
AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"])
AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) AC_CHECK_HEADERS([curses.h],[:],
[AC_CHECK_HEADERS([ncurses/curses.h],[:],
[AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
[AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
fi fi
if test ! -z "$missing_libraries"; then if test ! -z "$missing_libraries"; then