aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-08 15:24:52 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-08 15:24:52 +0000
commitc4a6d12d562074ed223102f0ff0a1dcd4a475a24 (patch)
tree51f50e1c87acdd66d06b44274d14da301f4c352c
parent4017232235153691044d12c50e759e05607a5da0 (diff)
add smarter checking for termcap support, which fixes a build problem when
ncurses is statically compiled with term info support, which is provided in the statically compiled editline library that we are including. (issue #6948, original patch by casper, modified to use the features of AST_EXT_LIB) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25611 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile8
-rw-r--r--configure.ac27
-rw-r--r--makeopts.in3
3 files changed, 29 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 628fab60e..87c9bfdca 100644
--- a/Makefile
+++ b/Makefile
@@ -365,9 +365,9 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
endif
ifeq ($(OSARCH),Linux)
- LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
+ LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv #-lnjamd
else
- LIBS+=-lncurses -lm
+ LIBS+=$(EDITLINE_LIBS) -lm
endif
ifeq ($(OSARCH),Darwin)
@@ -395,11 +395,11 @@ ifeq ($(OSARCH),FreeBSD)
endif
ifeq ($(OSARCH),NetBSD)
- LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib -lncurses
+ LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
endif
ifeq ($(OSARCH),OpenBSD)
- LIBS+=-lcrypto -lpthread -lm -lncurses
+ LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
endif
ifeq ($(OSARCH),SunOS)
diff --git a/configure.ac b/configure.ac
index 0dd06da4f..88dacbf2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,9 +171,26 @@ AST_EXT_LIB([speex], [speex_encode], [speex/speex.h], [SPEEX], [Speex], [-lm])
AST_EXT_LIB([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
AST_EXT_LIB([tds], [tds_version], [tds.h], [FREETDS], [FreeTDS])
+AST_EXT_LIB([termcap], [tgetent], [], [TERMCAP], [Termcap])
+AST_EXT_LIB([tinfo], [tgetent], [], [TINFO], [Term Info])
AST_EXT_LIB([vorbis], [vorbis_info_init], [vorbis/codec.h], [VORBIS], [Vorbis], [-lm -lvorbisenc])
AST_EXT_LIB([z], [compress], [zlib.h], [ZLIB], [zlib])
+EDITLINE_LIBS=""
+if test "x$termcap_LIB" != "x" ; then
+ EDITLINE_LIBS="$termcap_LIB"
+elif test "x$tinfo_LIB" != "x" ; then
+ EDITLINE_LIBS="$tinfo_LIB"
+elif test "x$curses_LIB" != "x" ; then
+ EDITLINE_LIBS="$curses_LIB"
+elif test "x$ncurses_LIB" != "x" ; then
+ EDITLINE_LIBS="$ncurses_LIB"
+else
+ echo "*** termcap support not found"
+ exit 1
+fi
+AC_SUBST(EDITLINE_LIBS)
+
PBX_LIBossaudio=0
AC_CHECK_HEADER([linux/soundcard.h],
[
@@ -339,7 +356,7 @@ case ${withval} in
esac
])
if test "${USE_VPB}" != "no"; then
- echo -n "checking for vpb_open in -lvpb..."
+ echo -n "checking for vpb_open in -lvpb... "
saved_libs="${LIBS}"
saved_cppflags="${CPPFLAGS}"
if test "x${VPB_DIR}" != "x"; then
@@ -401,7 +418,7 @@ esac
PBX_QT=0
if test "${USE_QT}" != "no"; then
- echo -n "checking for QDate in -lqt..."
+ echo -n "checking for QDate in -lqt... "
saved_libs="${LIBS}"
saved_cppflags="${CPPFLAGS}"
if test "x${QT_DIR}" != "x"; then
@@ -487,7 +504,7 @@ esac
PBX_KDE=0
if test "${USE_KDE}" != "no"; then
- echo -n "checking for crashHandler in -lkdecore..."
+ echo -n "checking for crashHandler in -lkdecore... "
saved_ldflags="${LDFLAGS}"
LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR}/lib -lkdecore"
AC_LINK_IFELSE(
@@ -566,7 +583,7 @@ case ${withval} in
esac
])
if test "${USE_PWLIB}" != "no"; then
- echo -n "checking for existence of pwlib..."
+ echo -n "checking for existence of pwlib... "
saved_ldflags="${LDFLAGS}"
LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}"
@@ -696,7 +713,7 @@ echo
echo "Package configured for: "
echo " OS type : $PBX_OSTYPE"
-echo " host cpu : $host_cpu"
+echo " Host CPU : $host_cpu"
if test "x${crossCompile}" = xYes; then
echo ""
echo " Cross Compilation = YES"
diff --git a/makeopts.in b/makeopts.in
index 69a53d681..2e148f3b9 100644
--- a/makeopts.in
+++ b/makeopts.in
@@ -101,3 +101,6 @@ CURSES_INCLUDE=@curses_INCLUDE@
NCURSES_LIB=@ncurses_LIB@
NCURSES_INCLUDE=@ncurses_INCLUDE@
+
+EDITLINE_LIBS=@EDITLINE_LIBS@
+