@@ -5,7 +5,7 @@ dnl University Research and Technology
55dnl Corporation. All rights reserved.
66dnl Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
77dnl Copyright (c) 2011-2012 Oak Ridge National Labs. All rights reserved.
8- dnl Copyright (c) 2015-2018 Research Organization for Information Science
8+ dnl Copyright (c) 2015-2019 Research Organization for Information Science
99dnl and Technology (RIST). All rights reserved.
1010dnl Copyright (c) 2017 The University of Tennessee and The University
1111dnl of Tennessee Research Foundation. All rights
259259 [OMPI_MPIEXT_C],
260260 [OMPI_MPIEXT_MPIFH],
261261 [OMPI_MPIEXT_USEMPI],
262- [OMPI_MPIEXT_USEMPIF08])])])
262+ [OMPI_MPIEXT_USEMPIF08],
263+ [OMPI_MPIEXT_ARCHIVE])])])
263264
264265 # ##############
265266 # C Bindings
@@ -344,10 +345,10 @@ EOF
344345
345346 OMPI_EXT_MAKE_DIR_LIST(OMPI_MPIEXT_ALL_SUBDIRS, $OMPI_MPIEXT_ALL )
346347
347- OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_C, $OMPI_MPIEXT_C , c, c)
348- OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_MPIFH, $OMPI_MPIEXT_MPIFH , mpif-h, mpifh)
349- OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_USEMPI, $OMPI_MPIEXT_USEMPI , use-mpi, usempi)
350- OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_USEMPIF08, $OMPI_MPIEXT_USEMPIF08 , use-mpi-f08, usempif08)
348+ OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_C, $OMPI_MPIEXT_C , $OMPI_MPIEXT_ARCHIVE , c, c)
349+ OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_MPIFH, $OMPI_MPIEXT_MPIFH , $OMPI_MPIEXT_ARCHIVE , mpif-h, mpifh)
350+ OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_USEMPI, $OMPI_MPIEXT_USEMPI , $OMPI_MPIEXT_ARCHIVE , use-mpi, usempi)
351+ OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_USEMPIF08, $OMPI_MPIEXT_USEMPIF08 , $OMPI_MPIEXT_ARCHIVE , use-mpi-f08, usempif08)
351352
352353 comps=` echo $OMPI_MPIEXT_C | sed -e ' s/^[ \t]*//;s/[ \t]*$//;s/ /, /g' `
353354 AC_DEFINE_UNQUOTED([OMPI_MPIEXT_COMPONENTS], [" $comps " ],
366367# (3) c_components_variable,
367368# (4) mpifh_components_variable,
368369# (5) usempi_components_variable,
369- # (6) usempif08_components_variable)
370+ # (6) usempif08_components_variable,
371+ # (7) archive_components_variable)
370372#
371373# - component_name is a single, naked string (no prefix)
372374# - all others are naked component names (e.g., "example"). If an
@@ -386,7 +388,7 @@ AC_DEFUN([EXT_CONFIGURE_M4_CONFIG_COMPONENT],[
386388 OMPI_MPIEXT_$1 _CONFIG([should_build= ${should_build} ], [should_build= 0])
387389
388390 AS_IF([test $should_build -eq 1],
389- [EXT_PROCESS_COMPONENT([$1 ], [$2 ], [$3 ], [$4 ], [$5 ], [$6 ])],
391+ [EXT_PROCESS_COMPONENT([$1 ], [$2 ], [$3 ], [$4 ], [$5 ], [$6 ], [ $7 ] )],
390392 [EXT_PROCESS_DEAD_COMPONENT([$1 ], [$2 ])])
391393])
392394
@@ -403,7 +405,8 @@ AC_DEFUN([EXT_CONFIGURE_M4_CONFIG_COMPONENT],[
403405# (3) c_components_variable,
404406# (4) mpifh_components_variable,
405407# (5) usempi_components_variable,
406- # (6) usempif08_components_variable)
408+ # (6) usempif08_components_variable,
409+ # (7) archive_components_variable)
407410#
408411# C bindings are mandatory. Other bindings are optional / built if
409412# they are found. Here's the files that the m4 expects:
615618 m4_ifdef([OMPI_MPIEXT_]$1 [_INCLUDE_MPIFH_IN_USEMPI],
616619 [include_mpifh= OMPI_MPIEXT_$1 _INCLUDE_MPIFH_IN_USEMPI],
617620 [include_mpifh= 1])
618- if test " $enabled_mpifh " = 1 && test " $include_mpifh " ! = 0; then
621+ if test $enabled_mpifh -eq 1 && test $include_mpifh -ne 0; then
619622 mpifh_component_header=" mpiext_${component} _mpifh.h"
620623 cat >> $mpiusempi_ext_h << EOF
621624#include "${mpifh_component_header_path} "
677680 m4_ifdef([OMPI_MPIEXT_]$1 [_INCLUDE_MPIFH_IN_USEMPIF08],
678681 [include_mpifh= OMPI_MPIEXT_$1 _INCLUDE_MPIFH_IN_USEMPIF08],
679682 [include_mpifh= 1])
680- if test " $enabled_mpifh " = 1 && test " $include_mpifh " ! = 0; then
683+ if test $enabled_mpifh -eq 1 && test $include_mpifh -ne 0; then
681684 mpifh_component_header=" mpiext_${component} _mpifh.h"
682685 cat >> $mpiusempif08_ext_h << EOF
683686#include "${mpifh_component_header_path} "
704707 [echo " extern const ompi_mpiext_component_t ompi_mpiext_${component} ;" >> $outfile .extern
705708 echo " &ompi_mpiext_${component} , " >> $outfile .struct])
706709
710+ m4_ifdef([OMPI_MPIEXT_]$1 [_HAVE_OBJECT],
711+ [have_object= OMPI_MPIEXT_$1 _HAVE_OBJECT],
712+ [have_object= 1])
713+ if test $have_object -ne 0; then
714+ $7 =" $$ 7 $component "
715+ fi
716+
707717 # now add the flags that were set in the environment variables
708718 # framework_component_FOO (for example, the flags set by
709719 # m4_configure components)
@@ -804,7 +814,7 @@ AC_DEFUN([EXT_COMPONENT_BUILD_CHECK],[
804814 fi
805815 fi
806816
807- AS_IF([test " $want_component " = " 1 " ], [$2 ], [$3 ])
817+ AS_IF([test $want_component -eq 1 ], [$2 ], [$3 ])
808818])
809819
810820
@@ -821,25 +831,31 @@ AC_DEFUN([OMPI_EXT_MAKE_DIR_LIST],[
821831])
822832
823833# OMPI_EXT_MAKE_LISTS((1) subst'ed variable prefix,
824- # (2) shell list,
825- # (3) bindings dir name,
826- # (4) bindings suffix)
834+ # (2) shell list of extensions of which the bindings are enabled,
835+ # (3) shell list of extensions which needs libtool archive,
836+ # (4) bindings dir name,
837+ # (5) bindings suffix)
827838#
828839# Prefix every extension name with "mpiext/".
829840# -------------------------------------------------------------------------
830841AC_DEFUN([OMPI_EXT_MAKE_LISTS],[
831842 # Make the directory list
832843 tmp=
833844 for item in $2 ; do
834- tmp=" $tmp mpiext/$item /$3 "
845+ tmp=" $tmp mpiext/$item /$4 "
835846 done
836847 $1 _DIRS= $tmp
837848 AC_SUBST($1 _DIRS)
838849
839850 # Make the list of libraries
840851 tmp=
841852 for item in $2 ; do
842- tmp=" $tmp " ' $(top_builddir)' " /ompi/mpiext/$item /$3 /libmpiext_${item} _$4 .la"
853+ for item2 in $3 ; do
854+ if test $item = $item2 ; then
855+ tmp=" $tmp " ' $(top_builddir)' " /ompi/mpiext/$item /$4 /libmpiext_${item} _$5 .la"
856+ break
857+ fi
858+ done
843859 done
844860 $1 _LIBS= $tmp
845861 AC_SUBST($1 _LIBS)
0 commit comments