Skip to content

Commit

Permalink
build: Use MCA env management for common/sse
Browse files Browse the repository at this point in the history
Update the Curl and Jansson checks to not AC_SUBST their compile/link
flags, but instead have the common/sse component build the flags
variables using the output of the Curl/Jansson tests, but named
using the standard component convention.  This allows the MCA system
to add the flags to the wrapper flags without a bunch of extra mucking
about.

This fixes an issue where -lcurl / -ljansson weren't propogated to
the wrapper compilers if common/sse is built as part of libpmix.

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
  • Loading branch information
bwbarrett authored and rhc54 committed Mar 18, 2022
1 parent e15de4b commit a1a5935
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 0 additions & 4 deletions config/pmix_check_curl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,4 @@ AC_DEFUN([PMIX_CHECK_CURL],[
AC_MSG_RESULT([$pmix_check_curl_happy])
PMIX_SUMMARY_ADD([External Packages], [Curl], [], [$pmix_check_curl_SUMMARY])
AC_SUBST(pmix_check_curl_CPPFLAGS)
AC_SUBST(pmix_check_curl_LDFLAGS)
AC_SUBST(pmix_check_curl_LIBS)
])
4 changes: 0 additions & 4 deletions config/pmix_check_jansson.m4
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ AC_DEFUN([PMIX_CHECK_JANSSON],[
AS_IF([test "$pmix_check_jansson_happy" = "no" -a "$with_jansson" != "no"],
[AC_MSG_ERROR([Jansson support requested but not found. Aborting])])
AC_SUBST(pmix_check_jansson_CPPFLAGS)
AC_SUBST(pmix_check_jansson_LDFLAGS)
AC_SUBST(pmix_check_jansson_LIBS)
AC_MSG_CHECKING([Jansson support available])
AC_MSG_RESULT([$pmix_check_jansson_happy])
Expand Down
6 changes: 3 additions & 3 deletions src/mca/common/sse/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Header files

AM_CPPFLAGS = $(LTDLINCL) -I$(top_builddir)/src -I$(top_builddir)/src/include -I$(top_builddir)/include -I$(top_builddir)/include/pmix $(pmix_check_curl_CPPFLAGS)
AM_CPPFLAGS = $(LTDLINCL) -I$(top_builddir)/src -I$(top_builddir)/src/include -I$(top_builddir)/include -I$(top_builddir)/include/pmix $(common_sse_CPPFLAGS)
AM_LFLAGS = -Ppmix_util_sse_yy
LEX_OUTPUT_ROOT = lex.pmix_util_sse_yy

Expand All @@ -34,11 +34,11 @@ noinst_LTLIBRARIES += libmca_common_sse.la
endif

libmca_common_sse_la_SOURCES = $(headers) $(sources)
libmca_common_sse_la_LDFLAGS = $(pmix_check_curl_LDFLAGS)
libmca_common_sse_la_LDFLAGS = $(common_sse_LDFLAGS)
if MCA_BUILD_pmix_common_sse_DSO
libmca_common_sse_la_LDFLAGS += -version-info $(libmca_common_sse_so_version)
endif
libmca_common_sse_la_LIBADD = $(pmix_check_curl_LIBS)
libmca_common_sse_la_LIBADD = $(common_sse_LIBS)

# install the header files
pmixdir = $(pmixincludedir)/$(subdir)
Expand Down
10 changes: 10 additions & 0 deletions src/mca/common/sse/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@ AC_DEFUN([MCA_pmix_common_sse_CONFIG], [
[$2
pmix_common_sse_happy=no])

common_sse_CPPFLAGS="${pmix_check_curl_CPPFLAGS} ${pmix_check_jansson_CPPFLAGS}"
common_sse_LDFLAGS="${pmix_check_curl_LDFLAGS} ${pmix_check_jansson_LDFLAGS}"
common_sse_STATIC_LDFLAGS="${pmix_check_curl_STATIC_LDFLAGS} ${pmix_check_jansson_STATIC_LDFLAGS}"
common_sse_LIBS="${pmix_check_curl_LIBS} ${pmix_check_jansson_LIBS}"
common_sse_STATIC_LIBS="${pmix_check_curl_STATIC_LIBS} ${pmix_check_jansson_STATIC_LIBS}"
common_sse_PC_MODULES="${pmix_check_curl_PC_MODULES} ${pmix_check_jansson_PC_MODULES}"

AC_SUBST([common_sse_CPPFLAGS])
AC_SUBST([common_sse_LDFLAGS])
AC_SUBST([common_sse_LIBS])
])dnl

0 comments on commit a1a5935

Please sign in to comment.