From: Todd C. Miller Date: Wed, 9 Jul 2014 02:19:09 +0000 (-0600) Subject: Remove @SOEXT@ and @SHLIB_EXT@ now that we use libtool to install X-Git-Tag: SUDO_1_8_11^2~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78d2b42b7ec815b6e70011ed3d1fd13227acaa45;p=sudo Remove @SOEXT@ and @SHLIB_EXT@ now that we use libtool to install shared objects. Instead, use the new @SHLIB_ENABLE@ that is set to the value of $enable_dlopen. For sudo_noexec.so there is nothing special to do since the install-noexec target is only called when noexec is enabled by configure. --- diff --git a/configure b/configure index 383cfa011..3f888b83f 100755 --- a/configure +++ b/configure @@ -747,7 +747,6 @@ DONT_LEAK_PATH_INFO INSTALL_NOEXEC sesh_file noexec_file -SOEXT NOEXECDIR NOEXECFILE mansrcdir @@ -762,8 +761,8 @@ DEVEL SUDOERS_GID SUDOERS_UID SUDOERS_MODE -SHLIB_EXT SHLIB_MODE +SHLIB_ENABLE MANCOMPRESSEXT MANCOMPRESS MANDIRTYPE @@ -2977,7 +2976,6 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;} - # @@ -13995,18 +13993,9 @@ if test "$enable_shared" = "no"; then lt_cv_dlopen_libs= ac_cv_func_dlopen=no LT_LDFLAGS=-static -else - eval _shrext="$shrext_cmds" - # Darwin uses .dylib for libraries but .so for modules - if test X"$_shrext" = X".dylib"; then - SOEXT=".so" - SHLIB_EXT=".dylib" - else - SOEXT="$_shrext" - SHLIB_EXT="$_shrext" - fi fi LIBDL="$lt_cv_dlopen_libs" +SHLIB_ENABLE="$enable_dlopen" { $as_echo "$as_me:${as_lineno-$LINENO}: checking path to sudo_noexec.so" >&5 $as_echo_n "checking path to sudo_noexec.so... " >&6; } diff --git a/configure.ac b/configure.ac index 274a2f753..6c793c65b 100644 --- a/configure.ac +++ b/configure.ac @@ -45,8 +45,8 @@ AC_SUBST([MANTYPE]) AC_SUBST([MANDIRTYPE]) AC_SUBST([MANCOMPRESS]) AC_SUBST([MANCOMPRESSEXT]) +AC_SUBST([SHLIB_ENABLE]) AC_SUBST([SHLIB_MODE]) -AC_SUBST([SHLIB_EXT]) AC_SUBST([SUDOERS_MODE]) AC_SUBST([SUDOERS_UID]) AC_SUBST([SUDOERS_GID]) @@ -61,7 +61,6 @@ AC_SUBST([mansectform]) AC_SUBST([mansrcdir]) AC_SUBST([NOEXECFILE]) AC_SUBST([NOEXECDIR]) -AC_SUBST([SOEXT]) AC_SUBST([noexec_file]) AC_SUBST([sesh_file]) AC_SUBST([INSTALL_NOEXEC]) @@ -1535,18 +1534,9 @@ if test "$enable_shared" = "no"; then lt_cv_dlopen_libs= ac_cv_func_dlopen=no LT_LDFLAGS=-static -else - eval _shrext="$shrext_cmds" - # Darwin uses .dylib for libraries but .so for modules - if test X"$_shrext" = X".dylib"; then - SOEXT=".so" - SHLIB_EXT=".dylib" - else - SOEXT="$_shrext" - SHLIB_EXT="$_shrext" - fi fi LIBDL="$lt_cv_dlopen_libs" +SHLIB_ENABLE="$enable_dlopen" AC_MSG_CHECKING(path to sudo_noexec.so) AC_ARG_WITH(noexec, [AS_HELP_STRING([--with-noexec[=PATH]], [fully qualified pathname of sudo_noexec.so])], diff --git a/plugins/group_file/Makefile.in b/plugins/group_file/Makefile.in index 5f968630f..bd580ddab 100644 --- a/plugins/group_file/Makefile.in +++ b/plugins/group_file/Makefile.in @@ -71,8 +71,8 @@ datarootdir = @datarootdir@ localstatedir = @localstatedir@ plugindir = @PLUGINDIR@ -# File extension, mode and map file to use for shared libraries/objects -soext = @SOEXT@ +# File mode and map file to use for shared libraries/objects +shlib_enable = @SHLIB_ENABLE@ shlib_mode = @SHLIB_MODE@ shlib_exp = $(srcdir)/group_file.exp shlib_map = group_file.map @@ -128,7 +128,7 @@ install-includes: install-doc: install-plugin: install-dirs group_file.la - if [ X"$(soext)" != X"" ]; then \ + if [ X"$(shlib_enable)" = X"yes" ]; then \ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) group_file.la $(DESTDIR)$(plugindir); \ fi diff --git a/plugins/sample/Makefile.in b/plugins/sample/Makefile.in index 00e5945c0..d15ec7e41 100644 --- a/plugins/sample/Makefile.in +++ b/plugins/sample/Makefile.in @@ -70,8 +70,8 @@ datarootdir = @datarootdir@ localstatedir = @localstatedir@ plugindir = @PLUGINDIR@ -# File extension, mode and map file to use for shared libraries/objects -soext = @SOEXT@ +# File mode and map file to use for shared libraries/objects +shlib_enable = @SHLIB_ENABLE@ shlib_mode = @SHLIB_MODE@ shlib_exp = $(srcdir)/sample_plugin.exp shlib_map = sample_plugin.map @@ -127,7 +127,7 @@ install-includes: install-doc: install-plugin: install-dirs sample_plugin.la - if [ X"$(soext)" != X"" ]; then \ + if [ X"$(shlib_enable)" = X"yes" ]; then \ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sample_plugin.la $(DESTDIR)$(plugindir); \ fi diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 983a1b723..c73c862ab 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -89,8 +89,8 @@ datarootdir = @datarootdir@ localedir = @localedir@ localstatedir = @localstatedir@ -# File extension, mode and map file to use for shared libraries/objects -soext = @SOEXT@ +# File mode and map file to use for shared libraries/objects +shlib_enable = @SHLIB_ENABLE@ shlib_mode = @SHLIB_MODE@ shlib_exp = $(srcdir)/sudoers.exp shlib_map = sudoers.map @@ -227,7 +227,7 @@ check_iolog_path: $(CHECK_IOLOG_PATH_OBJS) $(LT_LIBS) # We need to link check_symbols with -lpthread on HP-UX since LDAP uses threads check_symbols: $(CHECK_SYMBOLS_OBJS) $(LT_LIBS) - if [ X"$(soext)" != X"" ]; then \ + if [ X"$(shlib_enable)" = X"yes" ]; then \ $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(LIBS) @SUDO_LIBS@ -no-fast-install; \ fi @@ -306,9 +306,7 @@ install-doc: install-dirs @LDAP@$(INSTALL) $(INSTALL_OWNER) -m 0755 $(srcdir)/sudoers2ldif $(DESTDIR)$(docdir) install-plugin: sudoers.la install-dirs - if [ X"$(soext)" != X"" -a -e .libs/sudoers$(soext) ]; then \ - test X"$$SUDO_PREINSTALL_CMD" != X"" && \ - $$SUDO_PREINSTALL_CMD .libs/sudoers$(soext); \ + if [ X"$(shlib_enable)" = X"yes" ]; then \ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudoers.la $(DESTDIR)$(plugindir); \ fi @@ -340,8 +338,8 @@ check: $(TEST_PROGS) visudo testsudoers diff regress/parser/check_digest.out $(srcdir)/regress/parser/check_digest.out.ok || rval=`expr $$rval + $$?`; \ ./check_fill || rval=`expr $$rval + $$?`; \ ./check_iolog_path $(srcdir)/regress/iolog_path/data || rval=`expr $$rval + $$?`; \ - if [ X"$(soext)" != X"" -a -e .libs/sudoers$(soext) ]; then \ - ./check_symbols .libs/sudoers$(soext) $(shlib_exp) || rval=`expr $$rval + $$?`; \ + if [ X"$(shlib_enable)" = X"yes" ]; then \ + ./check_symbols .libs/sudoers.so $(shlib_exp) || rval=`expr $$rval + $$?`; \ fi; \ mkdir -p regress/logging; \ ./check_wrap $(srcdir)/regress/logging/check_wrap.in > regress/logging/check_wrap.out; \ diff --git a/plugins/system_group/Makefile.in b/plugins/system_group/Makefile.in index e75e203d4..361820a8a 100644 --- a/plugins/system_group/Makefile.in +++ b/plugins/system_group/Makefile.in @@ -71,8 +71,8 @@ datarootdir = @datarootdir@ localstatedir = @localstatedir@ plugindir = @PLUGINDIR@ -# File extension, mode and map file to use for shared libraries/objects -soext = @SOEXT@ +# File mode and map file to use for shared libraries/objects +shlib_enable = @SHLIB_ENABLE@ shlib_mode = @SHLIB_MODE@ shlib_exp = $(srcdir)/system_group.exp shlib_map = system_group.map @@ -128,7 +128,7 @@ install-includes: install-doc: install-plugin: install-dirs system_group.la - if [ X"$(soext)" != X"" ]; then \ + if [ X"$(shlib_enable)" = X"yes" ]; then \ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) system_group.la $(DESTDIR)$(plugindir); \ fi diff --git a/src/Makefile.in b/src/Makefile.in index 2d84331b0..6f28ef730 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -77,8 +77,7 @@ noexecdir = @NOEXECDIR@ install_uid = 0 install_gid = 0 -# File extension and mode to use for shared libraries -shlib_ext = @SHLIB_EXT@ +# File mode to use for shared libraries shlib_mode = @SHLIB_MODE@ # Optional init script and rc.d link @@ -169,12 +168,8 @@ install-doc: install-includes: -# We install sudo_noexec by hand so we can avoid a "lib" prefix -# and a version number. Since we use LD_PRELOAD, neither is needed. install-noexec: install-dirs sudo_noexec.la - if [ -f .libs/sudo_noexec$(shlib_ext) ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudo_noexec.la $(DESTDIR)$(noexecdir); \ - fi + INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudo_noexec.la $(DESTDIR)$(noexecdir) install-plugin: