mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@25611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
8
Makefile
8
Makefile
@@ -365,9 +365,9 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),Linux)
|
ifeq ($(OSARCH),Linux)
|
||||||
LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
|
LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv #-lnjamd
|
||||||
else
|
else
|
||||||
LIBS+=-lncurses -lm
|
LIBS+=$(EDITLINE_LIBS) -lm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),Darwin)
|
ifeq ($(OSARCH),Darwin)
|
||||||
@@ -395,11 +395,11 @@ ifeq ($(OSARCH),FreeBSD)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),NetBSD)
|
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
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),OpenBSD)
|
ifeq ($(OSARCH),OpenBSD)
|
||||||
LIBS+=-lcrypto -lpthread -lm -lncurses
|
LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),SunOS)
|
ifeq ($(OSARCH),SunOS)
|
||||||
|
19
configure.ac
19
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([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
|
||||||
AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
|
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([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([vorbis], [vorbis_info_init], [vorbis/codec.h], [VORBIS], [Vorbis], [-lm -lvorbisenc])
|
||||||
AST_EXT_LIB([z], [compress], [zlib.h], [ZLIB], [zlib])
|
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
|
PBX_LIBossaudio=0
|
||||||
AC_CHECK_HEADER([linux/soundcard.h],
|
AC_CHECK_HEADER([linux/soundcard.h],
|
||||||
[
|
[
|
||||||
@@ -696,7 +713,7 @@ echo
|
|||||||
|
|
||||||
echo "Package configured for: "
|
echo "Package configured for: "
|
||||||
echo " OS type : $PBX_OSTYPE"
|
echo " OS type : $PBX_OSTYPE"
|
||||||
echo " host cpu : $host_cpu"
|
echo " Host CPU : $host_cpu"
|
||||||
if test "x${crossCompile}" = xYes; then
|
if test "x${crossCompile}" = xYes; then
|
||||||
echo ""
|
echo ""
|
||||||
echo " Cross Compilation = YES"
|
echo " Cross Compilation = YES"
|
||||||
|
@@ -101,3 +101,6 @@ CURSES_INCLUDE=@curses_INCLUDE@
|
|||||||
|
|
||||||
NCURSES_LIB=@ncurses_LIB@
|
NCURSES_LIB=@ncurses_LIB@
|
||||||
NCURSES_INCLUDE=@ncurses_INCLUDE@
|
NCURSES_INCLUDE=@ncurses_INCLUDE@
|
||||||
|
|
||||||
|
EDITLINE_LIBS=@EDITLINE_LIBS@
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user