git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH V2 5/5] configure: Check for libpcre

From
Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Date
May 4, 2011, 22:00 UTC
Message-ID
<1304546421-25439-6-git-send-email-michal.kiedrowicz@gmail.com>
In-Reply-To
<1304546421-25439-1-git-send-email-michal.kiedrowicz@gmail.com>
This adds checks for libpcre based on checking for curl.
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
---
 config.mak.in |    1 +
 configure.ac  |   26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/config.mak.in b/config.mak.in
index e378534..9bab021 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -30,6 +30,7 @@ export srcdir VPATH
 ASCIIDOC7=@ASCIIDOC7@
 NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
 NO_OPENSSL=@NO_OPENSSL@
+NO_LIBPCRE=@NO_LIBPCRE@
 NO_CURL=@NO_CURL@
 NO_EXPAT=@NO_EXPAT@
 NO_LIBGEN_H=@NO_LIBGEN_H@
diff --git a/configure.ac b/configure.ac
index fafd815..4711369 100644
--- a/configure.ac
+++ b/configure.ac
@@ -220,6 +220,17 @@ AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)])
 AS_HELP_STRING([],              [ARG can be prefix for openssl library and headers]),\
 GIT_PARSE_WITH(openssl))
 #
+# Define NO_LIBPCRE if you do not have libpcre installed.  git-grep cannot use
+# Perl-compatible regexes.
+#
+# Define LIBPCREDIR=/foo/bar if your libpcre header and library files are in
+# /foo/bar/include and /foo/bar/lib directories.
+#
+AC_ARG_WITH(libpcre,
+AS_HELP_STRING([--with-libpcre],[support Perl-compatible regexes (default is YES)])
+AS_HELP_STRING([],           [ARG can be also prefix for libpcre library and headers]),
+GIT_PARSE_WITH(libpcre))
+#
 # Define NO_CURL if you do not have curl installed.  git-http-pull and
 # git-http-push are not built, and you cannot use http:// and https://
 # transports.
@@ -435,6 +446,21 @@ AC_SUBST(NEEDS_SSL_WITH_CRYPTO)
 AC_SUBST(NO_OPENSSL)
 
 #
+# Define NO_LIBPCRE if you do not have libpcre installed.  git-grep cannot use
+# Perl-compatible regexes.
+#
+
+GIT_STASH_FLAGS($LIBPCREDIR)
+
+AC_CHECK_LIB([pcre], [pcre_version],
+[NO_LIBPCRE=],
+[NO_LIBPCRE=YesPlease])
+
+GIT_UNSTASH_FLAGS($LIBPCREDIR)
+
+AC_SUBST(NO_LIBPCRE)
+
+#
 # Define NO_CURL if you do not have libcurl installed.  git-http-pull and
 # git-http-push are not built, and you cannot use http:// and https://
 # transports.
-- 
1.7.3.4
Previous: Alex Riesen
Message 16 of 16 in “Add PCRE support to git-grep”
  1. 0/5 Add PCRE support to git-grepMichał Kiedrowicz, May 4, 2011
  2. 1/5 Documentation: Add --line-number to git-grep synopsisMichał Kiedrowicz, May 4, 2011
  3. 2/5 contrib/completion: --line-number to git grepMichał Kiedrowicz, May 4, 2011
  4. 3/5 grep: Put calls to fixmatch() and regmatch() into patmatch()Michał Kiedrowicz, May 4, 2011
  5. 4/5 git-grep: Learn PCREMichał Kiedrowicz, May 4, 2011
  6. Junio C HamanoMay 5, 2011
  7. Bert WesargMay 5, 2011
  8. Junio C HamanoMay 5, 2011
  9. Johannes SixtMay 5, 2011
  10. Michal KiedrowiczMay 5, 2011
  11. Johannes SixtMay 5, 2011
  12. Michal KiedrowiczMay 5, 2011
  13. Johannes SixtMay 5, 2011
  14. Michal KiedrowiczMay 5, 2011
  15. Alex RiesenMay 5, 2011
  16. 5/5 configure: Check for libpcreMichał Kiedrowicz, May 4, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.