Added a test for readline.h and eventually enabled use of libreadline
This commit is contained in:
parent
ebcb21bc96
commit
66070ecc0e
@ -7,7 +7,7 @@ AC_CANONICAL_TARGET
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
# A dummy demanded by libburn sources, but unused by xorriso
|
||||
dnl A dummy demanded by libburn sources, but unused by xorriso
|
||||
BURN_MAJOR_VERSION=0
|
||||
BURN_MINOR_VERSION=0
|
||||
BURN_MICRO_VERSION=0
|
||||
@ -68,6 +68,17 @@ else
|
||||
CFLAGS="$CFLAGS -DDEBUG"
|
||||
fi
|
||||
|
||||
|
||||
dnl Check whether there is readline-devel and readline-runtime.
|
||||
dnl If not, erase this macro which would enable use of readline(),add_history()
|
||||
READLINE_DEF="-DXorriso_with_readlinE"
|
||||
dnl The empty yes case obviously causes -lreadline to be linked
|
||||
AC_CHECK_HEADER(readline/readline.h, AC_CHECK_LIB(readline, readline, , READLINE_DEF= ), READLINE_DEF= )
|
||||
dnl The X= in the yes case prevents that -lreadline gets linked twice
|
||||
AC_CHECK_HEADER(readline/history.h, AC_CHECK_LIB(readline, add_history, X= , READLINE_DEF= ), READLINE_DEF= )
|
||||
AC_SUBST(READLINE_DEF)
|
||||
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
version.h
|
||||
|
@ -18,7 +18,7 @@ xorriso_xorriso_CPPFLAGS = -I./libburn -I./libisofs -I./libisoburn -I./xorriso
|
||||
|
||||
# No readline in the vanilla version because the necessary headers
|
||||
# are in a separate readline-development package.
|
||||
xorriso_xorriso_CFLAGS = -DXorriso_standalonE -DXorriso_with_maiN -DXorriso_with_regeX
|
||||
xorriso_xorriso_CFLAGS = -DXorriso_standalonE -DXorriso_with_maiN -DXorriso_with_regeX $(READLINE_DEF)
|
||||
|
||||
xorriso_xorriso_LDADD = $(THREAD_LIBS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user