Move CONFIGURE_ARGS from sudo_usage.h.in to config.h.in.

This commit is contained in:
Todd C. Miller
2023-04-18 07:29:37 -06:00
parent 80b85bdd50
commit 65c0b5a089
5 changed files with 19 additions and 10 deletions

View File

@@ -3,6 +3,9 @@
#ifndef SUDO_CONFIG_H
#define SUDO_CONFIG_H
/* Configure script arguments used to build sudo. */
#undef CONFIGURE_ARGS
/* Define to 1 if you want the insults from the "classic" version sudo. */
#undef CLASSIC_INSULTS

8
configure vendored
View File

@@ -809,7 +809,6 @@ LIBCRYPTO
LIBINTL
LIBRT
LIBDL
CONFIGURE_ARGS
LIBTOOL_DEPS
ZLIB_SRC
ZLIB
@@ -3604,7 +3603,6 @@ AAMAN=0
devdir='$(srcdir)'
PRELOAD_MODULE='-module'
LDAP='#'
CONFIGURE_ARGS=$@
SUDO_NLS=disabled
exampledir='$(docdir)/examples'
PYTHON_PLUGIN='#'
@@ -3714,6 +3712,7 @@ devsearch="/dev/pts:/dev/vt:/dev/term:/dev/zcons:/dev/pty:/dev"
: ${SUDOERS_MODE='0440'}
: ${SUDOERS_UID='0'}
: ${SUDOERS_GID='0'}
CONFIGURE_ARGS="$@"
AUTH_REG=
AUTH_EXCL=
AUTH_EXCL_DEF=
@@ -17519,6 +17518,11 @@ fi
fi
sudo_cv_prev_host="$host"
cat >>confdefs.h <<EOF
#define CONFIGURE_ARGS "$CONFIGURE_ARGS"
EOF
if test -n "$host_os"
then :

View File

@@ -86,7 +86,6 @@ AC_SUBST([LOGINCAP_USAGE])dnl
AC_SUBST([ZLIB])dnl
AC_SUBST([ZLIB_SRC])dnl
AC_SUBST([LIBTOOL_DEPS])dnl
AC_SUBST([CONFIGURE_ARGS], [$@])dnl
AC_SUBST([LIBDL])dnl
AC_SUBST([LIBRT])dnl
AC_SUBST([LIBINTL])dnl
@@ -240,6 +239,7 @@ dnl
dnl
dnl Other variables
dnl
CONFIGURE_ARGS="$@"
AUTH_REG=
AUTH_EXCL=
AUTH_EXCL_DEF=
@@ -1736,6 +1736,11 @@ AS_IF([test -n "$sudo_cv_prev_host"], [
])
sudo_cv_prev_host="$host"
dnl
dnl Store configure arguments for "sudo -V"
dnl
SUDO_DEFINE_UNQUOTED([CONFIGURE_ARGS], "$CONFIGURE_ARGS")
dnl
dnl We want to be able to differentiate between different rev's
dnl
@@ -4686,7 +4691,10 @@ dnl
dnl Bits to copy verbatim into config.h.in
dnl
AH_TOP([#ifndef SUDO_CONFIG_H
#define SUDO_CONFIG_H])
#define SUDO_CONFIG_H
/* Configure script arguments used to build sudo. */
#undef CONFIGURE_ARGS])
AH_BOTTOM([#ifndef HAVE_SIG_ATOMIC_T
typedef int sig_atomic_t;

View File

@@ -64,7 +64,6 @@
# include <prot.h>
#endif /* HAVE_GETPRPWNAM && HAVE_SET_AUTH_PARAMETERS */
#include <sudo_usage.h>
#include "sudo.h"
#include "sudo_plugin.h"
#include "sudo_plugin_int.h"

View File

@@ -31,9 +31,4 @@
#define SUDO_USAGE4 " [-ABbEHkNnPS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C num] [-D directory] @LOGINCAP_USAGE@[-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i | -s] [command [arg ...]]"
#define SUDO_USAGE5 " -e [-ABkNnS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C num] @LOGINCAP_USAGE@[-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ..."
/*
* Configure script arguments used to build sudo.
*/
#define CONFIGURE_ARGS "@CONFIGURE_ARGS@"
#endif /* SUDO_USAGE_H */