Skip to content

Commit 84ce7ee

Browse files
author
Ralph Castain
authored
Merge pull request #2683 from rhc54/topic/nits
Cleanup some configure stuff for static builds
2 parents dc7d2f5 + 822e268 commit 84ce7ee

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

opal/mca/pmix/pmix2x/configure.m4

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# All rights reserved.
1313
# Copyright (c) 2011-2013 Los Alamos National Security, LLC.
1414
# All rights reserved.
15-
# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved.
16-
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
15+
# Copyright (c) 2010-2017 Cisco Systems, Inc. All rights reserved.
16+
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1717
# Copyright (c) 2015-2016 Research Organization for Information Science
1818
# and Technology (RIST). All rights reserved.
1919
# $COPYRIGHT$
@@ -28,7 +28,7 @@
2828
AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
2929
AC_CONFIG_FILES([opal/mca/pmix/pmix2x/Makefile])
3030

31-
OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix2x_save_CPPFLAGS opal_pmix_pmix2x_save_LDFLAGS opal_pmix_pmix2x_save_LIBS opal_pmix_pmix2x_basedir opal_pmix_pmix2x_save_cflags opal_pmix_pmix2x_sm_flag])
31+
OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix2x_save_CPPFLAGS opal_pmix_pmix2_save_CFLAGS opal_pmix_pmix2x_save_LDFLAGS opal_pmix_pmix2x_save_LIBS opal_pmix_pmix2x_basedir opal_pmix_pmix2x_args opal_pmix_pmix2x_happy opal_pmix_pmix2x_sm_flag pmix_pmix2x_status_filename])
3232

3333
opal_pmix_pmix2x_basedir=opal/mca/pmix/pmix2x
3434

@@ -49,7 +49,7 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
4949
opal_pmix_pmix2x_sm_flag=--disable-dstore
5050
fi
5151

52-
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix2x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\""
52+
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX2X_ $opal_pmix_pmix2x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\""
5353
AS_IF([test "$enable_debug" = "yes"],
5454
[opal_pmix_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args"
5555
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
@@ -82,15 +82,29 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
8282
[AC_MSG_RESULT([yes - using the internal v2.x library])
8383
# Build flags for our Makefile.am
8484
opal_pmix_pmix2x_LDFLAGS=
85-
opal_pmix_pmix2x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix2x_basedir"'/pmix/src/libpmix.la'
86-
opal_pmix_pmix2x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix'
87-
opal_pmix_pmix2x_DEPENDENCIES='$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/src/libpmix.la'])
85+
opal_pmix_pmix2x_LIBS="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/src/libpmix.la"
86+
opal_pmix_pmix2x_CPPFLAGS="-I$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/include -I$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix -I$OPAL_TOP_SRCDIR/$opal_pmix_pmix2x_basedir/pmix/include -I$OPAL_TOP_SRCDIR/$opal_pmix_pmix2x_basedir/pmix"
87+
opal_pmix_pmix2x_DEPENDENCIES="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/src/libpmix.la"])
8888

8989
AC_SUBST([opal_pmix_pmix2x_LIBS])
9090
AC_SUBST([opal_pmix_pmix2x_CPPFLAGS])
9191
AC_SUBST([opal_pmix_pmix2x_LDFLAGS])
9292
AC_SUBST([opal_pmix_pmix2x_DEPENDENCIES])
9393

94+
# Finally, add some flags to the wrapper compiler so that our
95+
# headers can be found.
96+
pmix_pmix2x_status_filename="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/config.status"
97+
pmix_pmix2x_WRAPPER_EXTRA_CPPFLAGS=`egrep PMIX_EMBEDDED_CPPFLAGS $pmix_pmix2x_status_filename | cut -d\" -f4`
98+
pmix_pmix2x_WRAPPER_EXTRA_LDFLAGS=`egrep PMIX_EMBEDDED_LDFLAGS $pmix_pmix2x_status_filename | cut -d\" -f4`
99+
pmix_pmix2x_WRAPPER_EXTRA_LIBS=`egrep PMIX_EMBEDDED_LIBS $pmix_pmix2x_status_filename | cut -d\" -f4`
100+
101+
AC_MSG_CHECKING([PMIx extra wrapper CPPFLAGS])
102+
AC_MSG_RESULT([$pmix_pmix2x_WRAPPER_EXTRA_CPPFLAGS])
103+
AC_MSG_CHECKING([PMIx extra wrapper LDFLAGS])
104+
AC_MSG_RESULT([$pmix_pmix2x_WRAPPER_EXTRA_LDFLAGS])
105+
AC_MSG_CHECKING([PMIx extra wrapper LIBS])
106+
AC_MSG_RESULT([$pmix_pmix2x_WRAPPER_EXTRA_LIBS])
107+
94108
AS_IF([test $opal_pmix_pmix2x_happy -eq 1],
95109
[$1],
96110
[$2])

opal/mca/pmix/pmix2x/pmix/config/pmix.m4

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
1717
dnl reserved.
1818
dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
1919
dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
20-
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
20+
dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
2121
dnl Copyright (c) 2015-2016 Research Organization for Information Science
2222
dnl and Technology (RIST). All rights reserved.
2323
dnl Copyright (c) 2016 Mellanox Technologies, Inc.
@@ -90,7 +90,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
9090
if test "$?" != "0"; then
9191
AC_MSG_ERROR([Cannot continue])
9292
fi
93-
AC_MSG_RESULT([$PMIX_MAJOR_VERSION])
9493
AC_SUBST(PMIX_MAJOR_VERSION)
9594
AC_DEFINE_UNQUOTED([PMIX_MAJOR_VERSION], [$PMIX_MAJOR_VERSION],
9695
[The library major version is always available, contrary to VERSION])
@@ -99,7 +98,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
9998
if test "$?" != "0"; then
10099
AC_MSG_ERROR([Cannot continue])
101100
fi
102-
AC_MSG_RESULT([$PMIX_MINOR_VERSION])
103101
AC_SUBST(PMIX_MINOR_VERSION)
104102
AC_DEFINE_UNQUOTED([PMIX_MINOR_VERSION], [$PMIX_MINOR_VERSION],
105103
[The library minor version is always available, contrary to VERSION])
@@ -114,7 +112,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
114112
if test "$?" != "0"; then
115113
AC_MSG_ERROR([Cannot continue])
116114
fi
117-
AC_MSG_RESULT([$PMIX_RELEASE_VERSION])
118115
AC_SUBST(PMIX_RELEASE_VERSION)
119116
AC_DEFINE_UNQUOTED([PMIX_RELEASE_VERSION], [$PMIX_RELEASE_VERSION],
120117
[The library release version is always available, contrary to VERSION])
@@ -679,9 +676,9 @@ AC_DEFUN([PMIX_SETUP_CORE],[
679676
# rather than have successive assignments to these shell
680677
# variables, lest the $(foo) names try to get evaluated here.
681678
# Yuck!
682-
CPPFLAGS='-I$(PMIX_top_builddir) -I$(PMIX_top_srcdir) -I$(PMIX_top_srcdir)/src -I$(PMIX_top_builddir)/include -I$(PMIX_top_srcdir)/include'" $CPPFLAGS"
679+
CPPFLAGS="-I$PMIX_top_builddir -I$PMIX_top_srcdir -I$PMIX_top_srcdir/src -I$PMIX_top_builddir/include -I$PMIX_top_srcdir/include $CPPFLAGS"
683680
else
684-
CPPFLAGS='-I$(PMIX_top_srcdir) -I$(PMIX_top_srcdir)/src -I$(PMIX_top_srcdir)/include'" $CPPFLAGS"
681+
CPPFLAGS="-I$PMIX_top_srcdir -I$PMIX_top_srcdir/src -I$PMIX_top_srcdir/include $CPPFLAGS"
685682
fi
686683

687684
# pmixdatadir, pmixlibdir, and pmixinclude are essentially the same as
@@ -708,6 +705,11 @@ AC_DEFUN([PMIX_SETUP_CORE],[
708705
pmix_config_prefix[src/mca/base/Makefile]
709706
)
710707

708+
# publish any embedded flags so external wrappers can use them
709+
AC_SUBST(PMIX_EMBEDDED_LIBS)
710+
AC_SUBST(PMIX_EMBEDDED_LDFLAGS)
711+
AC_SUBST(PMIX_EMBEDDED_CPPFLAGS)
712+
711713
# Success
712714
$2
713715
])dnl

opal/mca/pmix/pmix2x/pmix/config/pmix_setup_zlib.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
5-
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
5+
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
66
# $COPYRIGHT$
77
#
88
# Additional copyrights may follow
@@ -58,10 +58,13 @@ AC_DEFUN([PMIX_ZLIB_CONFIG],[
5858
[pmix_zlib_support=0])
5959
if test $pmix_zlib_support == "1"; then
6060
LIBS="$LIBS -lz"
61+
PMIX_EMBEDDED_LIBS="$PMIX_EMBEDDED_LIBS -lz"
6162
if test "$pmix_zlib_standard_header_location" != "yes"; then
63+
PMIX_EMBEDDED_CPPFLAGS="$PMIX_EMBEDDED_CPPFLAGS $pmix_zlib_CPPFLAGS"
6264
CPPFLAGS="$CPPFLAGS $pmix_zlib_CPPFLAGS"
6365
fi
6466
if test "$pmix_zlib_standard_lib_location" != "yes"; then
67+
PMIX_EMBEDDED_LDFLAGS="$PMIX_EMBEDDED_LDFLAGS $pmix_zlib_LDFLAGS"
6568
LDFLAGS="$LDFLAGS $pmix_zlib_LDFLAGS"
6669
fi
6770
fi

0 commit comments

Comments
 (0)