TT#14008 make bcg729 inclusion conditional on dpkg profile

closes #1174

Change-Id: I277986ea30b25633c281291aa956fb2159c386ed
pull/1194/head
Richard Fuchs 4 years ago
parent 4366f6fa22
commit d47f4ac427

@ -3,53 +3,6 @@ TARGET= rtpengine
with_iptables_option ?= yes
with_transcoding ?= yes
# look for bcg729
# system pkg-config
ifeq ($(shell pkg-config --exists libbcg729 && echo yes),yes)
have_bcg729 := yes
bcg729_inc := $(shell pkg-config --cflags libbcg729)
bcg729_lib := $(shell pkg-config --libs libbcg729)
else
# system generic
ifneq (,$(wildcard /usr/include/bcg729/decoder.h))
have_bcg729 := yes
else
# /usr/src
ifneq (,$(wildcard /usr/src/bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I/usr/src/bcg729/include/
bcg729_lib := -L/usr/src/bcg729/src/ -lbcg729
else
# rfuchs dev
ifneq (,$(wildcard $(HOME)/src/bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I$(HOME)/src/bcg729/include/
bcg729_lib := -L$(HOME)/src/bcg729/src/ -lbcg729
else
# home directory
ifneq (,$(wildcard $(HOME)/bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I$(HOME)/bcg729/include/
bcg729_lib := -L$(HOME)/bcg729/src/ -lbcg729
else
# included toplevel
ifneq (,$(wildcard ../bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I../bcg729/include/
bcg729_lib := -L../bcg729/src/ -lbcg729
else
# /usr/local/include when installing from git
ifneq (,$(wildcard /usr/local/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I/usr/local/include/
bcg729_lib := -L/usr/local/lib64/ -lbcg729
endif
endif
endif
endif
endif
endif
endif
CFLAGS+= -g -Wall -Wstrict-prototypes -pthread -fno-strict-aliasing
CFLAGS+= -std=c99
@ -78,10 +31,6 @@ CFLAGS+= $(shell pkg-config --cflags libswresample)
CFLAGS+= $(shell pkg-config --cflags libavfilter)
CFLAGS+= $(shell pkg-config --cflags spandsp)
CFLAGS+= -DWITH_TRANSCODING
ifeq ($(have_bcg729),yes)
CFLAGS+= -DHAVE_BCG729
CFLAGS+= $(bcg729_inc)
endif
CFLAGS+= $(shell mysql_config --cflags)
else
CFLAGS+= -DWITHOUT_CODECLIB
@ -119,12 +68,13 @@ LDLIBS+= $(shell pkg-config --libs libavutil)
LDLIBS+= $(shell pkg-config --libs libswresample)
LDLIBS+= $(shell pkg-config --libs libavfilter)
LDLIBS+= $(shell pkg-config --libs spandsp)
ifeq ($(have_bcg729),yes)
LDLIBS+= $(bcg729_lib)
endif
LDLIBS+= $(shell mysql_config --libs)
endif
ifeq ($(with_transcoding),yes)
include ../lib/g729.Makefile
endif
SRCS= main.c kernel.c poller.c aux.c control_tcp.c call.c control_udp.c redis.c \
bencode.c cookie_cache.c udp_listener.c control_ng.strhash.c sdp.strhash.c stun.c rtcp.c \
crypto.c rtp.c call_interfaces.strhash.c dtls.c log.c cli.c graphite.c ice.c \

@ -0,0 +1,57 @@
ifeq (,$(filter pkg.ngcp-rtpengine.nobcg729,${DEB_BUILD_PROFILES}))
# look for bcg729
# system pkg-config
ifeq ($(shell pkg-config --exists libbcg729 && echo yes),yes)
have_bcg729 := yes
bcg729_inc := $(shell pkg-config --cflags libbcg729)
bcg729_lib := $(shell pkg-config --libs libbcg729)
else
# system generic
ifneq (,$(wildcard /usr/include/bcg729/decoder.h))
have_bcg729 := yes
else
# /usr/src
ifneq (,$(wildcard /usr/src/bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I/usr/src/bcg729/include/
bcg729_lib := -L/usr/src/bcg729/src/ -lbcg729
else
# rfuchs dev
ifneq (,$(wildcard $(HOME)/src/bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I$(HOME)/src/bcg729/include/
bcg729_lib := -L$(HOME)/src/bcg729/src/ -lbcg729
else
# home directory
ifneq (,$(wildcard $(HOME)/bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I$(HOME)/bcg729/include/
bcg729_lib := -L$(HOME)/bcg729/src/ -lbcg729
else
# included toplevel
ifneq (,$(wildcard ../bcg729/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I../bcg729/include/
bcg729_lib := -L../bcg729/src/ -lbcg729
else
# /usr/local/include when installing from git
ifneq (,$(wildcard /usr/local/include/bcg729/decoder.h))
have_bcg729 := yes
bcg729_inc := -I/usr/local/include/
bcg729_lib := -L/usr/local/lib64/ -lbcg729
endif
endif
endif
endif
endif
endif
endif
endif
ifeq ($(have_bcg729),yes)
CFLAGS+= -DHAVE_BCG729
CFLAGS+= $(bcg729_inc)
endif
ifeq ($(have_bcg729),yes)
LDLIBS+= $(bcg729_lib)
endif

@ -24,6 +24,8 @@ LDLIBS+= $(shell pkg-config --libs libavfilter)
LDLIBS+= $(shell mysql_config --libs)
LDLIBS+= $(shell pkg-config --libs openssl)
include ../lib/g729.Makefile
SRCS= epoll.c garbage.c inotify.c main.c metafile.c stream.c recaux.c packet.c \
decoder.c output.c mix.c db.c log.c forward.c tag.c poller.c
LIBSRCS= loglib.c auxlib.c rtplib.c codeclib.c resample.c str.c socket.c streambuf.c ssllib.c \

Loading…
Cancel
Save