123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 |
- # @configure_input@
- # Define the desired video device backend
- # Valid values are:
- # - darwin_os
- # - android_os
- AC_PJMEDIA_VIDEO = @ac_pjmedia_video@
- # SDL flags
- SDL_CFLAGS = @ac_sdl_cflags@
- SDL_LDFLAGS = @ac_sdl_ldflags@
- # FFMPEG dlags
- FFMPEG_CFLAGS = @ac_ffmpeg_cflags@
- FFMPEG_LDFLAGS = @ac_ffmpeg_ldflags@
- # Video4Linux2
- V4L2_CFLAGS = @ac_v4l2_cflags@
- V4L2_LDFLAGS = @ac_v4l2_ldflags@
- # Directshow
- DSHOW_CFLAGS = @ac_dshow_cflags@
- DSHOW_LDFLAGS = @ac_dshow_ldflags@
- # QT
- AC_PJMEDIA_VIDEO_HAS_QT = @ac_pjmedia_video_has_qt@
- # QT_CFLAGS = @ac_qt_cflags@
- # Darwin (Mac and iOS)
- DARWIN_CFLAGS = @ac_darwin_cflags@
- # Android
- ANDROID_CFLAGS = @ac_android_cflags@
- OBOE_CFLAGS = @ac_oboe_cflags@
- OBOE_LDFLAGS = @ac_oboe_ldflags@
- # openh264
- OPENH264_CFLAGS = @ac_openh264_cflags@
- OPENH264_LDFLAGS = @ac_openh264_ldflags@
- # vpx
- VPX_CFLAGS = @ac_vpx_cflags@
- VPX_LDFLAGS = @ac_vpx_ldflags@
- # PJMEDIA features exclusion
- export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@ \
- $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(DSHOW_CFLAGS) $(QT_CFLAGS) \
- $(DARWIN_CFLAGS) $(ANDROID_CFLAGS) \
- $(OPENH264_CFLAGS) $(VPX_CFLAGS) $(OBOE_CFLAGS)
- export LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) $(DSHOW_LDFLAGS) \
- $(OPENH264_LDFLAGS) $(VPX_LDFLAGS) $(OBOE_LDFLAGS)
- # Define the desired sound device backend
- # Valid values are:
- # - win32: Win32 MME (wmme_dev.c)
- # - coreaudio: MaxOSX CoreAudio (coreaudio_dev.m)
- # - alsa: Unix ALSA (alsa_dev.c)
- # - null: Null sound device (nullsound.c)
- # - external: Link with no sounddev (app will provide)
- AC_PJMEDIA_SND=@ac_pjmedia_snd@
- #
- # Codecs
- #
- AC_NO_G711_CODEC=@ac_no_g711_codec@
- AC_NO_L16_CODEC=@ac_no_l16_codec@
- AC_NO_GSM_CODEC=@ac_no_gsm_codec@
- AC_NO_SPEEX_CODEC=@ac_no_speex_codec@
- AC_NO_ILBC_CODEC=@ac_no_ilbc_codec@
- AC_NO_G722_CODEC=@ac_no_g722_codec@
- AC_NO_G7221_CODEC=@ac_no_g7221_codec@
- AC_NO_OPENCORE_AMRNB=@ac_no_opencore_amrnb@
- AC_NO_OPENCORE_AMRWB=@ac_no_opencore_amrwb@
- AC_NO_BCG729=@ac_no_bcg729@
- AC_NO_ANDROID_MEDIACODEC=@ac_no_mediacodec@
- AC_NO_LYRA_CODEC=@ac_no_lyra_codec@
- export CODEC_OBJS=
- export PJMEDIA_AUDIODEV_OBJS += @ac_pjmedia_audiodev_objs@
- ifeq ($(AC_NO_G711_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
- else
- export CODEC_OBJS +=
- endif
- ifeq ($(AC_NO_L16_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
- else
- export CODEC_OBJS += l16.o
- endif
- ifeq ($(AC_NO_GSM_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
- else
- export CODEC_OBJS += gsm.o
- endif
- ifeq ($(AC_NO_SPEEX_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
- else
- export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
- export CODEC_OBJS += speex_codec.o
- ifeq (@ac_no_speex_aec@,)
- export PJMEDIA_OBJS += echo_speex.o
- endif
- endif
- ifeq ($(AC_NO_ILBC_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
- else
- export CODEC_OBJS += ilbc.o
- endif
- ifeq ($(AC_NO_G722_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_G722_CODEC=0
- else
- export CODEC_OBJS += g722.o g722/g722_enc.o g722/g722_dec.o
- endif
- ifeq ($(AC_NO_G7221_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_G7221_CODEC=0
- else
- export CODEC_OBJS += g7221.o
- export G7221_CFLAGS += -I$(THIRD_PARTY)
- endif
- ifeq ($(AC_NO_OPENCORE_AMRNB),1)
- export CFLAGS += -DPJMEDIA_HAS_OPENCORE_AMRNB_CODEC=0
- else
- export CODEC_OBJS += opencore_amr.o
- endif
- ifeq ($(AC_NO_OPENCORE_AMRWB),1)
- export CFLAGS += -DPJMEDIA_HAS_OPENCORE_AMRWB_CODEC=0
- else
- ifeq ($(AC_NO_OPENCORE_AMRNB),1)
- export CODEC_OBJS += opencore_amr.o
- endif
- endif
- ifeq ($(AC_NO_BCG729),)
- export CODEC_OBJS += bcg729.o
- endif
- ifeq ($(AC_NO_ANDROID_MEDIACODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_ANDROID_MEDIACODEC=0
- else
- export CODEC_OBJS += and_aud_mediacodec.o and_vid_mediacodec.o
- endif
- ifeq ($(AC_NO_LYRA_CODEC),1)
- export CFLAGS += -DPJMEDIA_HAS_LYRA_CODEC=0
- else
- export CODEC_OBJS += lyra.o
- export CFLAGS += -DPJMEDIA_CODEC_LYRA_DEFAULT_MODEL_PATH='"@ac_lyra_model_path@"'
- endif
- #
- # SRTP
- #
- ifneq (@ac_external_srtp@,0)
- # External SRTP
- export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=@ac_external_srtp@
- # SRTP srtp_deinit()/srtp_shutdown() API availability settings
- export CFLAGS += -DPJMEDIA_SRTP_HAS_DEINIT=@ac_srtp_deinit_present@ \
- -DPJMEDIA_SRTP_HAS_SHUTDOWN=@ac_srtp_shutdown_present@
- else
- # Our SRTP in third_party
- export CFLAGS += -I$(THIRD_PARTY)/build/srtp \
- -I$(THIRD_PARTY)/srtp/crypto/include \
- -I$(THIRD_PARTY)/srtp/include
- endif
- #
- # Resample
- #
- AC_PJMEDIA_RESAMPLE=@ac_pjmedia_resample@
- ifeq ($(AC_PJMEDIA_RESAMPLE),none)
- # No resample support
- export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE
- endif
- ifeq ($(AC_PJMEDIA_RESAMPLE),libresample)
- export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE
- endif
- ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate)
- export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE
- endif
- ifeq ($(AC_PJMEDIA_RESAMPLE),speex)
- export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX
- endif
- #
- # PortAudio
- #
- ifeq (@ac_external_pa@,1)
- # External PA
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=1 \
- -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
- endif
- #
- # libyuv
- #
- ifeq (@ac_no_yuv@,1)
- export CFLAGS += -DPJMEDIA_HAS_LIBYUV=0
- else
- export CFLAGS += -DPJMEDIA_HAS_LIBYUV=1
- ifeq (@ac_external_yuv@,0)
- export CFLAGS += -I$(THIRD_PARTY)/yuv/include
- endif
- endif
- #
- # libwebrtc
- #
- ifeq (@ac_no_webrtc@,1)
- export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC=0
- else
- export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC=1
- ifneq ($(findstring arm,$(@ac_webrtc_instset@)),)
- export CFLAGS += -DPJMEDIA_WEBRTC_AEC_USE_MOBILE=1
- endif
- ifeq (@ac_external_webrtc@,0)
- export CFLAGS += -I$(THIRD_PARTY)/webrtc/src
- endif
- endif
- #
- # libwebrtc-aec3
- #
- ifeq (@ac_no_webrtc_aec3@,1)
- export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC3=0
- else
- export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC3=1 @ac_webrtc_aec3_cflags@
- ifeq (@ac_external_webrtc@,0)
- export CFLAGS += -I$(THIRD_PARTY)/webrtc_aec3/src
- endif
- endif
- #
- # MacOSX specific
- #
- ifneq ($(findstring coreaudio,$(AC_PJMEDIA_SND)),)
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_COREAUDIO=1 \
- -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
- -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
- endif
- #
- # Unix specific
- #
- ifneq ($(findstring alsa,$(AC_PJMEDIA_SND)),)
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_ALSA=1 \
- -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
- -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
- endif
- #
- # Windows specific
- #
- ifneq ($(findstring win32,$(AC_PJMEDIA_SND)),)
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=1 \
- -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0
- else
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
- endif
- #
- # Null sound device
- #
- ifeq ($(AC_PJMEDIA_SND),null)
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
- -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
- endif
- #
- # External sound device
- #
- ifeq ($(AC_PJMEDIA_SND),external)
- export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
- -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
- endif
- #
- # QT video device
- #
- ifeq ($(AC_PJMEDIA_VIDEO_HAS_QT),yes)
- export PJMEDIA_VIDEODEV_OBJS += qt_dev.o
- endif
- #
- # Darwin video device
- #
- ifeq ($(AC_PJMEDIA_VIDEO_HAS_DARWIN),yes)
- export PJMEDIA_VIDEODEV_OBJS += darwin_dev.o
- endif
- #
- # Metal video device
- #
- ifeq ($(AC_PJMEDIA_VIDEO_HAS_METAL),yes)
- export PJMEDIA_VIDEODEV_OBJS += metal_dev.o
- endif
- #
- # VideoToolbox codec
- #
- ifeq ($(AC_PJMEDIA_VIDEO_HAS_VTOOLBOX),yes)
- export CODEC_OBJS += vid_toolbox.o
- endif
- #
- # iOS OpenGL video device
- #
- ifeq ($(AC_PJMEDIA_VIDEO_HAS_IOS_OPENGL),yes)
- export PJMEDIA_VIDEODEV_OBJS += ios_opengl_dev.o
- endif
- #
- # Directshow video device
- #
- ifeq ($(AC_PJMEDIA_VIDEO_DEV_HAS_DSHOW),yes)
- export PJMEDIA_VIDEODEV_OBJS += dshow_dev.o dshowclasses.o
- export CFLAGS += -I$(THIRD_PARTY)/BaseClasses
- endif
- #
- # Android video device
- #
- ifeq ($(AC_PJMEDIA_VIDEO),android_os)
- export PJMEDIA_VIDEODEV_OBJS += android_dev.o android_opengl.o
- endif
- #
- # Determine whether we should compile the obj-c version of a particular
- # source code
- #
- ifneq (,$(filter $(AC_PJMEDIA_VIDEO),darwin_os))
- # Mac and iPhone OS specific, use obj-c
- export PJMEDIA_VIDEODEV_OBJS += sdl_dev_m.o
- else
- # Other platforms, compile .c
- export PJMEDIA_VIDEODEV_OBJS += sdl_dev.o
- endif
|