
$FreeBSD: ports/audio/mp3blaster/files/patch-ab,v 1.7 2003/09/26 00:07:08 naddy Exp $

--- configure.orig	Sun Oct 20 19:04:59 2002
+++ configure	Thu Sep 25 23:33:55 2003
@@ -1970,7 +1970,11 @@
 
 
 if test "$INCLUDEPTHREAD" = 1 ; then
-	if test "$FREEBSD" = 1 -o "$OPENBSD" = 1 ; then
+	if test "${PTHREAD_CFLAGS}${PTHREAD_LIBS}" != ""; then
+	CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
+	CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}"
+	LIBS="${LIBS} ${PTHREAD_LIBS}"
+	elif test "$OPENBSD" = 1 ; then
   	LDFLAGS="$LDFLAGS -pthread"
 	else
   	echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
@@ -2420,7 +2424,7 @@
 fi
 done
 
-for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h getopt.h
+for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -3704,7 +3708,9 @@
 
 
 if test "$INCLUDEPTHREAD" = 1 ; then
-  if test "$FREEBSD" = 1 -o "$OPENBSD" = 1 ; then
+  if test "${PTHREAD_CFLAGS}${PTHREAD_LIBS}" != ""; then
+    : already handled
+  elif test "$OPENBSD" = 1 ; then
     LDFLAGS="$LDFLAGS -pthread"
     cat >> confdefs.h <<\EOF
 #define _THREAD_SAFE 1
