$NetBSD: patch-aa,v 1.7 2004/12/31 23:01:33 kim Exp $ --- configure.in.orig 2003-11-17 15:29:46.000000000 -0500 +++ configure.in 2004-12-31 17:55:25.000000000 -0500 @@ -10,27 +10,23 @@ dnl I've seen a report that pthread support is shaky in FreeBSD 2.x releases case "${host_os}" in freebsd2* ) - disable_thread=yes + enable_thread=no ;; solaris*|linux*|freebsd* ) - disable_thread=no + enable_thread=yes ;; * ) - disable_thread=yes + enable_thread=no ;; esac AC_ARG_ENABLE(thread, [ --disable-thread disable thread always], -[disable_thread=yes],) - -AC_ARG_ENABLE(thread, -[ --enable-thread enable thread (on non-solaris platform)], -[disable_thread=no],) +) AC_ARG_ENABLE(wall, [ --disable-wall disable -Wall option always], -[disable_wall=yes],) +) pwd=`pwd` pwd=`basename $pwd` @@ -65,7 +61,7 @@ dnl fi AC_MSG_CHECKING(for -Wall option) -if test "$disable_wall" = yes; then +if test "$enable_wall" != yes; then if test "$GCC" != "yes"; then dnl shut up SUN WorkShop Compilers CFLAGS="$CFLAGS -w" @@ -115,12 +111,18 @@ LIBS="$LIBS -lipc" ;; freebsd*|netbsd*|openbsd* ) - if test "$disable_thread" != yes; then + if test "$enable_thread" = yes; then LDFLAGS="$LDFLAGS -pthread" THREAD_CFLAGS="-D_THREAD_SAFE -pthread" fi CRYPT_LIB="-lcrypt" - ac_pthrlib="c_r" + case "${host_os}" in + netbsd* ) + ;; + * ) + ac_pthrlib="c_r" + ;; + esac ;; linux* ) CRYPT_LIB="-lcrypt" @@ -129,7 +131,7 @@ if test $CC = "cc" ; then CPPFLAGS="$CPPFLAGS -taso -pthread" fi - if test "$disable_thread" != yes; then + if test "$enable_thead" = yes; then LDFLAGS="$LDFLAGS -lc_r" THREAD_CFLAGS="-D_THREAD_SAFE" fi @@ -152,7 +154,7 @@ AC_SUBST(MAKEDEPCLEAN) dnl Checks for pthread libraries. (linux has pthread.h only, so ...) -if test "$disable_thread" = yes; then +if test "$enable_thread" != yes; then AC_MSG_CHECKING(for thread support) AC_MSG_RESULT(disabled) else