Merge pull request #138 from Mr-DaveDev/pkg-config

Revised configure messages for pkg-config
This commit is contained in:
Mr-Dave
2016-08-20 08:14:06 -06:00
committed by GitHub
2 changed files with 20 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
Summary of Changes
* Better messages for pkg-config
* Fix timelapse crash when selecting mpeg4
Version 3.4.1 Changes Below
* Added suggestion for including pkgconf as part of build requirements

View File

@@ -368,6 +368,14 @@ if test x$JPEG_SUPPORT != xyes ; then
)
fi
#
# Check for the pkg-config.
#
AC_CHECK_PROG([PKGCONFIG],[pkg-config],[yes],[no])
AM_CONDITIONAL([FOUND_PKGCONFIG], [test "x$PKGCONFIG" = xyes])
AM_COND_IF([FOUND_PKGCONFIG],,[AC_MSG_ERROR([Required package 'pkg-config' not found, please check motion_guide.html and install necessary dependencies.])])
#
# Check for libavcodec and libavformat from ffmpeg
@@ -383,7 +391,17 @@ AS_IF([test "x$with_ffmpeg" != "xno"], [
PKG_CONFIG_PATH=${with_ffmpeg}/lib/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH
])
PKG_CHECK_MODULES([FFMPEG], libavutil libavformat libavcodec libswscale, HAVE_FFMPEG=yes)
AC_SUBST(FFMPEG_LIBS)
AC_SUBST(FFMPEG_CFLAGS)
FFMPEG_DEPS="libavutil libavformat libavcodec libswscale"
if pkg-config $FFMPEG_DEPS; then
FFMPEG_CFLAGS=`pkg-config --cflags $FFMPEG_DEPS`
FFMPEG_LIBS=`pkg-config --libs $FFMPEG_DEPS`
HAVE_FFMPEG="yes"
else
AC_MSG_ERROR([Required ffmpeg packages 'libavutil-dev libavformat-dev libavcodec-dev libswscale-dev' were not found. Please check motion_guide.html and install necessary dependencies or use the '--without-ffmpeg' configuration option.])
fi
])
AS_IF([test "${HAVE_FFMPEG}" = "yes" ], [