opal_check_package: minor formatting cleanups
Change # comments to dnl, and add a more thorough explanation of the parameters to OPAL_CHECK_PACKAGE.
Этот коммит содержится в:
родитель
95660822b9
Коммит
24f728596d
@ -1,29 +1,29 @@
|
|||||||
# -*- shell-script -*-
|
dnl -*- shell-script -*-
|
||||||
#
|
dnl
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
# University Research and Technology
|
dnl University Research and Technology
|
||||||
# Corporation. All rights reserved.
|
dnl Corporation. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
# of Tennessee Research Foundation. All rights
|
dnl of Tennessee Research Foundation. All rights
|
||||||
# reserved.
|
dnl reserved.
|
||||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
# University of Stuttgart. All rights reserved.
|
dnl University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
dnl All rights reserved.
|
||||||
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
dnl Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||||
# Copyright (c) 2014 Intel, Inc. All rights reserved.
|
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
dnl $COPYRIGHT$
|
||||||
#
|
dnl
|
||||||
# Additional copyrights may follow
|
dnl Additional copyrights may follow
|
||||||
#
|
dnl
|
||||||
# $HEADER$
|
dnl $HEADER$
|
||||||
#
|
dnl
|
||||||
|
|
||||||
# _OPAL_CHECK_PACKAGE_HEADER(prefix, header, dir-prefix,
|
dnl _OPAL_CHECK_PACKAGE_HEADER(prefix, header, dir-prefix,
|
||||||
# [action-if-found], [action-if-not-found],
|
dnl [action-if-found], [action-if-not-found],
|
||||||
# includes)
|
dnl includes)
|
||||||
# --------------------------------------------------------------------
|
dnl --------------------------------------------------------------------
|
||||||
AC_DEFUN([_OPAL_CHECK_PACKAGE_HEADER], [
|
AC_DEFUN([_OPAL_CHECK_PACKAGE_HEADER], [
|
||||||
# This is stolen from autoconf to peek under the covers to get the
|
# This is stolen from autoconf to peek under the covers to get the
|
||||||
# cache variable for the library check. one should not copy this
|
# cache variable for the library check. one should not copy this
|
||||||
@ -57,10 +57,10 @@ AC_DEFUN([_OPAL_CHECK_PACKAGE_HEADER], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# _OPAL_CHECK_PACKAGE_LIB(prefix, library, function, extra-libraries,
|
dnl _OPAL_CHECK_PACKAGE_LIB(prefix, library, function, extra-libraries,
|
||||||
# dir-prefix, libdir,
|
dnl dir-prefix, libdir,
|
||||||
# [action-if-found], [action-if-not-found]])
|
dnl [action-if-found], [action-if-not-found]])
|
||||||
# --------------------------------------------------------------------
|
dnl --------------------------------------------------------------------
|
||||||
AC_DEFUN([_OPAL_CHECK_PACKAGE_LIB], [
|
AC_DEFUN([_OPAL_CHECK_PACKAGE_LIB], [
|
||||||
# This is stolen from autoconf to peek under the covers to get the
|
# This is stolen from autoconf to peek under the covers to get the
|
||||||
# cache variable for the library check. one should not copy this
|
# cache variable for the library check. one should not copy this
|
||||||
@ -133,20 +133,51 @@ AC_DEFUN([_OPAL_CHECK_PACKAGE_LIB], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# OPAL_CHECK_PACKAGE(prefix,
|
dnl FI_CHECK_PACKAGE(prefix,
|
||||||
# header,
|
dnl header,
|
||||||
# library,
|
dnl library,
|
||||||
# function,
|
dnl function,
|
||||||
# extra-libraries,
|
dnl extra-libraries,
|
||||||
# dir-prefix,
|
dnl dir-prefix,
|
||||||
# libdir-prefix,
|
dnl libdir-prefix,
|
||||||
# [action-if-found], [action-if-not-found],
|
dnl [action-if-found], [action-if-not-found],
|
||||||
# includes)
|
dnl includes)
|
||||||
# -----------------------------------------------------------
|
dnl -----------------------------------------------------------
|
||||||
# check for package defined by header and libs, and probably
|
dnl Check for package defined by header and libs, and probably
|
||||||
# located in dir-prefix, possibly with libs in libdir-prefix.
|
dnl located in dir-prefix, possibly with libs in libdir-prefix.
|
||||||
# Both dir-prefix and libdir-prefix can be empty. Will set
|
dnl Both dir-prefix and libdir-prefix can be empty. Will set
|
||||||
# prefix_{CPPFLAGS, LDFLAGS, LIBS} as needed
|
dnl prefix_{CPPFLAGS, LDFLAGS, LIBS} as needed.
|
||||||
|
dnl
|
||||||
|
dnl The general intent of this macro is to provide finer-grained scoping
|
||||||
|
dnl of C preprocessor flags, linker flags, and libraries (as opposed to
|
||||||
|
dnl unconditionally adding to the top-level CPFLAGS, LDFLAGS, and LIBS,
|
||||||
|
dnl which get used to compile/link *everything*).
|
||||||
|
dnl
|
||||||
|
dnl Here is a breakdown of the parameters:
|
||||||
|
dnl
|
||||||
|
dnl * prefix: the macro sets $prefix_CPPFLAGS, $prefix_LDFLAGS, and
|
||||||
|
dnl $prefix_LIBS (and AC_SUBSTs all of them). For example, if a
|
||||||
|
dnl provider uses this macro to check for a header/library that it
|
||||||
|
dnl needs, it might well set prefix to be its provider name.
|
||||||
|
dnl * header_filename: the foo.h file to check for
|
||||||
|
dnl * library_name / function_name: check for function function_name in
|
||||||
|
dnl -llibrary_name. Specifically, for library_name, use the "foo" form,
|
||||||
|
dnl as opposed to "libfoo".
|
||||||
|
dnl * extra_libraries: if the library_name you are checking for requires
|
||||||
|
dnl additonal -l arguments to link successfully, list them here.
|
||||||
|
dnl * dir_prefix: if the header/library is located in a non-standard
|
||||||
|
dnl location (e.g., /opt/foo as opposed to /usr), list it here
|
||||||
|
dnl * libdir_prefix: if the library is not under $dir_prefix/lib or
|
||||||
|
dnl $dir_prefix/lib64, list it here.
|
||||||
|
dnl * action_if_found: if both the header and library are found and
|
||||||
|
dnl usable, execute action_if_found
|
||||||
|
dnl * action_if_not_found: otherwise, execute action_if_not_found
|
||||||
|
dnl * extra_includes: if including header_filename requires additional
|
||||||
|
dnl headers to be included first, list them here
|
||||||
|
dnl
|
||||||
|
dnl The output _CPPFLAGS, _LDFLAGS, and _LIBS can be used to limit the
|
||||||
|
dnl scope various flags in Makefiles.
|
||||||
|
dnl
|
||||||
AC_DEFUN([OPAL_CHECK_PACKAGE],[
|
AC_DEFUN([OPAL_CHECK_PACKAGE],[
|
||||||
opal_check_package_$1_save_CPPFLAGS="$CPPFLAGS"
|
opal_check_package_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||||
opal_check_package_$1_save_LDFLAGS="$LDFLAGS"
|
opal_check_package_$1_save_LDFLAGS="$LDFLAGS"
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user