in conjunction with the --enable-static-sudoers option.
not prevent other plugins from being used and the noexec
option will continue to function.
+ --disable-shared-libutil
+ Disable the use of the dynamic libsudo_util library. By
+ default, sudo, the sudoers plugin and the associated sudo
+ utilities are linked against a shared version of libsudo_util.
+ If the --disable-shared-libutil option is specified, a
+ static version of the libsudo_util library will be used
+ instead. This option may only be used in conjunction with
+ the --enable-static-sudoers option.
+
--enable-zlib[=location]
Enable the use of the zlib compress library when storing
I/O log files. If specified, location is the base directory
that of other gettext-enabled packages.
* Sudo and its associated programs now link against a shared version
- of libsudo_util.
+ of libsudo_util. The --disable-shared-libutil configure option
+ may be used to force static linking if the --enable-static-sudoers
+ option is also specified.
* It is now possible to match an environment variable's value as
well as its name using env_keep and env_check. This can be used
SUDOERS_OBJS
COMMON_OBJS
LT_DEP_LIBS
+LT_STATIC_LIBUTIL
LT_STATIC
LT_LDEXPORTS
LT_LDDEP
enable_nls
enable_rpath
enable_static_sudoers
+enable_shared_libutil
with_selinux
enable_gss_krb5_ccache_name
enable_shared
--disable-rpath Disable passing of -Rpath to the linker
--enable-static-sudoers Build the sudoers policy module as part of the sudo
binary instead as a plugin
+ --disable-shared-libutil
+ Disable use of the libsudo_util shared library.
--enable-gss-krb5-ccache-name
Use GSS-API to set the Kerberos V cred cache name
--enable-shared[=PKGS] build shared libraries [default=yes]
+
#
fi
+# Check whether --enable-shared_libutil was given.
+if test "${enable_shared_libutil+set}" = set; then :
+ enableval=$enable_shared_libutil;
+else
+ enable_shared_libutil=yes
+fi
+
+
# Check whether --with-selinux was given.
if test "${with_selinux+set}" = set; then :
;;
esac
+#
+# We can only disable linking with the shared libsudo_util if
+# sudoers is linked statically too.
+#
+if test "$enable_shared_libutil" = "no"; then
+ if test X"$STATIC_SUDOERS" = X""; then
+ as_fn_error $? "\"--disable-shared-libutil may only be specified with --enable-static-sudoers or when dynamic linking is disabled.\"" "$LINENO" 5
+ else
+ # Disable use shared version of libsudo_util.
+ LT_STATIC_LIBUTIL="--tag=disable-shared"
+ fi
+else
+ LT_STATIC_LIBUTIL="$LT_STATIC"
+fi
+
# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless
# the main program is linked against -lpthread. We have no knowledge of
# what libraries a plugin may depend on (e.g. HP-UX LDAP which uses pthreads)
AC_SUBST([LT_LDDEP])
AC_SUBST([LT_LDEXPORTS])
AC_SUBST([LT_STATIC])
+AC_SUBST([LT_STATIC_LIBUTIL])
AC_SUBST([LT_DEP_LIBS])
AC_SUBST([COMMON_OBJS])
AC_SUBST([SUDOERS_OBJS])
[AS_HELP_STRING([--enable-static-sudoers], [Build the sudoers policy module as part of the sudo binary instead as a plugin])],
[], [enable_static_sudoers=no])
+AC_ARG_ENABLE(shared_libutil,
+[AS_HELP_STRING([--disable-shared-libutil], [Disable use of the libsudo_util shared library.])],
+[], [enable_shared_libutil=yes])
+
AC_ARG_WITH(selinux, [AS_HELP_STRING([--with-selinux], [enable SELinux support])],
[case $with_selinux in
yes) SELINUX_USAGE="[[-r role]] [[-t type]] "
;;
esac
+#
+# We can only disable linking with the shared libsudo_util if
+# sudoers is linked statically too.
+#
+if test "$enable_shared_libutil" = "no"; then
+ if test X"$STATIC_SUDOERS" = X""; then
+ AC_MSG_ERROR(["--disable-shared-libutil may only be specified with --enable-static-sudoers or when dynamic linking is disabled."])
+ else
+ # Disable use shared version of libsudo_util.
+ LT_STATIC_LIBUTIL="--tag=disable-shared"
+ fi
+else
+ LT_STATIC_LIBUTIL="$LT_STATIC"
+fi
+
# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless
# the main program is linked against -lpthread. We have no knowledge of
# what libraries a plugin may depend on (e.g. HP-UX LDAP which uses pthreads)
# Compiler & tools to use
CC = @CC@
-LIBTOOL = @LIBTOOL@ @LT_STATIC@
+LIBTOOL = @LIBTOOL@ @LT_STATIC_LIBUTIL@
SED = @SED@
# Our install program supports extra flags...
pre-install:
install: install-dirs
- if [ X"$(shlib_enable)" = X"yes" ]; then \
- INSTALL_BACKUP='~' $(LIBTOOL) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_util.la $(DESTDIR)$(libexecdir)/sudo; \
- fi
+ case "$(LIBTOOL)" in \
+ *disable-shared*) ;; \
+ *) if [ X"$(shlib_enable)" = X"yes" ]; then \
+ INSTALL_BACKUP='~' $(LIBTOOL) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_util.la $(DESTDIR)$(libexecdir)/sudo; \
+ fi;; \
+ esac
install-dirs:
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)/sudo