From ea7a2df6000e7ea7564857082f38e3141ebc363e Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 20 Dec 2010 17:34:49 -0700 Subject: [PATCH] FreeBSD 7.x required for pthreads support This only looks at the first byte of the numeric version. So will break when 10.* is released. However 6.* should be dead by then. --- configure.ac | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index cd3dba995f..29a3d1b3e4 100644 --- a/configure.ac +++ b/configure.ac @@ -531,12 +531,15 @@ for module in $MAYBE_DISK_MODULES none; do AC_MSG_NOTICE([Windows threads support automatically enabled]) ;; i386-unknown-freebsd*) - SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT" - SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT" - if test "$GCC" = "yes" ; then - if test -z "$PRESET_LDFLAGS"; then - LDFLAGS="$LDFLAGS -pthread" - fi + if test `echo "$squid_host_os_version" | cut -b1` -lt 7 ; then + AC_MSG_NOTICE(pthread library requires FreeBSD 7 or later) + squid_opt_use_diskthreads="no" + else + SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT" + SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT" + if test "x$GCC" = "xyes" -a "x$PRESET_LDFLAGS" = "x" ; then + LDFLAGS="$LDFLAGS -pthread" + fi fi ;; *-solaris2.*) -- 2.47.2