summaryrefslogtreecommitdiffstats
path: root/src/aclocal.m4
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2001-06-11 15:14:32 +0000
committerEzra Peisach <epeisach@mit.edu>2001-06-11 15:14:32 +0000
commit98f89fa0b26ed1dba66a76d4213c2c38b844b795 (patch)
treebb8598d0fe1b6a9f653c21abcac12a569dc8dc77 /src/aclocal.m4
parent4fa73fb015a8cc6631694537cdd02b05346b5a55 (diff)
downloadkrb5-98f89fa0b26ed1dba66a76d4213c2c38b844b795.tar.gz
krb5-98f89fa0b26ed1dba66a76d4213c2c38b844b795.tar.xz
krb5-98f89fa0b26ed1dba66a76d4213c2c38b844b795.zip
* aclocal.m4 (KRB5_NEED_PROTO): Determines if the OS provides a
prototype for a function - and if not, allows us to define it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13324 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r--src/aclocal.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 585e58d318..95a08a5d25 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -1244,3 +1244,26 @@ dnl AC_MSG_RESULT($enable_dns_for_kdc)
dnl AC_MSG_CHECKING(if DNS should be used to find realm name by default)
dnl AC_MSG_RESULT($enable_dns_for_realm)
])
+dnl
+dnl
+dnl Check if we need the prototype for a function - we give it a bogus
+dnl prototype and if it complains - then a valid prototype exists on the
+dnl system.
+dnl
+dnl KRB5_NEED_PROTO(includes, function)
+dnl
+AC_DEFUN([KRB5_NEED_PROTO], [
+if test "x$ac_cv_func_$2" = xyes; then
+AC_CACHE_CHECK([if $2 needs a prototype provided], krb5_cv_func_$2_noproto,
+AC_TRY_COMPILE([$1],
+[struct k5foo {int foo; } xx;
+extern int $2 (struct k5foo*);
+$2(&xx);
+],
+krb5_cv_func_$2_noproto=yes,krb5_cv_func_$2_noproto=no))
+if test $krb5_cv_func_$2_noproto = yes; then
+ AC_DEFINE([NEED_]translit($2, [a-z], [A-Z])[_PROTO], 1, dnl
+[define if the system header files are missing prototype for $2()])
+fi
+fi
+])