Debian Codegraph @

m4/ax_check_openssl_func.m4

raw
1 # SYNOPSIS
2 #
3 # AX_CHECK_OPENSSL_DEFINE([DEFINE], [VAR][, action-if-found[, action-if-not-found]])
4 #
5 # DESCRIPTION
6 #
7 # Check if OpenSSL has a define set in it's features provided, i.e. OPENSSL_NO_MD4.
8 # If so, the var argument ac_cv_openssl_[VAR] is set to yes, and action-is-found is
9 # run, else action-if-not-found is executed.
10 #
11 # This module require AX_CHECK_OPENSSL
12 #
13 # LICENSE
14 #
15 # Copyright (c) 2021 Eivind Naess <[email protected]>
16 #
17 # Copying and distribution of this file, with or without modification, are
18 # permitted in any medium without royalty provided the copyright notice
19 # and this notice are preserved. This file is offered as-is, without any
20 # warranty.
21
22 #serial 1
23
24 AC_DEFUN([AX_CHECK_OPENSSL_DEFINE], [
25 AC_REQUIRE([AX_CHECK_OPENSSL])
26 AC_MSG_CHECKING([for $2 support in openssl])
27 save_CPPFLAGS="$CPPFLAGS"
28 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
29 AC_PREPROC_IFELSE([
30 AC_LANG_PROGRAM(
31 [[@%:@include <openssl/opensslconf.h>]],
32 [[#ifdef $1
33 #error "No support for $1"
34 #endif]])],
35 AC_MSG_RESULT([yes])
36 [ac_cv_openssl_$2=yes]
37 $3,
38 AC_MSG_RESULT([no])
39 [ac_cv_openssl_$2=no]
40 $4
41 )
42 CPPFLAGS="$save_CPPFLAGS"
43 ])
44