From 1671dc03bbee34c0948619387917aebbf0cc2756 Mon Sep 17 00:00:00 2001 From: William Brown Date: Feb 18 2020 23:06:04 +0000 Subject: Ticket 50900 - Fix cargo offline build Bug Description: The cargo offline build was broken due to a missing + on the CPP flags to nsslapd, and because of a "space" between a variable and the value in configure.ac. Fix Description: Add the plus, remove the space. https://pagure.io/389-ds-base/pull-request/50900 Author: William Brown Review by: mhonek (Thanks!) --- diff --git a/Makefile.am b/Makefile.am index df986bf..9180d17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2180,7 +2180,7 @@ ns_slapd_LDADD = libslapd.la libldaputil.la libsvrcore.la $(LDAPSDK_LINK) $(NSS_ $(NSPR_LINK) $(SASL_LINK) $(LIBNSL) $(LIBSOCKET) $(THREADLIB) $(SYSTEMD_LIBS) $(EVENT_LINK) if RUST_ENABLE ns_slapd_LDADD += $(RNSSLAPD_LIB) -ns_slapd_CPPFLAGS = -lssl -lcrypto +ns_slapd_CPPFLAGS += -lssl -lcrypto endif ns_slapd_DEPENDENCIES = libslapd.la libldaputil.la # We need to link ns-slapd with the C++ compiler on HP-UX since we load diff --git a/configure.ac b/configure.ac index 78803cc..bfb9436 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,11 @@ AC_ARG_ENABLE(rust_offline, AS_HELP_STRING([--enable-rust-offline], [Enable rust AC_MSG_RESULT($enable_rust_offline) AM_CONDITIONAL([RUST_ENABLE_OFFLINE],[test "$enable_rust_offline" = yes]) +AS_IF([test "$enable_rust_offline" = yes], + [rust_vendor_sources="replace-with = \"vendored-sources\""], + [rust_vendor_sources=""]) +AC_SUBST([rust_vendor_sources]) + AC_MSG_CHECKING(for --enable-rust) AC_ARG_ENABLE(rust, AS_HELP_STRING([--enable-rust], [Enable rust language features (default: no)]), [], [ enable_rust=no ]) @@ -104,14 +109,6 @@ if test "$enable_rust" = yes -o "$enable_rust_offline" = yes; then AS_IF([test "$CARGO" != "yes" -o "$RUSTC" != "yes"], [ AC_MSG_FAILURE("Rust based plugins cannot be built cargo=$CARGO rustc=$RUSTC") ]) - - if test "$enable_rust_offline" = yes; then - rust_vendor_sources = "replace-with = \"vendored-sources\"" - else - rust_vendor_sources = "" - fi - AC_SUBST([rust_vendor_sources]) - AC_CONFIG_FILES([.cargo/config]) fi AC_SUBST([enable_rust]) AM_CONDITIONAL([RUST_ENABLE],[test "$enable_rust" = yes -o "$enable_rust_offline" = yes]) @@ -925,5 +922,7 @@ AC_CONFIG_FILES([src/pkgconfig/dirsrv.pc src/pkgconfig/libsds.pc src/pkgconfig/s AC_CONFIG_FILES([Makefile rpm/389-ds-base.spec ]) +AC_CONFIG_FILES([.cargo/config]) + AC_OUTPUT