openbsd-ports/www/squid/patches/patch-configure_in
2010-11-29 23:06:39 +00:00

73 lines
1.8 KiB
Plaintext

$OpenBSD: patch-configure_in,v 1.31 2010/11/29 23:06:39 dcoppa Exp $
--- configure.in.orig Wed Mar 17 01:10:12 2010
+++ configure.in Mon Nov 29 21:43:13 2010
@@ -17,11 +17,6 @@ AM_MAINTAINER_MODE
PRESET_CFLAGS="$CFLAGS"
PRESET_LDFLAGS="$LDFLAGS"
-dnl Set default LDFLAGS
-if test -z "$LDFLAGS"; then
- LDFLAGS="-g"
-fi
-
dnl Check for GNU cc
AC_PROG_CC
AM_PROG_CC_C_O
@@ -2216,11 +2211,9 @@ dnl We use pthreads when doing ASYNC I/O
if test "$with_pthreads" = "yes"; then
CFLAGS="$CFLAGS -D_REENTRANT"
case "$host" in
- i386-unknown-freebsd*)
+ i386-unknown-freebsd*|*-unknown-openbsd*)
if test "$GCC" = "yes" ; then
- if test -z "$PRESET_LDFLAGS"; then
- LDFLAGS="$LDFLAGS -pthread"
- fi
+ LDFLAGS="$LDFLAGS -pthread"
fi
;;
*-solaris2.*)
@@ -2231,7 +2224,6 @@ if test "$with_pthreads" = "yes"; then
fi
;;
esac
- AC_CHECK_LIB(pthread, pthread_create)
fi
dnl Check for librt
@@ -2350,18 +2342,6 @@ dnl during compile.
;;
esac
-# Remove optimization for GCC 2.95.[123]
-# gcc -O[2] on *BSD and Linux (x86) causes pointers to magically become NULL
-if test "$GCC" = "yes"; then
- GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
- case "$GCCVER" in
- [2.95.[123]])
- echo "Removing -O for gcc on $host with GCC $GCCVER"
- CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
- ;;
- esac
-fi
-
# Recommended by Balint Nagy Endre <bne@CareNet.hu>
case "$host" in
*-univel-sysv4.2MP)
@@ -2906,12 +2886,14 @@ AC_ARG_WITH(maxfd,
;;
esac
])
+
+TLDFLAGS="$LDFLAGS"
+
if test -z "$SQUID_MAXFD"; then
dnl Not cached since people are likely to tune this
AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
dnl damn! FreeBSD's pthreads breaks dup2().
-TLDFLAGS="$LDFLAGS"
case $host in
i386-unknown-freebsd*)
if echo "$LDFLAGS" | grep -q pthread; then