fi
echo "$ac_t""$CPP" 1>&6
-for ac_hdr in unistd.h getopt.h netinet/in.h
+for ac_hdr in unistd.h getopt.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
done
+ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
+echo "configure:2796: checking for netinet/in.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2801 "configure"
+#include "confdefs.h"
+#include <netinet/in.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_NETINET_IN_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+no_netinet_in=yes
+fi
+
+
+if test "$no_netinet_in" != "yes"; then
+ echo $ac_n "checking for in_addr_t defined in netinet/in.h""... $ac_c" 1>&6
+echo "configure:2834: checking for in_addr_t defined in netinet/in.h" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 2836 "configure"
+#include "confdefs.h"
+#include <netinet/in.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "in_addr_t" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_in_addr_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_in_addr_t=no
+fi
+rm -f conftest*
+
+ echo "$ac_t""$ac_cv_type_in_addr_t" 1>&6
+fi
+
+if test "$ac_cv_type_in_addr_t" != "yes"; then
+ cat >> confdefs.h <<\EOF
+#define in_addr_t uint32_t
+EOF
+
+fi
+
case $PRO_C_INCLUDES in
*INCLUDE='$(srcdir)'*) ;;
AC_CHECK_FUNC(sigaction, AC_DEFINE(HAVE_POSIX_SIGNALS))
-AC_CHECK_HEADERS(unistd.h getopt.h netinet/in.h)
+AC_CHECK_HEADERS(unistd.h getopt.h)
+
+AC_CHECK_HEADER(netinet/in.h, AC_DEFINE(HAVE_NETINET_IN_H), no_netinet_in=yes)
+
+if test "$no_netinet_in" != "yes"; then
+ AC_MSG_CHECKING(for in_addr_t defined in netinet/in.h)
+ AC_EGREP_HEADER(in_addr_t, netinet/in.h,
+ ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)
+ AC_MSG_RESULT($ac_cv_type_in_addr_t)
+fi
+
+if test "$ac_cv_type_in_addr_t" != "yes"; then
+ AC_DEFINE(in_addr_t, uint32_t)
+fi
MR_EXTEND(PRO_C_INCLUDES, INCLUDE='$(srcdir)')
MR_INCLUDE('$(SRCTOP)/include')