Enable non-gfortran compilation by separating Fortran libs
authorAlastair McKinstry <mckinstry@debian.org>
Mon, 1 Jan 2024 17:14:56 +0000 (17:14 +0000)
committerAlastair McKinstry <mckinstry@debian.org>
Mon, 1 Jan 2024 17:14:56 +0000 (17:14 +0000)
Last-Updated: 2023-12-31
Forwarded: no

 Note pkg-config files shipped in arch-dep libopenmpi-dev
 Don't put FMODDIR in wrapper-data (openmpi-common is arch-indep)

Gbp-Pq: Name pkg-config.patch

ompi/tools/wrappers/ompi-c.pc.in
ompi/tools/wrappers/ompi-fort.pc.in
ompi/tools/wrappers/ompi.pc.in

index be29ad77f2cdf4556249757c978c9045176b083d..4f2f8932eb6e14b8b9839a2f64391d5cfee7fb08 100644 (file)
@@ -19,4 +19,4 @@ pkgincludedir=@opalincludedir@
 Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ -l@OMPI_LIBMPI_NAME@
 Libs.private: -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@
 #
-Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@
+Cflags: -I${includedir} -I@FMODDIR@/openmpi  @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@
index 5635870b80eb5b5c085930f89bf703a6d478a476..014806ea33ee2f1e88a0409e8f57249533d67210 100644 (file)
@@ -11,11 +11,15 @@ exec_prefix=@exec_prefix@
 includedir=@includedir@
 libdir=@libdir@
 pkgincludedir=@opalincludedir@
+# override $fortran with --define-variable when building on non-gfortran compile
+fortran=gfortran
+flibdir=${libdir}/../../fortran/${fortran}
+
 #
 # Note that -lopen-pal and all the EXTRA_LIBS are only necessary when
 # static linking (they're pulled in by libopen-rte.so's implicit
 # dependencies), so only list these in Libs.private.
 #
-Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@
+Libs: -L${flibdir} -L${libdir}  @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@
 Libs.private: -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@
-Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@
+Cflags: -I${includedir} -I@FMODDIR@/openmpi  @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@
index c6961869ee83eeb71d2a77b98ea25cf7b74ac330..c25ae52fddc69912a6516b24f64246efec49886d 100644 (file)
@@ -19,4 +19,4 @@ pkgincludedir=@opalincludedir@
 Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ -l@OMPI_LIBMPI_NAME@
 Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
 #
-Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@
+Cflags: -I${includedir} -I@FMODDIR@/openmpi  @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@