Skip to content

Commit 687e32a

Browse files
committed
configury: install Fortran stuff in the subdir DIR specified by the --mpi-fortran-dir=DIR configure option
Refs #2056
1 parent 3b968ec commit 687e32a

File tree

17 files changed

+68
-16
lines changed

17 files changed

+68
-16
lines changed

config/ompi_configure_options.m4

Lines changed: 10 additions & 1 deletion
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 Oak Ridge National Labs. All rights reserved.
1919
dnl Copyright (c) 2013 Intel, Inc. All rights reserved.
20-
dnl Copyright (c) 2015 Research Organization for Information Science
20+
dnl Copyright (c) 2015-2016 Research Organization for Information Science
2121
dnl and Technology (RIST). All rights reserved.
2222
dnl
2323
dnl $COPYRIGHT$
@@ -106,6 +106,15 @@ AC_ARG_ENABLE(mpi-fortran,
106106
AC_HELP_STRING([--enable-mpi-fortran],
107107
[specify which Fortran MPI bindings to build: yes, none (or no), best-effort, mpifh (build only mpif.h support), usempi (build mpif.h and the mpi module), or usempif08 (or all, build mpifh, the mpi module, and the mpi_f08 module) (default: "yes" if Fortran compiler found)]))
108108

109+
AC_ARG_WITH(mpi-fortran-dir,
110+
AC_HELP_STRING([--with-mpi-fortran-dir=VALUE],
111+
[install Fortran headers, modules and libs in includeVALEUE and libVALUE instead of include and lib]))
112+
113+
AS_IF([test $with_mpi_fortran_dir = yes || test $with_fortran_dir = no],
114+
[OMPI_FORTRAN_DIR=],
115+
[OMPI_FORTRAN_DIR=$with_mpi_fortran_dir])
116+
AC_SUBST([OMPI_FORTRAN_DIR])
117+
109118
# These are the 4 monotonically-rising values indicating levels of
110119
# Fortran bindings support.
111120
OMPI_FORTRAN_NO_BINDINGS=0

config/opal_setup_wrappers.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
465465
AC_MSG_CHECKING([for OMPI FCFLAGS])
466466
OMPI_WRAPPER_EXTRA_FCFLAGS="$wrapper_extra_fcflags $with_wrapper_fcflags"
467467
if test "$OMPI_FC_MODULE_FLAG" != "" ; then
468-
OMPI_WRAPPER_EXTRA_FCFLAGS="$OMPI_WRAPPER_EXTRA_FCFLAGS $OMPI_FC_MODULE_FLAG"'${libdir}'
468+
OMPI_WRAPPER_EXTRA_FCFLAGS="$OMPI_WRAPPER_EXTRA_FCFLAGS $OMPI_FC_MODULE_FLAG"'${libdir}''${opalfortrandir}'
469469
fi
470470
AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS])
471471
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS])
@@ -477,7 +477,7 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
477477

478478
AC_MSG_CHECKING([for OMPI LDFLAGS])
479479
OMPI_WRAPPER_EXTRA_LDFLAGS="$ompi_mca_wrapper_extra_ldflags $wrapper_extra_ldflags $with_wrapper_ldflags"
480-
OMPI_WRAPPER_EXTRA_FC_LDFLAGS=$OMPI_WRAPPER_EXTRA_LDFLAGS
480+
OMPI_WRAPPER_EXTRA_FC_LDFLAGS=-L'${libdir}${opalfortrandir}'" ${OMPI_WRAPPER_EXTRA_LDFLAGS}"
481481
RPATHIFY_LDFLAGS([OMPI_WRAPPER_EXTRA_LDFLAGS])
482482
AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS])
483483
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LDFLAGS])

ompi/include/Makefile.am

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# All rights reserved.
1212
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
1313
# Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
14-
# Copyright (c) 2014-2015 Research Organization for Information Science
14+
# Copyright (c) 2014-2016 Research Organization for Information Science
1515
# and Technology (RIST). All rights reserved.
1616
# $COPYRIGHT$
1717
#
@@ -26,15 +26,18 @@ include $(top_srcdir)/Makefile.ompi-rules
2626
# not ${includedir}/
2727
headers = ompi_config.h
2828
nodist_headers =
29+
fincludedir = $(includedir)@OMPI_FORTRAN_DIR@
2930

3031
# Install these in $(includedir)
3132
include_HEADERS =
33+
# Install those in $(finclude)
34+
finclude_HEADERS =
3235

3336
# Always install these in $(pkgincludedir)
3437
pkginclude_HEADERS =
3538

3639
if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS
37-
include_HEADERS += \
40+
finclude_HEADERS += \
3841
mpif-constants.h \
3942
mpif-externals.h \
4043
mpif-handles.h \
@@ -50,14 +53,16 @@ endif
5053
nodist_include_HEADERS = \
5154
mpi.h \
5255
mpi-ext.h \
56+
mpi_portable_platform.h
57+
58+
nodist_finclude_HEADERS = \
5359
mpif.h \
5460
mpif-ext.h \
5561
mpif-sizeof.h \
56-
mpif-c-constants-decl.h \
57-
mpi_portable_platform.h
62+
mpif-c-constants-decl.h
5863

