1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2021 IBM Corporation. All rights reserved.
dnl Copyright (c) 2021 Cisco Systems, Inc. All rights reserved.
dnl
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([_OPAL_CFLAGS_FAIL_SEARCH],[
AC_REQUIRE([AC_PROG_GREP])
if test -s conftest.err ; then
$GREP -iq $1 conftest.err
if test "$?" = "0" ; then
opal_cv_cc_[$2]=0
fi
fi
])
AC_DEFUN([_OPAL_CHECK_SPECIFIC_CFLAGS], [
AC_MSG_CHECKING(if $CC supports ([$1]))
CFLAGS_orig=$CFLAGS
OPAL_FLAGS_APPEND_UNIQ([CFLAGS], ["$1"])
AC_CACHE_VAL(opal_cv_cc_[$2], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [$3])],
[
opal_cv_cc_[$2]=1
_OPAL_CFLAGS_FAIL_SEARCH(["ignored\|not recognized\|not supported\|not compatible\|unrecognized\|unknown"], [$2])
],
[
opal_cv_cc_[$2]=1
_OPAL_CFLAGS_FAIL_SEARCH(["ignored\|not recognized\|not supported\|not compatible\|unrecognized\|unknown\|error"], [$2])
])])
if test "$opal_cv_cc_[$2]" = "0" ; then
CFLAGS="$CFLAGS_orig"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi
])
AC_DEFUN([_OPAL_CXXFLAGS_FAIL_SEARCH],[
AC_REQUIRE([AC_PROG_GREP])
if test -s conftest.err ; then
$GREP -iq $1 conftest.err
if test "$?" = "0" ; then
opal_cv_cxx_[$2]=0
fi
fi
])
AC_DEFUN([_OPAL_CHECK_SPECIFIC_CXXFLAGS], [
AC_MSG_CHECKING(if $CXX supports ([$1]))
CXXFLAGS_orig=$CXXFLAGS
OPAL_FLAGS_APPEND_UNIQ([CXXFLAGS], ["$1"])
AC_CACHE_VAL(opal_cv_cxx_[$2], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [$3])],
[
opal_cv_cxx_[$2]=1
_OPAL_CXXFLAGS_FAIL_SEARCH(["ignored\|not recognized\|not supported\|not compatible\|unrecognized\|unknown"], [$2])
],
[
opal_cv_cxx_[$2]=1
_OPAL_CXXFLAGS_FAIL_SEARCH(["ignored\|not recognized\|not supported\|not compatible\|unrecognized\|unknown\|error"], [$2])
])])
if test "$opal_cv_cxx_[$2]" = "0" ; then
CXXFLAGS="$CXXFLAGS_orig"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi
])
|