]> eyrie.org Git - kerberos/krb5-strength.git/blobdiff - m4/lib-helper.m4
Merge pull request #5 from rra/dependabot/github_actions/actions/checkout-4
[kerberos/krb5-strength.git] / m4 / lib-helper.m4
index aa533856091183b10441b30f4bacafede0661b01..28226b2f1880164da4911e8c5c40e54e58912efc 100644 (file)
@@ -1,3 +1,5 @@
+# serial 1
+
 dnl Helper functions to manage compiler variables.
 dnl
 dnl These are a wide variety of helper macros to make it easier to construct
@@ -6,18 +8,21 @@ dnl CPPFLAGS, LDFLAGS, and LIBS shell substitution variables.  Most of them
 dnl take as one of the arguments the prefix string to use for variables, which
 dnl is usually something like "KRB5" or "GSSAPI".
 dnl
-dnl Depends on RRA_ENABLE_REDUCED_DEPENDS and RRA_SET_LDFLAGS.
+dnl Depends on RRA_SET_LDFLAGS.
 dnl
 dnl The canonical version of this file is maintained in the rra-c-util
-dnl package, available at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
-dnl Written by Russ Allbery <rra@stanford.edu>
-dnl Copyright 2011
+dnl Written by Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2018 Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2011, 2013
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Add the library flags to the default compiler flags and then remove them.
 dnl
@@ -88,6 +93,14 @@ AC_DEFUN([RRA_LIB_HELPER_VAR_INIT],
  AC_SUBST([$1][_LDFLAGS])
  AC_SUBST([$1][_LIBS])])
 
+dnl Unset all of the variables used by a library probe.  Used with the
+dnl _OPTIONAL versions of header probes when a header or library wasn't found
+dnl and therefore the library isn't usable.
+AC_DEFUN([RRA_LIB_HELPER_VAR_CLEAR],
+[$1[]_CPPFLAGS=
+ $1[]_LDFLAGS=
+ $1[]_LIBS=])
+
 dnl Handles --with options for a non-optional library.  First argument is the
 dnl base for the switch names.  Second argument is the short description.
 dnl Third argument is the variable prefix.  The variables set are used by
@@ -124,7 +137,7 @@ AC_DEFUN([RRA_LIB_HELPER_WITH_OPTIONAL],
         [Location of $2 headers and libraries])],
     [AS_IF([test x"$withval" = xno],
         [rra_use_$3=false],
-        [AS_IF([test x"$withval" != yes], [rra_$3[]_root="$withval"])
+        [AS_IF([test x"$withval" != xyes], [rra_$3[]_root="$withval"])
          rra_use_$3=true])])
  AC_ARG_WITH([$1][-include],
     [AS_HELP_STRING([--with-][$1][-include=DIR],