aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac52
1 files changed, 21 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac
index 80ce414..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#
18AC_PREREQ(2.61) 18AC_PREREQ([2.71])
19AC_INIT([libextractor], [1.11], [bug-libextractor@gnu.org]) 19AC_INIT([libextractor],[1.13],[bug-libextractor@gnu.org])
20AC_CONFIG_AUX_DIR([build-aux]) 20AC_CONFIG_AUX_DIR([build-aux])
21AC_CONFIG_HEADERS([config.h]) 21AC_CONFIG_HEADERS([config.h])
22AC_CONFIG_MACRO_DIR([m4]) 22AC_CONFIG_MACRO_DIR([m4])
23AH_TOP([#define _GNU_SOURCE 1]) 23AH_TOP([#define _GNU_SOURCE 1])
24AC_CANONICAL_TARGET 24AC_CANONICAL_TARGET
25AC_CANONICAL_HOST 25AC_CANONICAL_HOST
26AC_CANONICAL_SYSTEM 26AC_CANONICAL_TARGET
27 27
28LIB_VERSION_CURRENT=4 28LIB_VERSION_CURRENT=4
29LIB_VERSION_REVISION=8 29LIB_VERSION_REVISION=8
@@ -46,7 +46,7 @@ AC_PROG_INSTALL
46AC_PROG_LN_S 46AC_PROG_LN_S
47AC_PROG_MAKE_SET 47AC_PROG_MAKE_SET
48AC_CANONICAL_HOST 48AC_CANONICAL_HOST
49AC_PROG_LIBTOOL 49LT_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
52LT_INIT([disable-static dlopen win32-dll]) 52LT_INIT([disable-static dlopen win32-dll])
@@ -176,6 +176,8 @@ AS_CASE(["$target_os"],
176 176
177AM_ICONV 177AM_ICONV
178 178
179PKG_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
190rplugindir="libextractor" 192rplugindir="libextractor"
191AC_ARG_WITH(plugindirname, 193AC_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])
196AC_SUBST(RPLUGINDIR, $rplugindir) 196AC_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
429AC_MSG_CHECKING(for tidyNodeGetValue -ltidy) 429# tidyNodeGetValue was already available in 5.0.0, released in 2015.
430AC_LANG_PUSH(C++) 430maybe_tidy=1
431SAVED_LIBS=$LIBS 431PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0],
432LIBS="$LIBS -ltidy" 432 [AC_DEFINE(HAVE_TIDY, 1, [Have tidy])
433AC_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); ]])], 435CFLAGS="$CFLAGS $TIDY_CFLAGS"
436 [AC_MSG_RESULT(yes) 436LIBS="$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)])
441LIBS=$SAVED_LIBS
442AC_LANG_POP(C++)
443
444# restore LIBS
445LIBS=$LIBSOLD
446 437
438AC_CHECK_HEADERS([tidy.h],,
439 AC_CHECK_HEADERS([tidy/tidy.h],,[maybe_tidy=0]))
447 440
441AM_CONDITIONAL(HAVE_TIDY, test "x$maybe_tidy" = "x1")
448 442
449# should 'make check' run tests? 443# should 'make check' run tests?
450AC_MSG_CHECKING(whether to run tests) 444AC_MSG_CHECKING(whether to run tests)
@@ -455,10 +449,6 @@ AC_ARG_ENABLE([testruns],
455AC_MSG_RESULT($enable_test_run) 449AC_MSG_RESULT($enable_test_run)
456AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) 450AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
457 451
458
459
460# Checks for header files.
461AC_HEADER_STDC
462AC_HEADER_DIRENT 452AC_HEADER_DIRENT
463AC_HEADER_STDBOOL 453AC_HEADER_STDBOOL
464AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h]) 454AC_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])
553LE_LIB_LIBS=$LIBS 543LE_LIB_LIBS=$LIBS
554LIBS=$LIBSOLD 544LIBS=$LIBSOLD
555 545
556AM_GNU_GETTEXT_VERSION([0.16.1]) 546AM_GNU_GETTEXT_VERSION([0.21])
557AM_GNU_GETTEXT([external]) 547AM_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)
567AC_MSG_CHECKING([whether glib is disabled]) 557AC_MSG_CHECKING([whether glib is disabled])
568AC_ARG_ENABLE(glib, 558AC_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