* configure.in: Fix test for STRUCT_RPCENT_ALREADY_PROVIDED if
authorTom Yu <tlyu@mit.edu>
Thu, 1 Aug 1996 00:41:55 +0000 (00:41 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 1 Aug 1996 00:41:55 +0000 (00:41 +0000)
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

src/lib/rpc/configure.in

index e5ef77b1f7d90df4e9cee2f5ee22f75583496556..97199f8471478889f27ff34d04832640ff954383 100644 (file)
@@ -4,14 +4,13 @@ AC_PROG_ARCHIVE
 AC_PROG_ARCHIVE_ADD
 AC_PROG_RANLIB
 AC_PROG_INSTALL
-AC_TRY_COMPILE([
-#include <netdb.h>
-       ],[
-       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 <netdb.h>],
+[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