PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/config/ac_xcpu.m4

https://code.google.com/
m4 | 43 lines | 21 code | 4 blank | 18 comment | 0 complexity | bebb7bf06273f27af179a5c0fb8c6a46 MD5 | raw file
 1##*****************************************************************************
 2## $Id:$
 3##*****************************************************************************
 4#  AUTHOR:
 5#    Jim Garlick <garlick@llnl.gov>
 6#
 7#  SYNOPSIS:
 8#    AC_XCPU
 9#
10#  DESCRIPTION:
11#    Checks for xcpu
12#
13#  WARNINGS:
14#    This macro must be placed after AC_PROG_CC or equivalent.
15##*****************************************************************************
16
17AC_DEFUN([AC_XCPU],
18[
19  #
20  # Check for whether to include xcpu module
21  #
22  AC_MSG_CHECKING([for whether to build xcpu module])
23  AC_ARG_WITH([xcpu],
24    AC_HELP_STRING([--with-xcpu], [Build xcpu module]),
25    [ case "$withval" in
26        no)  ac_with_xcpu=no ;;
27        yes) ac_with_xcpu=yes ;;
28        *)   AC_MSG_RESULT([doh!])
29             AC_MSG_ERROR([bad value "$withval" for --with-xcpu]) ;;
30      esac
31    ]
32  )
33  AC_MSG_RESULT([${ac_with_xcpu=no}])
34
35  if test "$ac_with_xcpu" = "yes"; then
36     ac_have_xcpu=yes
37     AC_ADD_STATIC_MODULE("xcpucmd")
38     AC_DEFINE([HAVE_XCPU], [1], [Define if you have XCPU.])
39  fi
40
41  AC_SUBST(HAVE_XCPU)
42
43])