From: Sascha Schumann Date: Mon, 27 Dec 1999 09:54:12 +0000 (+0000) Subject: Save a few lines while checking for -pthread[s]? X-Git-Tag: PRE_ISSET_TYPE~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e1baf3a4ec67d89adfd83639162224cadb57dbe;p=php Save a few lines while checking for -pthread[s]? --- diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4 index 28443530a0..0eea9be2fa 100644 --- a/TSRM/tsrm.m4 +++ b/TSRM/tsrm.m4 @@ -46,19 +46,13 @@ AC_DEFUN(TSRM_CHECK_PTHREADS,[ old_CFLAGS="$CFLAGS" if test -n "$GCC"; then - dnl FreeBSD/Linux - TSRM_CHECK_GCC_ARG(-pthread, gcc_pthread) - - if test "$gcc_pthread" = "yes"; then - CFLAGS="$CFLAGS -pthread" - else - dnl gcc on Solaris - TSRM_CHECK_GCC_ARG(-pthreads, gcc_pthreads) - if test "$gcc_pthreads" = "yes"; then - CFLAGS="$CFLAGS -pthreads" + for i in -pthread -pthreads; do + TSRM_CHECK_GCC_ARG($i, gcc_opt) + if test "$gcc_opt" = "yes"; then + CFLAGS="$CFLAGS $i" + break fi - fi - + done AC_CHECK_FUNCS(pthread_kill) fi