diff a/acinclude.m4 b/acinclude.m4 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -289,7 +289,7 @@ if test "x$acx_pthread_ok" = xyes; then case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";; - *-linux*) + *-linux*|*-k*bsd*-gnu*|*-gnu*) if test x"$PTHREAD_CFLAGS" = "x-pthread"; then # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread. diff a/configure b/configure --- a/configure +++ b/configure @@ -28428,7 +28428,7 @@ echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_ case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";; - *-linux*) + *-linux*|*-k*bsd*-gnu*|*-gnu*) if test x"$PTHREAD_CFLAGS" = "x-pthread"; then # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread.