SUDOERS_OBJS
COMMON_OBJS
LT_DEP_LIBS
-LT_STATIC_LIBUTIL
LT_STATIC
LT_LDEXPORTS
LT_LDDEP
LT_LDFLAGS
+LIBUTIL_LDFLAGS
SUDOERS_LDFLAGS
LDFLAGS
CPPFLAGS
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"
+ # Do not install sudoers or libsudo_util.
+ SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS}${SUDOERS_LDFLAGS+ }-no-install"
+ LIBUTIL_LDFLAGS="${LIBUTIL_LDFLAGS}${LIBUTIL_LDFLAGS+ }-no-install"
fi
-else
- LT_STATIC_LIBUTIL="$LT_STATIC"
fi
# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless
AC_SUBST([CPPFLAGS])
AC_SUBST([LDFLAGS])
AC_SUBST([SUDOERS_LDFLAGS])
+AC_SUBST([LIBUTIL_LDFLAGS])
AC_SUBST([LT_LDFLAGS])
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])
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"
+ # Do not install sudoers or libsudo_util.
+ SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS}${SUDOERS_LDFLAGS+ }-no-install"
+ LIBUTIL_LDFLAGS="${LIBUTIL_LDFLAGS}${LIBUTIL_LDFLAGS+ }-no-install"
fi
-else
- LT_STATIC_LIBUTIL="$LT_STATIC"
fi
# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless
# Compiler & tools to use
CC = @CC@
-LIBTOOL = @LIBTOOL@ @LT_STATIC_LIBUTIL@
+LIBTOOL = @LIBTOOL@ @LT_STATIC@
SED = @SED@
# Our install program supports extra flags...
# Flags to pass to the link stage
LDFLAGS = @LDFLAGS@
-LT_LDFLAGS = @LT_LDFLAGS@ @LT_LDEXPORTS@
+LT_LDFLAGS = @LIBUTIL_LDFLAGS@ @LT_LDFLAGS@ @LT_LDEXPORTS@
# PIE flags
PIE_CFLAGS = @PIE_CFLAGS@
@$(SED) 's/^/+e /' $(shlib_exp) > $@
libsudo_util.la: $(LTOBJS) @LT_LDDEP@
- $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(LT_LDFLAGS) $(LTOBJS) -version-info $(SHLIB_VERSION) -rpath $(libexecdir)/sudo @LT_DEP_LIBS@ @LIBDL@
+ case "$(LT_LDFLAGS)" in \
+ *-no-install*) \
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(LT_LDFLAGS) $(LTOBJS);; \
+ *) \
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(LT_LDFLAGS) $(LTOBJS) -version-info $(SHLIB_VERSION) -rpath $(libexecdir)/sudo @LT_DEP_LIBS@ @LIBDL@;; \
+ esac
siglist.c: mksiglist
./mksiglist > $@
pre-install:
install: install-dirs
- case "$(LIBTOOL)" in \
- *disable-shared*) ;; \
+ case "$(LT_LDFLAGS)" in \
+ *-no-install*) ;; \
*) if [ X"$(shlib_enable)" = X"yes" ]; then \
INSTALL_BACKUP='~' $(LIBTOOL) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_util.la $(DESTDIR)$(libexecdir)/sudo; \
fi;; \
$(LIBTOOL) --mode=link $(CC) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install
sudoers.la: $(SUDOERS_OBJS) $(LT_LIBS) libparsesudoers.la @LT_LDDEP@
- $(LIBTOOL) @LT_STATIC@ --mode=link $(CC) $(LDFLAGS) $(LT_LDFLAGS) -o $@ $(SUDOERS_OBJS) libparsesudoers.la $(SUDOERS_LIBS) -module -avoid-version -rpath $(plugindir) -shrext .so
+ case "$(LT_LDFLAGS)" in \
+ *-no-install*) \
+ $(LIBTOOL) @LT_STATIC@ --mode=link $(CC) $(LDFLAGS) $(LT_LDFLAGS) -o $@ $(SUDOERS_OBJS) libparsesudoers.la $(SUDOERS_LIBS) -module;; \
+ *) \
+ $(LIBTOOL) @LT_STATIC@ --mode=link $(CC) $(LDFLAGS) $(LT_LDFLAGS) -o $@ $(SUDOERS_OBJS) libparsesudoers.la $(SUDOERS_LIBS) -module -avoid-version -rpath $(plugindir) -shrext .so;; \
+ esac
visudo: libparsesudoers.la $(VISUDO_OBJS) $(LT_LIBS)
$(LIBTOOL) --mode=link $(CC) -o $@ $(VISUDO_OBJS) $(LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) libparsesudoers.la $(LIBS) $(VISUDO_LIBS)
@LDAP@$(INSTALL) $(INSTALL_OWNER) -m 0755 $(srcdir)/sudoers2ldif $(DESTDIR)$(docdir)
install-plugin: sudoers.la install-dirs
- if [ X"$(shlib_enable)" = X"yes" ]; then \
- INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudoers.la $(DESTDIR)$(plugindir); \
- fi
+ case "$(LT_LDFLAGS)" in \
+ *-no-install*) ;; \
+ *) if [ X"$(shlib_enable)" = X"yes" ]; then \
+ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudoers.la $(DESTDIR)$(plugindir); \
+ fi;; \
+ esac
install-sudoers: install-dirs
$(INSTALL) -d $(INSTALL_OWNER) -m 0750 $(DESTDIR)$(sudoersdir)/sudoers.d