diff options
author | Ezra Peisach <epeisach@mit.edu> | 2001-06-11 15:14:32 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2001-06-11 15:14:32 +0000 |
commit | 98f89fa0b26ed1dba66a76d4213c2c38b844b795 (patch) | |
tree | bb8598d0fe1b6a9f653c21abcac12a569dc8dc77 | |
parent | 4fa73fb015a8cc6631694537cdd02b05346b5a55 (diff) | |
download | krb5-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
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/aclocal.m4 | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 14cd7f7eb..0325cd679 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-06-11 Ezra Peisach <epeisach@mit.edu> + + * aclocal.m4 (KRB5_NEED_PROTO): Determines if the OS provides a + prototype for a function - and if not, allows us to define it. + 2001-06-08 Ezra Peisach <epeisach@mit.edu> * krb5-config.in (CC_LINK): Use ' vs " to prevent bash expansion of diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 585e58d31..95a08a5d2 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 +]) |