trying to fix the first part of #310033 by detecting gcc <= 3.2 Daniel
* configure.in: trying to fix the first part of #310033 by
detecting gcc <= 3.2
Daniel
diff --git a/ChangeLog b/ChangeLog
index ae64504..ffa7c72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 25 23:47:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: trying to fix the first part of #310033 by
+ detecting gcc <= 3.2
+
Thu Aug 25 22:13:37 CEST 2005 Daniel Veillard <daniel@veillard.com>
* error.c: fixed bug #310033, the URI extraction code given a
diff --git a/configure.in b/configure.in
index a608d05..ac3c3ed 100644
--- a/configure.in
+++ b/configure.in
@@ -812,9 +812,25 @@
THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
;;
*linux*)
- if test "${GCC}" = "yes" -a "${THREAD_LIBS}" = "-lpthread" ; then
- THREAD_LIBS=""
- BASE_THREAD_LIBS="-lpthread"
+ if test "${GCC}" = "yes" ; then
+ GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+ GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
+ GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
+ if test "${THREAD_LIBS}" = "-lpthread" ; then
+ if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
+ then
+ THREAD_LIBS=""
+ BASE_THREAD_LIBS="-lpthread"
+ else
+ if expr ${GCC_MAJOR} \> 3 > /dev/null
+ then
+ THREAD_LIBS=""
+ BASE_THREAD_LIBS="-lpthread"
+ else
+ echo old GCC disabling weak symbols for pthread
+ fi
+ fi
+ fi
fi
;;
esac