From: Tom Yu Date: Thu, 1 Aug 1996 00:41:55 +0000 (+0000) Subject: * configure.in: Fix test for STRUCT_RPCENT_ALREADY_PROVIDED if X-Git-Tag: krb5-1.0-beta7~197 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=09803308e34229619278d96d49362ef85313baf5;p=krb5.git * configure.in: Fix test for STRUCT_RPCENT_ALREADY_PROVIDED if there happens to be a /usr/include/rpc/netdb.h. This causes /usr/include/netdb.h to include netdb.h from our tree rather from /usr/include/rpc, which of course results in massive damage. Basically, if /usr/include/netdb.h contains rpcent declaration and /usr/include/rpc/netdb.h exists, then assume that there is no struct rpcent in the system include files. It's really unfortunate that we need to do this at all, but it's all we can do short of renaming a bunch of include files or directories. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8885 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/rpc/configure.in b/src/lib/rpc/configure.in index e5ef77b1f..97199f847 100644 --- a/src/lib/rpc/configure.in +++ b/src/lib/rpc/configure.in @@ -4,14 +4,13 @@ AC_PROG_ARCHIVE AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL -AC_TRY_COMPILE([ -#include - ],[ - struct rpcent e; - char c = e.r_name[0]; - int i = e.r_number; - ], [rpcent_define='#define STRUCT_RPCENT_ALREADY_PROVIDED'], - [rpcent_define='']) dnl +AC_TRY_COMPILE([#include ], +[struct rpcent e; +char c = e.r_name[0]; +int i = e.r_number;], +[AC_CHECK_HEADER(rpc/netdb.h, rpcent_define='', + [rpcent_define='#define STRUCT_RPCENT_ALREADY_PROVIDED'])], +[rpcent_define='']) AC_SUBST(rpcent_define) AC_CHECK_SIZEOF(int) SIZEOF_INT=$ac_cv_sizeof_int