Build the SCTP flags in configure, they may be needed outside the engine.

git-svn-id: http://voip.null.ro/svn/yate@2846 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2009-09-21 11:37:38 +00:00
parent f9e2c83d85
commit 2bd88556e9
2 changed files with 8 additions and 8 deletions

View File

@ -261,6 +261,7 @@ AC_SUBST(FDSIZE_HACK)
HAVE_SCTP=no
HAVE_SCTP_NETINET=no
SCTP_FLAGS=""
AC_ARG_ENABLE(sctp,AC_HELP_STRING([--enable-sctp],[Enable SCTP sockets (default: no)]),want_sctp=$enableval,want_sctp=no)
if [[ "x$want_sctp" = "xyes" ]]; then
AC_LANG_SAVE
@ -279,11 +280,17 @@ AC_MSG_RESULT([$HAVE_SCTP_NETINET])
if [[ "x$HAVE_SCTP_NETINET" != "xno" ]]; then
# including netinet/sctp.h fixes SCTP support so enable it
HAVE_SCTP=yes
SCTP_FLAGS="-DHAVE_SCTP -DHAVE_SCTP_NETINET"
else
if [[ "x$HAVE_SCTP" != "xno" ]]; then
SCTP_FLAGS="-DHAVE_SCTP"
fi
fi
AC_LANG_RESTORE
fi
AC_SUBST(HAVE_SCTP)
AC_SUBST(HAVE_SCTP_NETINET)
AC_SUBST(SCTP_FLAGS)
# Checks for optional libraries.

View File

@ -36,14 +36,7 @@ CLEANS = $(LIBOBJS) core
CCOMPILE = $(CC) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS)
COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CPPFLAGS)
LINK = $(CXX) $(LDFLAGS)
SCTPOPTS:=
ifneq (@HAVE_SCTP@,no)
SCTPOPTS := $(SCTPOPTS) -DHAVE_SCTP
endif
ifneq (@HAVE_SCTP_NETINET@,no)
SCTPOPTS := $(SCTPOPTS) -DHAVE_SCTP_NETINET
endif
ifeq (@INTERNAL_REGEX@,yes)
REGEX_INC:= -I@top_srcdir@/engine/regex
LIBOBJS := $(LIBOBJS) regex.o
@ -95,7 +88,7 @@ DataFormat.o: @srcdir@/DataFormat.cpp $(MKDEPS) $(PINC)
$(COMPILE) -c $<
Socket.o: @srcdir@/Socket.cpp $(MKDEPS) $(CINC)
$(COMPILE) @FDSIZE_HACK@ $(SCTPOPTS) -c $<
$(COMPILE) @FDSIZE_HACK@ @SCTP_FLAGS@ -c $<
Mutex.o: @srcdir@/Mutex.cpp $(MKDEPS) $(CINC)
$(COMPILE) @MUTEX_HACK@ -c $<