It's deprecated for years. Let's rely on old good libc regex.h for now.
Signed-off-by: Karel Zak <kzak@redhat.com>
UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library])
AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes])
-PKG_CHECK_MODULES([PCRE2_POSIX], [libpcre2-posix],
- [have_pcre2_posix=yes],
- [have_pcre2_posix=no])
-AS_IF([test "x$have_pcre2_posix" = xyes ], [
- AC_DEFINE([HAVE_PCRE2_POSIX], [1], [Define if libpcre2-posix is available])
-])
-AM_CONDITIONAL([HAVE_PCRE2_POSIX], [test "x$have_pcre2_posix" = xyes])
-
AC_ARG_ENABLE([hardlink],
AS_HELP_STRING([--disable-hardlink], [do not build hardlink]),
[], [UL_DEFAULT_ENABLE([hardlink], [check])]
static : true,
required : need_static_libs ? get_option('readline') : disabler())
-lib_pcre = dependency(
- 'libpcre2-posix',
- required : get_option('libpcre2-posix'))
-conf.set('HAVE_PCRE2_POSIX', lib_pcre.found() ? 1 : false)
-
lib_user = dependency(
'libuser',
version : '>= 0.58',
hardlink_sources,
include_directories : includes,
link_with : [lib_common],
- dependencies : [lib_pcre],
install_dir : usrbin_exec_dir,
install : true)
if not is_disabler(exe)
hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c
hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS)
hardlink_CFLAGS = $(AM_CFLAGS)
-if HAVE_PCRE2_POSIX
-hardlink_LDADD += $(PCRE2_POSIX_LIBS)
-hardlink_CFLAGS += $(PCRE2_POSIX_CFLAGS)
-endif
endif
#include "monotonic.h"
#include "optutils.h"
-/* Use libpcre2posix if it's available */
-#ifdef HAVE_PCRE2_POSIX
-# include <pcre2posix.h>
-# undef REG_NOSUB
-# define REG_NOSUB 0 /* we do want backreferences in PCRE mode */
-#else
-# include <regex.h> /* regcomp(), regsearch() */
-#endif
+#include <regex.h> /* regcomp(), regsearch() */
#ifdef HAVE_SYS_XATTR_H
# include <sys/xattr.h> /* listxattr, getxattr */