openbsd-ports/www/squid/patches/patch-configure_ac
sthen af9d1f1acc landry@ noticed that www/squid was picking up execinfo.h in bulk causing
#ifdef'd headers to be used and dpb was junking it thus breaking the build;
fix by improving detection for backtrace_symbol_fd / libexecinfo and
explicitly using it.
2013-01-22 14:30:46 +00:00

39 lines
1.3 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.5 2013/01/22 14:30:46 sthen Exp $
--- configure.ac.orig Wed Jan 9 01:42:47 2013
+++ configure.ac Tue Jan 22 12:58:39 2013
@@ -566,6 +566,16 @@ for module in $squid_disk_module_candidates none; do
fi
fi
;;
+ openbsd)
+ if test `echo "$squid_host_os_version" | tr -d .` -lt 52 ; then
+ AC_MSG_NOTICE(pthread library requires OpenBSD 5.2 or later)
+ squid_opt_use_diskthreads="no"
+ else
+ SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT"
+ SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT"
+ LDFLAGS="$LDFLAGS -lpthread"
+ fi
+ ;;
solaris)
if test "x$GCC" = "xyes" ; then
SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT -pthreads"
@@ -3112,9 +3122,16 @@ if test "x$squid_host_os" = "xmingw" ; then
ac_cv_func_statfs='yes'
fi
+dnl Some systems (mostly BSDs) require -lexecinfo for backtrace_symbols_fd()
+AC_CHECK_LIB(execinfo,backtrace_symbols_fd,[BACKTRACE_LIB="-lexecinfo"])
+oLIBS=$LIBS
+LIBS="$BACKTRACE_LIB"
+AC_CHECK_FUNCS(backtrace_symbols_fd)
+LIBS=$oLIBS
+AC_SUBST(BACKTRACE_LIB)
+
dnl Check for library functions
AC_CHECK_FUNCS(\
- backtrace_symbols_fd \
bcopy \
bswap_16 \
bswap_32 \