a better test for unix domain sockets
authorAndrew Tridgell <tridge@samba.org>
Wed, 25 Jul 2001 03:28:45 +0000 (03:28 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 25 Jul 2001 03:28:45 +0000 (03:28 +0000)
(This used to be commit 7b3d030e1f869a842822d9a356a027cca6f3a725)

source3/acconfig.h
source3/configure.in
source3/include/config.h.in
source3/include/includes.h
source3/nsswitch/winbind_nss_config.h

index cdb4b8235a553ff9406c40bd7649bfaa77b7e596..04e7222bda58eb3b045763b11d2c451ce7b6dfec 100644 (file)
 #undef HAVE_SNPRINTF_DECL
 #undef HAVE_VSNPRINTF_DECL
 #undef HAVE_NATIVE_ICONV
+#undef HAVE_UNIXSOCKET
index ce66eef9735ed3d1cd301b34952a9310ac1e5a82..8e4f8784eea1ff2d9759fa597e0ce08ef54fffec 100644 (file)
@@ -250,7 +250,7 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h)
 AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
 AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
-AC_CHECK_HEADERS(sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
+AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
 AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
 AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
@@ -311,6 +311,25 @@ AC_CHECK_LIB(cups,httpConnect)
 AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
        AC_DEFINE(HAVE_LIBDL)])
 
+############################################
+# check for unix domain sockets
+AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <sys/socket.h>
+#include <sys/un.h>],
+[
+  struct sockaddr_un sunaddr; 
+  sunaddr.sun_family = AF_UNIX;
+],
+       samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
+if test x"$samba_cv_unixsocket" = x"yes"; then
+   AC_DEFINE(HAVE_UNIXSOCKET)
+fi
+
+
 AC_CACHE_CHECK([for socklen_t type],samba_cv_socklen_t, [
     AC_TRY_COMPILE([
 #include <sys/types.h>
index a76aee400526feedc2204a1926ac5e7844143f98..7bf992336876124a0a2e26ca58eb04c3009fd2dc 100644 (file)
 #undef HAVE_SNPRINTF_DECL
 #undef HAVE_VSNPRINTF_DECL
 #undef HAVE_NATIVE_ICONV
+#undef HAVE_UNIXSOCKET
 
 /* The number of bytes in a int.  */
 #undef SIZEOF_INT
 /* Define if you have the <sys/time.h> header file.  */
 #undef HAVE_SYS_TIME_H
 
-/* Define if you have the <sys/un.h> header file.  */
-#undef HAVE_SYS_UN_H
-
 /* Define if you have the <sys/unistd.h> header file.  */
 #undef HAVE_SYS_UNISTD_H
 
index 87547f5253faaba9714bd52a31e15094f386b34b..2caeb255bd8f2c0f20163de2c6a7d41079eefc45 100644 (file)
 #include <sys/socket.h>
 #endif
 
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_UNIXSOCKET
 #include <sys/un.h>
 #endif
 
index a946db89f6b7a0a31db992e29c682c1fba7b50e2..4902f6ec5c478d86a3644d6ac03b38538d548391 100644 (file)
@@ -43,7 +43,7 @@
 #include <sys/socket.h>
 #endif
 
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_UNIXSOCKET
 #include <sys/un.h>
 #endif