mirror of https://gitee.com/bigwinds/arangodb
issue #157: test for ncurses and readline headers, not only library files
This commit is contained in:
parent
93d530f6ba
commit
0ddec8a62a
|
@ -1249,6 +1249,7 @@ WIKI = \
|
|||
Home \
|
||||
HttpCollection \
|
||||
HttpCursor \
|
||||
HttpImport \
|
||||
HttpIndex \
|
||||
HttpInterface \
|
||||
HttpQueries \
|
||||
|
|
|
@ -7665,9 +7665,47 @@ fi
|
|||
fi
|
||||
|
||||
if test "x$tr_NCURSES" != xyes; then
|
||||
as_fn_error $? "Please install the ncurses library" "$LINENO" 5
|
||||
as_fn_error $? "Please install the ncurses library and header files" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
for ac_header in curses.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_curses_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_CURSES_H 1
|
||||
_ACEOF
|
||||
tr_NCURSES="yes"
|
||||
else
|
||||
tr_NCURSES="no"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if test "x$tr_NCURSES" != xyes; then
|
||||
as_fn_error $? "Please install the ncurses header files" "$LINENO" 5
|
||||
fi
|
||||
|
||||
for ac_header in term.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "term.h" "ac_cv_header_term_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_term_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_TERM_H 1
|
||||
_ACEOF
|
||||
tr_NCURSES="yes"
|
||||
else
|
||||
tr_NCURSES="no"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if test "x$tr_NCURSES" != xyes; then
|
||||
as_fn_error $? "Please install the ncurses header files" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking NCURSES version" >&5
|
||||
$as_echo_n "checking NCURSES version... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRI_NCURSES_VERSION" >&5
|
||||
|
@ -7949,6 +7987,10 @@ fi
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "x$tr_READLINE" = xno; then
|
||||
as_fn_error $? "Please install readline support" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
if test "x$tr_READLINE" = xyes; then
|
||||
|
||||
|
@ -7969,6 +8011,11 @@ _ACEOF
|
|||
$as_echo_n "checking READLINE version... " >&6; }
|
||||
eval "$ac_cpp conftest.$ac_ext" | fgrep "long sdnhg36ed" | awk '{print $4 "." $5}' > conftest.output
|
||||
TRI_READLINE_VERSION=`cat conftest.output`
|
||||
|
||||
if test -z "$TRI_READLINE_VERSION"; then
|
||||
as_fn_error $? "Readline support is not working. Please re-install readline support" "$LINENO" 5
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRI_READLINE_VERSION" >&5
|
||||
$as_echo "$TRI_READLINE_VERSION" >&6; }
|
||||
rm -f conftest*
|
||||
|
|
|
@ -55,9 +55,24 @@ if test "x$tr_NCURSES" = xyes; then
|
|||
fi
|
||||
|
||||
if test "x$tr_NCURSES" != xyes; then
|
||||
AC_MSG_ERROR([Please install the ncurses library])
|
||||
AC_MSG_ERROR([Please install the ncurses library and header files])
|
||||
fi
|
||||
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
dnl check if ncurses headers are present
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
|
||||
AC_CHECK_HEADERS(curses.h, [tr_NCURSES="yes"], [tr_NCURSES="no"])
|
||||
if test "x$tr_NCURSES" != xyes; then
|
||||
AC_MSG_ERROR([Please install the ncurses header files])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(term.h, [tr_NCURSES="yes"], [tr_NCURSES="no"])
|
||||
if test "x$tr_NCURSES" != xyes; then
|
||||
AC_MSG_ERROR([Please install the ncurses header files])
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([NCURSES version])
|
||||
AC_MSG_RESULT([$TRI_NCURSES_VERSION])
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_NCURSES=1"
|
||||
|
|
|
@ -74,6 +74,10 @@ if test "x$tr_READLINE" = xyes -o "x$tr_READLINE" = xmaybe; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "x$tr_READLINE" = xno; then
|
||||
AC_MSG_ERROR([Please install readline support])
|
||||
fi
|
||||
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
dnl grep readline version number
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
|
@ -96,6 +100,11 @@ _ACEOF
|
|||
AC_MSG_CHECKING([READLINE version])
|
||||
eval "$ac_cpp conftest.$ac_ext" | fgrep "long sdnhg36ed" | awk '{print $4 "." $5}' > conftest.output
|
||||
TRI_READLINE_VERSION=`cat conftest.output`
|
||||
|
||||
if test -z "$TRI_READLINE_VERSION"; then
|
||||
AC_MSG_ERROR([Readline support is not working. Please re-install readline support])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$TRI_READLINE_VERSION])
|
||||
rm -f conftest*
|
||||
|
||||
|
|
Loading…
Reference in New Issue