Browse Source

Added a test for readline.h and eventually enabled use of libreadline

master
Thomas Schmitt 15 years ago
parent
commit
d6b3cfac76
  1. 13
      test/configure_ac.txt
  2. 2
      test/xorriso_makefile_am.txt

13
test/configure_ac.txt

@ -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

2
test/xorriso_makefile_am.txt

@ -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…
Cancel
Save