[vlc-commits] [Git][videolan/vlc][master] configure.ac: refactor avcodec check

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Aug 24 10:33:44 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
8b21c2fc by Alexandre Janniaux at 2023-08-24T09:59:32+00:00
configure.ac: refactor avcodec check

Use PKG_HAVE_WITH_MODULES to declare the automake conditional and do the
actual pkg-config lookup.

This will also change the output in case of failure, from:


    checking for AVCODEC... no
    configure: error: No package 'libavcodec' found
    No package 'libavutil' found. Pass --disable-avcodec to ignore this error.


To:


    checking for AVCODEC... no
    configure: error: Package requirements (libavcodec >= 57.37.100 libavutil >= 55.22.101) were not met:

    No package 'libavcodec' found
    No package 'libavutil' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables AVCODEC_CFLAGS
    and AVCODEC_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    make: *** [Makefile:1549: config.status] Error 1

- - - - -


1 changed file:

- configure.ac


Changes:

=====================================
configure.ac
=====================================
@@ -2523,20 +2523,10 @@ AS_HELP_STRING([--enable-merge-ffmpeg], [merge FFmpeg-based plugins (default dis
 ])
 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
 
-AC_ARG_ENABLE([avcodec],
-AS_HELP_STRING([--enable-avcodec], [libavcodec codec (default enabled)]))
-AS_IF([test "${enable_avcodec}" != "no"], [
-  dnl We need >=57.37.100 from ffmpeg
-  dnl 7fc329e2dd6226dfecaa4a1d7adf353bf2773726  include libavutil 55.22.101
-  PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 57.37.100 libavutil >= 55.22.101], [
-    have_avcodec="yes"
-  ],[
-    AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
-  ])
-], [
-  have_avcodec="no"
-])
-AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
+dnl We need >=57.37.100 from ffmpeg
+dnl 7fc329e2dd6226dfecaa4a1d7adf353bf2773726  include libavutil 55.22.101
+PKG_HAVE_WITH_MODULES([AVCODEC], [libavcodec >= 57.37.100 libavutil >= 55.22.101],
+                       [libavcodec codec (default enabled)], [yes])
 
 dnl
 dnl libva needs avcodec



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8b21c2fc760b672f33760b7472b316f562308f4c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8b21c2fc760b672f33760b7472b316f562308f4c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list