diff --git a/configure b/configure
index 10faa4ac146316916e6a6af7b6aded0036722413..010f7e288812964659e94f983648cdae66b56a80 100755
--- a/configure
+++ b/configure
@@ -23930,7 +23930,7 @@ fi
 # which indicates that we try without any flags at all, and "pthread-config"
 # which is a program returning the flags for the Pth emulation library.
 
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
 
 # The ordering *is* (sometimes) important.  Some notes on the
 # individual items follow:
diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4
index 1af4517283e495f50afbc5433caae8249e69ad9f..816728745469ee58b74b0f7c7060caed8e35fdd2 100644
--- a/m4/acx_pthread.m4
+++ b/m4/acx_pthread.m4
@@ -85,7 +85,7 @@ fi
 # which indicates that we try without any flags at all, and "pthread-config"
 # which is a program returning the flags for the Pth emulation library.
 
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
 
 # The ordering *is* (sometimes) important.  Some notes on the
 # individual items follow: