]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
FreeBSD 7.x required for pthreads support
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 21 Dec 2010 00:34:49 +0000 (17:34 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 21 Dec 2010 00:34:49 +0000 (17:34 -0700)
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

index cd3dba995f5a1a13cba7a202ad62bc7e758fd718..29a3d1b3e4ad2370236b3a42f5907424d7a80757 100644 (file)
@@ -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.*)