More carefully checking for libreadline suitability

This commit is contained in:
2010-04-13 15:43:58 +00:00
parent 8a3b4e2207
commit dfd0466291
4 changed files with 62 additions and 8 deletions

View File

@ -131,6 +131,41 @@ iconv_close(cd);
])
dnl LIBBURNIA_ASSERT_READLINE disables xorriso readline if not all needed
dnl functions are present
AC_DEFUN([LIBBURNIA_ASSERT_READLINE],
[
if test x$XORRISO_ASSUME_READLINE = x
then
dnl Check for the essential gestures of libisofs/util.c
AC_MSG_CHECKING([for desired functions in libreadline])
libburnia_save_LIBS="$LIBS"
LIBS="$LIBS -lreadline"
AC_TRY_LINK([
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <readline/readline.h>
#include <readline/history.h>],
[HIST_ENTRY **hl;
readline("");
add_history("");
hl= history_list();
], [readline_test="yes"], [readline_test="no"]
)
AC_MSG_RESULT([$readline_test])
if test x$readline_test = xno
then
READLINE_DEF=
LIBS="$libburnia_save_LIBS"
fi
fi
])
dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file.
dnl Important: Must be performed _after_ TARGET_SHIZZLE
dnl