diff --git a/autogen.sh b/autogen.sh index 7ce17b4500..92cffe880a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -361,7 +361,7 @@ EOF # We only need the libltdl stuff for the top-level # configure, not any of the MCA components. - if test -f include/mpi.h; then + if test -f include/mpi.h.in; then rm -rf libltdl opal/libltdl opal/ltdl.h run_and_check $ompi_libtoolize --automake --copy --ltdl mv libltdl opal @@ -1036,7 +1036,7 @@ echo "Configuring projects: $config_project_list" # figure out if we're at the top level of the OMPI tree, a component's # top-level directory, or somewhere else. -if test -f VERSION -a -f configure.ac -a -f include/mpi.h ; then +if test -f VERSION -a -f configure.ac -a -f include/mpi.h.in ; then # Top level of OMPI tree ompidir="`pwd`" elif test -f configure.in -o -f configure.ac -o -f configure.params ; then diff --git a/configure.ac b/configure.ac index 8f74305069..53ac27f1ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1585,7 +1585,7 @@ AC_SUBST(FCFLAGS) ompi_show_subtitle "Final output" -AM_CONFIG_HEADER([include/ompi_config.h]) +AM_CONFIG_HEADER([include/ompi_config.h include/mpi.h]) AC_CONFIG_FILES([ Makefile diff --git a/include/mpi.h b/include/mpi.h.in similarity index 97% rename from include/mpi.h rename to include/mpi.h.in index 390c66bbf1..dcf14d1586 100644 --- a/include/mpi.h +++ b/include/mpi.h.in @@ -17,17 +17,94 @@ #ifndef OMPI_MPI_H #define OMPI_MPI_H -/* - * Turn off OMPI_BUILDING if we were included before ompi_config.h, - * which should happen whenever an MPI application is involved. This - * will turn off most of the includes / compatibility code in - * ompi_config_bottom.h, giving the user an expected experience. - */ +#ifndef OMPI_CONFIG_H + +/* Only include these if OMPI_CONFIG_H isn't defined (meaning if + ompi_config.h hasn't already been included). Otherwise, we'll + duplicate all those symbols. OMPI coding standards say that + ompi_config.h must be included before all other files, so this + should be good enough */ + +/* Do we want the MPI-2 one-sided functions to be compiled in or left out + altogether (i.e., unlinkable)? */ +#undef OMPI_WANT_MPI2_ONE_SIDED + +/* Whether we have FORTRAN INTEGER*1 or not */ +#undef OMPI_HAVE_FORTRAN_INTEGER1 + +/* Whether we have FORTRAN INTEGER*16 or not */ +#undef OMPI_HAVE_FORTRAN_INTEGER16 + +/* Whether we have FORTRAN INTEGER*2 or not */ +#undef OMPI_HAVE_FORTRAN_INTEGER2 + +/* Whether we have FORTRAN INTEGER*4 or not */ +#undef OMPI_HAVE_FORTRAN_INTEGER4 + +/* Whether we have FORTRAN INTEGER*8 or not */ +#undef OMPI_HAVE_FORTRAN_INTEGER8 + +/* Whether we have FORTRAN REAL*16 or not */ +#undef OMPI_HAVE_FORTRAN_REAL16 + +/* Whether we have FORTRAN REAL*4 or not */ +#undef OMPI_HAVE_FORTRAN_REAL4 + +/* Whether we have FORTRAN REAL*8 or not */ +#undef OMPI_HAVE_FORTRAN_REAL8 + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if the system has the type `long long'. */ +#undef HAVE_LONG_LONG + +/* The size of a `bool', as computed by sizeof. */ +#undef SIZEOF_BOOL + +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* Type of MPI_Offset */ +#undef MPI_Offset + +/* Whether we want MPI cxx support or not */ +#undef OMPI_WANT_CXX_BINDINGS + +/* Whether we want the MPI f77 bindings or not */ +#undef OMPI_WANT_F77_BINDINGS + +/* Whether we want the MPI f90 bindings or not */ +#undef OMPI_WANT_F90_BINDINGS + +/* Whether or not we have compiled with C++ exceptions support */ +#undef OMPI_HAVE_CXX_EXCEPTION_SUPPORT + +/* MPI datatype corresponding to MPI_Offset */ +#undef OMPI_OFFSET_DATATYPE + +/* C type corresponding to FORTRAN INTEGER */ +#undef ompi_fortran_integer_t + +#ifndef OMPI_DECLSPEC +#if defined(WIN32) +#define OMPI_DECLSPEC __declspec(dllimport) +#else +#define OMPI_DECLSPEC +#endif +#endif + +#ifndef MPI_Fint +/* MPI_Fint is the same as ompi_fortran_INTEGER_t */ +#define MPI_Fint ompi_fortran_integer_t +#endif + +#endif + #ifndef OMPI_BUILDING #define OMPI_BUILDING 0 #endif -#include "ompi_config.h" /* * Just in case you need it. :-) diff --git a/ompi/mca/io/romio/romio-dist/adio/include/io_adio_conv.h b/ompi/mca/io/romio/romio-dist/adio/include/io_adio_conv.h index 4b514fd3d9..ef975c9b21 100644 --- a/ompi/mca/io/romio/romio-dist/adio/include/io_adio_conv.h +++ b/ompi/mca/io/romio/romio-dist/adio/include/io_adio_conv.h @@ -17,6 +17,8 @@ #ifndef MCA_IO_ADIO_CONV_H #define MCA_IO_ADIO_CONV_H +#include "ompi_config.h" + /* Prefix that we add to all ROMIO symbols */ #ifdef ROMIO_PREFIX #undef ROMIO_PREFIX