hardlink: remove pcre2posix.h support
It's deprecated for years. Let's rely on old good libc regex.h for now. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
937fe5d9c5
commit
22a2bce042
|
@ -1459,14 +1459,6 @@ UL_REQUIRES_HAVE([setpriv], [linux_capability_h], [linux/capability.h header fil
|
||||||
UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library])
|
UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library])
|
||||||
AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes])
|
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],
|
AC_ARG_ENABLE([hardlink],
|
||||||
AS_HELP_STRING([--disable-hardlink], [do not build hardlink]),
|
AS_HELP_STRING([--disable-hardlink], [do not build hardlink]),
|
||||||
[], [UL_DEFAULT_ENABLE([hardlink], [check])]
|
[], [UL_DEFAULT_ENABLE([hardlink], [check])]
|
||||||
|
|
|
@ -264,11 +264,6 @@ lib_readline_static = dependency(
|
||||||
static : true,
|
static : true,
|
||||||
required : need_static_libs ? get_option('readline') : disabler())
|
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(
|
lib_user = dependency(
|
||||||
'libuser',
|
'libuser',
|
||||||
version : '>= 0.58',
|
version : '>= 0.58',
|
||||||
|
@ -2541,7 +2536,6 @@ exe = executable(
|
||||||
hardlink_sources,
|
hardlink_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [lib_common],
|
link_with : [lib_common],
|
||||||
dependencies : [lib_pcre],
|
|
||||||
install_dir : usrbin_exec_dir,
|
install_dir : usrbin_exec_dir,
|
||||||
install : true)
|
install : true)
|
||||||
if not is_disabler(exe)
|
if not is_disabler(exe)
|
||||||
|
|
|
@ -244,8 +244,4 @@ dist_noinst_DATA += misc-utils/hardlink.1.adoc
|
||||||
hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c
|
hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c
|
||||||
hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS)
|
hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS)
|
||||||
hardlink_CFLAGS = $(AM_CFLAGS)
|
hardlink_CFLAGS = $(AM_CFLAGS)
|
||||||
if HAVE_PCRE2_POSIX
|
|
||||||
hardlink_LDADD += $(PCRE2_POSIX_LIBS)
|
|
||||||
hardlink_CFLAGS += $(PCRE2_POSIX_CFLAGS)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -44,14 +44,7 @@
|
||||||
#include "monotonic.h"
|
#include "monotonic.h"
|
||||||
#include "optutils.h"
|
#include "optutils.h"
|
||||||
|
|
||||||
/* Use libpcre2posix if it's available */
|
#include <regex.h> /* regcomp(), regsearch() */
|
||||||
#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
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_XATTR_H
|
#ifdef HAVE_SYS_XATTR_H
|
||||||
# include <sys/xattr.h> /* listxattr, getxattr */
|
# include <sys/xattr.h> /* listxattr, getxattr */
|
||||||
|
|
Loading…
Reference in New Issue