File: mbvendor.m4

package info (click to toggle)
ocfs2-tools 1.8.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 6,232 kB
  • sloc: ansic: 86,865; sh: 5,781; python: 2,380; makefile: 1,305
file content (73 lines) | stat: -rw-r--r-- 2,390 bytes parent folder | download | duplicates (7)
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
# MB_VENDOR([VARIABLE])
# ---------------------
AC_DEFUN([MB_VENDOR],
  [AC_MSG_CHECKING([for vendor])
   AC_ARG_WITH(vendor, [  --with-vendor=VENDOR    Vendor to tailor build defaults and packages to [common]],[
     mb_vendor="$withval"
     if test -x "vendor/${mb_vendor}/vendor.guess"; then
       if "vendor/${mb_vendor}/vendor.guess" >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
         AC_MSG_RESULT([$mb_vendor])
       else
         AC_MSG_RESULT([not found])
         AC_MSG_ERROR([Vendor $mb_vendor not detected])
       fi
     else
       AC_MSG_RESULT([not supported])
       AC_MSG_ERROR([Vendor $mb_vendor not supported])
     fi
  ], [
    mb_vendor=`./vendor.guess 2>&AS_MESSAGE_LOG_FD`
    if test -z "$mb_vendor"; then
       AC_MSG_RESULT([not found])
    else
       AC_MSG_RESULT([$mb_vendor])
    fi
  ])
  dnl Use 2.13 safe ifelse()
  ifelse([$1], [], [], [
           $1="$mb_vendor"
           AC_SUBST($1)
         ])
])  # MB_VENDOR

# MB_VENDOR_KERNEL([VARIABLE])
# ---------------------
AC_DEFUN([MB_VENDOR_KERNEL],
  [AC_MSG_CHECKING([for vendor kernel])
   AC_ARG_WITH(vendorkernel, [  --with-vendorkernel=KERNELVERSION  Vendor kernel version to compile against [detected]], [
     mb_vendorkernel="$withval"
     if test -z "$mb_vendor"; then
       AC_MSG_RESULT([no vendor])
       AC_MSG_ERROR([No vendor specified or discovered])
     fi
     if test -x "vendor/${mb_vendor}/kernel.guess"; then
       mb_vkinclude="`vendor/${mb_vendor}/kernel.guess build ${mb_vendorkernel} 2>&AS_MESSAGE_LOG_FD`"
       if test -z "$mb_vkinclude"; then
         AC_MSG_RESULT([not found])
         AC_MSG_ERROR([Vendor kernel $mb_vendorkernel not detected])
       else
         AC_MSG_RESULT([$mb_vkinclude])
       fi
     else
       AC_MSG_RESULT([not supported])
       AC_MSG_ERROR([Vendor $mb_vendor does not support kernel detection])
     fi
   ], [
     if test -x "vendor/${mb_vendor}/kernel.guess"; then
       mb_vkinclude="`vendor/${mb_vendor}/kernel.guess build 2>&AS_MESSAGE_LOG_FD`"
       if test -z "$mb_vkinclude"; then
         AC_MSG_RESULT([not found])
       else
         AC_MSG_RESULT([$mb_vkinclude])
       fi
     else
       mb_vkinclude=
       AC_MSG_RESULT([not supported])
     fi
  ])
  dnl Use 2.13 safe ifelse()
  ifelse([$1], [], [], [
           $1="$mb_vkinclude"
           AC_SUBST($1)
         ])
])  # MB_VENDOR_KERNEL