--- configure.orig 2010-01-17 00:22:43.000000000 +0100 +++ configure 2010-01-17 14:29:54.248533341 +0100 @@ -527,7 +527,7 @@ _iwmmxt=auto _mtrr=auto _altivec=auto -_install=install +_install=@${BSD_INSTALL_PROGRAM} _ranlib=ranlib _windres=windres _cc=cc @@ -1353,7 +1353,6 @@ *) echo "Unknown parameter: $ac_option" - exit 1 ;; esac @@ -1462,8 +1461,8 @@ _timer=timer-linux.c _getch=getch2.c if freebsd ; then - extra_ldflags="$extra_ldflags -L/usr/local/lib" - extra_cflags="$extra_cflags -I/usr/local/include" + extra_ldflags="$extra_ldflags -L$_prefix/lib" + extra_cflags="$extra_cflags -I$_prefix/include" fi if netbsd || dragonfly ; then @@ -3516,22 +3515,10 @@ if linux ; then THREAD_CFLAGS=-D_REENTRANT elif freebsd || netbsd || openbsd || bsdos ; then - THREAD_CFLAGS=-D_THREAD_SAFE -fi -if test "$_pthreads" = auto ; then -cat > $TMPC << EOF -#include -void* func(void *arg) { return arg; } -int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; } -EOF -_pthreads=no -if ! hpux ; then - for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do - # for crosscompilation, we cannot execute the program, be happy if we can link statically - cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break - done -fi + THREAD_CFLAGS=${PTHREAD_CFLAGS} fi +_pthreads=yes +_ld_pthread="${PTHREAD_LIBS}" if test "$_pthreads" = yes ; then test $_ld_pthread && _res_comment="using $_ld_pthread" def_pthreads='#define HAVE_PTHREADS 1' @@ -7637,8 +7624,8 @@ if test "$_mencoder" = yes ; then def_muxers='#define CONFIG_MUXERS 1' else - # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint, png for vf_screenshot - _libavencoders="MPEG1VIDEO_ENCODER SNOW_ENCODER" + # mpeg1video for vf_lavc, snow/h263 for vf_uspp and vf_mcdeint, png for vf_screenshot + _libavencoders="MPEG1VIDEO_ENCODER H263_ENCODER SNOW_ENCODER" test "$_zlib" = yes && _libavencoders="$_libavencoders PNG_ENCODER" _libavmuxers="" def_muxers='#define CONFIG_MUXERS 0' @@ -8023,8 +8010,11 @@ if test "$_gui" = yes ; then # Required libraries - if test "$_libavcodec" != yes || - ! echo $_libavdecoders | grep -q PNG_DECODER ; then + # Work around a sh bug in FreeBSD < 8 + if test "$_libavcodec" != yes ; then + die "The GUI requires libavcodec with PNG support (needs zlib)." + fi + if ! echo $_libavdecoders | grep -q PNG_DECODER ; then die "The GUI requires libavcodec with PNG support (needs zlib)." fi test "$_freetype" = no && test "$_bitmap_font" = no && \ @@ -8217,7 +8207,7 @@ echocheck "joystick" def_joystick='#undef CONFIG_JOYSTICK' if test "$_joystick" = yes ; then - if linux ; then + if linux || freebsd ; then # TODO add some check def_joystick='#define CONFIG_JOYSTICK 1' else