]> git.sesse.net Git - vlc/blobdiff - configure.ac
Fix ffmpeg section flag handling calls. (at least it fixes the pkg-config code path)
[vlc] / configure.ac
index 0dfc6891be2e317e2b9b2cc1b781b10cc3c970df..056f89fff28353706d81dacede6cec96845bfc91 100644 (file)
@@ -3033,18 +3033,19 @@ dnl Trying with pkg-config
          [${FFMPEG_LIBS}])
          ],
          [${SWSCALE_LIBS}])
-     VLC_RESTORE_FLAGS
     ],[AC_CHECK_LIB(avcodec,img_resample,[],
         [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
         [${FFMPEG_LIBS}])
       ]
     )
+    VLC_RESTORE_FLAGS
 
   ],[
 
     dnl
     dnl last chance: at the default place
     dnl
+      VLC_SAVE_FLAGS
       CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
       AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h)
@@ -3071,8 +3072,7 @@ dnl Trying with pkg-config
 
       AC_CHECK_LIB(avformat, av_open_input_stream, [
         VLC_ADD_LIBS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
-      LDFLAGS="${LDFLAGS_save}"
-      CPPFLAGS="${CPPFLAGS_save}"
+      VLC_RESTORE_FLAGS
 
       AC_CHECK_LIB(swscale, sws_getContext, [
         AC_CHECK_HEADERS(ffmpeg/swscale.h libswscale/swscale.h)
@@ -3080,10 +3080,10 @@ dnl Trying with pkg-config
         [AC_CHECK_LIB(avcodec,img_resample,[],
             [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
         [-lavcodec $LDAVUTIL])
-      LDFLAGS="${LDFLAGS_save}"
-      CPPFLAGS="${CPPFLAGS_save}"
       ],
       [${SWSCALE_LIBS}])
+
+      VLC_RESTORE_FLAGS
   ])
 fi