[netperf-dev] netperf2 commit notice r266 - in trunk: . m4/m4 src/missing/m4

raj at netperf.org raj at netperf.org
Tue Mar 18 14:08:57 PDT 2008


Author: raj
Date: 2008-03-18 14:08:56 -0700 (Tue, 18 Mar 2008)
New Revision: 266

Added:
   trunk/m4/m4/salen.m4
   trunk/src/missing/m4/salen.m4
Modified:
   trunk/aclocal.m4
   trunk/config.h.in
   trunk/configure
   trunk/configure.ac
Log:
configure cruft

Modified: trunk/aclocal.m4
===================================================================
--- trunk/aclocal.m4	2008-03-18 16:50:07 UTC (rev 265)
+++ trunk/aclocal.m4	2008-03-18 21:08:56 UTC (rev 266)
@@ -1201,3 +1201,36 @@
 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
+dnl Copyright (c) 1995, 1996, 1997, 1998
+dnl tising materials mentioning
+dnl dnl features or use of this software display the following acknowledgement:
+dnl dnl ``This product includes software developed by the University of California,
+dnl dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+dnl dnl the University nor the names of its contributors may be used to endorse
+dnl dnl or promote products derived from this software without specific prior
+dnl dnl written permission.
+dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+dnl dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+dnl dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+dnl dnl
+dnl dnl LBL autoconf macros
+dnl dnl
+dnl
+dnl
+dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
+dnl borrowed from LBL libpcap
+AC_DEFUN(AC_CHECK_SA_LEN, [
+        AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+        AC_CACHE_VAL($1,
+        AC_TRY_COMPILE([
+#               include <sys/types.h>
+#               include <sys/socket.h>],
+                [u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
+                $1=yes,
+                $1=no))
+        AC_MSG_RESULT($$1)
+                if test $$1 = yes ; then
+                        AC_DEFINE([HAVE_SOCKADDR_SA_LEN],1,[Define if struct sockaddr has the sa_len member])
+        fi
+])
+

Modified: trunk/config.h.in
===================================================================
--- trunk/config.h.in	2008-03-18 16:50:07 UTC (rev 265)
+++ trunk/config.h.in	2008-03-18 21:08:56 UTC (rev 266)
@@ -39,6 +39,9 @@
 /* Define to 1 if you have the `gethrtime' function. */
 #undef HAVE_GETHRTIME
 
+/* Define to 1 if you have the `getifaddrs' function. */
+#undef HAVE_GETIFADDRS
+
 /* Define to 1 if you have the `getnameinfo' function. */
 #undef HAVE_GETNAMEINFO
 
@@ -51,6 +54,9 @@
 /* Define to one to include ICSC-EXS tests. */
 #undef HAVE_ICSC_EXS
 
+/* Define to 1 if you have the <ifaddrs.h> header file. */
+#undef HAVE_IFADDRS_H
+
 /* Define to 1 if you have the `inet_ntoa' function. */
 #undef HAVE_INET_NTOA
 
@@ -148,6 +154,9 @@
 /* Define to 1 if you have the <smbios/SystemInfo.h> header file. */
 #undef HAVE_SMBIOS_SYSTEMINFO_H
 
+/* Define if struct sockaddr has the sa_len member */
+#undef HAVE_SOCKADDR_SA_LEN
+
 /* Define to 1 if you have the `socket' function. */
 #undef HAVE_SOCKET
 

Modified: trunk/configure
===================================================================
--- trunk/configure	2008-03-18 16:50:07 UTC (rev 265)
+++ trunk/configure	2008-03-18 21:08:56 UTC (rev 266)
@@ -4418,7 +4418,8 @@
 
 
 
-for ac_header in arpa/inet.h endian.h errno.h fcntl.h limits.h malloc.h netdb.h netinet/in.h signal.h stdlib.h string.h strings.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h unistd.h
+
+for ac_header in arpa/inet.h endian.h errno.h fcntl.h limits.h malloc.h netdb.h netinet/in.h signal.h stdlib.h string.h strings.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h unistd.h ifaddrs.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -5871,6 +5872,67 @@
 fi
 
 
+        { echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5
+echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6; }
+        if test "${ac_cv_sockaddr_has_sa_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#               include <sys/types.h>
+#               include <sys/socket.h>
+int
+main ()
+{
+u_int i = sizeof(((struct sockaddr *)0)->sa_len)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_sockaddr_has_sa_len=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_sockaddr_has_sa_len=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+        { echo "$as_me:$LINENO: result: $ac_cv_sockaddr_has_sa_len" >&5
+echo "${ECHO_T}$ac_cv_sockaddr_has_sa_len" >&6; }
+                if test $ac_cv_sockaddr_has_sa_len = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKADDR_SA_LEN 1
+_ACEOF
+
+        fi
+
+
 # Checks for library functions.
 # AC_FUNC_ERROR_AT_LINE
 { echo "$as_me:$LINENO: checking for pid_t" >&5
@@ -7322,7 +7384,8 @@
 
 
 
-for ac_func in getnameinfo getaddrinfo inet_ntop
+
+for ac_func in getnameinfo getaddrinfo inet_ntop getifaddrs
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-03-18 16:50:07 UTC (rev 265)
+++ trunk/configure.ac	2008-03-18 21:08:56 UTC (rev 266)
@@ -31,7 +31,7 @@
 # Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h limits.h malloc.h netdb.h netinet/in.h signal.h stdlib.h string.h strings.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h unistd.h])
+AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h limits.h malloc.h netdb.h netinet/in.h signal.h stdlib.h string.h strings.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h unistd.h ifaddrs.h])
 
 # Some platforms require these.  There may be a better way.
 AC_HAVE_LIBRARY(socket)
@@ -57,6 +57,7 @@
 AC_STRUCT_SOCKADDR_STORAGE
 AC_HEADER_TIME
 AC_HEADER_STDBOOL
+AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)
 
 # Checks for library functions.
 # AC_FUNC_ERROR_AT_LINE
@@ -74,7 +75,7 @@
 #AC_CONFIG_SUBDIRS(src/missing)
 
 # does this platform need the replacement getaddrinfo
-AC_CHECK_FUNCS([getnameinfo getaddrinfo inet_ntop])
+AC_CHECK_FUNCS([getnameinfo getaddrinfo inet_ntop getifaddrs])
 # AC_REPLACE_FUNCS([getaddrinfo])
 
 

Added: trunk/m4/m4/salen.m4
===================================================================
--- trunk/m4/m4/salen.m4	                        (rev 0)
+++ trunk/m4/m4/salen.m4	2008-03-18 21:08:56 UTC (rev 266)
@@ -0,0 +1,32 @@
+dnl Copyright (c) 1995, 1996, 1997, 1998
+dnl tising materials mentioning
+dnl dnl features or use of this software display the following acknowledgement:
+dnl dnl ``This product includes software developed by the University of California,
+dnl dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+dnl dnl the University nor the names of its contributors may be used to endorse
+dnl dnl or promote products derived from this software without specific prior
+dnl dnl written permission.
+dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+dnl dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+dnl dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+dnl dnl
+dnl dnl LBL autoconf macros
+dnl dnl
+dnl
+dnl
+dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
+dnl borrowed from LBL libpcap
+AC_DEFUN(AC_CHECK_SA_LEN, [
+        AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+        AC_CACHE_VAL($1,
+        AC_TRY_COMPILE([
+#               include <sys/types.h>
+#               include <sys/socket.h>],
+                [u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
+                $1=yes,
+                $1=no))
+        AC_MSG_RESULT($$1)
+                if test $$1 = yes ; then
+                        AC_DEFINE([HAVE_SOCKADDR_SA_LEN],1,[Define if struct sockaddr has the sa_len member])
+        fi
+])

Added: trunk/src/missing/m4/salen.m4
===================================================================
--- trunk/src/missing/m4/salen.m4	                        (rev 0)
+++ trunk/src/missing/m4/salen.m4	2008-03-18 21:08:56 UTC (rev 266)
@@ -0,0 +1,32 @@
+dnl Copyright (c) 1995, 1996, 1997, 1998
+dnl tising materials mentioning
+dnl dnl features or use of this software display the following acknowledgement:
+dnl dnl ``This product includes software developed by the University of California,
+dnl dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+dnl dnl the University nor the names of its contributors may be used to endorse
+dnl dnl or promote products derived from this software without specific prior
+dnl dnl written permission.
+dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+dnl dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+dnl dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+dnl dnl
+dnl dnl LBL autoconf macros
+dnl dnl
+dnl
+dnl
+dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
+dnl borrowed from LBL libpcap
+AC_DEFUN(AC_CHECK_SA_LEN, [
+        AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+        AC_CACHE_VAL($1,
+        AC_TRY_COMPILE([
+#               include <sys/types.h>
+#               include <sys/socket.h>],
+                [u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
+                $1=yes,
+                $1=no))
+        AC_MSG_RESULT($$1)
+                if test $$1 = yes ; then
+                        AC_DEFINE([HAVE_SOCKADDR_SA_LEN],1,[Define if struct sockaddr has the sa_len member])
+        fi
+])



More information about the netperf-dev mailing list