File: acx_detect_cxx.m4

package info (click to toggle)
madness 0.10.1%2Bgit20200818.eee5fd9f-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, 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 (49 lines) | stat: -rw-r--r-- 1,425 bytes parent folder | download | duplicates (4)
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
AC_DEFUN([ACX_DETECT_CXX], [
    # Sets environment variable CXXVENDOR to one of
    # [GNU,Intel,Portland,Pathscale,IBM,unknown]
    AC_CACHE_CHECK([compiler vendor], [acx_cv_detect_cxx], [
      acx_cv_detect_cxx=unknown
      if test $acx_cv_detect_cxx = unknown; then
          $CXX --version 2>&1 | egrep -q "clang"
          if test $? = 0; then
             acx_cv_detect_cxx=clang
          fi
      fi
      if test $acx_cv_detect_cxx = unknown; then
          $CXX --version 2>&1 | egrep -q "GCC|GNU|gcc|gnu|g\+\+|Free S"
          if test $? = 0; then
             acx_cv_detect_cxx=GNU
          fi
      fi
      if test $acx_cv_detect_cxx = unknown; then
          $CXX --version 2>&1 | grep -q "Intel"
          if test $? = 0; then
             acx_cv_detect_cxx=Intel
          fi
      fi
      if test $acx_cv_detect_cxx = unknown; then
          $CXX --version 2>&1 | grep -q "Portland"
          if test $? = 0; then
             acx_cv_detect_cxx=Portland
          fi
      fi
      if test $acx_cv_detect_cxx = unknown; then
          $CXX -v 2>&1 | grep -q "Pathscale"
          if test $? = 0; then
             acx_cv_detect_cxx=Pathscale
          fi
      fi
      if test $acx_cv_detect_cxx = unknown; then
          $CXX -qversion 2>&1 | grep -q "IBM"
          if test $? = 0; then
             acx_cv_detect_cxx=IBM
          fi
      fi
    ])
    
    CXXVENDOR="$acx_cv_detect_cxx"
])