summaryrefslogtreecommitdiffstats
path: root/configure.in.in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 19:33:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 19:33:36 +0000
commit991863ab5e86d6c05eaf0449b6623825b56ee97c (patch)
tree87ba05be2b9c56a0e326dd3fa8726030f780866a /configure.in.in
parent32cb73195f95212a97ae0784163b0551d80b05c8 (diff)
downloadk9copy-991863ab5e86d6c05eaf0449b6623825b56ee97c.tar.gz
k9copy-991863ab5e86d6c05eaf0449b6623825b56ee97c.zip
Autodetect av_free_packet presence and compensate if not present
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1172237 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'configure.in.in')
-rwxr-xr-xconfigure.in.in17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.in.in b/configure.in.in
index f8ff819..81d28a6 100755
--- a/configure.in.in
+++ b/configure.in.in
@@ -49,6 +49,19 @@ AC_CHECK_HEADER([ffmpeg/avcodec.h], \
[AC_DEFINE(NEW_FFMPEG,1, [new ffmpeg])], \
[AC_MSG_ERROR([libavcodec may be missing]) ])])
-
-
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+cxx_flags_safe="$CXXFLAGS"
+cflags_safe="$CFLAGS"
+CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
+CFLAGS="$CFLAGS -D__STDC_CONSTANT_MACROS"
+AC_MSG_CHECKING([if libavformat/avformat.h provides av_free_packet])
+AC_TRY_COMPILE([#include <libavformat/avformat.h>
+],[AVPacket *packet; av_free_packet(packet);],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(NEEDS_AV_FREE_PACKET,1,[no])],
+AC_MSG_RESULT(no))
+CXXFLAGS="$cxx_flags_safe"
+CFLAGS="$cflags_safe"
+AC_LANG_RESTORE