aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mediaplugin/src/plugins/media/ffmpeg/Makefile.am2
-rw-r--r--mediaplugin/src/plugins/media/ffmpeg/configure.ac65
2 files changed, 28 insertions, 39 deletions
diff --git a/mediaplugin/src/plugins/media/ffmpeg/Makefile.am b/mediaplugin/src/plugins/media/ffmpeg/Makefile.am
index 7f38d2f6..8dec1d59 100644
--- a/mediaplugin/src/plugins/media/ffmpeg/Makefile.am
+++ b/mediaplugin/src/plugins/media/ffmpeg/Makefile.am
@@ -3,7 +3,7 @@ libffmpegplugin_la_SOURCES = ../core/plugin_core.cpp ../core/util.cpp ../core/lo
libffmpegplugin_la_CXXFLAGS = -I../include -Wall \
$(ffmpeg_CFLAGS) \
$(libswscale_CFLAGS)
-libffmpegplugin_la_LDFLAGS = -shared -dynamic -avoid-version \
+libffmpegplugin_la_LDFLAGS = -shared -avoid-version \
$(ffmpeg_LIBS) \
$(libswscale_LIBS) \
$(LDFLAGS)
diff --git a/mediaplugin/src/plugins/media/ffmpeg/configure.ac b/mediaplugin/src/plugins/media/ffmpeg/configure.ac
index 1e350c63..a130225f 100644
--- a/mediaplugin/src/plugins/media/ffmpeg/configure.ac
+++ b/mediaplugin/src/plugins/media/ffmpeg/configure.ac
@@ -21,34 +21,33 @@ AC_CONFIG_AUX_DIR(../../../../dists/autogen)
# show features and packages in one list
AC_PRESERVE_HELP_ORDER
+AC_CANONICAL_SYSTEM
+
# -----------------------------------------
# find tools
# -----------------------------------------
+AM_INIT_AUTOMAKE([foreign])
+
# options for make command
AC_PROG_MAKE_SET
-# find tool for ln -s (e.g. uses cp -p for FAT-filesystems)
-#AC_LN_S
-# find a program for recursive dir creation
-#AC_PROG_MKDIR_P
-# find the best install tool
-#AC_PROG_INSTALL
-# some other useful tools
-#AC_PROG_AWK
-#AC_PROG_SED
-#AC_PROG_GREP
-AC_PROG_LIBTOOL
-#AC_PROG_RANLIB
-#AC_PROG_EGREP
+AM_PROG_LIBTOOL
-AM_INIT_AUTOMAKE([foreign])
+# -----------------------------------------
+# functions
+# -----------------------------------------
+
+# ADD_DEFINE(DEFINE)
+# adds a preprocessor definition
+AC_DEFUN([ADD_DEFINE],
+[
+ CPPFLAGS="-D$1 $CPPFLAGS"
+])
# -----------------------------------------
# check for compilers
# -----------------------------------------
-AC_CANONICAL_HOST
-
# find and test the C compiler (for C-libs and wrappers)
AC_PROG_CC
AC_LANG([C])
@@ -57,30 +56,16 @@ AC_LANG([C])
AC_PROG_CXX
AC_LANG([C++])
-# find pkg-config
-PKG_PROG_PKG_CONFIG()
-if [[ x$PKG_CONFIG = x ]]; then
- AC_MSG_ERROR([
-!!! pkg-config was not found on your system.
-!!! It is needed to determine the versions of your libraries.
-!!! Install it and try again.])
-fi
-
-# ADD_DEFINE(DEFINE)
-# adds a preprocessor definition
-AC_DEFUN([ADD_DEFINE],
-[
- CPPFLAGS="-D$1 $CPPFLAGS"
-])
-
-case "${host_os}" in
+case "${target_os}" in
darwin*)
- CPPFLAGS="-arch i386"
- CFLAGS="-arch i386"
- CXXFLAGS="-arch i386"
+ CPPFLAGS="$CPPFLAGS -arch i386"
+ CFLAGS="$CFLAGS -arch i386"
+ CXXFLAGS="$CXXFLAGS -arch i386"
+ LDFLAGS="$LDFLAGS -dynamic"
LIB_EXT=.dylib
;;
- cygwin*)
+ cygwin*|mingw*)
+ LDFLAGS="$LDFLAGS -no-undefined"
LIB_EXT=.dll
;;
*)
@@ -96,9 +81,13 @@ AC_SUBST(PLUGIN_DIR)
# check for libraries
# -----------------------------------------
+# find pkg-config
+PKG_PROG_PKG_CONFIG()
+
# find FFmpeg
PKG_CHECK_MODULES([ffmpeg], [libavcodec libavformat libavutil], [
CPPFLAGS="$ffmpeg_CFLAGS $CPPFLAGS"
+ #AC_CHECK_LIB([avcodec], [img_convert], [HAVE_IMG_CONVERT="yes"])
AC_CHECK_HEADERS(ffmpeg/avformat.h, [
# old include layout
ADD_DEFINE(HAVE_FFMPEG_INCLUDE_DIR)
@@ -109,7 +98,7 @@ PKG_CHECK_MODULES([libswscale], [libswscale],
[
ADD_DEFINE(HAVE_SWSCALE)
], [])
-
+
# -----------------------------------------
# create output files
# -----------------------------------------