Question on Porting configure.ac
Ryan McDougall
sempuki1 at gmail.com
Wed Jan 21 13:51:40 UTC 2009
I have found the existence of the following kind of code in configure.ac
#### Abstract sockets
#AC_LANG_PUSH(C)
#AC_CACHE_CHECK([abstract socket namespace],
# ac_cv_have_abstract_sockets,
# [AC_RUN_IFELSE([AC_LANG_PROGRAM(
#[[
##include <sys/types.h>
##include <stdlib.h>
##include <string.h>
##include <stdio.h>
##include <sys/socket.h>
##include <sys/un.h>
##include <errno.h>
#]],
#[[
# int listen_fd;
# struct sockaddr_un addr;
#
# listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
#
# if (listen_fd < 0)
# {
# fprintf (stderr, "socket() failed: %s\n", strerror (errno));
# exit (1);
# }
#
# memset (&addr, '\0', sizeof (addr));
# addr.sun_family = AF_UNIX;
# strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
# addr.sun_path[0] = '\0'; /* this is what makes it abstract */
#
# if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
# {
# fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
# strerror (errno));
# exit (1);
# }
# else
# exit (0);
#]])],
# [ac_cv_have_abstract_sockets=yes],
# [ac_cv_have_abstract_sockets=no]
#)])
#AC_LANG_POP(C)
I am no autotools expert. How can I change this to work without
brute-force commenting it out?
Cheers,
More information about the mingw
mailing list