Enabled use of libreadline on Solaris by eventually linking -lcurses

This commit is contained in:
Thomas Schmitt 2010-06-15 16:05:55 +00:00
parent 58f1bb249c
commit ed3eede4aa
2 changed files with 39 additions and 13 deletions

View File

@ -81,7 +81,12 @@ AC_DEFUN([LIBBURNIA_CHECK_ICONV],
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
], [], [libburnia_iconv_const=""], [libburnia_iconv_const="const"] ], [], [libburnia_iconv_const=""], [libburnia_iconv_const="const"]
) )
AC_DEFINE_UNQUOTED([ICONV_CONST], [$libburnia_iconv_const]) if test x$libburnia_iconv_const = xconst
then
AC_DEFINE_UNQUOTED([ICONV_CONST], [const])
else
AC_DEFINE_UNQUOTED([ICONV_CONST], [])
fi
test -z "$libburnia_iconv_const" && libburnia_iconv_const="no" test -z "$libburnia_iconv_const" && libburnia_iconv_const="no"
AC_MSG_RESULT([$libburnia_iconv_const]) AC_MSG_RESULT([$libburnia_iconv_const])
]) ])
@ -131,16 +136,11 @@ iconv_close(cd);
]) ])
dnl LIBBURNIA_ASSERT_READLINE disables xorriso readline if not all needed dnl LIBBURNIA_TRY_READLINE is by Thomas Schmitt, libburnia project
dnl functions are present dnl It performs the actual test compilation for readline.
AC_DEFUN([LIBBURNIA_ASSERT_READLINE], dnl Variable LIBS has to be set by the caller.
AC_DEFUN([LIBBURNIA_TRY_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([ AC_TRY_LINK([
#include <ctype.h> #include <ctype.h>
#include <sys/types.h> #include <sys/types.h>
@ -156,17 +156,43 @@ add_history("");
hl= history_list(); hl= history_list();
], [readline_test="yes"], [readline_test="no"] ], [readline_test="yes"], [readline_test="no"]
) )
AC_MSG_RESULT([$readline_test]) ])
dnl LIBBURNIA_ASSERT_READLINE is by Thomas Schmitt, libburnia project
dnl It disables xorriso readline if not all needed 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])
readline_msg=
libburnia_save_LIBS="$LIBS"
LIBS="$LIBS -lreadline"
LIBBURNIA_TRY_READLINE
if test x$readline_test = xno
then
LIBS="$libburnia_save_LIBS"
LIBS="$LIBS -lreadline -lcurses"
LIBBURNIA_TRY_READLINE
if test x$readline_test = xyes
then
readline_msg=", with -lcurses"
fi
fi
if test x$readline_test = xno if test x$readline_test = xno
then then
READLINE_DEF= READLINE_DEF=
LIBS="$libburnia_save_LIBS" LIBS="$libburnia_save_LIBS"
fi fi
AC_MSG_RESULT([$readline_test $readline_msg])
fi fi
]) ])
dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file. dnl LIBBURNIA_SET_PKGCONFIG is by Thomas Schmitt, libburnia project
dnl It determines the install directory for the *.pc file.
dnl Important: Must be performed _after_ TARGET_SHIZZLE dnl Important: Must be performed _after_ TARGET_SHIZZLE
dnl dnl
AC_DEFUN([LIBBURNIA_SET_PKGCONFIG], AC_DEFUN([LIBBURNIA_SET_PKGCONFIG],

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.06.15.160133" #define Xorriso_timestamP "2010.06.15.160501"