Commit 23a4ece1 authored by Sam Hocevar's avatar Sam Hocevar

  * FreeBSD pthread fixes.
parent 501cb1ba
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
#===================# #===================#
HEAD HEAD
* FreeBSD pthread fixes.
* AC3 IMDCT and downmix functions are now in plugins, --imdct and
--downmix options added.
* Bugfixes, cleanings in gtk.
* Initialization bugfixes in input_dvd.
* Added a b_stopped flag to interface playlist to have a stop function in
interface plugins.
* Updated the Gtk+ interface so that it has the same features as the
Gnome one.
* Beginning of SSE/3DNow! support for imdct and downmix.
* Ported alsa interface for alsa 0.9beta * Ported alsa interface for alsa 0.9beta
* Fixed a deadlock in spudec. * Fixed a deadlock in spudec.
* Added SPU cropping. * Added SPU cropping.
......
...@@ -2388,26 +2388,9 @@ else ...@@ -2388,26 +2388,9 @@ else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
fi fi
echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6
echo "configure:2393: checking for old style FreeBSD -pthread flag" >&5 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF echo "configure:2394: checking for pthread_create in -lpthread" >&5
#line 2395 "configure"
#include "confdefs.h"
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread"
else
rm -rf conftest*
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:2411: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2415,7 +2398,7 @@ else ...@@ -2415,7 +2398,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS" LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2419 "configure" #line 2402 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2426,7 +2409,7 @@ int main() { ...@@ -2426,7 +2409,7 @@ int main() {
pthread_create() pthread_create()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2444,10 +2427,27 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ...@@ -2444,10 +2427,27 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
LIB="${LIB} -lpthread" LIB="${LIB} -lpthread"
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6
echo "configure:2432: checking for old style FreeBSD -pthread flag" >&5
cat > conftest.$ac_ext <<EOF
#line 2434 "configure"
#include "confdefs.h"
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread"
else
rm -rf conftest*
echo "$ac_t""no" 1>&6
fi fi
rm -f conftest*
fi fi
rm -f conftest*
echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6 echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
echo "configure:2454: checking for thread_create in -lthreads" >&5 echo "configure:2454: checking for thread_create in -lthreads" >&5
......
...@@ -61,15 +61,17 @@ AC_FUNC_MMAP ...@@ -61,15 +61,17 @@ AC_FUNC_MMAP
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl") AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm") AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm")
AC_MSG_CHECKING(for old style FreeBSD -pthread flag)
AC_EGREP_CPP(yes, AC_CHECK_LIB(pthread,pthread_create,
[#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001 LIB="${LIB} -lpthread",
yes AC_MSG_CHECKING(for old style FreeBSD -pthread flag)
#endif AC_EGREP_CPP(yes,
], AC_MSG_RESULT(yes) [#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread", yes
AC_MSG_RESULT(no) #endif],
AC_CHECK_LIB(pthread,pthread_create,LIB="${LIB} -lpthread")) AC_MSG_RESULT(yes)
DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread",
AC_MSG_RESULT(no)))
AC_CHECK_LIB(threads,thread_create,LIB="${LIB} -lthreads") AC_CHECK_LIB(threads,thread_create,LIB="${LIB} -lthreads")
CPPFLAGS="${CPPFLAGS} -I/usr/local/include" CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ac3_imdct_common.c: common ac3 DCT functions * ac3_imdct_common.c: common ac3 DCT functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_imdct_common.c,v 1.1 2001/05/15 16:19:42 sam Exp $ * $Id: ac3_imdct_common.c,v 1.2 2001/05/15 19:36:27 sam Exp $
* *
* Authors: Renaud Dartus <reno@videolan.org> * Authors: Renaud Dartus <reno@videolan.org>
* Aaron Holtzman <aholtzma@engr.uvic.ca> * Aaron Holtzman <aholtzma@engr.uvic.ca>
...@@ -109,6 +109,8 @@ static const int pm64[64] = ...@@ -109,6 +109,8 @@ static const int pm64[64] =
7, 23, 39, 55, 15, 31, 47, 63 7, 23, 39, 55, 15, 31, 47, 63
}; };
void _M( fft_64p ) ( complex_t *a );
void _M( imdct_do_256 ) (imdct_t * p_imdct, float data[],float delay[]) void _M( imdct_do_256 ) (imdct_t * p_imdct, float data[],float delay[])
{ {
int i, j, k; int i, j, k;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* and spawn threads. * and spawn threads.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.95 2001/05/15 16:19:42 sam Exp $ * $Id: main.c,v 1.96 2001/05/15 19:36:27 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
# include <mach/bootstrap.h> # include <mach/bootstrap.h>
#endif #endif
#ifndef WIN32
#include <netinet/in.h> /* BSD: struct in_addr */
#endif
#include <unistd.h> #include <unistd.h>
#include <errno.h> /* ENOMEM */ #include <errno.h> /* ENOMEM */
#include <stdlib.h> /* getenv(), strtol(), */ #include <stdlib.h> /* getenv(), strtol(), */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment