]> andersk Git - moira.git/commitdiff
Redhat 6.x doesn't have an in_addr_t typedef. Compensate.
authorzacheiss <zacheiss>
Thu, 20 Sep 2001 06:24:08 +0000 (06:24 +0000)
committerzacheiss <zacheiss>
Thu, 20 Sep 2001 06:24:08 +0000 (06:24 +0000)
configure
configure.in

index 7069a3c0f7d9fc63eb81552e55581c969fff70f0..3d12e6107f6f51cca9e3ca8556acad0af4ec742e 100755 (executable)
--- a/configure
+++ b/configure
@@ -2749,7 +2749,7 @@ else
 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
@@ -2790,6 +2790,72 @@ fi
 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)'*) ;;
index b3b1384f266ddae08bbeaf256b020d6c71ff8bce..cbe44a170a8c99a0090ddcb5b4c5ddd32ba9cca8 100755 (executable)
@@ -384,7 +384,20 @@ AC_CHECK_FUNCS(getusershell strlcpy strlcat uname)
 
 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')
This page took 0.099651 seconds and 5 git commands to generate.