libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

configure.ac (31060B)


      1 # Process this file with autoconf to produce a configure script.
      2 #
      3 #  This file is part of GNU libextractor
      4 #  Copyright (C) 2003-2026 Christian Grothoff
      5 #
      6 #  GNU libextractor is free software; you can redistribute it and/or modify it under the
      7 #  terms of the GNU General Public License as published by the Free Software
      8 #  Foundation; either version 3, or (at your option) any later version.
      9 #
     10 #  GNU libextractor is distributed in the hope that it will be useful, but WITHOUT ANY
     11 #  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     12 #  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     13 #
     14 #  You should have received a copy of the GNU General Public License along with
     15 #  GNU libextractor; see the file COPYING.  If not, If not, see <http://www.gnu.org/license>
     16 #
     17 #
     18 AC_PREREQ([2.72])
     19 AC_INIT([libextractor],[1.20],[bug-libextractor@gnu.org])
     20 AC_CONFIG_AUX_DIR([build-aux])
     21 AC_CONFIG_HEADERS([config.h])
     22 AC_CONFIG_MACRO_DIR([m4])
     23 AC_CANONICAL_TARGET
     24 AC_CANONICAL_HOST
     25 AC_CANONICAL_TARGET
     26 
     27 LIB_VERSION_CURRENT=5
     28 LIB_VERSION_REVISION=0
     29 LIB_VERSION_AGE=2
     30 AC_SUBST(LIB_VERSION_CURRENT)
     31 AC_SUBST(LIB_VERSION_REVISION)
     32 AC_SUBST(LIB_VERSION_AGE)
     33 
     34 AM_INIT_AUTOMAKE([silent-rules])
     35 
     36 # Checks for programs.
     37 AC_USE_SYSTEM_EXTENSIONS
     38 AC_PROG_AWK
     39 AC_PROG_CC
     40 AM_PROG_CC_C_O
     41 AC_PROG_CPP
     42 AC_PROG_CXX
     43 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
     44 AC_PROG_INSTALL
     45 AC_PROG_LN_S
     46 AC_PROG_MAKE_SET
     47 AC_CANONICAL_HOST
     48 
     49 # NetBSD provides libgcc only as a static archive (/usr/lib/libgcc.a; the
     50 # shared runtime is libgcc_s.so), yet the C++ compiler's libtool postdeps
     51 # name plain -lgcc.  With NetBSD's default deplibs_check_method of
     52 # match_pattern, libtool then decides it cannot satisfy the inter-library
     53 # dependencies of a -module and silently builds a *static* module instead.
     54 # A static module cannot be dlopen()ed, so the C++ plugins (exiv2, pdf)
     55 # would be built but never loadable, and their tests fail with every
     56 # expected item missing.  Nothing here has undefined symbols we need
     57 # libtool to police, so tell it to accept the dependencies.
     58 AS_CASE(["$host_os"],
     59   [netbsd*],[: ${lt_cv_deplibs_check_method=pass_all}])
     60 
     61 LT_INIT
     62 # save LIBS, libtool does a AC_SEARCH_LIBS(dlopen, dl), but plugins
     63 # need not have -ldl added
     64 LT_INIT([disable-static dlopen win32-dll])
     65 AC_SUBST(MKDIR_P)
     66 
     67 AC_CHECK_DECLS([_stati64])
     68 
     69 AS_CASE(["$target_os"],
     70   [*linux-gnu],[
     71      AC_DEFINE(GNU_LINUX,1,[This is a GNU/Linux system])
     72      AC_DEFINE_UNQUOTED(GNU_LINUX,1,[This is a GNU/Linux system])
     73      AM_CONDITIONAL(HAVE_GNU_LD, true)
     74      AM_CONDITIONAL(SOMEBSD, false)
     75      AM_CONDITIONAL(WINDOWS, false)
     76      XTRA_CPPLIBS=-lstdc++
     77      LIBEXT=.so
     78   ],
     79   [freebsd*],[
     80      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
     81      AC_CHECK_LIB(c_r, pthread_create)
     82      AM_CONDITIONAL(HAVE_GNU_LD, true)
     83      AM_CONDITIONAL(SOMEBSD, true)
     84      AM_CONDITIONAL(WINDOWS, false)
     85      XTRA_CPPLIBS=-lstdc++
     86      LIBEXT=.so
     87   ],
     88   [openbsd*],[
     89      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
     90      AC_CHECK_LIB(c_r, pthread_create)
     91      AM_CONDITIONAL(HAVE_GNU_LD, true)
     92      AM_CONDITIONAL(SOMEBSD, true)
     93      AM_CONDITIONAL(WINDOWS, false)
     94      XTRA_CPPLIBS=-lstdc++
     95      LIBEXT=.so
     96    ],
     97   [netbsd*],[
     98      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
     99      # NetBSD's libpthread only works if it is loaded at program start;
    100      # if it arrives later with a plugin's dependencies (GStreamer/GLib),
    101      # pthread_create() fails in the plugin process.  Linking it into
    102      # libextractor makes every application load it in time.
    103      AC_CHECK_LIB(pthread, pthread_create)
    104      AM_CONDITIONAL(HAVE_GNU_LD, true)
    105      AM_CONDITIONAL(SOMEBSD, true)
    106      AM_CONDITIONAL(WINDOWS, false)
    107      XTRA_CPPLIBS=-lstdc++
    108      LIBEXT=.so
    109   ],
    110   [*solaris*],[
    111      AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
    112      AC_CHECK_LIB(resolv, res_init)
    113      XTRA_CPPLIBS=-lstdc++
    114      AM_CONDITIONAL(HAVE_GNU_LD, false)
    115      AM_CONDITIONAL(SOMEBSD, false)
    116      AM_CONDITIONAL(WINDOWS, false)
    117      AM_CFLAGS="-D_POSIX_PTHREAD_SEMANTICS $AM_CFLAGS"
    118      LIBEXT=.so
    119    ],
    120   [darwin*],[
    121      AC_DEFINE_UNQUOTED(DARWIN,1,[This is a Darwin system])
    122      AM_CONDITIONAL(HAVE_GNU_LD, false)
    123      AM_CONDITIONAL(SOMEBSD, false)
    124      AM_CONDITIONAL(WINDOWS, false)
    125      AM_CFLAGS="-fno-common $AM_CFLAGS"
    126      LIBEXT=.so
    127   ],
    128   [cygwin*],[
    129      AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a CYGWIN system])
    130      AM_CONDITIONAL(SOMEBSD, false)
    131      AM_CONDITIONAL(HAVE_GNU_LD, false)
    132      AM_CONDITIONAL(WINDOWS, false)
    133      LIBEXT=.dll
    134   ],
    135   [mingw*],[
    136      AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
    137      AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
    138      AC_CHECK_LIB(intl, gettext)
    139      # Sufficiently new Windows XP
    140      AM_CFLAGS="-D__MSVCRT_VERSION__=0x0601 $AM_CFLAGS"
    141      AM_CPPFLAGS="-DFTRUNCATE_DEFINED=1 $AM_CPPFLAGS"
    142 
    143     AC_MSG_CHECKING(for PlibC)
    144     plibc=0
    145     AC_ARG_WITH(plibc,
    146        [  --with-plibc=PFX    Base of PliBC installation],
    147        [AC_MSG_RESULT([$with_plibc])
    148         AS_CASE([$with_plibc],
    149           [no],[],
    150           [yes],[
    151             AC_CHECK_HEADERS([plibc.h],
    152               AC_CHECK_LIB([plibc], [plibc_init],
    153                 plibc=1))
    154           ],[
    155             AM_LDFLAGS="-L$with_plibc/lib $AM_LDFLAGS"
    156             AM_CPPFLAGS="-I$with_plibc/include $AM_CPPFLAGS"
    157             AC_CHECK_HEADERS([plibc.h],
    158               AC_CHECK_LIB([plibc], [plibc_init],
    159                 EXT_LIB_PATH="-L$with_plibc/lib $EXT_LIB_PATH"
    160                 plibc=1))
    161           ])
    162        ],
    163        [AC_MSG_RESULT([--with-plibc not specified])
    164         AM_LDFLAGS="-L/usr/lib $AM_LDFLAGS"
    165         AM_CPPFLAGS="-I/usr/include $AM_CPPFLAGS"
    166         AC_CHECK_HEADERS([plibc.h],
    167               AC_CHECK_LIB([plibc], [plibc_init],
    168                 EXT_LIB_PATH="-L$with_plibc/lib $EXT_LIB_PATH"
    169                 plibc=1))])
    170 
    171      AS_IF([test $plibc -ne 1],
    172            [AC_MSG_ERROR([libextractor requires PlibC])],
    173            [LIBS="$LIBS -lplibc"])
    174 
    175      AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-all-symbols"
    176      AM_CONDITIONAL(HAVE_GNU_LD, true)
    177      AM_CONDITIONAL(SOMEBSD, false)
    178      AM_CONDITIONAL(WINDOWS, true)
    179      LIBEXT=.dll
    180    ],[
    181      AC_MSG_RESULT(Unrecognised OS $host_os)
    182      AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
    183      AC_MSG_RESULT(otheros)
    184      AC_DEFINE(GNU_LINUX,1,[We hope this is a GNU/Linux-compatible system])
    185      AC_DEFINE_UNQUOTED(GNU_LINUX,1,[We hope this is a GNU/Linux-compatible system])
    186      AM_CONDITIONAL(HAVE_GNU_LD, false)
    187      AM_CONDITIONAL(SOMEBSD, false)
    188      AM_CONDITIONAL(WINDOWS, false)
    189      LIBEXT=.so
    190   ]
    191 )
    192 
    193 # Since macOS 14.4 the system iconv() transliterates instead of failing
    194 # when a character has no equivalent in the target charset, and AM_ICONV
    195 # therefore declares it "not working".  We only ever convert *into*
    196 # UTF-8 (or from UTF-8 into the locale's charset for display), where
    197 # that cannot lose information, so the system iconv is fine for us;
    198 # without it all non-UTF-8 meta data would be dropped.
    199 AS_CASE(["$host_os"],
    200   [darwin*],[: ${am_cv_func_iconv_works=yes}])
    201 AM_ICONV
    202 
    203 PKG_PROG_PKG_CONFIG()
    204 
    205 # We define the paths here, because MinGW/GCC expands paths
    206 # passed through the command line ("-DLOCALEDIR=..."). This would
    207 # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
    208 # not contain the actual installation.
    209 AC_DEFINE_DIR([LOCALEDIR], [datarootdir/locale], [gettext catalogs])
    210 
    211 ISOPFX=`pkg-config --variable=prefix iso-codes`
    212 pkg-config --variable=prefix iso-codes 2> /dev/null || ISOPFX=/usr
    213 AC_DEFINE_DIR([ISOLOCALEDIR], [ISOPFX/share/locale], [iso-639 catalog])
    214 
    215 # relative plugin directory
    216 rplugindir="libextractor"
    217 AC_ARG_WITH(plugindirname,
    218 	AS_HELP_STRING([--with-plugindirname],[install directory for plugins (always relative to libdir)]),
    219 	[rplugindir=$withval])
    220 AC_SUBST(RPLUGINDIR, $rplugindir)
    221 
    222 # large file support
    223 AC_SYS_LARGEFILE
    224 AC_FUNC_FSEEKO
    225 
    226 AM_CONDITIONAL(CYGWIN, test "$build_os" = "cygwin")
    227 AM_CONDITIONAL(MINGW, test "$build_os" = "mingw32")
    228 
    229 
    230 # use '-fno-strict-aliasing', but only if the compiler can take it
    231 AS_IF([gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1],
    232       [AM_CFLAGS="-fno-strict-aliasing $AM_CFLAGS"])
    233 
    234 AM_CONDITIONAL(HAVE_CXX, test "x$HAVE_CXX" = "xyes")
    235 
    236 
    237 # Adam shostack suggests the following for Windows:
    238 # -D_FORTIFY_SOURCE=2 -fstack-protector-all
    239 AC_ARG_ENABLE(gcc-hardening,
    240   [AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks)],
    241   [AS_IF([test x$enableval = xyes],
    242          [AM_CFLAGS="$AM_CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
    243           AM_CFLAGS="$AM_CFLAGS -fwrapv -fPIE -Wstack-protector"
    244           AM_CFLAGS="$AM_CFLAGS --param ssp-buffer-size=1"
    245           AM_LDFLAGS="$AM_LDFLAGS -pie"])])
    246 
    247 
    248 # Linker hardening options
    249 # Currently these options are ELF specific - you can't use this with MacOSX
    250 AC_ARG_ENABLE(linker-hardening,
    251   [AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups)],
    252   [AS_IF([x$enableval = xyes],
    253          [AM_LDFLAGS="$AM_LDFLAGS -z relro -z now"])])
    254 
    255 
    256 # Support for hiding non-public symbols
    257 HIDDEN_VISIBILITY_CFLAGS=""
    258 AS_CASE(["$host"],
    259  [*-*-mingw*],[
    260     # mingw32 we do -fvisibility=hidden and __declspec(dllexport)
    261     AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
    262               [defines how to decorate public symbols while building])
    263     HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
    264  ],[
    265     # other compilers, check if we can do -fvisibility=hidden
    266     AX_CHECK_LINK_FLAG([-fvisibility=hidden],
    267       [AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
    268                            [AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) extern],
    269                                        [defines how to decorate public symbols while building])
    270                             HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])])
    271  ])
    272 AC_SUBST(HIDDEN_VISIBILITY_CFLAGS)
    273 
    274 
    275 
    276 # Checks for libraries.
    277 
    278 AC_CHECK_HEADERS([langinfo.h])
    279 
    280 # Check for libltdl header (#2999)
    281 ltdl=0
    282 AC_MSG_CHECKING(for libltdl)
    283 AC_ARG_WITH(ltdl,
    284    [  --with-ltdl=PFX    base of libltdl installation],
    285    [AC_MSG_RESULT([$with_ltdl])
    286     AS_CASE([$with_ltdl],
    287       [no],[],
    288       [yes],[
    289         AC_CHECK_HEADERS(ltdl.h,
    290           AC_CHECK_LIB([ltdl], [lt_dlopenext],
    291             ltdl=1))
    292       ],[
    293         OLD_LIBS="$LIBS"
    294         LIBS="-L$with_ltdl/lib $LIBS"
    295         AM_CPPFLAGS="-I$with_ltdl/include $AM_CPPFLAGS"
    296         AC_CHECK_HEADERS(ltdl.h,
    297           AC_CHECK_LIB([ltdl], [lt_dlopenext],
    298             EXT_LIB_PATH="-L$with_ltdl/lib $EXT_LIB_PATH"
    299             ltdl=1))
    300         LIBS="$OLD_LIBS"
    301       ])
    302    ],
    303    [AC_MSG_RESULT([--with-ltdl not specified])
    304     AC_CHECK_HEADERS(ltdl.h,
    305      AC_CHECK_LIB([ltdl], [lt_dlopenext],
    306       ltdl=1))])
    307 AS_IF([test x$ltdl = x1],
    308       [AC_MSG_RESULT([libltdl found])],
    309       [AC_MSG_ERROR([libextractor requires libltdl (from GNU libtool), try installing libltdl-dev])])
    310 
    311 # check for apparmor
    312 AC_CHECK_LIB(apparmor, aa_change_profile,
    313         [AC_CHECK_HEADERS([sys/apparmor.h],
    314           AM_CONDITIONAL(HAVE_APPARMOR, true)
    315           AC_DEFINE(HAVE_APPARMOR,1,[Have apparmor]),
    316           AM_CONDITIONAL(HAVE_APPARMOR, false)
    317           AC_DEFINE(HAVE_APPARMOR,0,[lacking apparmor]))],
    318         AM_CONDITIONAL(HAVE_APPARMOR, false),
    319         -lapparmor)
    320 
    321 # FIXME: allow --with-oggvorbis=PFX
    322 
    323 # test if we have vorbisfile
    324 # prior versions had ov_open_callbacks in libvorbis, test that, too.
    325 AC_CHECK_LIB(vorbisfile, ov_open_callbacks,
    326         [AC_CHECK_HEADERS([vorbis/vorbisfile.h],
    327           AM_CONDITIONAL(HAVE_VORBISFILE, true)
    328           AC_DEFINE(HAVE_VORBISFILE,1,[Have vorbisfile]),
    329           AM_CONDITIONAL(HAVE_VORBISFILE, false)
    330           AC_DEFINE(HAVE_VORBISFILE,0,[lacking vorbisfile]))],
    331         AM_CONDITIONAL(HAVE_VORBISFILE, false),
    332         -lvorbis -logg)
    333 AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init_stream,
    334         [AC_CHECK_HEADERS([FLAC/all.h],
    335          AM_CONDITIONAL(HAVE_FLAC, true)
    336           AC_DEFINE(HAVE_FLAC,1,[Have flac]),
    337          AM_CONDITIONAL(HAVE_FLAC, false))],
    338         AM_CONDITIONAL(HAVE_FLAC, false),
    339         -logg)
    340 # test without -logg to see whether we really need it (libflac can be without)
    341 AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init_ogg_stream,
    342          AM_CONDITIONAL(HAVE_FLAC, true)
    343          AC_DEFINE(HAVE_FLAC,1,[Have flac])
    344          AM_CONDITIONAL(NEED_OGG, false),
    345         [AM_CONDITIONAL(NEED_OGG, true)])
    346 AC_CHECK_LIB(vorbisfile, vorbis_comment_query,
    347         AM_CONDITIONAL(NEED_VORBIS, false),
    348         AM_CONDITIONAL(NEED_VORBIS, true),
    349         -logg)
    350 
    351 AC_CHECK_LIB(z, inflate,
    352         [AC_CHECK_HEADERS([zlib.h],
    353          AM_CONDITIONAL(HAVE_ZLIB, true)
    354          AC_DEFINE(HAVE_ZLIB,1,[Have zlib]),
    355          AM_CONDITIONAL(HAVE_ZLIB, false))],
    356          AM_CONDITIONAL(HAVE_ZLIB, false))
    357 
    358 AC_CHECK_LIB(bz2, BZ2_bzDecompress,
    359         [AC_CHECK_HEADERS([bzlib.h],
    360           AM_CONDITIONAL(HAVE_BZ2, true)
    361           AC_DEFINE(HAVE_LIBBZ2,1,[Have libbz2]),
    362          AM_CONDITIONAL(HAVE_BZ2, false))],
    363          AM_CONDITIONAL(HAVE_BZ2, false))
    364 
    365 AC_CHECK_LIB(rpm, rpmReadPackageFile,
    366         [AC_CHECK_HEADERS([rpm/rpmlib.h],
    367           AM_CONDITIONAL(HAVE_LIBRPM, true)
    368           AC_DEFINE(HAVE_LIBRPM,1,[Have librpm]),
    369          AM_CONDITIONAL(HAVE_LIBRPM, false))],
    370          AM_CONDITIONAL(HAVE_LIBRPM, false))
    371 
    372 AC_CHECK_LIB(vlc, libvlc_media_player_play,
    373         [AC_CHECK_HEADERS([vlc/vlc.h],
    374           AM_CONDITIONAL(HAVE_LIBVLC, true)
    375           AC_DEFINE(HAVE_LIBVLC,1,[Have libvlc]),
    376          AM_CONDITIONAL(HAVE_LIBVLC, false))],
    377          AM_CONDITIONAL(HAVE_LIBVLC, false))
    378 
    379 AC_CHECK_LIB(mpeg2, mpeg2_init,
    380         [AC_CHECK_HEADERS([mpeg2dec/mpeg2.h],
    381            AM_CONDITIONAL(HAVE_MPEG2, true)
    382            AC_DEFINE(HAVE_MPEG2,1,[Have libmpeg2]),
    383          AM_CONDITIONAL(HAVE_MPEG2, false))],
    384          AM_CONDITIONAL(HAVE_MPEG2, false))
    385 
    386 AC_CHECK_LIB(jpeg, jpeg_mem_src,
    387         [AC_CHECK_HEADERS([jpeglib.h],
    388            AM_CONDITIONAL(HAVE_JPEG, true)
    389            AC_DEFINE(HAVE_JPEG,1,[Have libjpeg]),
    390          AM_CONDITIONAL(HAVE_JPEG, false))],
    391          AM_CONDITIONAL(HAVE_JPEG, false))
    392 
    393 AC_CHECK_LIB(tiff, TIFFClientOpen,
    394         [AC_CHECK_HEADERS([tiffio.h],
    395            AM_CONDITIONAL(HAVE_TIFF, true)
    396            AC_DEFINE(HAVE_TIFF,1,[Have libtiff]),
    397          AM_CONDITIONAL(HAVE_TIFF, false))],
    398          AM_CONDITIONAL(HAVE_TIFF, false))
    399 
    400 AC_CHECK_LIB(archive, archive_read_open,
    401         [AC_CHECK_HEADERS([archive.h],
    402            AM_CONDITIONAL(HAVE_ARCHIVE, true)
    403            AC_DEFINE(HAVE_ARCHIVE,1,[Have libarchive]),
    404          AM_CONDITIONAL(HAVE_ARCHIVE, false))],
    405          AM_CONDITIONAL(HAVE_ARCHIVE, false))
    406 
    407 # should experimental code be compiled (code that may not yet compile)?
    408 AC_MSG_CHECKING(whether to compile experimental code)
    409 AC_ARG_ENABLE([experimental],
    410    [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])],
    411    [enable_experimental=${enableval}],
    412    [enable_experimental=no])
    413 AC_MSG_RESULT($enable_experimental)
    414 AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
    415 
    416 
    417 AC_MSG_CHECKING(for ImageFactory::iptcData in -lexiv2)
    418 AC_LANG_PUSH(C++)
    419 SAVED_AM_LDFLAGS=$AM_LDFLAGS
    420 AM_LDFLAGS="$AM_LDFLAGS -lexiv2"
    421 AC_LINK_IFELSE(
    422   [AC_LANG_PROGRAM([[#include <iostream>
    423 #include <exiv2/exif.hpp>
    424 #include <exiv2/image.hpp>
    425 #include <exiv2/futils.hpp>]],
    426     [[Exiv2::Image *foo = NULL; foo->iptcData(); ]])],
    427   [AC_MSG_RESULT(yes)
    428    AM_CONDITIONAL(HAVE_EXIV2, true)
    429    AC_DEFINE(HAVE_EXIV2,1,[Have exifData in libexiv2])],
    430   [AC_MSG_RESULT(no)
    431    AM_CONDITIONAL(HAVE_EXIV2, false)])
    432 AM_LDFLAGS=$SAVED_AM_LDFLAGS
    433 AC_LANG_POP(C++)
    434 
    435 
    436 # poppler-cpp is poppler's stable C++ binding.  0.73.0 (2019) is
    437 # the first release with the non-deprecated time_t date accessors
    438 # that the PDF plugin relies on.
    439 PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.73.0],
    440   [AM_CONDITIONAL(HAVE_POPPLER, true)
    441    AC_DEFINE(HAVE_POPPLER, 1, [Have libpoppler-cpp])],
    442   [AM_CONDITIONAL(HAVE_POPPLER, false)])
    443 
    444 
    445 AC_MSG_CHECKING(for DGifOpen -lgif)
    446 SAVED_AM_LDFLAGS=$AM_LDFLAGS
    447 AC_CHECK_LIB(gif, DGifOpen,
    448   [AC_CHECK_HEADERS([gif_lib.h],
    449    AM_CONDITIONAL(HAVE_GIF, true)
    450    AC_DEFINE(HAVE_GIF,1,[Have libgif]),
    451    AM_CONDITIONAL(HAVE_GIF, false))],
    452   AM_CONDITIONAL(HAVE_GIF, false))
    453 
    454 AC_MSG_CHECKING(for magic_open -lmagic)
    455 SAVED_AM_LDFLAGS=$AM_LDFLAGS
    456 have_magic=no
    457 AC_CHECK_LIB(magic, magic_open,
    458   [AC_CHECK_HEADERS([magic.h],
    459    [AM_CONDITIONAL(HAVE_MAGIC, true)
    460     have_magic=yes],
    461    AM_CONDITIONAL(HAVE_MAGIC, false))],
    462   AM_CONDITIONAL(HAVE_MAGIC, false))
    463 
    464 # tidyNodeGetValue was already available in 5.0.0, released in 2015.
    465 maybe_tidy=1
    466 PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0],
    467  [AC_DEFINE(HAVE_TIDY, 1, [Have tidy])
    468   AM_CONDITIONAL(HAVE_TIDY, true)],
    469  [maybe_tidy=0])
    470 CFLAGS="$CFLAGS $TIDY_CFLAGS"
    471 LIBS="$LIBS $TIDY_LIBS"
    472 
    473 AC_CHECK_HEADERS([tidy.h],,
    474   AC_CHECK_HEADERS([tidy/tidy.h],,[maybe_tidy=0]))
    475 
    476 AM_CONDITIONAL(HAVE_TIDY, test "x$maybe_tidy" = "x1")
    477 
    478 # should 'make check' run tests?
    479 AC_MSG_CHECKING(whether to run tests)
    480 AC_ARG_ENABLE([testruns],
    481    [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
    482    [enable_tests_run=${enableval}],
    483    [enable_tests_run=yes])
    484 AC_MSG_RESULT($enable_test_run)
    485 AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
    486 
    487 AC_HEADER_DIRENT
    488 AC_HEADER_STDBOOL
    489 AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h])
    490 
    491 # Checks for typedefs, structures, and compiler characteristics.
    492 AC_C_INLINE
    493 AC_TYPE_SIZE_T
    494 AC_TYPE_PID_T
    495 GNUPG_CHECK_ENDIAN
    496 
    497 # Checks for library functions.
    498 AC_FUNC_MEMCMP
    499 AC_FUNC_VPRINTF
    500 AC_FUNC_MMAP
    501 AC_FUNC_STAT
    502 AC_FUNC_ERROR_AT_LINE
    503 AC_SEARCH_LIBS(dlopen, dl)
    504 AC_SEARCH_LIBS(shm_open, rt)
    505 AC_CHECK_FUNCS([mkstemp strndup munmap strcasecmp strdup strncasecmp memmove memset strtoul floor getcwd pow setenv sqrt strchr strcspn strrchr strnlen strndup ftruncate shm_open shm_unlink lseek64 secure_getenv issetugid])
    506 
    507 
    508 # is kind of tedious, but simple and straightforward
    509 sockets=no
    510 AC_MSG_CHECKING(for sockets)
    511 AC_LANG_PUSH(C)
    512 SAVED_LIBS="$LIBS"
    513 SOCKET_LIBS=
    514 AC_LINK_IFELSE(
    515   [
    516     AC_LANG_PROGRAM(
    517       [[#include <sys/socket.h>]],
    518       [[int s = socket (AF_INET, SOCK_STREAM, 6);]]
    519     )
    520   ],
    521   [
    522     sockets=yes
    523   ],
    524   [
    525     LIBS="$SAVED_LIBS -lsocket"
    526     AC_LINK_IFELSE(
    527       [
    528         AC_LANG_PROGRAM(
    529           [[#include <sys/socket.h>]],
    530           [[int s = socket (AF_INET, SOCK_STREAM, 6);]]
    531         )
    532       ],
    533       [
    534         sockets=yes
    535         SOCKET_LIBS="-lsocket"
    536       ],
    537       [
    538         AC_LINK_IFELSE(
    539           [
    540             AC_LANG_PROGRAM(
    541               [[#include <winsock2.h>]],
    542               [[int s = socket (AF_INET, SOCK_STREAM, 6);]]
    543             )
    544           ],
    545           [
    546             sockets=yes
    547           ],
    548           [
    549             LIBS="$SAVED_LIBS -lws2_32"
    550             AC_LINK_IFELSE(
    551               [
    552                 AC_LANG_PROGRAM(
    553                   [[#include <winsock2.h>]],
    554                   [[int s = socket (AF_INET, SOCK_STREAM, 6);]]
    555                 )
    556               ],
    557               [
    558                 sockets=yes
    559                 SOCKET_LIBS="-lws2_32"
    560               ],
    561               [
    562                 sockets=no
    563               ]
    564             )
    565           ]
    566         )
    567       ]
    568     )
    569   ]
    570 )
    571 LIBS="$SAVED_LIBS $SOCKET_LIBS"
    572 AC_LANG_POP(C)
    573 AC_MSG_RESULT([$sockets])
    574 AS_IF([test "x$sockets" = "xno"],
    575       [AC_MSG_ERROR([libextractor requires some kind of socket library])])
    576 AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS])
    577 
    578 LE_LIB_LIBS=$LIBS
    579 LIBS=$LIBSOLD
    580 
    581 AM_GNU_GETTEXT_VERSION([0.23.1])
    582 AM_GNU_GETTEXT([external])
    583 
    584 # check for GNU LD
    585 AC_LIB_PROG_LD_GNU
    586 
    587 # check for glib >= 2.0.0
    588 AC_MSG_CHECKING(for glib)
    589 AM_PATH_GLIB_2_0(2.0.0,
    590 	         without_glib=false,
    591                  without_glib=true)
    592 AC_MSG_CHECKING([whether glib is disabled])
    593 AC_ARG_ENABLE(glib,
    594   [AS_HELP_STRING([--disable-glib],[disable glib support])],
    595   [case "$enableval" in
    596    no)  AC_MSG_RESULT(disabled)
    597         without_glib=true
    598         ;;
    599    *)   AC_MSG_RESULT(allowed)
    600         ;;
    601    esac],
    602   AC_MSG_RESULT(allowed))
    603 
    604 AS_IF([test x$without_glib != xtrue],
    605       [AS_IF([test $with_gnu_ld = yes],
    606              [# We need both GNU LD and GLIB here!
    607               AM_CONDITIONAL(HAVE_GLIB,true)
    608               AC_DEFINE(HAVE_GLIB, 1, [Have glib])],
    609              [# We may have GLIB, but without GNU LD we must not use it!
    610               AM_CONDITIONAL(HAVE_GLIB,false)
    611               AC_DEFINE(HAVE_GLIB, 0, [Have glib, but not GNU LD])])],
    612      [AM_CONDITIONAL(HAVE_GLIB,false)
    613       AC_DEFINE(HAVE_GLIB, 0, [Have glib])])
    614 
    615 # smf requires glib.h
    616 CFLAGS_OLD="$CFLAGS"
    617 CPPFLAGS_OLD="$CPPFLAGS"
    618 CFLAGS="$AM_CFLAGS $GLIB_CFLAGS"
    619 CPPFLAGS="$AM_CPPFLAGS $GLIB_CFLAGS"
    620 
    621 AC_CHECK_LIB(smf, smf_load_from_memory,
    622         [AC_CHECK_HEADERS([smf.h],
    623            AM_CONDITIONAL(HAVE_SMF, true)
    624            AC_DEFINE(HAVE_MPEG2,1,[Have libsmf]),
    625          AM_CONDITIONAL(HAVE_SMF, false))],
    626          AM_CONDITIONAL(HAVE_SMF, false))
    627 
    628 # check for gdk-pixbuf >= 2.4
    629 AC_MSG_CHECKING(for gdk-pixbuf)
    630 PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.4], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no])
    631 
    632 AM_CONDITIONAL(HAVE_GDK_PIXBUF, test x$have_gdk_pixbuf != xno)
    633 AS_IF([test $have_gdk_pixbuf != no],
    634       [have_gdk_pixbuf=1],
    635       [have_gdk_pixbuf=0
    636       AC_MSG_NOTICE([Cannot find Gdk-pixbuf: Is pkg-config in path?])])
    637 AC_DEFINE_UNQUOTED([HAVE_GDK_PIXBUF], [$have_gdk_pixbuf], [We have Gdk-pixbuf])
    638 
    639 CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
    640 CPPFLAGS="$CPPFLAGS $GDK_PIXBUF_CFLAGS"
    641 LIBS="$LIBS $GDK_PIXBUF_LIBS"
    642 
    643 
    644 AC_ARG_WITH([gstreamer], AS_HELP_STRING([--with-gstreamer], [Build with the GStreamer plugin]), [], [with_gstreamer=yes])
    645 
    646 have_gstreamer=no
    647 have_gstreamer_pbutils=no
    648 have_gstreamer_tag=no
    649 have_gstreamer_app=no
    650 AS_IF([test "x$with_gstreamer" = "xyes"], [
    651    PKG_CHECK_MODULES([GSTREAMER], [gstreamer-1.0 >= 0.11.93], [have_gstreamer=yes], [have_gstreamer=no])
    652    PKG_CHECK_MODULES([GSTREAMER_PBUTILS], [gstreamer-pbutils-1.0 >= 0.11.93], [have_gstreamer_pbutils=yes], [have_gstreamer_pbutils=no])
    653    PKG_CHECK_MODULES([GSTREAMER_TAG], [gstreamer-tag-1.0 >= 0.11.93], [have_gstreamer_tag=yes], [have_gstreamer_tag=no])
    654    PKG_CHECK_MODULES([GSTREAMER_APP], [gstreamer-app-1.0 >= 0.11.93], [have_gstreamer_app=yes], [have_gstreamer_app=no])
    655 ])
    656 
    657 AM_CONDITIONAL(HAVE_GSTREAMER, test x$have_gstreamer = xyes -a x$have_gstreamer_pbutils = xyes -a x$have_gstreamer_tag = xyes -a x$have_gstreamer_app = xyes -a ! x$without_glib = xtrue)
    658 
    659 # The video thumbnailer and the audio preview plugin need more of
    660 # GStreamer than the metadata plugin does: gstreamer-video-1.0 for
    661 # gst_video_convert_sample() and gstreamer-controller-1.0 for the fade.
    662 # 1.8 (2016) is the first release that ships opusenc in -base.
    663 have_gstreamer_video=no
    664 have_gstreamer_controller=no
    665 AS_IF([test "x$with_gstreamer" = "xyes"], [
    666    PKG_CHECK_MODULES([GSTREAMER_VIDEO], [gstreamer-video-1.0 >= 1.8], [have_gstreamer_video=yes], [have_gstreamer_video=no])
    667    PKG_CHECK_MODULES([GSTREAMER_CONTROLLER], [gstreamer-controller-1.0 >= 1.8], [have_gstreamer_controller=yes], [have_gstreamer_controller=no])
    668 ])
    669 gstreamer_media=no
    670 AS_IF([test "x$have_gstreamer" = "xyes" -a "x$have_gstreamer_app" = "xyes" -a "x$have_gstreamer_video" = "xyes" -a "x$have_gstreamer_controller" = "xyes" -a "x$have_magic" = "xyes" -a ! "x$without_glib" = "xtrue"],
    671   [gstreamer_media=yes])
    672 AM_CONDITIONAL(HAVE_GSTREAMER_MEDIA, test "x$gstreamer_media" = "xyes")
    673 
    674 # FFmpeg-based video thumbnailer and audio preview plugin.  Note the
    675 # version floor: FFmpeg 5.1 is the first release with the AVChannelLayout
    676 # API, and supporting anything older would mean re-introducing the
    677 # per-version compatibility code that got the predecessors of these two
    678 # plugins deleted in 2021.
    679 AC_ARG_WITH([ffmpeg],
    680   AS_HELP_STRING([--without-ffmpeg], [do not build the FFmpeg-based plugins]),
    681   [], [with_ffmpeg=yes])
    682 have_ffmpeg=no
    683 have_swresample=no
    684 AS_IF([test "x$with_ffmpeg" = "xyes"], [
    685    PKG_CHECK_MODULES([FFMPEG],
    686      [libavformat >= 59.27 libavcodec >= 59.37 libavutil >= 57.28 libswscale >= 6.7],
    687      [have_ffmpeg=yes], [have_ffmpeg=no])
    688    PKG_CHECK_MODULES([FFMPEG_SWR], [libswresample >= 4.7], [have_swresample=yes], [have_swresample=no])
    689 ])
    690 ffmpeg_video=no
    691 AS_IF([test "x$have_ffmpeg" = "xyes" -a "x$have_magic" = "xyes"],
    692   [ffmpeg_video=yes])
    693 AM_CONDITIONAL(HAVE_FFMPEG, test "x$ffmpeg_video" = "xyes")
    694 ffmpeg_audio=no
    695 AS_IF([test "x$ffmpeg_video" = "xyes" -a "x$have_swresample" = "xyes"],
    696   [ffmpeg_audio=yes])
    697 AM_CONDITIONAL(HAVE_FFMPEG_AUDIO, test "x$ffmpeg_audio" = "xyes")
    698 
    699 ABI_GSF
    700 
    701 AM_CONDITIONAL(HAVE_GSF, test "x$have_gsf" = "xtrue")
    702 
    703 # produce new line
    704 echo ""
    705 AC_CHECK_LIB(gsf-1, gsf_init, AC_DEFINE(HAVE_GSF_INIT,1,[gsf_init supported]))
    706 AC_CHECK_LIB(gsf-1, gsf_doc_meta_data_read_from_msole, AC_DEFINE(HAVE_GSF_DOC_META_DATA_READ_FROM_MSOLE,1,[gsf_doc_meta_data_read_from_msole supported]))
    707 
    708 
    709 CFLAGS="$CFLAGS_OLD"
    710 CPPFLAGS="$CPPFLAGS_OLD"
    711 
    712 
    713 # Fuzzing harnesses (src/fuzz).  They are only meaningful in a build with
    714 # sanitizers, and they call functions that are hidden in the shared
    715 # objects, so they need the static archives.
    716 AC_MSG_CHECKING([whether to build the fuzzing harnesses])
    717 AC_ARG_ENABLE([fuzzing],
    718   [AS_HELP_STRING([--enable-fuzzing],
    719     [build the in-process fuzzing harnesses in src/fuzz and run them as ]
    720     [part of "make check"; requires a static build of the library and is ]
    721     [only really useful together with a sanitizer build [no]])],
    722   [], [enable_fuzzing="no"])
    723 AS_IF([test "x$enable_fuzzing" = "xyes"],
    724   [AS_IF([test "x$enable_static" = "xno"],
    725      [AC_MSG_RESULT([no])
    726       AC_MSG_ERROR([--enable-fuzzing requires --enable-static])],
    727      [AC_MSG_RESULT([yes])])],
    728   [enable_fuzzing="no"
    729    AC_MSG_RESULT([no])])
    730 AM_CONDITIONAL([ENABLE_FUZZING], [test "x$enable_fuzzing" = "xyes"])
    731 
    732 LE_INTLINCL=""
    733 LE_LIBINTL="$LTLIBINTL"
    734 AC_ARG_ENABLE(framework, [  --enable-framework      enable Mac OS X framework build helpers],enable_framework_build=$enableval)
    735 AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
    736 AS_IF([test x$enable_framework_build = xyes],
    737  [AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
    738   LE_INTLINCL='-I$(top_srcdir)/src/intlemu'
    739   LE_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
    740   AC_LIB_APPENDTOVAR([AM_CPPFLAGS], [$LE_INTLINCL])
    741  ])
    742 
    743 LE_LIB_LDFLAGS="-export-dynamic -no-undefined"
    744 LE_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
    745 
    746 
    747 # TODO insert a proper check here
    748 AC_CACHE_CHECK([whether -export-symbols-regex works],
    749  gn_cv_export_symbols_regex_works,
    750  [AS_CASE(["$host_os"],
    751    [mingw*],[gn_cv_export_symbols_regex_works=no],
    752    [gn_cv_export_symbols_regex_works=yes])
    753  ])
    754 AS_IF([test "x$gn_cv_export_symbols_regex_works" = "xyes"],
    755  [LE_LIB_LDFLAGS="$LE_LIB_LDFLAGS -export-symbols-regex \"(EXTRACTOR|pl)_@<:@a-zA-Z0-9_@:>@*\""
    756  LE_PLUGIN_LDFLAGS="$LE_PLUGIN_LDFLAGS -export-symbols-regex \"(EXTRACTOR|pl)_@<:@a-zA-Z0-9_@:>@*_.......\""
    757  ])
    758 
    759 # restore LIBS
    760 LIBS=$LIBSOLD
    761 
    762 AC_SUBST(LE_LIB_LDFLAGS)
    763 AC_SUBST(LE_PLUGIN_LDFLAGS)
    764 AC_SUBST(LE_INTLINCL)
    765 AC_SUBST(LE_LIBINTL)
    766 AC_SUBST(LE_LIB_LIBS)
    767 
    768 AC_SUBST(QT_CPPFLAGS)
    769 AC_SUBST(QT_LDFLAGS)
    770 AC_SUBST(XTRA_CPPLIBS)
    771 AC_SUBST(LIBEXT)
    772 
    773 PACKAGE_VERSION_NOALPHA=`echo $PACKAGE_VERSION | sed "s/@<:@A-Za-z@:>@*//g;"`
    774 AC_SUBST(PACKAGE_VERSION_NOALPHA)
    775 
    776 # gcov compilation
    777 AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
    778 AC_ARG_ENABLE([coverage],
    779               AS_HELP_STRING([--enable-coverage],
    780                              [compile the library with code coverage support]),
    781               [use_gcov=${enableval}],
    782               [use_gcov=no])
    783 AC_MSG_RESULT($use_gcov)
    784 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
    785 
    786 
    787 
    788 AC_CONFIG_FILES([Makefile
    789 po/Makefile.in
    790 m4/Makefile
    791 contrib/macosx/Info.plist
    792 contrib/macosx/Pkg-Info.plist
    793 doc/Makefile
    794 src/Makefile
    795 src/include/Makefile
    796 src/intlemu/Makefile
    797 src/common/Makefile
    798 src/main/Makefile
    799 src/plugins/Makefile
    800 src/fuzz/Makefile
    801 ])
    802 
    803 AX_CREATE_PKGCONFIG_INFO([libextractor.pc],,[-lextractor],[Metadata extraction library],,)
    804 
    805 AC_OUTPUT
    806 
    807 AS_IF([test "x$HAVE_ZLIB_TRUE" = "x#"],
    808   [AC_MSG_NOTICE([NOTICE: zlib not found, zlib support disabled])])
    809 
    810 AS_IF([test "x$HAVE_BZ2_TRUE" = "x#"],
    811   [AC_MSG_NOTICE([NOTICE: libbz2 not found, bz2 support disabled])])
    812 
    813 AS_IF([test "x$HAVE_EXIV2_TRUE" = "x#"],
    814   [AC_MSG_NOTICE([NOTICE: libexiv2 not found, exiv2 disabled])])
    815 
    816 AS_IF([test "x$HAVE_POPPLER_TRUE" = "x#"],
    817   [AC_MSG_NOTICE([NOTICE: libpoppler-cpp not found, PDF support disabled])])
    818 
    819 AS_IF([test "x$HAVE_TIFF_TRUE" = "x#"],
    820   [AC_MSG_NOTICE([NOTICE: libtiff not found, tiff disabled])])
    821 
    822 AS_IF([test "x$HAVE_JPEG_TRUE" = "x#"],
    823   [AC_MSG_NOTICE([NOTICE: libjpeg not found, jpeg disabled])])
    824 
    825 AS_IF([test "x$HAVE_GIF_TRUE" = "x#"],
    826   [AC_MSG_NOTICE([NOTICE: libgif not found, gif disabled])])
    827 
    828 AS_IF([test "x$have_gsf" != "xtrue"],
    829   [AC_MSG_NOTICE([NOTICE: libgsf not found, no OLE2 (MS Office) support])])
    830 
    831 AS_IF([test "x$have_gdk_pixbuf" = "x0"],
    832   [AC_MSG_NOTICE([NOTICE: libgdk-pixbuf not found, gtk thumbnail support disabled])])
    833 
    834 AS_IF([test "x$HAVE_VORBISFILE_TRUE" = "x#"],
    835   [AC_MSG_NOTICE([NOTICE: libvorbis not found, vorbis support disabled])])
    836 
    837 AS_IF([test "x$HAVE_FLAC_TRUE" = "x#"],
    838   [AC_MSG_NOTICE([NOTICE: libflac not found, flac support disabled])])
    839 
    840 AS_IF([test "x$HAVE_SMF_TRUE" = "x#"],
    841   [AC_MSG_NOTICE([NOTICE: libsmf not found, midi support disabled])])
    842 
    843 AS_IF([test "x$HAVE_MPEG2_TRUE" = "x#"],
    844   [AC_MSG_NOTICE([NOTICE: libmpeg2 not found, mpeg2 support disabled])])
    845 
    846 AS_IF([test "x$HAVE_VLC_TRUE" = "x#"],
    847   [AC_MSG_NOTICE([NOTICE: libvlc not found, libvlc support disabled])])
    848 
    849 AS_IF([test "x$HAVE_RPM_TRUE" = "x#"],
    850   [AC_MSG_NOTICE([NOTICE: librpm not found, rpm support disabled])])
    851 
    852 AS_IF([test "x$HAVE_CXX" != "xyes"],
    853   [AC_MSG_NOTICE([NOTICE: no C++ compiler found (not compiling plugins that require C++)])])
    854 
    855 AS_IF([test x$have_gstreamer = xyes -a x$have_gstreamer_pbutils = xyes -a x$have_gstreamer_tag = xyes -a x$have_gstreamer_app = xyes -a ! x$without_glib = xtrue],
    856   [AS_IF([test x$enable_experimental = xyes],
    857     [AC_MSG_NOTICE([NOTICE: gstreamer enabled])])],
    858   [AC_MSG_NOTICE([NOTICE: gstreamer not found, gstreamer support disabled])])
    859 
    860 AS_IF([test "x$gstreamer_media" = "xyes"],
    861   [AC_MSG_NOTICE([NOTICE: gstreamer video thumbnail and audio preview plugins enabled])],
    862   [AC_MSG_NOTICE([NOTICE: gstreamer-video/-controller/-app or libmagic missing, gstreamer thumbnail and preview plugins disabled])])
    863 
    864 AS_IF([test "x$ffmpeg_video" = "xyes"],
    865   [AC_MSG_NOTICE([NOTICE: FFmpeg video thumbnail plugin enabled])],
    866   [AC_MSG_NOTICE([NOTICE: FFmpeg >= 5.1 or libmagic not found, FFmpeg thumbnail plugin disabled])])
    867 
    868 AS_IF([test "x$ffmpeg_audio" = "xyes"],
    869   [AC_MSG_NOTICE([NOTICE: FFmpeg opus audio preview plugin enabled])],
    870   [AC_MSG_NOTICE([NOTICE: libswresample not found, FFmpeg opus audio preview plugin disabled])])
    871 
    872 AS_IF([test "x$HAVE_APPARMOR_TRUE" = "x#"],
    873  [AC_MSG_NOTICE([NOTICE: libapparmor not found, apparmor support disabled])])