aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac62
-rw-r--r--g10/Makefile.am2
-rw-r--r--tests/openpgp/Makefile.am4
-rw-r--r--tools/Makefile.am10
5 files changed, 10 insertions, 70 deletions
diff --git a/Makefile.am b/Makefile.am
index 6cbb9c36d..ad5111f00 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,7 +100,7 @@ else
doc =
endif
-SUBDIRS = m4 common kbx \
+SUBDIRS = m4 common regexp kbx \
${gpg} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
tools po ${doc} tests
diff --git a/configure.ac b/configure.ac
index 12a8feaf2..4b4aa7ab8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1480,59 +1480,9 @@ AC_CHECK_FUNCS([getpeerucred])
GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
#
-# Sanity check regex. Tests adapted from mutt.
+# Define for regexp support
#
-AC_MSG_CHECKING([whether regular expression support is requested])
-AC_ARG_ENABLE(regex,
- AC_HELP_STRING([--disable-regex],
- [do not handle regular expressions in trust signatures]),
- use_regex=$enableval, use_regex=yes)
-AC_MSG_RESULT($use_regex)
-
-if test "$use_regex" = yes ; then
- _cppflags="${CPPFLAGS}"
- _ldflags="${LDFLAGS}"
- AC_ARG_WITH(regex,
- AC_HELP_STRING([--with-regex=DIR],[look for regex in DIR]),
- [
- if test -d "$withval" ; then
- CPPFLAGS="${CPPFLAGS} -I$withval/include"
- LDFLAGS="${LDFLAGS} -L$withval/lib"
- fi
- ],withval="")
-
- # Does the system have regex functions at all?
- AC_SEARCH_LIBS([regcomp], [regex])
- AC_CHECK_FUNC(regcomp, gnupg_cv_have_regex=yes, gnupg_cv_have_regex=no)
-
- if test $gnupg_cv_have_regex = no; then
- use_regex=no
- else
- if test x"$cross_compiling" = xyes; then
- AC_MSG_WARN([cross compiling; assuming regexp library is not broken])
- else
- AC_CACHE_CHECK([whether your system's regexp library is broken],
- [gnupg_cv_regex_broken],
- AC_TRY_RUN([
-#include <unistd.h>
-#include <regex.h>
-main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }],
- gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes))
-
- if test $gnupg_cv_regex_broken = yes; then
- AC_MSG_WARN([your regex is broken - disabling regex use])
- use_regex=no
- fi
- fi
- fi
- CPPFLAGS="${_cppflags}"
- LDFLAGS="${_ldflags}"
-fi
-
-if test "$use_regex" != yes ; then
- AC_DEFINE(DISABLE_REGEX,1, [Define to disable regular expression support])
-fi
-AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes)
+AC_DEFINE(DISABLE_REGEX,0, [Define to disable regular expression support])
@@ -2070,6 +2020,7 @@ Makefile
po/Makefile.in
common/Makefile
common/w32info-rc.h
+regexp/Makefile
kbx/Makefile
g10/Makefile
sm/Makefile
@@ -2123,13 +2074,6 @@ echo "
TOFU support: $use_tofu
Tor support: $show_tor_support
"
-if test x"$use_regex" != xyes ; then
-echo "
- Warning: No regular expression support available.
- OpenPGP trust signatures won't work.
- gpg-check-pattern will not be built.
-"
-fi
if test "x${gpg_config_script_warn}" != x; then
cat <<G10EOF
Warning: Mismatches between the target platform and the
diff --git a/g10/Makefile.am b/g10/Makefile.am
index 2b92daf33..c3f9d6f1e 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -31,7 +31,7 @@ include $(top_srcdir)/am/cmacros.am
AM_CFLAGS = $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS) \
$(LIBASSUAN_CFLAGS) $(NPTH_CFLAGS) $(GPG_ERROR_CFLAGS)
-needed_libs = ../kbx/libkeybox.a $(libcommonpth)
+needed_libs = ../kbx/libkeybox.a $(libcommonpth) ../regexp/libregexp.a
# Because there are no program specific transform macros we need to
# work around that to allow installing gpg as gpg2.
diff --git a/tests/openpgp/Makefile.am b/tests/openpgp/Makefile.am
index e5be42b41..8faf747fd 100644
--- a/tests/openpgp/Makefile.am
+++ b/tests/openpgp/Makefile.am
@@ -276,11 +276,7 @@ CLEANFILES = prepared.stamp x y yy z out err $(data_files) \
gnupg-test.stop random_seed gpg-agent.log tofu.db \
passphrases sshcontrol S.gpg-agent.ssh report.xml
-if DISABLE_REGEX
-EXTRA_DIST += trust-pgp-4.scm
-else
XTESTS += trust-pgp-4.scm
-endif
clean-local:
-rm -rf private-keys-v1.d openpgp-revocs.d tofu.d gpgtar.d
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 9df9d4c46..878c249bc 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -56,9 +56,7 @@ if !HAVE_W32_SYSTEM
bin_PROGRAMS += watchgnupg gpgparsemail ${gpg_wks_server}
endif
-if !DISABLE_REGEX
libexec_PROGRAMS += gpg-check-pattern
-endif
if !HAVE_W32CE_SYSTEM
noinst_PROGRAMS = clean-sat make-dns-cert gpgsplit
@@ -92,6 +90,9 @@ if HAVE_W32CE_SYSTEM
opt_libassuan_libs = $(LIBASSUAN_LIBS)
endif
+regexp_libs = ../regexp/libregexp.a
+
+
gpgsplit_LDADD = $(common_libs) \
$(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
$(ZLIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
@@ -140,13 +141,12 @@ gpg_card_LDADD = \
$(gpg_card_tool_rc_objs)
-if !DISABLE_REGEX
gpg_check_pattern_SOURCES = gpg-check-pattern.c
gpg_check_pattern_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(INCICONV)
-gpg_check_pattern_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
+gpg_check_pattern_LDADD = $(common_libs) $(regexp_libs) $(LIBGCRYPT_LIBS) \
+ $(GPG_ERROR_LIBS) \
$(LIBINTL) $(NETLIBS) $(LIBICONV) $(W32SOCKLIBS) \
$(LIBICONV)
-endif
gpgtar_SOURCES = \
gpgtar.c gpgtar.h \