CFLAGS='-pipe'
-if [ `expr "$host_cpu" : "alpha"` -ge 5 ]
-then CFLAGS="$CFLAGS -O"
- CXXFLAGS="$CFLAGS -O"
-fi
+case $host_cpu in
+ alpha*) CFLAGS="$CFLAGS -O" ;;
+esac
+
+SUPPORTS_THREADS=yes
+NEED_REENTRANT_FUNCS=yes # 4.8, 5.1 2003-09-12
+
+case $host_os in
+ freebsd2*|freebsd3*|freebsd4*)
+ THREAD_CFLAGS="-pthread"
+ ;;
+ *)
+ THREAD_LIBS="-lc_r"
+ ;;
+esac