mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Merge "Detect and use proper libraries for musl toolchains"
This commit is contained in:
19
configure
vendored
19
configure
vendored
@@ -4866,6 +4866,9 @@ case "${host_os}" in
|
||||
linux-gnueabi* | linux-gnuspe)
|
||||
OSARCH=linux-gnu
|
||||
;;
|
||||
linux-musl*)
|
||||
OSARCH=linux-musl
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
OSARCH=kfreebsd-gnu
|
||||
;;
|
||||
@@ -13772,7 +13775,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -13818,7 +13821,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -13842,7 +13845,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -13887,7 +13890,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -13911,7 +13914,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -19328,7 +19331,8 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
if test "x${OSARCH}" = "xlinux-gnu" ; then
|
||||
case "${OSARCH}" in
|
||||
linux*)
|
||||
|
||||
if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then
|
||||
pbxlibdir=""
|
||||
@@ -19433,7 +19437,8 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if test "x${PBX_DAHDI}" != "x1"; then
|
||||
|
@@ -181,6 +181,9 @@ case "${host_os}" in
|
||||
linux-gnueabi* | linux-gnuspe)
|
||||
OSARCH=linux-gnu
|
||||
;;
|
||||
linux-musl*)
|
||||
OSARCH=linux-musl
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
OSARCH=kfreebsd-gnu
|
||||
;;
|
||||
@@ -1388,9 +1391,11 @@ if test "${PBX_BFD}" = "0"; then
|
||||
AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty -lz])
|
||||
fi
|
||||
|
||||
if test "x${OSARCH}" = "xlinux-gnu" ; then
|
||||
case "${OSARCH}" in
|
||||
linux*)
|
||||
AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230])
|
||||
AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220])
|
||||
|
@@ -46,7 +46,7 @@ AST_LIBS+=$(CRYPT_LIB)
|
||||
AST_LIBS+=$(AST_CLANG_BLOCKS_LIBS)
|
||||
AST_LIBS+=$(RT_LIB)
|
||||
|
||||
ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),)
|
||||
ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-musl kfreebsd-gnu),)
|
||||
ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
|
||||
AST_LIBS+=-ldl
|
||||
endif
|
||||
|
Reference in New Issue
Block a user