diff --git a/AI/EmptyAI/Makefile.in b/AI/EmptyAI/Makefile.in index df81d8ec6..abf2e92e9 100644 --- a/AI/EmptyAI/Makefile.in +++ b/AI/EmptyAI/Makefile.in @@ -123,6 +123,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@ diff --git a/AI/GeniusAI/Makefile.in b/AI/GeniusAI/Makefile.in index 41b3b1e54..73cfc15d5 100644 --- a/AI/GeniusAI/Makefile.in +++ b/AI/GeniusAI/Makefile.in @@ -125,6 +125,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@ diff --git a/AI/Makefile.in b/AI/Makefile.in index 019146f81..f04b9cde7 100644 --- a/AI/Makefile.in +++ b/AI/Makefile.in @@ -96,6 +96,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@ diff --git a/Makefile.in b/Makefile.in index f6fd93b19..f24e73778 100644 --- a/Makefile.in +++ b/Makefile.in @@ -111,6 +111,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@ diff --git a/client/Makefile.am b/client/Makefile.am index 32df8f081..9044bf62e 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -1,7 +1,7 @@ bin_PROGRAMS = vcmiclient vcmiclient_LDADD = $(top_builddir)/lib/libvcmi.la @SDL_LIBS@ @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @BOOST_IOSTREAMS_LIB@ @FFMPEG_LIBS@ -vcmiclient_CXXFLAGS = @CXXFLAGS@ @SDL_CXXFLAGS@ +vcmiclient_CXXFLAGS = @CXXFLAGS@ @SDL_CXXFLAGS@ @FFMPEG_CXXFLAGS@ vcmiclient_LDFLAGS = -L$(top_builddir)/lib vcmiclient_SOURCES = \ ../AI_Base.h \ diff --git a/client/Makefile.in b/client/Makefile.in index 94fd96303..e6a65b64c 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -144,6 +144,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@ @@ -238,7 +239,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vcmiclient_LDADD = $(top_builddir)/lib/libvcmi.la @SDL_LIBS@ @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @BOOST_IOSTREAMS_LIB@ @FFMPEG_LIBS@ -vcmiclient_CXXFLAGS = @CXXFLAGS@ @SDL_CXXFLAGS@ +vcmiclient_CXXFLAGS = @CXXFLAGS@ @SDL_CXXFLAGS@ @FFMPEG_CXXFLAGS@ vcmiclient_LDFLAGS = -L$(top_builddir)/lib vcmiclient_SOURCES = \ ../AI_Base.h \ diff --git a/configure b/configure index c61ac5f37..505fd042e 100755 --- a/configure +++ b/configure @@ -785,6 +785,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +FFMPEG_CXXFLAGS FFMPEG_LIBS SDL_CXXFLAGS SDL_LIBS @@ -4914,13 +4915,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4917: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4918: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4920: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4921: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4923: output\"" >&5) + (eval echo "\"\$as_me:4924: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6126,7 +6127,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6129 "configure"' > conftest.$ac_ext + echo '#line 6130 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8642,11 +8643,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8645: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8646: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8649: \$? = $ac_status" >&5 + echo "$as_me:8650: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8981,11 +8982,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8984: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8985: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8988: \$? = $ac_status" >&5 + echo "$as_me:8989: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9086,11 +9087,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9089: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9090: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9093: \$? = $ac_status" >&5 + echo "$as_me:9094: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9141,11 +9142,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9144: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9145: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9148: \$? = $ac_status" >&5 + echo "$as_me:9149: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11954,7 +11955,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11957 "configure" +#line 11958 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12050,7 +12051,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12053 "configure" +#line 12054 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14070,11 +14071,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14073: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14074: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14077: \$? = $ac_status" >&5 + echo "$as_me:14078: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14169,11 +14170,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14172: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14173: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14176: \$? = $ac_status" >&5 + echo "$as_me:14177: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14221,11 +14222,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14224: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14225: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14228: \$? = $ac_status" >&5 + echo "$as_me:14229: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17361,6 +17362,7 @@ SDL_LIBS="`sdl-config --libs` $LIBS" LIBS=$saved_LIBS # Check for ffmpeg libraries +saved_LIBS=$LIBS { $as_echo "$as_me:$LINENO: checking for main in -lavformat" >&5 $as_echo_n "checking for main in -lavformat... " >&6; } @@ -17507,7 +17509,10 @@ $as_echo "$as_me: error: FFMpeg swscale library not found. Please install it." > { (exit 1); exit 1; }; } fi -FFMPEG_LIBS="-lavformat -lswscale" + +FFMPEG_CXXFLAGS=`pkg-config --cflags libavformat libswscale` +FFMPEG_LIBS=`pkg-config --libs libavformat libswscale` +LIBS=$saved_LIBS # Checks for header files. @@ -18107,6 +18112,7 @@ done + ac_config_files="$ac_config_files Makefile lib/Makefile client/Makefile server/Makefile AI/Makefile AI/GeniusAI/Makefile AI/EmptyAI/Makefile" cat >confcache <<\_ACEOF diff --git a/configure.ac b/configure.ac index 626a53bde..18e62fcd9 100644 --- a/configure.ac +++ b/configure.ac @@ -49,9 +49,13 @@ SDL_LIBS="`sdl-config --libs` $LIBS" LIBS=$saved_LIBS # Check for ffmpeg libraries +saved_LIBS=$LIBS AC_CHECK_LIB(avformat,main,,AC_MSG_ERROR([FFMpeg avformat library not found. Please install it.])) AC_CHECK_LIB(swscale,main,,AC_MSG_ERROR([FFMpeg swscale library not found. Please install it.])) -FFMPEG_LIBS="-lavformat -lswscale" + +FFMPEG_CXXFLAGS=`pkg-config --cflags libavformat libswscale` +FFMPEG_LIBS=`pkg-config --libs libavformat libswscale` +LIBS=$saved_LIBS # Checks for header files. AC_HEADER_STDC @@ -65,5 +69,6 @@ AC_CHECK_FUNCS([atexit memset pow select sqrt]) AC_SUBST(SDL_LIBS) AC_SUBST(SDL_CXXFLAGS) AC_SUBST(FFMPEG_LIBS) +AC_SUBST(FFMPEG_CXXFLAGS) AC_OUTPUT(Makefile lib/Makefile client/Makefile server/Makefile AI/Makefile AI/GeniusAI/Makefile AI/EmptyAI/Makefile) diff --git a/lib/Makefile.in b/lib/Makefile.in index f53094059..93cb1b2a0 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -125,6 +125,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@ diff --git a/server/Makefile.in b/server/Makefile.in index 81d36ba46..5832ebb97 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -119,6 +119,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FFMPEG_CXXFLAGS = @FFMPEG_CXXFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GREP = @GREP@