File: ox_rhel8_tirpc.m4

package info (click to toggle)
libdap 3.20.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,568 kB
  • sloc: cpp: 50,809; sh: 41,536; xml: 23,511; ansic: 20,030; yacc: 2,508; exp: 1,544; makefile: 990; lex: 309; perl: 52; fortran: 8
file content (42 lines) | stat: -rw-r--r-- 1,422 bytes parent folder | download
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

#
# SYNOPSIS
#
#   OX_RHEL8_TIRPC()
#
# DESCRIPTION
#
# If this system is a RHEL 8 or equivalent, look for the tirpc library on the
# CPPFLAGS and LDFLAGS environment variables. Print an error message if they are
# not listed there if this is a RHEL 8 system.
#
# LICENSE
#
#   Copyright (c) 2022 OPeNDAP
#   Author: James Gallagher <jgallagher@opendap.org>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

dnl Check and see if we are building on RHEL8 or the equivalent and if so,
dnl is the tirpc library available and set up correctly.
AC_DEFUN([OX_RHEL8_TIRPC], [
AS_IF([test -f /etc/redhat-release && grep -q '8\.' /etc/redhat-release],
    dnl if this is RHEL8, then we need the tirpc library on CPPFLAGS and LDFLAGS
    [
        AC_MSG_NOTICE([Found a RHEL 8 or equivalent system...])
        AS_IF([grep -q -v tirpc <<< $CPPFLAGS || grep -q -v tirpc <<< $LDFLAGS],
        dnl if either CPPFLAGS or LDFLAGS lack 'tirpc', error
        [
            AC_MSG_ERROR([Libdap4 on Redhat Linux 8 requires the tirpc library be included on CPPFLAGS and LDFLAGS])
        ],
        [AC_MSG_NOTICE([and CPPFLAGS and LDFLAGS are set])
        ])
    ],
    [
        AC_MSG_NOTICE([Not a RHEL 8 or equivalent system])
    ])
])