mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Add --without-tre option
elinks-lite in Debian does not depend on any libraries (except gnutls). Including this option will allow elinks-lite to be built without libtre dependency.
This commit is contained in:
parent
adeac4720a
commit
4c95dd86a7
36
configure.in
36
configure.in
@ -926,25 +926,37 @@ fi
|
||||
# Check for TRE library
|
||||
# ===================================================================
|
||||
|
||||
AC_MSG_CHECKING([[for TRE in pkg-config]])
|
||||
if pkg-config tre; then
|
||||
disable_tre=""
|
||||
AC_ARG_WITH(tre, [ --without-tre disable TRE regex search support],
|
||||
[if test "$with_tre" = no; then disable_tre=yes; fi])
|
||||
|
||||
AC_MSG_CHECKING([for TRE])
|
||||
|
||||
EL_SAVE_FLAGS
|
||||
cf_result="no"
|
||||
|
||||
if test "$disable_tre" = yes; then
|
||||
cf_result="not used"
|
||||
else
|
||||
AC_MSG_CHECKING([[for TRE in pkg-config]])
|
||||
if pkg-config tre; then
|
||||
TRE_CFLAGS=`pkg-config --cflags tre`
|
||||
TRE_LIBS=`pkg-config --libs tre`
|
||||
AC_MSG_RESULT([[yes]])
|
||||
else
|
||||
else
|
||||
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513055>
|
||||
# "libtre-dev: /usr/lib/pkgconfig/tre.pc missing"
|
||||
# so we look for the library even if pkg-config doesn't know about it.
|
||||
TRE_CFLAGS=
|
||||
TRE_LIBS=-ltre
|
||||
AC_MSG_RESULT([[no, but let's try defaults]])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([[for TRE header and library]])
|
||||
EL_SAVE_FLAGS
|
||||
CFLAGS="$TRE_CFLAGS $CFLAGS"
|
||||
LIBS="$TRE_LIBS $LIBS"
|
||||
AC_TRY_LINK([#include <tre/regex.h>],
|
||||
AC_MSG_CHECKING([[for TRE header and library]])
|
||||
EL_SAVE_FLAGS
|
||||
CFLAGS="$TRE_CFLAGS $CFLAGS"
|
||||
LIBS="$TRE_LIBS $LIBS"
|
||||
AC_TRY_LINK([#include <tre/regex.h>],
|
||||
[regex_t re;
|
||||
regmatch_t match[1];
|
||||
regwcomp(&re, L"zap", REG_ICASE);
|
||||
@ -960,8 +972,10 @@ AC_TRY_LINK([#include <tre/regex.h>],
|
||||
TRE_CFLAGS=
|
||||
TRE_LIBS=
|
||||
EL_RESTORE_FLAGS])
|
||||
AC_SUBST(TRE_CFLAGS)
|
||||
AC_SUBST(TRE_LIBS)
|
||||
AC_SUBST(TRE_CFLAGS)
|
||||
AC_SUBST(TRE_LIBS)
|
||||
fi
|
||||
AC_MSG_RESULT($cf_result)
|
||||
|
||||
AC_CHECK_SIZEOF([wchar_t], [4], [[#include <wchar.h>]])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user