aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-12-26 20:12:03 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-12-26 20:12:03 +0100
commit7aa5a93e77fa10f40f4e4721745c764106ae188f (patch)
treea7eb8a268bb2720aacc165b8aed79a5fa71557ab /configure.ac
parent2b03b8c07c1e816af6627547b34711135483c5a2 (diff)
libsctp: Fix build and don't link everything to libsctp
On some systems sctp_* is part of the standard libc, so do not use AC_CHECK_LIB but AC_SEARCH_LIBS to find the symbol we need. Both macros modify LIBS which means all applications will link again libsctp and this is not what we want. Undo the side-effect of LIBS and export LIBSCTP_LIBS which is already used in the Makefile.am.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 42f3f42..cd91a6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,13 +40,15 @@ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.0)
dnl FIXME: We depend on libosmoabis by now until we can move LAPD code here
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.0.7)
PKG_CHECK_MODULES(ORTP, ortp >= 0.15.0)
-AC_CHECK_LIB([sctp], [sctp_send], [
- AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])
- AC_SUBST(HAVE_LIBSCTP, [1])
- LIBS="-lsctp $LIBS"
- ], [
- AC_MSG_ERROR([libsctp not found])
- ])
+
+old_LIBS=$LIBS
+AC_SEARCH_LIBS([sctp_send], [sctp], [
+ AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])
+ AC_SUBST(HAVE_LIBSCTP, [1])
+ AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib])
+ ], [
+ AC_MSG_ERROR([sctp_send not found in searched libs])])
+LIBS=$old_LIBS
AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))