Use proper readline detection

parent cdc14e2b
......@@ -112,10 +112,7 @@ The libvpx build isn't able to produce dual architecture files. To workaround th
If you got the source code from git, run `./autogen.sh` first.
Then or otherwise, :
# HomeBrew
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp --disable-strict --with-readline=/usr/local && make
# MacPorts
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp --disable-strict --with-readline=/opt/local && make
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp --disable-strict && make
* Install on the system
......
......@@ -5,8 +5,12 @@
AC_DEFUN([LP_CHECK_READLINE],[
AC_ARG_WITH( readline,
[ --with-readline Set prefix where gnu readline headers and libs can be found (ex:/usr, /usr/local, none) [default=/usr] ],
[ readline_prefix=${withval}],[ readline_prefix="/usr" ])
[ --with-readline Set prefix where gnu readline headers and libs can be found (ex:/usr, /usr/local, none) [default=/usr] ],
[ readline_prefix=${withval} ],
[ readline_prefix="/usr/local" ],
[ readline_prefix="/opt/local" ],
[ readline_prefix="/usr" ]
)
if test "$readline_prefix" != "none"; then
......@@ -14,14 +18,14 @@ if test "$readline_prefix" != "none"; then
READLINE_CFLAGS="-I$readline_prefix/include"
READLINE_LIBS="-L$readline_prefix/lib"
fi
CPPFLAGS_save=$CPPFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
LIBS="$LIBS $READLINE_LIBS"
AC_CHECK_HEADERS(readline.h readline/readline.h, readline_h_found=yes)
AC_CHECK_HEADERS(history.h readline/history.h)
for termcap_lib in "" -ltermcap -lcurses -lncurses; do
unset ac_cv_lib_readline_readline
AC_CHECK_LIB(readline, readline, [readline_libs_found=yes],[],[$termcap_lib])
......@@ -33,14 +37,14 @@ if test "$readline_prefix" != "none"; then
LIBS=$LIBS_save
CPPFLAGS=$CPPFLAGS_save
if test "$readline_libs_found$readline_h_found" != "yesyes" ; then
AC_MSG_WARN([Could not find libreadline headers or library, linphonec will have limited prompt features])
else
AC_DEFINE([HAVE_READLINE],1,[defined when compiling with readline support])
fi
AC_SUBST(READLINE_CFLAGS)
AC_SUBST(READLINE_LIBS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment