diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-11-25 11:05:44 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-11-25 11:05:44 +0000 |
commit | f238d1fd97cb605da60bbad619baa215d4569c32 (patch) | |
tree | 1a953af7850e03227486bab2a7d6db6560f249d1 /mediaplugin/src/mediaplugins/ffmpeg/configure.ac | |
parent | b84df627dc3910e8685de787ba7eb9541e8f2ae8 (diff) | |
download | usdx-f238d1fd97cb605da60bbad619baa215d4569c32.tar.gz usdx-f238d1fd97cb605da60bbad619baa215d4569c32.tar.xz usdx-f238d1fd97cb605da60bbad619baa215d4569c32.zip |
move /src/plugins/media to src/mediaplugins and /game/plugins/media to /game/mediaplugins
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2753 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'mediaplugin/src/mediaplugins/ffmpeg/configure.ac')
-rw-r--r-- | mediaplugin/src/mediaplugins/ffmpeg/configure.ac | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/mediaplugin/src/mediaplugins/ffmpeg/configure.ac b/mediaplugin/src/mediaplugins/ffmpeg/configure.ac new file mode 100644 index 00000000..f8bfd5b1 --- /dev/null +++ b/mediaplugin/src/mediaplugins/ffmpeg/configure.ac @@ -0,0 +1,110 @@ +# +# ultrastardx configure.ac script +# +# by UltraStar Deluxe Team +# +# Execute "autogen.sh" or "make reconf" +# to create the configure script. + +# Require autoconf >= 2.61 +AC_PREREQ(2.61) + +# Init autoconf +AC_INIT([usdx-ffmpeg-plugin], [1.1]) + +# Specify a source-file so autoconf can check if the source-dir exists +AC_CONFIG_SRCDIR(.) + +# Set the path to install-sh +AC_CONFIG_AUX_DIR(../../../dists/autogen) + +# show features and packages in one list +AC_PRESERVE_HELP_ORDER + +AC_CANONICAL_SYSTEM + +# ----------------------------------------- +# find tools +# ----------------------------------------- + +LT_PREREQ([2.2]) +LT_INIT([disable-static]) + +AM_INIT_AUTOMAKE([foreign]) + +# options for make command +AC_PROG_MAKE_SET + +# ----------------------------------------- +# functions +# ----------------------------------------- + +# ADD_DEFINE(DEFINE) +# adds a preprocessor definition +AC_DEFUN([ADD_DEFINE], +[ + CPPFLAGS="-D$1 $CPPFLAGS" +]) + +# ----------------------------------------- +# check for compilers +# ----------------------------------------- + +# find and test the C compiler (for C-libs and wrappers) +AC_PROG_CC +AC_LANG([C]) + +# find and test the C++ compiler (for C-libs and wrappers) +AC_PROG_CXX +AC_LANG([C++]) + +case "${target_os}" in + darwin*) + CPPFLAGS="$CPPFLAGS -arch i386" + CFLAGS="$CFLAGS -arch i386" + CXXFLAGS="$CXXFLAGS -arch i386" + LDFLAGS="$LDFLAGS -dynamic" + LIB_EXT=.dylib + ;; + cygwin*|mingw*) + LDFLAGS="$LDFLAGS -no-undefined" + LIB_EXT=.dll + ;; + *) + LIB_EXT=.so + ;; +esac +AC_SUBST(LIB_EXT) + +PLUGIN_DIR="../../../game/mediaplugins" +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) + ]) + ]) +# find FFMpeg's swscale lib (just if FFMpeg is compiled in GPL mode) +PKG_CHECK_MODULES([libswscale], [libswscale], + [ + ADD_DEFINE(HAVE_SWSCALE) + ], []) + +# ----------------------------------------- +# create output files +# ----------------------------------------- + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT + |