1
1

Add pkg-config(1) config files to Open MPI. Additionally, fix a minor

bug: libmpi_f90 had libmpi.la in its LIBADD instead of libmpi_f77.la.

Fixes trac:2244.

This commit was SVN r22704.

The following Trac tickets were found above:
  Ticket 2244 --> https://svn.open-mpi.org/trac/ompi/ticket/2244
Этот коммит содержится в:
Jeff Squyres 2010-02-24 18:46:06 +00:00
родитель 3d04940921
Коммит af6f1f4b00
15 изменённых файлов: 214 добавлений и 7 удалений

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

@ -1194,6 +1194,37 @@ Customizing the behavior of the wrapper compilers is possible (e.g.,
changing the compiler [not recommended] or specifying additional
compiler/linker flags); see the Open MPI FAQ for more information.
Alternatively, starting in the Open MPI v1.5 series, Open MPI also
installs pkg-config(1) configuration files under $libdir/pkgconfig.
If pkg-config is configured to find these files, then compiling /
linking Open MPI programs can be performed like this:
shell$ gcc hello_world_mpi.c -o hello_world_mpi -g \
`pkg-config ompi-c --cflags --libs`
shell$
Open MPI supplies multiple pkg-config(1) configuration files; one for
each different wrapper compiler (language):
------------------------------------------------------------------------
ompi Synonym for "ompi-c"; Open MPI applications using the C
MPI bindings
ompi-c Open MPI applications using the C MPI bindings
ompi-cxx Open MPI applications using the C or C++ MPI bindings
ompi-f77 Open MPI applications using the C or "mpif.h" MPI bindings
ompi-f90 Open MPI applications using the C, "mpif.h" or "use mpi" MPI
bindings
------------------------------------------------------------------------
The following pkg-config(1) configuration files *may* be installed,
depending on which command line options were specified to Open MPI's
configure script. They are not necessary for MPI applications, but
may be used by applications that use Open MPI's lower layer support
libraries.
orte: Open MPI Run-Time Environment applicaions
opal: Open Portable Access Layer applications
===========================================================================
Running Open MPI Applications

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

@ -1,6 +1,6 @@
# -*- shell-script -*-
#
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -35,6 +35,11 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
ompi/tools/wrappers/mpic++-wrapper-data.txt
ompi/tools/wrappers/mpif77-wrapper-data.txt
ompi/tools/wrappers/mpif90-wrapper-data.txt
ompi/tools/wrappers/ompi.pc
ompi/tools/wrappers/ompi-c.pc
ompi/tools/wrappers/ompi-cxx.pc
ompi/tools/wrappers/ompi-f77.pc
ompi/tools/wrappers/ompi-f90.pc
ompi/tools/ortetools/Makefile
ompi/tools/ompi-server/Makefile
ompi/tools/ompi-probe/Makefile

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

@ -142,7 +142,7 @@ libmpi_f90_la_SOURCES = \
attr_fn-f90-interfaces.h \
conversion_fn_null-f90-interface.h \
mpi.f90
libmpi_f90_la_LIBADD = $(top_builddir)/ompi/libmpi.la
libmpi_f90_la_LIBADD = $(top_builddir)/ompi/mpi/f77/libmpi_f77.la
# These files are all generated by scripts in the scripts/ directory.

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

@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -51,6 +51,9 @@ else # OPAL_WANT_SCRIPT_WRAPPER_COMPILERS
if OMPI_INSTALL_BINARIES
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ompi.pc ompi-c.pc ompi-cxx.pc ompi-f77.pc ompi-f90.pc
man_MANS = $(man_pages)
dist_pkgdata_DATA = \

25
ompi/tools/wrappers/ompi-c.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,25 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open MPI
Description: Portable high-performance MPI implementation
Version: @OMPI_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# 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_WRAPPER_EXTRA_LDFLAGS@ -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
#
# It is safe to hard-wire the -I before the EXTRA_INCLUDES because it
# will either contain "openmpi" or be blank. Hence, it'll either
# resolve to ${includedir} or ${includedir}/something. The former is
# redundant (ick), but safe.
#
Cflags: -I${includedir} -I${includedir}/@OMPI_WRAPPER_EXTRA_INCLUDES@ @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@

24
ompi/tools/wrappers/ompi-cxx.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open MPI
Description: Portable high-performance MPI implementation
Version: @OMPI_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# 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_WRAPPER_EXTRA_LDFLAGS@ @OMPI_WRAPPER_CXX_LIB@ -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
#
# It is safe to hard-wire the -I before the EXTRA_INCLUDES because we
# will not be installing this .pc file unless --enable-devel-headers is
# selected, meaning that there will definitely be a value in EXTRA_INCLUDES.
#
Cflags: -I${includedir} -I${includedir}/@OMPI_WRAPPER_EXTRA_INCLUDES@ @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CXXFLAGS@

19
ompi/tools/wrappers/ompi-f77.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,19 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open MPI
Description: Portable high-performance MPI implementation
Version: @OMPI_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# 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_WRAPPER_EXTRA_LDFLAGS@ -lmpi_f77 -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FFLAGS@

19
ompi/tools/wrappers/ompi-f90.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,19 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open MPI
Description: Portable high-performance MPI implementation
Version: @OMPI_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# 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_WRAPPER_EXTRA_LDFLAGS@ -lmpi_f90
Libs.private: -lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@
Cflags: @OMPI_FC_MODULE_FLAG@${libdir} -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@

25
ompi/tools/wrappers/ompi.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,25 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open MPI
Description: Portable high-performance MPI implementation
Version: @OMPI_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# 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_WRAPPER_EXTRA_LDFLAGS@ -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
#
# It is safe to hard-wire the -I before the EXTRA_INCLUDES because it
# will either contain "openmpi" or be blank. Hence, it'll either
# resolve to ${includedir} or ${includedir}/something. The former is
# redundant (ick), but safe.
#
Cflags: -I${includedir} -I${includedir}/@OMPI_WRAPPER_EXTRA_INCLUDES@ @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@

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

@ -1,6 +1,6 @@
# -*- shell-script -*-
#
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -26,6 +26,7 @@ AC_DEFUN([OPAL_CONFIG_FILES],[
opal/tools/wrappers/Makefile
opal/tools/wrappers/opalcc-wrapper-data.txt
opal/tools/wrappers/opalc++-wrapper-data.txt
opal/tools/wrappers/opal.pc
opal/tools/opal-checkpoint/Makefile
opal/tools/opal-restart/Makefile
])

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

@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# $COPYRIGHT$
#
@ -43,6 +43,9 @@ nodist_pkgdata_DATA = \
nodist_man_MANS += opalcc.1 opalc++.1
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = opal.pc
install-exec-hook:
(cd $(DESTDIR)$(bindir); rm -f opalcc$(EXEEXT); $(LN_S) opal_wrapper opalcc)
(cd $(DESTDIR)$(bindir); rm -f opalc++$(EXEEXT); $(LN_S) opal_wrapper opalc++)

24
opal/tools/wrappers/opal.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open Portability Access Layer (OPAL)
Description: Lowest layer abstractions for the Open MPI software package
Version: @OPAL_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# Note that the EXTRA_LIBS are only necessary when static linking
# (they're pulled in via libopen-pal.so's implicit dependencies), so
# list them in Libs.private.
#
Libs: -L${libdir} @OPAL_WRAPPER_EXTRA_LDFLAGS@ -lopen-pal
Libs.private: @OPAL_WRAPPER_EXTRA_LIBS@
#
# It is safe to hard-wire the -I before the EXTRA_INCLUDES because we
# will not be installing this .pc file unless --enable-devel-headers is
# selected, meaning that there will definitely be a value in EXTRA_INCLUDES.
#
Cflags: -I${includedir} -I${includedir}/@OPAL_WRAPPER_EXTRA_INCLUDES@ @OPAL_WRAPPER_EXTRA_CPPFLAGS@ @OPAL_WRAPPER_EXTRA_CFLAGS@

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

@ -1,6 +1,6 @@
# -*- shell-script -*-
#
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -19,6 +19,7 @@ AC_DEFUN([ORTE_CONFIG_FILES],[
orte/tools/wrappers/Makefile
orte/tools/wrappers/ortecc-wrapper-data.txt
orte/tools/wrappers/ortec++-wrapper-data.txt
orte/tools/wrappers/orte.pc
orte/tools/orte-checkpoint/Makefile
orte/tools/orte-iof/Makefile
orte/tools/orte-restart/Makefile

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

@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -54,6 +54,9 @@ else # OPAL_WANT_SCRIPT_WRAPPER_COMPILERS
if OMPI_INSTALL_BINARIES
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = orte.pc
#man_MANS = $(man_pages)
install-exec-hook-always:

24
orte/tools/wrappers/orte.pc.in Обычный файл
Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
#
Name: Open MPI Run-Time Environment (ORTE)
Description: Open MPI's run-time environment functionality
Version: @ORTE_VERSION@
URL: http://www.open-mpi.org/
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
#
# 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} @ORTE_WRAPPER_EXTRA_LDFLAGS@ -lopen-rte
Libs.private: @ORTE_WRAPPER_EXTRA_LIBS@
#
# It is safe to hard-wire the -I before the EXTRA_INCLUDES because we
# will not be installing this .pc file unless --enable-devel-headers is
# selected, meaning that there will definitely be a value in EXTRA_INCLUDES.
#
Cflags: -I${includedir} -I${includedir}/@ORTE_WRAPPER_EXTRA_INCLUDES@ @ORTE_WRAPPER_EXTRA_CPPFLAGS@ @ORTE_WRAPPER_EXTRA_CFLAGS@