Added a test for readline.h and eventually enabled use of libreadline
This commit is contained in:
parent
7d627486e3
commit
d6b3cfac76
@ -7,7 +7,7 @@ AC_CANONICAL_TARGET
|
|||||||
|
|
||||||
AM_INIT_AUTOMAKE([subdir-objects])
|
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_MAJOR_VERSION=0
|
||||||
BURN_MINOR_VERSION=0
|
BURN_MINOR_VERSION=0
|
||||||
BURN_MICRO_VERSION=0
|
BURN_MICRO_VERSION=0
|
||||||
@ -68,6 +68,17 @@ else
|
|||||||
CFLAGS="$CFLAGS -DDEBUG"
|
CFLAGS="$CFLAGS -DDEBUG"
|
||||||
fi
|
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([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
version.h
|
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
|
# No readline in the vanilla version because the necessary headers
|
||||||
# are in a separate readline-development package.
|
# 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)
|
xorriso_xorriso_LDADD = $(THREAD_LIBS)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user