From cd283c8825c9a94400f27735acb1c9385e90ffc8 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 19 Jul 2011 03:42:28 +0000 Subject: Re #1326: Initial code integration from branch 2.0-dev to trunk as "2.0-pre-alpha-svn". git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3664 74dad513-b988-da41-8d7b-12977e46ad98 --- aconfigure.ac | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 148 insertions(+), 2 deletions(-) (limited to 'aconfigure.ac') diff --git a/aconfigure.ac b/aconfigure.ac index 7c7db55f..b084304f 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -408,6 +408,9 @@ case $target in *mingw* | *cygw* | *win32* | *w32* ) ac_os_objs="$ac_os_objs file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o" ;; + *darwin*) + ac_os_objs="$ac_os_objs os_core_darwin.o" + ;; *) ac_os_objs="$ac_os_objs file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o" case $target in @@ -577,8 +580,7 @@ else AC_SUBST(ac_pa_use_oss,1) AC_ARG_ENABLE(oss, AC_HELP_STRING([--disable-oss], - [Disable OSS audio (default: not disabled)]) - , + [Disable OSS audio (default: not disabled)]), [ if test "$enable_oss" = "no"; then [ac_pa_use_oss=0] @@ -589,6 +591,37 @@ else esac fi +AC_SUBST(ac_pjmedia_video) +if test "$enable_video" = "no"; then + true; +else + case $target in + arm-apple-darwin*) + ac_pjmedia_video=iphone_os + AC_SUBST(ac_ios_cflags) + ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1" + LIBS="$LIBS -framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + AC_MSG_RESULT([Checking video device backend... AVFoundation]) + ;; + *darwin*) + ac_pjmedia_video=mac_os + AC_SUBST(ac_pjmedia_video_has_qt) + AC_SUBST(ac_qt_cflags) + SAVED_LIBS="$LIBS" + LIBS="-framework QTKit" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_qt=yes],[ac_pjmedia_video_has_qt=no]) + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_qt" = "yes"; then + ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" + LIBS="$LIBS -framework QTKit -framework Foundation -framework AppKit -framework QuartzCore -framework OpenGL" + AC_MSG_RESULT([Checking if QTKit framework is available... yes]) + else + AC_MSG_RESULT([Checking if QTKit framework is available... no]) + fi + ;; + esac +fi + AC_ARG_ENABLE(ext_sound, AC_HELP_STRING([--enable-ext-sound], [PJMEDIA will not provide any sound device backend]), @@ -725,6 +758,119 @@ AC_ARG_ENABLE(libsamplerate, AC_MSG_RESULT([Skipping libsamplerate detection]) ) +dnl # SDL +AC_ARG_ENABLE(sdl, + AC_HELP_STRING([--disable-sdl], + [Disable SDL (default: not disabled)]), + [ + if test "$enable_sdl" = "no"; then + AC_MSG_RESULT([Checking if SDL is disabled... yes]) + fi + ], + [ + AC_MSG_CHECKING([SDL availability..]) + if sdl-config --version; then + AC_SUBST(ac_sdl_cflags) + AC_SUBST(ac_sdl_ldflags) + ac_sdl_cflags=`sdl-config --cflags` + ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags" + ac_sdl_ldflags=`sdl-config --libs` + LIBS="$LIBS $ac_sdl_ldflags" + fi + ]) + + +dnl # FFMPEG stuffs +AC_ARG_ENABLE(ffmpeg, + AC_HELP_STRING([--disable-ffmpeg], + [Disable ffmpeg (default: not disabled)]), + [ + AC_SUBST(ac_has_ffmpeg,0) + if test "$enable_ffmpeg" = "no"; then + AC_MSG_RESULT([Checking if ffmpeg is disabled... yes]) + fi + ], + [ + AC_SUBST(ac_ffmpeg_cflags) + AC_SUBST(ac_ffmpeg_ldflags) + + FFMPEG_PREFIX="" + if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then + FFMPEG_PREFIX=$with_ffmpeg + AC_MSG_RESULT([Using ffmpeg prefix... $FFMPEG_PREFIX]) + LIBS="-L$FFMPEG_PREFIX/lib $LIBS" + LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" + CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" + fi + + AC_CHECK_LIB(avdevice, + avdevice_version, + [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" + ] + ) + AC_CHECK_LIB(avformat, + av_register_all, + [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" + ] + ) + AC_CHECK_LIB(avcodec, + avcodec_init, + [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" + ] + ) + AC_CHECK_LIB(swscale, + sws_scale, + [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" + ] + ) + AC_CHECK_LIB(avutil, + av_malloc, + [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" + ] + ) + AC_CHECK_LIB(avcore, + avcore_version, + [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" + ] + ) + LIBS="$LIBS $ac_ffmpeg_ldflags" + ] + ) + +AC_ARG_WITH(ffmpeg, + AC_HELP_STRING([--with-ffmpeg=DIR], + [Specify alternate FFMPEG prefix]), + [], + [with_ffmpeg=no] + ) + + +dnl # Video for Linux 2 +AC_ARG_ENABLE(v4l2, + AC_HELP_STRING([--disable-v4l2], + [Disable Video4Linux2 (default: not disabled)]), + [ + if test "$enable_v4l2" = "no"; then + AC_MSG_RESULT([Checking if V4L2 is disabled... yes]) + fi + ], + [ + AC_SUBST(ac_v4l2_cflags) + AC_SUBST(ac_v4l2_ldflags) + AC_CHECK_LIB(v4l2, + v4l2_open, + [ac_v4l2_cflags="-DPJMEDIA_VIDEO_DEV_HAS_V4L2=1" + ac_v4l2_ldflags="-lv4l2" + LIBS="$LIBS -lv4l2" + ] + ) + ]) dnl ######################################################## dnl # Intel IPP support -- cgit v1.2.3