The branch, v4-0-test has been updated
       via  3451b54bf7f5e37a589ec261d28c2a8b6f9788ed (commit)
       via  55a904b1d7aeca849d450e371b18afca5b0c6218 (commit)
      from  b09dd6b65d533832a025a51509dcc84f84b048aa (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 3451b54bf7f5e37a589ec261d28c2a8b6f9788ed
Author: Stefan Metzmacher <[EMAIL PROTECTED]>
Date:   Wed May 7 17:15:36 2008 +0200

    libreplace: use AC_LIBREPLACE_NETWORK_CHECKS only for samba
    
    metze

commit 55a904b1d7aeca849d450e371b18afca5b0c6218
Author: Stefan Metzmacher <[EMAIL PROTECTED]>
Date:   Wed May 7 16:50:19 2008 +0200

    libreplace: split out network checks into a AC_LIBREPLACE_NETWORK_CHECKS 
macro
    
    Note: moving it out of AC_LIBREPLACE_BROKEN_CHECKS will be the next step
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source/lib/replace/libreplace.m4         |   64 +--------------------------
 source/lib/replace/libreplace_network.m4 |   71 ++++++++++++++++++++++++++++++
 source/lib/replace/samba.m4              |    1 +
 3 files changed, 73 insertions(+), 63 deletions(-)
 create mode 100644 source/lib/replace/libreplace_network.m4


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4
index 8e17258..2b33d97 100644
--- a/source/lib/replace/libreplace.m4
+++ b/source/lib/replace/libreplace.m4
@@ -96,65 +96,10 @@ fi
 AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 AC_CHECK_HEADERS(sys/time.h time.h)
 AC_CHECK_HEADERS(stdarg.h vararg.h)
-AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
-AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
 AC_CHECK_HEADERS(sys/sockio.h sys/un.h)
 AC_CHECK_HEADERS(sys/mount.h mntent.h)
 AC_CHECK_HEADERS(stropts.h)
 
-dnl we need to check that net/if.h really can be used, to cope with hpux
-dnl where including it always fails
-AC_CACHE_CHECK([for usable net/if.h],libreplace_cv_USABLE_NET_IF_H,[
-       AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-               AC_INCLUDES_DEFAULT
-               #if HAVE_SYS_SOCKET_H
-               # include <sys/socket.h>
-               #endif
-               #include <net/if.h>
-               int main(void) {return 0;}])],
-               [libreplace_cv_USABLE_NET_IF_H=yes],
-               [libreplace_cv_USABLE_NET_IF_H=no]
-       )
-])
-if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then
-       AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h)
-fi
-
-AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
-AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
-AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
-AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
-AC_HAVE_TYPE([struct sockaddr_storage], [
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-])
-AC_HAVE_TYPE([struct sockaddr_in6], [
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-])
-
-if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
-AC_CHECK_MEMBER(struct sockaddr_storage.ss_family,
-                AC_DEFINE(HAVE_SS_FAMILY, 1, [Defined if struct 
sockaddr_storage has ss_family field]),,
-                [
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-               ])
-
-if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
-AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family,
-                AC_DEFINE(HAVE___SS_FAMILY, 1, [Defined if struct 
sockaddr_storage has __ss_family field]),,
-                [
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-               ])
-fi
-fi
-
 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
 AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
@@ -326,15 +271,7 @@ m4_include(getpass.m4)
 m4_include(strptime.m4)
 m4_include(win32.m4)
 m4_include(timegm.m4)
-m4_include(socket.m4)
-m4_include(inet_ntop.m4)
-m4_include(inet_pton.m4)
-m4_include(inet_aton.m4)
-m4_include(inet_ntoa.m4)
-m4_include(getaddrinfo.m4)
 m4_include(repdir.m4)
-m4_include(getifaddrs.m4)
-m4_include(socketpair.m4)
 
 AC_CHECK_FUNCS([syslog printf memset memcpy],,[AC_MSG_ERROR([Required function 
not found])])
 
@@ -361,5 +298,6 @@ CFLAGS="$CFLAGS -I$libreplacedir"
 
 m4_include(libreplace_cc.m4)
 m4_include(libreplace_ld.m4)
+m4_include(libreplace_network.m4)
 m4_include(libreplace_macros.m4)
 m4_include(autoconf-2.60.m4)
diff --git a/source/lib/replace/libreplace_network.m4 
b/source/lib/replace/libreplace_network.m4
new file mode 100644
index 0000000..7702702
--- /dev/null
+++ b/source/lib/replace/libreplace_network.m4
@@ -0,0 +1,71 @@
+AC_DEFUN_ONCE(AC_LIBREPLACE_NETWORK_CHECKS,
+[
+echo "LIBREPLACE_NETWORK_CHECKS: START"
+
+AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
+AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
+
+dnl we need to check that net/if.h really can be used, to cope with hpux
+dnl where including it always fails
+AC_CACHE_CHECK([for usable net/if.h],libreplace_cv_USABLE_NET_IF_H,[
+       AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+               AC_INCLUDES_DEFAULT
+               #if HAVE_SYS_SOCKET_H
+               # include <sys/socket.h>
+               #endif
+               #include <net/if.h>
+               int main(void) {return 0;}])],
+               [libreplace_cv_USABLE_NET_IF_H=yes],
+               [libreplace_cv_USABLE_NET_IF_H=no]
+       )
+])
+if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then
+       AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h)
+fi
+
+AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
+AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
+AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
+AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
+AC_HAVE_TYPE([struct sockaddr_storage], [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+])
+AC_HAVE_TYPE([struct sockaddr_in6], [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+])
+
+if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
+AC_CHECK_MEMBER(struct sockaddr_storage.ss_family,
+                AC_DEFINE(HAVE_SS_FAMILY, 1, [Defined if struct 
sockaddr_storage has ss_family field]),,
+                [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+               ])
+
+if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
+AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family,
+                AC_DEFINE(HAVE___SS_FAMILY, 1, [Defined if struct 
sockaddr_storage has __ss_family field]),,
+                [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+               ])
+fi
+fi
+
+m4_include(socket.m4)
+m4_include(inet_ntop.m4)
+m4_include(inet_pton.m4)
+m4_include(inet_aton.m4)
+m4_include(inet_ntoa.m4)
+m4_include(getaddrinfo.m4)
+m4_include(getifaddrs.m4)
+m4_include(socketpair.m4)
+
+echo "LIBREPLACE_NETWORK_CHECKS: END"
+]) dnl end AC_LIBREPLACE_NETWORK_CHECKS
diff --git a/source/lib/replace/samba.m4 b/source/lib/replace/samba.m4
index 7984ef3..07c4d38 100644
--- a/source/lib/replace/samba.m4
+++ b/source/lib/replace/samba.m4
@@ -1,4 +1,5 @@
 AC_LIBREPLACE_BROKEN_CHECKS
+AC_LIBREPLACE_NETWORK_CHECKS
 
 SMB_EXT_LIB(LIBREPLACE_EXT, [${LIBDL}])
 SMB_ENABLE(LIBREPLACE_EXT)


-- 
Samba Shared Repository

Reply via email to