]> andersk Git - moira.git/blobdiff - configure
Redhat 6.x doesn't have an in_addr_t typedef. Compensate.
[moira.git] / configure
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)'*) ;;
This page took 0.074077 seconds and 4 git commands to generate.