5964
if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS
60-
nodist_include_HEADERS += \
65+
nodist_finclude_HEADERS += \
6166
mpif-config.h
6267
endif
6368

ompi/mpi/fortran/mpiext/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#
22
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
3+
# Copyright (c) 2016 Research Organization for Information Science
4+
# and Technology (RIST). All rights reserved.
35
# $COPYRIGHT$
46
#
57
# Additional copyrights may follow
68
#
79
# $HEADER$
810
#
911

12+
libdir = @libdir@@OMPI_FORTRAN_DIR@
13+
1014
#
1115
# Only do the stuff in this file if we're going to build one/both of
1216
# the mpi/mpi_f08 ext modules.

ompi/mpi/fortran/mpif-h/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Copyright (c) 2011-2013 Universite Bordeaux 1
1515
# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
1616
# reserved.
17-
# Copyright (c) 2015 Research Organization for Information Science
17+
# Copyright (c) 2015-2016 Research Organization for Information Science
1818
# and Technology (RIST). All rights reserved.
1919
# $COPYRIGHT$
2020
#
@@ -25,6 +25,8 @@
2525

2626
include $(top_srcdir)/Makefile.ompi-rules
2727

28+
libdir = @libdir@@OMPI_FORTRAN_DIR@
29+
2830
SUBDIRS = profile
2931

3032
AM_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1

ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- makefile -*-
22
#
33
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
4-
# Copyright (c) 2015 Research Organization for Information Science
4+
# Copyright (c) 2015-2017 Research Organization for Information Science
55
# and Technology (RIST). All rights reserved.
66
#
77
# $COPYRIGHT$
@@ -11,6 +11,8 @@
1111
# $HEADER$
1212
#
1313

14+
libdir = @libdir@@OMPI_FORTRAN_DIR@
15+
1416
# This Makefile is only relevant if we're building the "use mpi_f08"
1517
# MPI bindings.
1618
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS

ompi/mpi/fortran/use-mpi-f08/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Copyright (c) 2012-2013 Inria. All rights reserved.
88
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
99
# reserved.
10-
# Copyright (c) 2015-2016 Research Organization for Information Science
10+
# Copyright (c) 2015-2017 Research Organization for Information Science
1111
# and Technology (RIST). All rights reserved.
1212
#
1313
# $COPYRIGHT$
@@ -19,6 +19,8 @@
1919

2020
include $(top_srcdir)/Makefile.ompi-rules
2121

22+
libdir = @libdir@@OMPI_FORTRAN_DIR@
23+
2224
# This Makefile is only relevant if we're building the "use mpi_f08"
2325
# MPI bindings.
2426
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS

ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- makefile -*-
22
#
33
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
4-
# Copyright (c) 2015 Research Organization for Information Science
4+
# Copyright (c) 2015-2016 Research Organization for Information Science
55
# and Technology (RIST). All rights reserved.
66
#
77
# $COPYRIGHT$
@@ -13,6 +13,8 @@
1313

1414
include $(top_srcdir)/Makefile.ompi-rules
1515

16+
libdir = @libdir@@OMPI_FORTRAN_DIR@
17+
1618
# This Makefile is only relevant if we're building the ignore-TKR "use
1719
# mpi" MPI bindings.
1820
if OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS

ompi/mpi/fortran/use-mpi-tkr/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2007 Los Alamos National Security, LLC. All rights
1515
# reserved.
16-
# Copyright (c) 2014-2015 Research Organization for Information Science
16+
# Copyright (c) 2014-2016 Research Organization for Information Science
1717
# and Technology (RIST). All rights reserved.
1818
# $COPYRIGHT$
1919
#
@@ -24,6 +24,8 @@
2424

2525
include $(top_srcdir)/Makefile.ompi-rules
2626

27+
libdir = @libdir@@OMPI_FORTRAN_DIR@
28+
2729
# THIS MAKEFILE IS OLD AND ONLY TO SUPPORT FORTRAN COMPILERS THAT DO
2830
# NOT SUPPORT "IGNORE TKR" FUNCTIONALITY (i.e., gfortran before v4.9).
2931
# All other Fortran compilers support ignore TKR and don't compile

ompi/tools/wrappers/mpifort-wrapper-data.txt.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ project=Open MPI
99
project_short=OMPI
1010
version=@OMPI_VERSION@
1111
language=Fortran
12+
fortrandir=@OMPI_FORTRAN_DIR@
1213
compiler_env=FC
1314
compiler_flags_env=FCFLAGS
1415
compiler=@FC@
@@ -24,5 +25,5 @@ libs_static=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -
2425
dyn_lib_file=libmpi.@OPAL_DYN_LIB_SUFFIX@
2526
static_lib_file=libmpi.a
2627
required_file=@OMPI_WRAPPER_FORTRAN_REQUIRED_FILE@
27-
includedir=${includedir}
28+
includedir=${includedir}${opalfortrandir}
2829
libdir=${libdir}

0 commit comments

Comments
 (0)