os-auto.mak.in 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. # @configure_input@
  2. # Define the desired video device backend
  3. # Valid values are:
  4. # - darwin_os
  5. # - android_os
  6. AC_PJMEDIA_VIDEO = @ac_pjmedia_video@
  7. # SDL flags
  8. SDL_CFLAGS = @ac_sdl_cflags@
  9. SDL_LDFLAGS = @ac_sdl_ldflags@
  10. # FFMPEG dlags
  11. FFMPEG_CFLAGS = @ac_ffmpeg_cflags@
  12. FFMPEG_LDFLAGS = @ac_ffmpeg_ldflags@
  13. # Video4Linux2
  14. V4L2_CFLAGS = @ac_v4l2_cflags@
  15. V4L2_LDFLAGS = @ac_v4l2_ldflags@
  16. # Directshow
  17. DSHOW_CFLAGS = @ac_dshow_cflags@
  18. DSHOW_LDFLAGS = @ac_dshow_ldflags@
  19. # QT
  20. AC_PJMEDIA_VIDEO_HAS_QT = @ac_pjmedia_video_has_qt@
  21. # QT_CFLAGS = @ac_qt_cflags@
  22. # Darwin (Mac and iOS)
  23. DARWIN_CFLAGS = @ac_darwin_cflags@
  24. # Android
  25. ANDROID_CFLAGS = @ac_android_cflags@
  26. OBOE_CFLAGS = @ac_oboe_cflags@
  27. OBOE_LDFLAGS = @ac_oboe_ldflags@
  28. # openh264
  29. OPENH264_CFLAGS = @ac_openh264_cflags@
  30. OPENH264_LDFLAGS = @ac_openh264_ldflags@
  31. # vpx
  32. VPX_CFLAGS = @ac_vpx_cflags@
  33. VPX_LDFLAGS = @ac_vpx_ldflags@
  34. # PJMEDIA features exclusion
  35. export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@ \
  36. $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(DSHOW_CFLAGS) $(QT_CFLAGS) \
  37. $(DARWIN_CFLAGS) $(ANDROID_CFLAGS) \
  38. $(OPENH264_CFLAGS) $(VPX_CFLAGS) $(OBOE_CFLAGS)
  39. export LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) $(DSHOW_LDFLAGS) \
  40. $(OPENH264_LDFLAGS) $(VPX_LDFLAGS) $(OBOE_LDFLAGS)
  41. # Define the desired sound device backend
  42. # Valid values are:
  43. # - win32: Win32 MME (wmme_dev.c)
  44. # - coreaudio: MaxOSX CoreAudio (coreaudio_dev.m)
  45. # - alsa: Unix ALSA (alsa_dev.c)
  46. # - null: Null sound device (nullsound.c)
  47. # - external: Link with no sounddev (app will provide)
  48. AC_PJMEDIA_SND=@ac_pjmedia_snd@
  49. #
  50. # Codecs
  51. #
  52. AC_NO_G711_CODEC=@ac_no_g711_codec@
  53. AC_NO_L16_CODEC=@ac_no_l16_codec@
  54. AC_NO_GSM_CODEC=@ac_no_gsm_codec@
  55. AC_NO_SPEEX_CODEC=@ac_no_speex_codec@
  56. AC_NO_ILBC_CODEC=@ac_no_ilbc_codec@
  57. AC_NO_G722_CODEC=@ac_no_g722_codec@
  58. AC_NO_G7221_CODEC=@ac_no_g7221_codec@
  59. AC_NO_OPENCORE_AMRNB=@ac_no_opencore_amrnb@
  60. AC_NO_OPENCORE_AMRWB=@ac_no_opencore_amrwb@
  61. AC_NO_BCG729=@ac_no_bcg729@
  62. AC_NO_ANDROID_MEDIACODEC=@ac_no_mediacodec@
  63. AC_NO_LYRA_CODEC=@ac_no_lyra_codec@
  64. export CODEC_OBJS=
  65. export PJMEDIA_AUDIODEV_OBJS += @ac_pjmedia_audiodev_objs@
  66. ifeq ($(AC_NO_G711_CODEC),1)
  67. export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
  68. else
  69. export CODEC_OBJS +=
  70. endif
  71. ifeq ($(AC_NO_L16_CODEC),1)
  72. export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
  73. else
  74. export CODEC_OBJS += l16.o
  75. endif
  76. ifeq ($(AC_NO_GSM_CODEC),1)
  77. export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
  78. else
  79. export CODEC_OBJS += gsm.o
  80. endif
  81. ifeq ($(AC_NO_SPEEX_CODEC),1)
  82. export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
  83. else
  84. export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
  85. export CODEC_OBJS += speex_codec.o
  86. ifeq (@ac_no_speex_aec@,)
  87. export PJMEDIA_OBJS += echo_speex.o
  88. endif
  89. endif
  90. ifeq ($(AC_NO_ILBC_CODEC),1)
  91. export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
  92. else
  93. export CODEC_OBJS += ilbc.o
  94. endif
  95. ifeq ($(AC_NO_G722_CODEC),1)
  96. export CFLAGS += -DPJMEDIA_HAS_G722_CODEC=0
  97. else
  98. export CODEC_OBJS += g722.o g722/g722_enc.o g722/g722_dec.o
  99. endif
  100. ifeq ($(AC_NO_G7221_CODEC),1)
  101. export CFLAGS += -DPJMEDIA_HAS_G7221_CODEC=0
  102. else
  103. export CODEC_OBJS += g7221.o
  104. export G7221_CFLAGS += -I$(THIRD_PARTY)
  105. endif
  106. ifeq ($(AC_NO_OPENCORE_AMRNB),1)
  107. export CFLAGS += -DPJMEDIA_HAS_OPENCORE_AMRNB_CODEC=0
  108. else
  109. export CODEC_OBJS += opencore_amr.o
  110. endif
  111. ifeq ($(AC_NO_OPENCORE_AMRWB),1)
  112. export CFLAGS += -DPJMEDIA_HAS_OPENCORE_AMRWB_CODEC=0
  113. else
  114. ifeq ($(AC_NO_OPENCORE_AMRNB),1)
  115. export CODEC_OBJS += opencore_amr.o
  116. endif
  117. endif
  118. ifeq ($(AC_NO_BCG729),)
  119. export CODEC_OBJS += bcg729.o
  120. endif
  121. ifeq ($(AC_NO_ANDROID_MEDIACODEC),1)
  122. export CFLAGS += -DPJMEDIA_HAS_ANDROID_MEDIACODEC=0
  123. else
  124. export CODEC_OBJS += and_aud_mediacodec.o and_vid_mediacodec.o
  125. endif
  126. ifeq ($(AC_NO_LYRA_CODEC),1)
  127. export CFLAGS += -DPJMEDIA_HAS_LYRA_CODEC=0
  128. else
  129. export CODEC_OBJS += lyra.o
  130. export CFLAGS += -DPJMEDIA_CODEC_LYRA_DEFAULT_MODEL_PATH='"@ac_lyra_model_path@"'
  131. endif
  132. #
  133. # SRTP
  134. #
  135. ifneq (@ac_external_srtp@,0)
  136. # External SRTP
  137. export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=@ac_external_srtp@
  138. # SRTP srtp_deinit()/srtp_shutdown() API availability settings
  139. export CFLAGS += -DPJMEDIA_SRTP_HAS_DEINIT=@ac_srtp_deinit_present@ \
  140. -DPJMEDIA_SRTP_HAS_SHUTDOWN=@ac_srtp_shutdown_present@
  141. else
  142. # Our SRTP in third_party
  143. export CFLAGS += -I$(THIRD_PARTY)/build/srtp \
  144. -I$(THIRD_PARTY)/srtp/crypto/include \
  145. -I$(THIRD_PARTY)/srtp/include
  146. endif
  147. #
  148. # Resample
  149. #
  150. AC_PJMEDIA_RESAMPLE=@ac_pjmedia_resample@
  151. ifeq ($(AC_PJMEDIA_RESAMPLE),none)
  152. # No resample support
  153. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE
  154. endif
  155. ifeq ($(AC_PJMEDIA_RESAMPLE),libresample)
  156. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE
  157. endif
  158. ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate)
  159. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE
  160. endif
  161. ifeq ($(AC_PJMEDIA_RESAMPLE),speex)
  162. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX
  163. endif
  164. #
  165. # PortAudio
  166. #
  167. ifeq (@ac_external_pa@,1)
  168. # External PA
  169. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=1 \
  170. -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
  171. endif
  172. #
  173. # libyuv
  174. #
  175. ifeq (@ac_no_yuv@,1)
  176. export CFLAGS += -DPJMEDIA_HAS_LIBYUV=0
  177. else
  178. export CFLAGS += -DPJMEDIA_HAS_LIBYUV=1
  179. ifeq (@ac_external_yuv@,0)
  180. export CFLAGS += -I$(THIRD_PARTY)/yuv/include
  181. endif
  182. endif
  183. #
  184. # libwebrtc
  185. #
  186. ifeq (@ac_no_webrtc@,1)
  187. export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC=0
  188. else
  189. export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC=1
  190. ifneq ($(findstring arm,$(@ac_webrtc_instset@)),)
  191. export CFLAGS += -DPJMEDIA_WEBRTC_AEC_USE_MOBILE=1
  192. endif
  193. ifeq (@ac_external_webrtc@,0)
  194. export CFLAGS += -I$(THIRD_PARTY)/webrtc/src
  195. endif
  196. endif
  197. #
  198. # libwebrtc-aec3
  199. #
  200. ifeq (@ac_no_webrtc_aec3@,1)
  201. export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC3=0
  202. else
  203. export CFLAGS += -DPJMEDIA_HAS_WEBRTC_AEC3=1 @ac_webrtc_aec3_cflags@
  204. ifeq (@ac_external_webrtc@,0)
  205. export CFLAGS += -I$(THIRD_PARTY)/webrtc_aec3/src
  206. endif
  207. endif
  208. #
  209. # MacOSX specific
  210. #
  211. ifneq ($(findstring coreaudio,$(AC_PJMEDIA_SND)),)
  212. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_COREAUDIO=1 \
  213. -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
  214. -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
  215. endif
  216. #
  217. # Unix specific
  218. #
  219. ifneq ($(findstring alsa,$(AC_PJMEDIA_SND)),)
  220. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_ALSA=1 \
  221. -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
  222. -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
  223. endif
  224. #
  225. # Windows specific
  226. #
  227. ifneq ($(findstring win32,$(AC_PJMEDIA_SND)),)
  228. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=1 \
  229. -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0
  230. else
  231. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
  232. endif
  233. #
  234. # Null sound device
  235. #
  236. ifeq ($(AC_PJMEDIA_SND),null)
  237. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
  238. -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
  239. endif
  240. #
  241. # External sound device
  242. #
  243. ifeq ($(AC_PJMEDIA_SND),external)
  244. export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
  245. -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
  246. endif
  247. #
  248. # QT video device
  249. #
  250. ifeq ($(AC_PJMEDIA_VIDEO_HAS_QT),yes)
  251. export PJMEDIA_VIDEODEV_OBJS += qt_dev.o
  252. endif
  253. #
  254. # Darwin video device
  255. #
  256. ifeq ($(AC_PJMEDIA_VIDEO_HAS_DARWIN),yes)
  257. export PJMEDIA_VIDEODEV_OBJS += darwin_dev.o
  258. endif
  259. #
  260. # Metal video device
  261. #
  262. ifeq ($(AC_PJMEDIA_VIDEO_HAS_METAL),yes)
  263. export PJMEDIA_VIDEODEV_OBJS += metal_dev.o
  264. endif
  265. #
  266. # VideoToolbox codec
  267. #
  268. ifeq ($(AC_PJMEDIA_VIDEO_HAS_VTOOLBOX),yes)
  269. export CODEC_OBJS += vid_toolbox.o
  270. endif
  271. #
  272. # iOS OpenGL video device
  273. #
  274. ifeq ($(AC_PJMEDIA_VIDEO_HAS_IOS_OPENGL),yes)
  275. export PJMEDIA_VIDEODEV_OBJS += ios_opengl_dev.o
  276. endif
  277. #
  278. # Directshow video device
  279. #
  280. ifeq ($(AC_PJMEDIA_VIDEO_DEV_HAS_DSHOW),yes)
  281. export PJMEDIA_VIDEODEV_OBJS += dshow_dev.o dshowclasses.o
  282. export CFLAGS += -I$(THIRD_PARTY)/BaseClasses
  283. endif
  284. #
  285. # Android video device
  286. #
  287. ifeq ($(AC_PJMEDIA_VIDEO),android_os)
  288. export PJMEDIA_VIDEODEV_OBJS += android_dev.o android_opengl.o
  289. endif
  290. #
  291. # Determine whether we should compile the obj-c version of a particular
  292. # source code
  293. #
  294. ifneq (,$(filter $(AC_PJMEDIA_VIDEO),darwin_os))
  295. # Mac and iPhone OS specific, use obj-c
  296. export PJMEDIA_VIDEODEV_OBJS += sdl_dev_m.o
  297. else
  298. # Other platforms, compile .c
  299. export PJMEDIA_VIDEODEV_OBJS += sdl_dev.o
  300. endif