-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --with-regex=PATH build option #1974
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1772,7 +1772,6 @@ AC_CHECK_HEADERS( \ | |
poll.h \ | ||
priv.h \ | ||
pwd.h \ | ||
regex.h \ | ||
sched.h \ | ||
siginfo.h \ | ||
signal.h \ | ||
|
@@ -2148,9 +2147,6 @@ AC_CHECK_FUNCS(\ | |
pthread_setschedparam \ | ||
pthread_sigmask \ | ||
putenv \ | ||
regcomp \ | ||
regexec \ | ||
regfree \ | ||
res_init \ | ||
__res_init \ | ||
rint \ | ||
|
@@ -2387,8 +2383,16 @@ AS_IF([test "x$enable_zph_qos" = "xyes"],[ | |
[Enable support for QOS netfilter mark preservation]) | ||
]) | ||
|
||
AC_CHECK_LIB(regex, regexec, [REGEXLIB="-lregex"],[REGEXLIB='']) | ||
AC_SUBST(REGEXLIB) | ||
dnl Look for libregex with regcomp() API | ||
SQUID_AUTO_LIB(regex,[GNU Regex],[LIBREGEX]) | ||
SQUID_CHECK_LIB_WORKS(regex,[ | ||
PKG_CHECK_MODULES([LIBREGEX],[libregex],[:],[:]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm.. what if the local install doesn't have a pkg-config file? For instance, my install of gnurx doesn't have one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kinkie, AFAICT, without pkg-config file, this PKG_CHECK_MODULES() call does nothing (but reporting) because its action-if-not-found is set to "do nothing" (i.e. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absent a relevant This line exists solely for auto-detecting the cases when a libregex does provide a |
||
CPPFLAGS="$LIBREGEX_CFLAGS $CPPFLAGS" | ||
LIBS="$LIBREGEX_PATH $LIBREGEX_LIBS $LIBS" | ||
AC_CHECK_HEADERS([regex.h],[ | ||
LIBREGEX_LIBS="$LIBREGEX_PATH -lregex" | ||
Comment on lines
+2391
to
+2393
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks odd that we are using LIBREGEX_LIBS to adjust LIBS and then modifying LIBREGEX_LIBS (while keeping the old value in LIBS). Why do we utilize this use-then-modify trick here? And why does this linking-related LIBREGEX_LIBS manipulation depend on a C++ header presence (while other regex checks/adjustments do not)? |
||
]) | ||
]) | ||
|
||
SQUID_DETECT_UDP_SND_BUFSIZE | ||
SQUID_DETECT_UDP_RECV_BUFSIZE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see any regcomp() checks in added code; have I overlooked them?
AFAICT, removed code was checking for regexec(). If feasible, let's preserve that logic (in this PR). Otherwise, please adjust PR description to explain why we are changing what API we check.