2005-07-09 22:52:53 +04:00
# -*- shell-script -*-
#
2006-01-16 07:00:44 +03:00
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
2005-11-05 22:57:48 +03:00
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
2005-07-09 22:52:53 +04:00
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
2010-09-18 03:04:06 +04:00
# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
2005-07-09 22:52:53 +04:00
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
2010-09-18 03:04:06 +04:00
AC_DEFUN([MCA_ompi_io_romio_POST_CONFIG], [
2006-09-26 03:51:13 +04:00
AS_IF([test $1 -eq 0 -a "$enable_dist" = "yes"],
[AC_MSG_ERROR([ROMIO disabled but --enable-dist specifed. This will result in a bad tarball. Aborting configure.])])
AM_CONDITIONAL([MCA_io_romio_SHOULD_BUILD], [test $1 -eq 1])
])
2005-07-13 08:16:03 +04:00
# MCA_io_romio_CONFIG([action-if-found], [action-if-not-found])
# -----------------------------------------------------------
2010-09-18 03:04:06 +04:00
AC_DEFUN([MCA_ompi_io_romio_CONFIG],[
AC_CONFIG_FILES([ompi/mca/io/romio/Makefile])
2010-11-13 02:22:11 +03:00
OPAL_VAR_SCOPE_PUSH([io_romio_flags io_romio_flags_define io_romio_happy io_romio_save_LIBS])
2005-07-13 05:07:31 +04:00
AC_ARG_ENABLE([io-romio],
[AC_HELP_STRING([--disable-io-romio],
[Disable the ROMIO MPI-IO component])])
2005-07-09 22:52:53 +04:00
AC_ARG_WITH([io-romio-flags],
[AC_HELP_STRING([--with-io-romio-flags=FLAGS],
[Pass FLAGS to the ROMIO distribution configuration script])])
2008-07-26 16:23:30 +04:00
AC_DEFINE_UNQUOTED([MCA_io_romio_USER_CONFIGURE_FLAGS], ["$with_io_romio_flags"], [Set of user-defined configure flags given to ROMIOs configure script via --with-io-romio-flags])
2005-07-13 05:07:31 +04:00
AC_MSG_CHECKING([if want ROMIO component])
AS_IF([test "$enable_io_romio" = "no"],
[AC_MSG_RESULT([no])
$2],
[AC_MSG_RESULT([yes])
2005-07-13 08:16:03 +04:00
AC_MSG_CHECKING([if MPI profiling is enabled])
AS_IF([test "$enable_mpi_profile" = "no"],
[AC_MSG_RESULT([no])
AC_MSG_WARN([*** The ROMIO io component requires the MPI profiling layer])
2006-05-08 17:13:32 +04:00
AS_IF([test "$enable_io_romio" = "yes"],
[AC_MSG_ERROR([*** ROMIO requested but not available. Aborting])])
2005-07-13 08:16:03 +04:00
$2],
[AC_MSG_RESULT([yes])
2005-07-09 22:52:53 +04:00
2005-07-13 08:16:03 +04:00
AS_IF([test -n "$with_io_romio_flags" -a "$with_io_romio_flags" != "no"],
[io_romio_flags="$with_io_romio_flags $io_romio_flags"],
[io_romio_flags=])
2005-12-20 03:52:02 +03:00
# If ROMIO is going to end up in a DSO, all we need is
# shared library-ized objects, as we're only building a
# DSO (which is always shared). Otherwise, build with
# same flags as OMPI, as we might need any combination of
# shared and static-ized objects...
2005-07-13 08:16:03 +04:00
AS_IF([test "$compile_mode" = "dso"],
[io_romio_shared=enable
io_romio_static=disable],
2005-12-20 03:52:02 +03:00
[AS_IF([test "$enable_shared" = "yes"],
[io_romio_shared=enable],
[io_romio_shared=disable])
AS_IF([test "$enable_static" = "yes"],
[io_romio_static=enable],
[io_romio_static=disable])])
2005-07-13 08:16:03 +04:00
AS_IF([test -n "$prefix" -a "$prefix" != "NONE"],
[io_romio_prefix_arg="--prefix=$prefix"],
[io_romio_prefix_arg=])
2006-01-16 07:00:44 +03:00
AS_IF([test "$cross_compiling" = "yes"],
[AS_IF([test ! -z $build], [io_romio_flags="$io_romio_flags --build=$build"])
AS_IF([test ! -z $host], [io_romio_flags="$io_romio_flags --host=$host"])
AS_IF([test ! -z $target], [io_romio_flags="$io_romio_flags --target=$target"])])
2008-07-26 16:23:30 +04:00
io_romio_flags_define="$io_romio_flags CFLAGS='$CFLAGS' CPPFLAGS='$CPPFLAGS' FFLAGS='$FFLAGS' LDFLAGS='$LDFLAGS' --$io_romio_shared-shared --$io_romio_static-static $io_romio_flags $io_romio_prefix_arg --with-mpi=open_mpi --disable-aio"
AC_DEFINE_UNQUOTED([MCA_io_romio_COMPLETE_CONFIGURE_FLAGS], ["$io_romio_flags_define"], [Complete set of command line arguments given to ROMIOs configure script])
io_romio_flags="$io_romio_flags CFLAGS="'"'"$CFLAGS"'"'" CPPFLAGS="'"'"$CPPFLAGS"'"'" FFLAGS="'"'"$FFLAGS"'"'" LDFLAGS="'"'"$LDFLAGS"'"'" --$io_romio_shared-shared --$io_romio_static-static $io_romio_flags $io_romio_prefix_arg --with-mpi=open_mpi --disable-aio"
2005-07-09 22:52:53 +04:00
2005-07-13 08:16:03 +04:00
ompi_show_subtitle "Configuring ROMIO distribution"
2005-08-27 19:17:25 +04:00
OMPI_CONFIG_SUBDIR([ompi/mca/io/romio/romio],
2005-07-13 08:16:03 +04:00
[$io_romio_flags],
[io_romio_happy=1], [io_romio_happy=0])
2005-07-09 22:52:53 +04:00
2005-07-13 08:16:03 +04:00
AS_IF([test "$io_romio_happy" = "1"],
2005-12-06 02:54:27 +03:00
[ # grab the libraries list from ROMIO. We don't
# need this for building the component, as libtool
# will figure that part out. But we do need it for
# the wrapper settings
io_romio_save_LIBS="$LIBS"
LIBS=
. ompi/mca/io/romio/romio/localdefs
io_romio_LIBS="$LIBS"
LIBS="$io_romio_save_LIBS"
echo "ROMIO distribution configured successfully"
2005-11-29 04:41:53 +03:00
io_romio_WRAPPER_EXTRA_LIBS="$io_romio_LIBS"
2005-07-13 08:16:03 +04:00
$1],
2006-05-08 17:13:32 +04:00
[AS_IF([test "$enable_io_romio" = "yes"],
[AC_MSG_ERROR([ROMIO distribution did not configure successfully])],
[AC_MSG_WARN([ROMIO distribution did not configure successfully])])
2005-07-13 08:16:03 +04:00
$2])])])
2010-11-13 02:22:11 +03:00
OPAL_VAR_SCOPE_POP
2005-07-09 22:52:53 +04:00
])