[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 0.3d doesn't like old Linux or DU/Tru64



"Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> writes:

> heimdal 0.3d won't build on i386_linux3 or alpha_dux40 because
> getaddrinfo.o is included in LIBOBJ twice: once for "not found" and
> once for "broken", according to my reading of configure.

You mean getnameinfo? It should only do the broken test if the
function exists, and it also has to do the test after the sa_len
test. You can try this hand-crafted patch.

/Johan
--- configure	Mon Dec 11 04:21:14 2000
+++ ../z	Tue Dec 12 22:44:05 2000
@@ -7158,6 +7158,47 @@
 fi
 done
 
+echo "configure:8425: checking for sa_len in struct sockaddr" >&5
+echo $ECHO_N "checking for sa_len in struct sockaddr... $ECHO_C" >&6
+if test "${ac_cv_type_struct_sockaddr_sa_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<EOF
+#line 8431 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr x; x.sa_len;
+  ;
+  return 0;
+}
+EOF
+if { (eval echo configure:8443: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
+  ac_cv_type_struct_sockaddr_sa_len=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_type_struct_sockaddr_sa_len=no
+fi
+rm -f conftest*
+fi
+echo "configure:8452: result: $ac_cv_type_struct_sockaddr_sa_len" >&5
+echo "${ECHO_T}$ac_cv_type_struct_sockaddr_sa_len" >&6
+if test "$ac_cv_type_struct_sockaddr_sa_len" = yes; then
+	
+	
+cat >>confdefs.h <<\EOF
+#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
+EOF
+
+	
+fi
+
+if test "$ac_cv_func_getaddrinfo" = yes; then
 echo "configure:6482: checking if getnameinfo is broken" >&5
 echo $ECHO_N "checking if getnameinfo is broken... $ECHO_C" >&6
 if test "${ac_cv_func_getnameinfo_broken+set}" = set; then
@@ -7209,6 +7250,7 @@
 if test "$ac_cv_func_getnameinfo_broken" = yes; then
 	LIBOBJS="$LIBOBJS getnameinfo.o"
 fi
+fi
 
 if test "$ac_cv_func_setenv+set" != set -o "$ac_cv_func_setenv" = yes; then
 echo "configure:6531: checking if setenv needs a prototype" >&5
@@ -9332,46 +9374,6 @@
 #define HAVE_STRUCT_SPWD 1
 EOF
 
-fi
-
-echo "configure:8425: checking for sa_len in struct sockaddr" >&5
-echo $ECHO_N "checking for sa_len in struct sockaddr... $ECHO_C" >&6
-if test "${ac_cv_type_struct_sockaddr_sa_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<EOF
-#line 8431 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr x; x.sa_len;
-  ;
-  return 0;
-}
-EOF
-if { (eval echo configure:8443: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
-  ac_cv_type_struct_sockaddr_sa_len=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_type_struct_sockaddr_sa_len=no
-fi
-rm -f conftest*
-fi
-echo "configure:8452: result: $ac_cv_type_struct_sockaddr_sa_len" >&5
-echo "${ECHO_T}$ac_cv_type_struct_sockaddr_sa_len" >&6
-if test "$ac_cv_type_struct_sockaddr_sa_len" = yes; then
-	
-	
-cat >>confdefs.h <<\EOF
-#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
-EOF
-
-	
 fi
 
 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"