$NetBSD: patch-aa,v 1.10 2006/05/08 22:14:27 joerg Exp $ --- configure.orig 2006-03-18 13:44:39.000000000 +0000 +++ configure @@ -28862,34 +28862,15 @@ if test $kde_qtver = 1; then kde_qt_dirs="$QTDIR /usr/lib/qt" fi + LIBPTHREAD="" - LIBPTHREAD="" - - if test -n "$PTHREAD_LIBS"; then - if test "x$PTHREAD_LIBS" = "x-pthread" ; then - LIBPTHREAD="PTHREAD" - else - PTHREAD_LIBS_save="$PTHREAD_LIBS" - PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'` - echo "$as_me:$LINENO: checking for pthread_create in $PTHREAD_LIBS" >&5 -echo $ECHO_N "checking for pthread_create in $PTHREAD_LIBS... $ECHO_C" >&6 - - kde_save_LDFLAGS="$LDFLAGS" - kde_save_LIBS="$LIBS" - LDFLAGS="$LDFLAGS $all_libraries" - case $host_os in - aix*) LDFLAGS="-brtl $LDFLAGS" - test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS" - ;; - esac - as_ac_Lib=`echo "ac_cv_lib_$PTHREAD_LIBS''_pthread_create" | $as_tr_sh` -echo "$as_me:$LINENO: checking for pthread_create in -l$PTHREAD_LIBS" >&5 -echo $ECHO_N "checking for pthread_create in -l$PTHREAD_LIBS... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l$PTHREAD_LIBS $LIBS" +LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28934,38 +28915,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" + ac_cv_lib_pthread_pthread_create=yes + LIBPTHREAD="-lpthread" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Lib=no" +ac_cv_lib_pthread_pthread_create=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - LIBPTHREAD="$PTHREAD_LIBS_save" -fi - - LDFLAGS="$kde_save_LDFLAGS" - LIBS="$kde_save_LIBS" - - PTHREAD_LIBS="$PTHREAD_LIBS_save" - fi - fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 - if test -z "$LIBPTHREAD"; then - echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$LIBPTHREAD"; then + echo "$as_me:$LINENO: checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 +echo $ECHO_N "checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6 ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29011,6 +28980,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_create=yes + LIBPTHREAD="$PTHREAD_LDFLAGS $PTHREAD_LIBS" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -29020,13 +28990,9 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS -fi + echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 -if test $ac_cv_lib_pthread_pthread_create = yes; then - LIBPTHREAD="-lpthread" -fi - fi if test -z "$LIBPTHREAD" ; then @@ -29088,12 +29054,6 @@ rm -f conftest.err conftest.$ac_objext \ LIBS=$kde_safe_libs fi - if test "x$LIBPTHREAD" = "xPTHREAD" ; then - LIBPTHREAD="" - fi - - - USE_THREADS="" if test -z "$LIBPTHREAD"; then @@ -34616,7 +34576,7 @@ if test "${ac_cv_lib_ossaudio__oss_ioctl echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lossaudio $LIBS" +LIBS="${LIBOSSAUDIO} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -34683,7 +34643,7 @@ fi if test "x$have_ossaudio" = xyes; then # for kmix/ and akode/ - LIBOSSAUDIO="-lossaudio" + LIBOSSAUDIO="${LIBOSSAUDIO}" fi @@ -35280,7 +35240,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -35324,7 +35284,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -35434,7 +35394,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main () @@ -37422,7 +37382,7 @@ if test "${ac_cv_lib_tunepimp_tp_SetFile echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltunepimp $LIBS" +LIBS="-ltunepimp ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -38330,7 +38290,7 @@ if test "${ac_cv_lib_FLAC_FLAC__seekable echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lFLAC $LIBS" +LIBS="-lFLAC -lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -40500,8 +40460,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - x11_dga2=yes - + lib=Xxf86dga + shared_lib_found=no + for i in ${LDFLAGS}; do + case "$i" in + -L*) + dir=`echo $i | sed "s,^-L,,"` + if [ -e $dir/lib${lib}.so ] || + [ "`echo $dir/lib${lib}.so.*`" != "$dir/lib${lib}.so.*" ]; then + shared_lib_found=yes + break; + fi + esac + done + if [ "$shared_lib_found" = "yes" ]; then + x11_dga2=yes + fi + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -40564,7 +40539,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + lib=Xv + shared_lib_found=no + for i in ${LDFLAGS}; do + case "$i" in + -L*) + dir=`echo $i | sed "s,^-L,,"` + if [ -e $dir/lib${lib}.so ] || + [ "`echo $dir/lib${lib}.so.*`" != "$dir/lib${lib}.so.*" ]; then + shared_lib_found=yes + break; + fi + esac + done + if [ "$shared_lib_found" = "yes" ]; then x11_xv=yes + fi else echo "$as_me: failed program was:" >&5 @@ -40628,7 +40618,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + lib=Xxf86vm + shared_lib_found=no + for i in ${LDFLAGS}; do + case "$i" in + -L*) + dir=`echo $i | sed "s,^-L,,"` + if [ -e $dir/lib${lib}.so ] || + [ "`echo $dir/lib${lib}.so.*`" != "$dir/lib${lib}.so.*" ]; then + shared_lib_found=yes + break; + fi + esac + done + if [ "$shared_lib_found" = "yes" ]; then x11_xvidmode=yes + fi else echo "$as_me: failed program was:" >&5 @@ -40700,6 +40705,9 @@ case "$OS_TYPE" in SunOS) kde_mpeglib_compiles=yes ;; + DragonFly) + kde_mpeglib_compiles=yes + ;; *) echo "$as_me:$LINENO: result: *** We disable mpeglib for this platform ***" >&5 echo "${ECHO_T}*** We disable mpeglib for this platform ***" >&6 @@ -40709,33 +40717,14 @@ esac - LIBPTHREAD="" - if test -n "$PTHREAD_LIBS"; then - if test "x$PTHREAD_LIBS" = "x-pthread" ; then - LIBPTHREAD="PTHREAD" - else - PTHREAD_LIBS_save="$PTHREAD_LIBS" - PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'` - echo "$as_me:$LINENO: checking for pthread_create in $PTHREAD_LIBS" >&5 -echo $ECHO_N "checking for pthread_create in $PTHREAD_LIBS... $ECHO_C" >&6 - - kde_save_LDFLAGS="$LDFLAGS" - kde_save_LIBS="$LIBS" - LDFLAGS="$LDFLAGS $all_libraries" - case $host_os in - aix*) LDFLAGS="-brtl $LDFLAGS" - test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS" - ;; - esac - as_ac_Lib=`echo "ac_cv_lib_$PTHREAD_LIBS''_pthread_create" | $as_tr_sh` -echo "$as_me:$LINENO: checking for pthread_create in -l$PTHREAD_LIBS" >&5 -echo $ECHO_N "checking for pthread_create in -l$PTHREAD_LIBS... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l$PTHREAD_LIBS $LIBS" +LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -40780,31 +40769,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" + ac_cv_lib_pthread_pthread_create=yes + LIBPTHREAD="-lpthread" + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Lib=no" +ac_cv_lib_pthread_pthread_create=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - LIBPTHREAD="$PTHREAD_LIBS_save" -fi - - LDFLAGS="$kde_save_LDFLAGS" - LIBS="$kde_save_LIBS" - - PTHREAD_LIBS="$PTHREAD_LIBS_save" - fi - fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 - if test -z "$LIBPTHREAD"; then + if test -z "$LIBPTHREAD"; then echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then @@ -40857,6 +40838,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_create=yes + LIBPTHREAD="$PTHREAD_LDFLAGS $PTHREAD_LIBS" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -40869,10 +40851,6 @@ LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 -if test $ac_cv_lib_pthread_pthread_create = yes; then - LIBPTHREAD="-lpthread" -fi - fi if test -z "$LIBPTHREAD" ; then @@ -40934,10 +40912,6 @@ rm -f conftest.err conftest.$ac_objext \ LIBS=$kde_safe_libs fi - if test "x$LIBPTHREAD" = "xPTHREAD" ; then - LIBPTHREAD="" - fi - case "$OS_TYPE" in @@ -40959,7 +40933,7 @@ _ACEOF ;; - FreeBSD) + FreeBSD | DragonFly) OS_TYPE="BSD" cat >>confdefs.h <<\_ACEOF @@ -45411,11 +45387,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -if test "x$with_fast_perl" = "xyes"; then - perl -i.bak $ac_aux_dir/conf.change.pl $CONFIG_STATUS \ - || mv $CONFIG_STATUS.bak $CONFIG_STATUS - rm -f $CONFIG_STATUS.bak -fi chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save