Browse code

clean up setting of HAVE_*THREADS

Originally committed as revision 7037 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2006/11/14 11:27:35
Showing 1 changed files
... ...
@@ -402,6 +402,7 @@ CONFIG_LIST='
402 402
 
403 403
 HAVE_LIST='
404 404
     altivec_h
405
+    beosthreads
405 406
     byteswap_h
406 407
     dcbzl
407 408
     dlfcn
... ...
@@ -414,8 +415,12 @@ HAVE_LIST='
414 414
     malloc_h
415 415
     memalign
416 416
     mlib
417
+    os2threads
418
+    pthreads
417 419
     sdl
418 420
     sdl_video_size
421
+    threads
422
+    w32threads
419 423
 '
420 424
 
421 425
 # set temporary file name
... ...
@@ -618,6 +623,7 @@ video4linux2="no"
618 618
 dv1394="no"
619 619
 # enable BeOS things
620 620
 audio_beos="yes"
621
+beosthreads="yes"
621 622
 # no need for libm, but the inet stuff
622 623
 # Check for BONE
623 624
 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
... ...
@@ -761,7 +767,7 @@ dv1394="no"
761 761
 ffserver="no"
762 762
 vhook="no"
763 763
 os2="yes"
764
-
764
+os2threads="yes"
765 765
 ;;
766 766
 *)
767 767
 targetos="${targetos}-UNKNOWN"
... ...
@@ -1019,6 +1025,9 @@ EOF
1019 1019
     dc1394="no"
1020 1020
     ffserver="no"
1021 1021
     network="no"
1022
+    if enabled mingw32; then
1023
+        w32threads="yes"
1024
+    fi
1022 1025
     if test "$mingwce" = "yes"; then
1023 1026
         protocols="no"
1024 1027
     fi
... ...
@@ -1931,11 +1940,6 @@ if test "$altivec" = "yes" ; then
1931 1931
   echo "#define HAVE_ALTIVEC 1" >> $TMPH
1932 1932
 fi
1933 1933
 
1934
-if test "$pthreads" = "yes" ; then
1935
-  echo "HAVE_PTHREADS=yes" >> config.mak
1936
-  echo "#define HAVE_PTHREADS 1" >> $TMPH
1937
-  echo "#define HAVE_THREADS 1" >> $TMPH
1938
-fi
1939 1934
 if test "$sdl" = "yes" ; then
1940 1935
   echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
1941 1936
   echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
... ...
@@ -1979,13 +1983,12 @@ enabled_any $DECODER_LIST && enable decoders
1979 1979
 enabled_any $MUXER_LIST   && enable muxers
1980 1980
 enabled_any $DEMUXER_LIST && enable demuxers
1981 1981
 
1982
+enabled_any pthreads beosthreads os2threads w32threads && enable threads
1983
+
1982 1984
 print_config HAVE_   $TMPH config.mak $HAVE_LIST
1983 1985
 print_config CONFIG_ $TMPH config.mak $CONFIG_LIST
1984 1986
 
1985 1987
 if test "$mingw32" = "yes" ; then
1986
-  echo "HAVE_W32THREADS=yes" >> config.mak
1987
-  echo "#define HAVE_W32THREADS 1" >> $TMPH
1988
-  echo "#define HAVE_THREADS 1" >> $TMPH
1989 1988
   echo "#ifndef __MINGW32__" >> $TMPH
1990 1989
   echo "#define __MINGW32__ 1" >> $TMPH
1991 1990
   echo "#endif" >> $TMPH
... ...
@@ -2000,15 +2003,6 @@ fi
2000 2000
 
2001 2001
 if test "$os2" = "yes" ; then
2002 2002
   echo "#define CONFIG_OS2 1" >> $TMPH
2003
-  echo "HAVE_OS2THREADS=yes" >> config.mak
2004
-  echo "#define HAVE_OS2THREADS 1" >> $TMPH
2005
-  echo "#define HAVE_THREADS 1" >> $TMPH
2006
-fi
2007
-
2008
-if test "$targetos" = "BeOS" ; then
2009
-  echo "HAVE_BEOSTHREADS=yes" >> config.mak
2010
-  echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
2011
-  echo "#define HAVE_THREADS 1" >> $TMPH
2012 2003
 fi
2013 2004
 
2014 2005
 if test "$targetos" = "Darwin"; then