From 3e3903c9161cb6ae706534f526d285a95079de0e Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 17 May 2012 11:23:41 +0000 Subject: Close #1500: - Added configure options to disable video. - Fixed exporting env var PKG_CONFIG_PATH for pkg_config(.py) script (didn't work on MacOS). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4131 74dad513-b988-da41-8d7b-12977e46ad98 --- aconfigure.ac | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'aconfigure.ac') diff --git a/aconfigure.ac b/aconfigure.ac index 235baf4d..1de41faa 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -612,6 +612,29 @@ else fi AC_SUBST(ac_pjmedia_video) + +dnl # --disable-video option +AC_ARG_ENABLE(video, + AC_HELP_STRING([--disable-video], + [Disable video feature]), + [if test "$enable_video" = "no"; then + #AC_DEFINE(PJMEDIA_HAS_VIDEO,0) + AC_MSG_RESULT([Video is disabled]) + enable_sdl="no" + enable_ffmpeg="no" + enable_v4l2="no" + fi], + []) + +case $target in + arm-apple-darwin*) + LIBS="$LIBS -framework UIKit" + ;; + *darwin*) + LIBS="$LIBS -framework Foundation -framework AppKit" + ;; +esac + if test "$enable_video" = "no"; then true; else @@ -621,12 +644,12 @@ else AC_SUBST(ac_pjmedia_video_has_ios) AC_SUBST(ac_ios_cflags) SAVED_LIBS="$LIBS" - LIBS="-framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_ios=yes],[ac_pjmedia_video_has_ios=no]) LIBS="$SAVED_LIBS" if test "$ac_pjmedia_video_has_ios" = "yes"; then ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1" - LIBS="$LIBS -framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" AC_MSG_RESULT([Checking if AVFoundation framework is available... yes]) else AC_MSG_RESULT([Checking if AVFoundation framework is available... no]) @@ -642,7 +665,7 @@ else 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" + LIBS="$LIBS -framework QTKit -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]) @@ -857,7 +880,7 @@ AC_ARG_ENABLE(ffmpeg, if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then FFMPEG_PREFIX=$with_ffmpeg AC_MSG_RESULT([Using ffmpeg prefix... $FFMPEG_PREFIX]) - PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig + export PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig fi AC_CHECK_PROGS(PKG_CONFIG,pkg-config "python pkgconfig.py",none) @@ -956,7 +979,7 @@ AC_ARG_ENABLE(ffmpeg, fi LIBS="$LIBS $ac_ffmpeg_ldflags" - PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH + export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH ] ) -- cgit v1.2.3