$NetBSD: patch-ac,v 1.3 1998/12/14 02:17:10 tv Exp $ --- configure.orig Fri Dec 11 08:26:26 1998 +++ configure Sun Dec 13 00:59:26 1998 @@ -2037,8 +2037,51 @@ echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6 +echo "configure:2042: checking for main in -lossaudio" >&5 +ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lossaudio $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6 -echo "configure:2042: checking for iswalnum in -lw" >&5 +echo "configure:2085: checking for iswalnum in -lw" >&5 ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2489,7 +2532,27 @@ ; return 0; } EOF -if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_opensoundsystem="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < +int main() { + +/* check for one of the Open Sound System specific SNDCTL_ defines */ +#if !defined(SNDCTL_DSP_STEREO) +#error No open sound system +#endif + +; return 0; } +EOF +if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_opensoundsystem="yes" else @@ -2500,6 +2563,8 @@ fi rm -f conftest* fi +rm -f conftest* +fi echo "$ac_t""$ac_cv_c_opensoundsystem" 1>&6 @@ -2680,50 +2745,90 @@ DLLFLAGS="" +LDSHARE="" if test "$LIB_TARGET" = "libwine.so.1.0" then - echo $ac_n "checking "whether we can build a dll"""... $ac_c" 1>&6 -echo "configure:2687: checking "whether we can build a dll"" >&5 -if eval "test \"`echo '$''{'ac_cv_c_dll'+set}'`\" = set"; then + echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6 +echo "configure:2753: checking "whether we can build a Linux dll"" >&5 +if eval "test \"`echo '$''{'ac_cv_c_dll_linux'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else saved_cflags=$CFLAGS CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - ac_cv_c_dll="yes" + ac_cv_c_dll_linux="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_c_dll="no" + ac_cv_c_dll_linux="no" fi rm -f conftest* CFLAGS=$saved_cflags fi -echo "$ac_t""$ac_cv_c_dll" 1>&6 - if test "$ac_cv_c_dll" = "yes" +echo "$ac_t""$ac_cv_c_dll_linux" 1>&6 + if test "$ac_cv_c_dll_linux" = "yes" then DLLFLAGS="-fPIC" - else + LDSHARE="$$(CC) -shared -Wl,-soname,libwine.so" + fi + echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6 +echo "configure:2788: checking "whether we can build a NetBSD dll"" >&5 +if eval "test \"`echo '$''{'ac_cv_c_dll_netbsd'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + saved_cflags=$CFLAGS + CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_c_dll_netbsd="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_dll_netbsd="no" +fi +rm -f conftest* + CFLAGS=$saved_cflags + +fi + +echo "$ac_t""$ac_cv_c_dll_netbsd" 1>&6 + if test "$ac_cv_c_dll_netbsd" = "yes" + then + DLLFLAGS="-fPIC" + LDSHARE="ld -Bshareable -Bforcearchive" + fi + if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_netbsd" = "no" + then LIB_TARGET="libwine.a" fi fi + echo $ac_n "checking "for reentrant libc"""... $ac_c" 1>&6 -echo "configure:2727: checking "for reentrant libc"" >&5 +echo "configure:2832: checking "for reentrant libc"" >&5 if eval "test \"`echo '$''{'wine_cv_libc_reentrant'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3849,6 +3954,7 @@ s%@C2MAN@%$C2MAN%g s%@XLIB@%$XLIB%g s%@DLLFLAGS@%$DLLFLAGS%g +s%@LDSHARE@%$LDSHARE%g /@MAKE_RULES@/r $MAKE_RULES s%@MAKE_RULES@%%g