diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 90 |
1 files changed, 21 insertions, 69 deletions
diff --git a/configure.ac b/configure.ac index 3c9b972..703c4a6 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,7 +1,7 @@ | |||
1 | # Process this file with autoconf to produce a configure script. | 1 | # Process this file with autoconf to produce a configure script. |
2 | # | 2 | # |
3 | # This file is part of GNU libextractor | 3 | # This file is part of GNU libextractor |
4 | # Copyright (C) 2003-2020 Christian Grothoff | 4 | # Copyright (C) 2003-2023 Christian Grothoff |
5 | # | 5 | # |
6 | # GNU libextractor is free software; you can redistribute it and/or modify it under the | 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 | 7 | # terms of the GNU General Public License as published by the Free Software |
@@ -15,15 +15,15 @@ | |||
15 | # GNU libextractor; see the file COPYING. If not, If not, see <http://www.gnu.org/license> | 15 | # GNU libextractor; see the file COPYING. If not, If not, see <http://www.gnu.org/license> |
16 | # | 16 | # |
17 | # | 17 | # |
18 | AC_PREREQ(2.61) | 18 | AC_PREREQ([2.71]) |
19 | AC_INIT([libextractor], [1.10], [bug-libextractor@gnu.org]) | 19 | AC_INIT([libextractor],[1.13],[bug-libextractor@gnu.org]) |
20 | AC_CONFIG_AUX_DIR([build-aux]) | 20 | AC_CONFIG_AUX_DIR([build-aux]) |
21 | AC_CONFIG_HEADERS([config.h]) | 21 | AC_CONFIG_HEADERS([config.h]) |
22 | AC_CONFIG_MACRO_DIR([m4]) | 22 | AC_CONFIG_MACRO_DIR([m4]) |
23 | AH_TOP([#define _GNU_SOURCE 1]) | 23 | AH_TOP([#define _GNU_SOURCE 1]) |
24 | AC_CANONICAL_TARGET | 24 | AC_CANONICAL_TARGET |
25 | AC_CANONICAL_HOST | 25 | AC_CANONICAL_HOST |
26 | AC_CANONICAL_SYSTEM | 26 | AC_CANONICAL_TARGET |
27 | 27 | ||
28 | LIB_VERSION_CURRENT=4 | 28 | LIB_VERSION_CURRENT=4 |
29 | LIB_VERSION_REVISION=8 | 29 | LIB_VERSION_REVISION=8 |
@@ -46,7 +46,7 @@ AC_PROG_INSTALL | |||
46 | AC_PROG_LN_S | 46 | AC_PROG_LN_S |
47 | AC_PROG_MAKE_SET | 47 | AC_PROG_MAKE_SET |
48 | AC_CANONICAL_HOST | 48 | AC_CANONICAL_HOST |
49 | AC_PROG_LIBTOOL | 49 | LT_INIT |
50 | # save LIBS, libtool does a AC_SEARCH_LIBS(dlopen, dl), but plugins | 50 | # save LIBS, libtool does a AC_SEARCH_LIBS(dlopen, dl), but plugins |
51 | # need not have -ldl added | 51 | # need not have -ldl added |
52 | LT_INIT([disable-static dlopen win32-dll]) | 52 | LT_INIT([disable-static dlopen win32-dll]) |
@@ -176,6 +176,8 @@ AS_CASE(["$target_os"], | |||
176 | 176 | ||
177 | AM_ICONV | 177 | AM_ICONV |
178 | 178 | ||
179 | PKG_PROG_PKG_CONFIG() | ||
180 | |||
179 | # We define the paths here, because MinGW/GCC expands paths | 181 | # We define the paths here, because MinGW/GCC expands paths |
180 | # passed through the command line ("-DLOCALEDIR=..."). This would | 182 | # passed through the command line ("-DLOCALEDIR=..."). This would |
181 | # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do | 183 | # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do |
@@ -189,9 +191,7 @@ AC_DEFINE_DIR([ISOLOCALEDIR], [ISOPFX/share/locale], [iso-639 catalog]) | |||
189 | # relative plugin directory | 191 | # relative plugin directory |
190 | rplugindir="libextractor" | 192 | rplugindir="libextractor" |
191 | AC_ARG_WITH(plugindirname, | 193 | AC_ARG_WITH(plugindirname, |
192 | AC_HELP_STRING( | 194 | AS_HELP_STRING([--with-plugindirname],[install directory for plugins (always relative to libdir)]), |
193 | [--with-plugindirname], | ||
194 | [install directory for plugins (always relative to libdir)]), | ||
195 | [rplugindir=$withval]) | 195 | [rplugindir=$withval]) |
196 | AC_SUBST(RPLUGINDIR, $rplugindir) | 196 | AC_SUBST(RPLUGINDIR, $rplugindir) |
197 | 197 | ||
@@ -426,25 +426,19 @@ AC_CHECK_LIB(magic, magic_open, | |||
426 | AM_CONDITIONAL(HAVE_MAGIC, false))], | 426 | AM_CONDITIONAL(HAVE_MAGIC, false))], |
427 | AM_CONDITIONAL(HAVE_MAGIC, false)) | 427 | AM_CONDITIONAL(HAVE_MAGIC, false)) |
428 | 428 | ||
429 | AC_MSG_CHECKING(for tidyNodeGetValue -ltidy) | 429 | # tidyNodeGetValue was already available in 5.0.0, released in 2015. |
430 | AC_LANG_PUSH(C++) | 430 | maybe_tidy=1 |
431 | SAVED_LIBS=$LIBS | 431 | PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0], |
432 | LIBS="$LIBS -ltidy" | 432 | [AC_DEFINE(HAVE_TIDY, 1, [Have tidy]) |
433 | AC_LINK_IFELSE( | 433 | AM_CONDITIONAL(HAVE_TIDY, true)], |
434 | [AC_LANG_PROGRAM([[#include <tidy/tidy.h>]], | 434 | [maybe_tidy=0]) |
435 | [[ Bool b = tidyNodeGetValue (NULL, NULL, NULL); ]])], | 435 | CFLAGS="$CFLAGS $TIDY_CFLAGS" |
436 | [AC_MSG_RESULT(yes) | 436 | LIBS="$LIBS $TIDY_LIBS" |
437 | AM_CONDITIONAL(HAVE_TIDY, true) | ||
438 | AC_DEFINE(HAVE_TIDY,1,[Have tidyNodeGetValue in libtidy])], | ||
439 | [AC_MSG_RESULT(no) | ||
440 | AM_CONDITIONAL(HAVE_TIDY, false)]) | ||
441 | LIBS=$SAVED_LIBS | ||
442 | AC_LANG_POP(C++) | ||
443 | |||
444 | # restore LIBS | ||
445 | LIBS=$LIBSOLD | ||
446 | 437 | ||
438 | AC_CHECK_HEADERS([tidy.h],, | ||
439 | AC_CHECK_HEADERS([tidy/tidy.h],,[maybe_tidy=0])) | ||
447 | 440 | ||
441 | AM_CONDITIONAL(HAVE_TIDY, test "x$maybe_tidy" = "x1") | ||
448 | 442 | ||
449 | # should 'make check' run tests? | 443 | # should 'make check' run tests? |
450 | AC_MSG_CHECKING(whether to run tests) | 444 | AC_MSG_CHECKING(whether to run tests) |
@@ -455,10 +449,6 @@ AC_ARG_ENABLE([testruns], | |||
455 | AC_MSG_RESULT($enable_test_run) | 449 | AC_MSG_RESULT($enable_test_run) |
456 | AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) | 450 | AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) |
457 | 451 | ||
458 | |||
459 | |||
460 | # Checks for header files. | ||
461 | AC_HEADER_STDC | ||
462 | AC_HEADER_DIRENT | 452 | AC_HEADER_DIRENT |
463 | AC_HEADER_STDBOOL | 453 | AC_HEADER_STDBOOL |
464 | AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h]) | 454 | AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h]) |
@@ -553,7 +543,7 @@ AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS]) | |||
553 | LE_LIB_LIBS=$LIBS | 543 | LE_LIB_LIBS=$LIBS |
554 | LIBS=$LIBSOLD | 544 | LIBS=$LIBSOLD |
555 | 545 | ||
556 | AM_GNU_GETTEXT_VERSION([0.16.1]) | 546 | AM_GNU_GETTEXT_VERSION([0.21]) |
557 | AM_GNU_GETTEXT([external]) | 547 | AM_GNU_GETTEXT([external]) |
558 | 548 | ||
559 | # check for GNU LD | 549 | # check for GNU LD |
@@ -566,7 +556,7 @@ AM_PATH_GLIB_2_0(2.0.0, | |||
566 | without_glib=true) | 556 | without_glib=true) |
567 | AC_MSG_CHECKING([whether glib is disabled]) | 557 | AC_MSG_CHECKING([whether glib is disabled]) |
568 | AC_ARG_ENABLE(glib, | 558 | AC_ARG_ENABLE(glib, |
569 | [AC_HELP_STRING([--disable-glib],[disable glib support])], | 559 | [AS_HELP_STRING([--disable-glib],[disable glib support])], |
570 | [case "$enableval" in | 560 | [case "$enableval" in |
571 | no) AC_MSG_RESULT(disabled) | 561 | no) AC_MSG_RESULT(disabled) |
572 | without_glib=true | 562 | without_glib=true |
@@ -648,38 +638,6 @@ CPPFLAGS="$CPPFLAGS_OLD" | |||
648 | AC_CHECK_PROG([HAVE_ZZUF],[zzuf], 1, 0) | 638 | AC_CHECK_PROG([HAVE_ZZUF],[zzuf], 1, 0) |
649 | AM_CONDITIONAL(HAVE_ZZUF, test 0 != $HAVE_ZZUF) | 639 | AM_CONDITIONAL(HAVE_ZZUF, test 0 != $HAVE_ZZUF) |
650 | 640 | ||
651 | AC_MSG_CHECKING([whether to enable the FFmpeg thumbnail extractor]) | ||
652 | new_ffmpeg=0 | ||
653 | AC_ARG_ENABLE(ffmpeg, | ||
654 | [AC_HELP_STRING([--enable-ffmpeg],[Enable FFmpeg support]) | ||
655 | AC_HELP_STRING([--disable-ffmpeg],[Disable FFmpeg support])], | ||
656 | [AS_CASE(["$enableval"], | ||
657 | [no],[ | ||
658 | AC_MSG_RESULT(no) | ||
659 | ffmpeg_enabled=0 | ||
660 | ],[ | ||
661 | AC_MSG_RESULT(yes) | ||
662 | ffmpeg_enabled=1 | ||
663 | ])], | ||
664 | [ AC_MSG_RESULT(yes) | ||
665 | ffmpeg_enabled=1]) | ||
666 | AS_IF([test x$ffmpeg_enabled = x1], | ||
667 | [ffmpeg_enabled=0 | ||
668 | new_ffmpeg=0 | ||
669 | AC_CHECK_HEADERS([libavutil/avutil.h libavformat/avformat.h libavcodec/avcodec.h libavutil/frame.h], | ||
670 | AC_CHECK_HEADERS([libavresample/avresample.h], | ||
671 | AC_CHECK_LIB(avutil, av_audio_fifo_alloc, | ||
672 | new_ffmpeg=1))) | ||
673 | |||
674 | AC_CHECK_LIB(swscale, sws_getContext, | ||
675 | AC_CHECK_LIB(avcodec, avcodec_alloc_context3, | ||
676 | ffmpeg_enabled=1)) | ||
677 | AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/avutil.h libavformat/avformat.h ffmpeg/avformat.h libavcodec/avcodec.h ffmpeg/avcodec.h libswscale/swscale.h ffmpeg/swscale.h]) | ||
678 | ]) | ||
679 | AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0) | ||
680 | AM_CONDITIONAL(HAVE_FFMPEG_NEW, test x$new_ffmpeg != x0) | ||
681 | |||
682 | |||
683 | LE_INTLINCL="" | 641 | LE_INTLINCL="" |
684 | LE_LIBINTL="$LTLIBINTL" | 642 | LE_LIBINTL="$LTLIBINTL" |
685 | AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval) | 643 | AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval) |
@@ -775,12 +733,6 @@ AS_IF([test "x$HAVE_GIF_TRUE" = "x#"], | |||
775 | AS_IF([test "x$have_gsf" != "xtrue"], | 733 | AS_IF([test "x$have_gsf" != "xtrue"], |
776 | [AC_MSG_NOTICE([NOTICE: libgsf not found, no OLE2 (MS Office) support])]) | 734 | [AC_MSG_NOTICE([NOTICE: libgsf not found, no OLE2 (MS Office) support])]) |
777 | 735 | ||
778 | AS_IF([test "x$ffmpeg_enabled" = "x0"], | ||
779 | [AC_MSG_NOTICE([NOTICE: FFmpeg thumbnailer plugin disabled])]) | ||
780 | |||
781 | AS_IF([test "x$new_ffmpeg" = "x0"], | ||
782 | [AC_MSG_NOTICE([NOTICE: FFmpeg/opus audio preview plugin disabled, It needs libav >= 10, or a FFmpeg with --enable-libavresample])]) | ||
783 | |||
784 | AS_IF([test "x$have_gdk_pixbuf" = "x0"], | 736 | AS_IF([test "x$have_gdk_pixbuf" = "x0"], |
785 | [AC_MSG_NOTICE([NOTICE: libgdk-pixbuf not found, gtk thumbnail support disabled])]) | 737 | [AC_MSG_NOTICE([NOTICE: libgdk-pixbuf not found, gtk thumbnail support disabled])]) |
786 | 738 | ||