mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
BuildSystem: Enable Jansson in Solaris 11.
In Solaris, the header <jansson.h> is in /usr/include/jansson. To find Jansson even in such a subdirectory, the tool pkg-config is queried via AST_PKG_CONFIG_CHECK. For those platforms, which do not list Jansson via pkg-config, the previous check remains and is executed thereafter. Because the check for the NetBSD Editline library uses the tool pkg-config conditionally PKG_PROG_PKG_CONFIG must be used. Because that check happens earlier than Jansson, it must be placed in front of that. The script configure does some pre-checks for the script configure of the Asterisk internal NetBSD Editline library. The check for the library ncurses should use not use the header <curses.h> but <ncurses.h>, because on some platforms <curses.h> is not a drop-in replacement for <ncurses.h>: For example in Solaris, the symbol initscr is a typedef in <curses.h> to a symbol which does not exist in the library ncurses (initscr32). Simply use <ncurses.h> when you link to ncurses. ASTERISK-27991 Change-Id: I69ea0f379f87a50049654b2487c76ee1c04fa53a
This commit is contained in:
@@ -592,6 +592,8 @@ AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
|
||||
|
||||
PKG_PROG_PKG_CONFIG()
|
||||
|
||||
# Find required NetBSD Editline library (libedit).
|
||||
EDITLINE_LIB=""
|
||||
LIBEDIT_INTERNAL="yes"
|
||||
@@ -634,7 +636,7 @@ if test "${LIBEDIT_INTERNAL}" = "yes"; then
|
||||
if test "x$CURSES_LIB" != "x" ; then
|
||||
EDITLINE_LIB="$CURSES_LIB"
|
||||
else
|
||||
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
|
||||
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [ncurses.h])
|
||||
if test "x$NCURSES_LIB" != "x" ; then
|
||||
EDITLINE_LIB="$NCURSES_LIB"
|
||||
else
|
||||
@@ -674,6 +676,7 @@ AC_SUBST(UUID_LIB)
|
||||
|
||||
# Find required JSON support if bundled is not enabled.
|
||||
if test "$JANSSON_BUNDLED" = "no" ; then
|
||||
AST_PKG_CONFIG_CHECK([JANSSON], [jansson])
|
||||
AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])
|
||||
|
||||
if test "${PBX_JANSSON}" != 1; then
|
||||
@@ -1495,9 +1498,6 @@ if test "${PBX_DLADDR}" = "0"; then
|
||||
)
|
||||
fi
|
||||
|
||||
# PKGCONFIG is used in later tests
|
||||
PKG_PROG_PKG_CONFIG()
|
||||
|
||||
|
||||
# do the package library checks now
|
||||
|
||||
|
||||
Reference in New Issue
Block a user