File: acx_with_pcm.m4

package info (click to toggle)
madness 0.10.1%2Bgit20200818.eee5fd9f-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 34,980 kB
  • sloc: cpp: 280,841; ansic: 12,626; python: 4,961; fortran: 4,245; xml: 1,053; makefile: 714; sh: 276; perl: 244; yacc: 227; lex: 188; asm: 141; csh: 55
file content (42 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download | duplicates (2)
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
AC_DEFUN([ACX_WITH_PCM], [
  acx_with_pcm=""
  AC_ARG_WITH([pcm],
    [AS_HELP_STRING([--with-pcm@<:@=Install DIR@:>@],
      [Enables use of the polarizable contiuum model library PCM])],
    [
      case $withval in
      yes)
        acx_with_pcm="yes"
      ;;
      no)
        acx_with_pcm="no"
      ;;
      *)
        CPPFLAGS="-I$withval/include $CPPFLAGS"
        LIBS="$LIBS -L$withval/lib"
        acx_with_pcm="$withval"
      esac
    ],
    [acx_with_pcm="yes"]
  )

  if test $acx_with_pcm != "no"; then
    AC_LANG_SAVE
    AC_LANG([C++])
    AC_CHECK_HEADERS([PCMSolver/pcmsolver.h PCMSolver/PCMInput.h], [], 
                     [acx_with_pcm=no
                      AC_MSG_NOTICE([Unable to include with pcmsolver.h or PCMInput.h])])
    AC_CHECK_LIB([pcm],[pcmsolver_is_compatible_library], [], 
                 [acx_with_pcm=no
                  AC_MSG_NOTICE([Unable to link with pcm])])


    AC_LANG_RESTORE
  fi

  if test $acx_with_pcm != "no"; then
    AC_DEFINE([MADNESS_HAS_PCM], [1], [Define if using pcm])                         
  fi

  AM_CONDITIONAL([MADNESS_HAS_PCM], [test $acx_with_pcm != "no"])
])