From 792965270bf44a8753f10b2e51a201721b12c2d3 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 16 May 2004 20:47:07 +0000 Subject: [PATCH] Check for _getopt_long_only_r and force using included version of getopt if the function is not available. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 1e7329b..b89a3b8 100644 --- a/configure.ac +++ b/configure.ac @@ -262,6 +262,14 @@ AC_CHECK_TYPE(iconv_t,:, #endif ]) +# Check if we have reentrant versions of getopt. Argp needs them, +# but many versions of Glibc lack them, though they define the +# same getopt interface version as lib/getopt.c. +AC_CHECK_FUNC(_getopt_long_only_r, + :, + [AC_DEFINE(WANT_INCLUDED_GETOPT,1, + [Define if the included version of getopt has to be used])]) + AC_SUBST(BACKUP_LIBEXEC_SCRIPTS) AC_SUBST(BACKUP_SBIN_SCRIPTS) AC_ARG_ENABLE(backup-scripts, -- 2.44.0