1
1

Properly propagate extra wrapper/libmpi flags up from component

configure scripts.  Only propagate wrapper flags when compiling the
component statically in libmpi.

This commit was SVN r1591.
Этот коммит содержится в:
Jeff Squyres 2004-07-08 13:08:44 +00:00
родитель 2f66c558aa
Коммит 5803b79dcd
3 изменённых файлов: 84 добавлений и 13 удалений

Просмотреть файл

@ -300,8 +300,23 @@ AC_SUBST(top_ompi_builddir)
# @MCA_TYPE@ @MCA_MODULE_NAME@ module specific setup
##################################
# Have at least one statement (well, m4 macro) in each "if" block so
# that some older sh flavors don't complain.
#
# Unset all *_EXTRA_* flags
#
unset ABORT
for scope in LIBMPI WRAPPER; do
for flags in CFLAGS CXXFLAGS FFLAGS LDFLAGS LIBS; do
str="unset ${scope}_EXTRA_${flags}"
eval $str
done
done
#
# Invoke configure.stub code stubs, if they exist. Have at least one
# statement (well, m4 macro) in each "if" block so that some older sh
# flavors don't complain.
#
if test "$OMPI_WANT_DIST" = "no"; then
OMPI_LOG_MSG([Running configure stub macro])
@ -311,6 +326,42 @@ else
@CONFIGURE_DIST_STUB_MACRO@
fi
#
# If any *_EXTRA_* flags were set, save them in $srcdir/post_configure.sh.
# This will be examined by the top-level configure script.
#
create_post_configure_file() {
if test ! -f post_configure.sh; then
cat > post_configure.sh <<EOF
# This file is automatically generated by configure.
# Manual changes will be lost!
# Generated by: `whoami`
# On machine: `hostname`
# On: `date`
EOF
fi
}
rm -f post_configure.sh
if test -n "$ABORT"; then
create_post_configure_file
echo "ABORT=\"$ABORT\"" >> post_configure.sh
AC_MSG_ERROR([*** ABORT flag is set; aborting])
fi
for scope in LIBMPI WRAPPER; do
for flags in CFLAGS CXXFLAGS FFLAGS LDFLAGS LIBS; do
str="found=\$${scope}_EXTRA_${flags}"
eval $str
if test -n "$found"; then
create_post_configure_file
echo "${scope}_EXTRA_${flags}=\"$found\"" >> post_configure.sh
fi
done
done
#
# We delayed doing it until now just so that long include paths don't
# show up in any of the configure output -- purely aesthetic.

Просмотреть файл

@ -394,18 +394,30 @@ if test "$HAPPY" = "1"; then
AC_MSG_ERROR([cannot continue])
fi
# Now check for the rest of the tags
# Now check for LIBMPI tags
for scope in LIBMPI WRAPPER; do
for flags in CFLAGS CXXFLAGS FFLAGS LDFLAGS LIBS; do
var="${scope}_EXTRA_${flags}"
line="`grep $var= $infile | cut -d= -f2-`"
if test -n "$line"; then
str="$var="'"$'"$var $line"'"'
eval $str
fi
done
done
for flags in CFLAGS CXXFLAGS FFLAGS LDFLAGS LIBS; do
var="LIBMPI_EXTRA_${flags}"
line="`grep $var= $infile | cut -d= -f2-`"
if test -n "$line"; then
str="$var="'"$'"$var $line"'"'
eval $str
fi
done
# Finally check for WRAPPER flags, but only if this component
# is compiling statically
if test "$compile_mode" = "static"; then
for flags in LDFLAGS LIBS; do
var="WRAPPER_EXTRA_${flags}"
line="`grep $var= $infile | cut -d= -f2-`"
if test -n "$line"; then
str="$var="'"$'"$var $line"'"'
eval $str
fi
done
fi
fi
elif test "$FOUND" = "1"; then
AC_MSG_CHECKING([if MCA module $type:$m can compile])

Просмотреть файл

@ -132,4 +132,12 @@ AC_DEFUN([MCA_CONFIGURE_STUB],[
AC_DEFINE_UNQUOTED(OMPI_MCA_PTL_GM_HAVE_RDMA_GET, $HAVE_RDMA_GET,
[Whether we have get_get() or not])
AC_MSG_RESULT([$MSG])
#
# Save extra compiler/linker flags so that they can be added in
# the wrapper compilers, if necessary
#
WRAPPER_EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
WRAPPER_EXTRA_LIBS="-lgm"
])dnl