summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/cf/have-struct-field.m4
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-09-19 14:19:32 +0000
committermarkm <markm@FreeBSD.org>1999-09-19 14:19:32 +0000
commitfe83e8abf357ee11114856a5278bb38431a9517c (patch)
tree36ce70fe2e8419130e546c38a7790e8ab224a362 /crypto/kerberosIV/cf/have-struct-field.m4
parenta8a89cfaf983bc64f4b42f7c35209a5a36dd0fe8 (diff)
downloadFreeBSD-src-fe83e8abf357ee11114856a5278bb38431a9517c.zip
FreeBSD-src-fe83e8abf357ee11114856a5278bb38431a9517c.tar.gz
Clean import of KTH krb4-0.10.1.
Diffstat (limited to 'crypto/kerberosIV/cf/have-struct-field.m4')
-rw-r--r--crypto/kerberosIV/cf/have-struct-field.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/kerberosIV/cf/have-struct-field.m4 b/crypto/kerberosIV/cf/have-struct-field.m4
new file mode 100644
index 0000000..f44b036
--- /dev/null
+++ b/crypto/kerberosIV/cf/have-struct-field.m4
@@ -0,0 +1,19 @@
+dnl $Id: have-struct-field.m4,v 1.5 1999/03/01 13:10:35 joda Exp $
+dnl
+dnl check for fields in a structure
+dnl
+dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
+
+AC_DEFUN(AC_HAVE_STRUCT_FIELD, [
+define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_]))
+AC_CACHE_CHECK([for $2 in $1], cache_val,[
+AC_TRY_COMPILE([$3],[$1 x; x.$2;],
+cache_val=yes,
+cache_val=no)])
+if test "$cache_val" = yes; then
+ define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_]))
+ AC_DEFINE(foo, 1, [Define if $1 has field $2.])
+ undefine(foo)
+fi
+undefine(cache_val)
+])
OpenPOWER on IntegriCloud