[Asterisk-code-review] Detect and use proper libraries for musl toolchains (asterisk[master])

Timo Teräs asteriskteam at digium.com
Fri Jun 3 01:17:47 CDT 2016


Timo Teräs has uploaded a new change for review.

  https://gerrit.asterisk.org/2938

Change subject: Detect and use proper libraries for musl toolchains
......................................................................

Detect and use proper libraries for musl toolchains

Change-Id: I8d9b212f70813404b82918a3f99439e500d4bfcb
---
M configure.ac
M main/Makefile
2 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/2938/1

diff --git a/configure.ac b/configure.ac
index 5852d3f..3cc8588 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,6 +181,9 @@
      linux-gnueabi* |  linux-gnuspe)
      OSARCH=linux-gnu
      ;;
+     linux-musl*)
+     OSARCH=linux-musl
+     ;;
      kfreebsd*-gnu)
      OSARCH=kfreebsd-gnu
      ;;
@@ -1388,9 +1391,11 @@
   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])
diff --git a/main/Makefile b/main/Makefile
index 3863978..729ae9c 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -46,7 +46,7 @@
 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

-- 
To view, visit https://gerrit.asterisk.org/2938
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d9b212f70813404b82918a3f99439e500d4bfcb
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Timo Teräs <timo.teras at iki.fi>



More information about the asterisk-code-review mailing list