80 lines
2.6 KiB
Text
80 lines
2.6 KiB
Text
$NetBSD: patch-ba,v 1.3 2008/12/23 19:29:29 jmcneill Exp $
|
|
|
|
--- configure.ac.orig 2008-10-05 20:39:37.000000000 -0400
|
|
+++ configure.ac 2008-12-23 12:38:28.000000000 -0500
|
|
@@ -125,7 +125,18 @@
|
|
no) ;;
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --disable-atomic-arm-linux-helpers) ;;
|
|
esac
|
|
- ],)
|
|
+ ],)
|
|
+
|
|
+AC_ARG_ENABLE([netbsd-atomic-ops],
|
|
+ AS_HELP_STRING([--enable-netbsd-atomic-ops],[Use the native NetBSD atomic_ops implementation]),
|
|
+ [
|
|
+ case "${enableval}" in
|
|
+ yes) atomic_netbsd_helpers=yes ;;
|
|
+ no) atomic_netbsd_helpers=no ;;
|
|
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-netbsd-atomic-ops) ;;
|
|
+ esac
|
|
+ ],
|
|
+ [atomic_netbsd_helpers=auto])
|
|
|
|
AC_MSG_CHECKING([target operating system])
|
|
case $host in
|
|
@@ -133,6 +144,10 @@
|
|
AC_MSG_RESULT([linux])
|
|
pulse_target_os=linux
|
|
;;
|
|
+ *-*-netbsd*)
|
|
+ AC_MSG_RESULT([netbsd])
|
|
+ pulse_target_os=netbsd
|
|
+ ;;
|
|
*)
|
|
AC_MSG_RESULT([unknown])
|
|
pulse_target_os=unknown
|
|
@@ -193,7 +208,13 @@
|
|
fi
|
|
;;
|
|
*)
|
|
- AC_MSG_RESULT([unknown])
|
|
+ if test "x$pulse_target_os" = "xnetbsd" && test "x$atomic_netbsd_helpers" = "xyes"; then
|
|
+ AC_MSG_RESULT([yes])
|
|
+ AC_DEFINE_UNQUOTED(NETBSD_ATOMIC_OPS, 1, [netbsd implementation])
|
|
+ need_libatomic_ops=no
|
|
+ else
|
|
+ AC_MSG_RESULT([unknown])
|
|
+ fi
|
|
;;
|
|
esac
|
|
fi
|
|
@@ -263,7 +284,7 @@
|
|
AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
|
|
netinet/in_systm.h netinet/tcp.h poll.h pwd.h sched.h \
|
|
sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
|
|
- syslog.h sys/dl.h dlfcn.h linux/sockios.h])
|
|
+ sys/uio.h syslog.h sys/dl.h dlfcn.h linux/sockios.h])
|
|
AC_CHECK_HEADERS([netinet/ip.h], [], [],
|
|
[#include <sys/types.h>
|
|
#if HAVE_NETINET_IN_H
|
|
@@ -292,6 +313,9 @@
|
|
# Windows
|
|
AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
|
|
|
|
+# NetBSD
|
|
+AC_CHECK_HEADERS([sys/atomic.h])
|
|
+
|
|
# Other
|
|
AC_CHECK_HEADERS([sys/ioctl.h])
|
|
AC_CHECK_HEADERS([byteswap.h])
|
|
@@ -359,8 +383,8 @@
|
|
AC_FUNC_FORK
|
|
AC_FUNC_GETGROUPS
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
-AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r \
|
|
- getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
|
|
+AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
|
|
+ getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
|
|
pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
|
|
sigaction sleep sysconf])
|
|
AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
|