diff --git a/configure b/configure index 0ceeed461ed..e3e63bd7945 100755 --- a/configure +++ b/configure @@ -3236,7 +3236,7 @@ fi done - for ac_hdr in X11/extensions/xf86dga.h + for ac_hdr in X11/Xlib.h X11/extensions/shape.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -3269,9 +3269,95 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:3275: checking for XShapeQueryExtension in -lXext" >&5 +ac_lib_var=`echo Xext'_'XShapeQueryExtension | 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="-lXext $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + cat >> confdefs.h <<\EOF +#define HAVE_LIBXSHAPE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: XShape extension found!!" 1>&2 + +fi +done + + + for ac_hdr in X11/extensions/xf86dga.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3330: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -echo "configure:3275: checking for XDGAQueryExtension in -lXxf86dga" >&5 +echo "configure:3361: checking for XDGAQueryExtension in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'XDGAQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3280,7 +3366,7 @@ else LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3321,7 +3407,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6 -echo "configure:3325: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 +echo "configure:3411: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3330,7 +3416,7 @@ else LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3383,17 +3469,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3387: checking for $ac_hdr" >&5 +echo "configure:3473: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3414,7 +3500,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then #define $ac_tr_hdr 1 EOF echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6 -echo "configure:3418: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 +echo "configure:3504: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3423,7 +3509,7 @@ else LIBS="-lXxf86vm $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3480,17 +3566,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3484: checking for $ac_hdr" >&5 +echo "configure:3570: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3519,19 +3605,19 @@ done if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes" -a "$ac_cv_header_GL_glext_h" = "yes" then echo $ac_n "checking "for up-to-date OpenGL version"""... $ac_c" 1>&6 -echo "configure:3523: checking "for up-to-date OpenGL version"" >&5 +echo "configure:3609: checking "for up-to-date OpenGL version"" >&5 if eval "test \"`echo '$''{'wine_cv_opengl_version_OK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { GLenum test = GL_UNSIGNED_SHORT_5_6_5; ; return 0; } EOF -if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_opengl_version_OK="yes" else @@ -3548,21 +3634,21 @@ fi echo "$ac_t""$wine_cv_opengl_version_OK" 1>&6 echo $ac_n "checking "for thread-safe OpenGL version"""... $ac_c" 1>&6 -echo "configure:3552: checking "for thread-safe OpenGL version"" >&5 +echo "configure:3638: checking "for thread-safe OpenGL version"" >&5 if eval "test \"`echo '$''{'wine_cv_opengl_version_threadsafe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else saved_libs=$LIBS LIBS="$X_LIBS -lGL" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* wine_cv_opengl_version_threadsafe="yes" else @@ -3581,7 +3667,7 @@ echo "$ac_t""$wine_cv_opengl_version_threadsafe" 1>&6 if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o $OPENGL = "yes" \) then echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6 -echo "configure:3585: checking for glXCreateContext in -lGL" >&5 +echo "configure:3671: checking for glXCreateContext in -lGL" >&5 ac_lib_var=`echo GL'_'glXCreateContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3589,7 +3675,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3626,7 +3712,7 @@ fi if test $ac_cv_lib_GL_glXCreateContext = "yes" then echo $ac_n "checking for glXGetProcAddressARB in -lGL""... $ac_c" 1>&6 -echo "configure:3630: checking for glXGetProcAddressARB in -lGL" >&5 +echo "configure:3716: checking for glXGetProcAddressARB in -lGL" >&5 ac_lib_var=`echo GL'_'glXGetProcAddressARB | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3634,7 +3720,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3672,12 +3758,12 @@ fi if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes" then echo $ac_n "checking "for OpenGL extension functions prototypes"""... $ac_c" 1>&6 -echo "configure:3676: checking "for OpenGL extension functions prototypes"" >&5 +echo "configure:3762: checking "for OpenGL extension functions prototypes"" >&5 if eval "test \"`echo '$''{'wine_cv_extension_prototypes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3685,7 +3771,7 @@ int main() { PFNGLCOLORTABLEEXTPROC test_proc; ; return 0; } EOF -if { (eval echo configure:3689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_GLEXT_PROTOTYPES 1 @@ -3732,17 +3818,17 @@ then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3736: checking for $ac_hdr" >&5 +echo "configure:3822: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3771,7 +3857,7 @@ done if test "$ac_cv_header_ncurses_h" = "yes" then echo $ac_n "checking for waddch in -lncurses""... $ac_c" 1>&6 -echo "configure:3775: checking for waddch in -lncurses" >&5 +echo "configure:3861: checking for waddch in -lncurses" >&5 ac_lib_var=`echo ncurses'_'waddch | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3779,7 +3865,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3821,7 +3907,7 @@ fi if test "$ac_cv_lib_ncurses_waddch" = "yes" then echo $ac_n "checking for resizeterm in -lncurses""... $ac_c" 1>&6 -echo "configure:3825: checking for resizeterm in -lncurses" >&5 +echo "configure:3911: checking for resizeterm in -lncurses" >&5 ac_lib_var=`echo ncurses'_'resizeterm | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3829,7 +3915,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3864,7 +3950,7 @@ else fi echo $ac_n "checking for getbkgd in -lncurses""... $ac_c" 1>&6 -echo "configure:3868: checking for getbkgd in -lncurses" >&5 +echo "configure:3954: checking for getbkgd in -lncurses" >&5 ac_lib_var=`echo ncurses'_'getbkgd | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3872,7 +3958,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3911,17 +3997,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3915: checking for $ac_hdr" >&5 +echo "configure:4001: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3950,7 +4036,7 @@ done if test "$ac_cv_header_curses_h" = "yes" then echo $ac_n "checking for waddch in -lcurses""... $ac_c" 1>&6 -echo "configure:3954: checking for waddch in -lcurses" >&5 +echo "configure:4040: checking for waddch in -lcurses" >&5 ac_lib_var=`echo curses'_'waddch | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3958,7 +4044,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3999,7 +4085,7 @@ fi if test "$ac_cv_lib_curses_waddch" = "yes" then echo $ac_n "checking for resizeterm in -lcurses""... $ac_c" 1>&6 -echo "configure:4003: checking for resizeterm in -lcurses" >&5 +echo "configure:4089: checking for resizeterm in -lcurses" >&5 ac_lib_var=`echo curses'_'resizeterm | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4007,7 +4093,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4042,7 +4128,7 @@ else fi echo $ac_n "checking for getbkgd in -lcurses""... $ac_c" 1>&6 -echo "configure:4046: checking for getbkgd in -lcurses" >&5 +echo "configure:4132: checking for getbkgd in -lcurses" >&5 ac_lib_var=`echo curses'_'getbkgd | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4050,7 +4136,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4090,12 +4176,12 @@ fi fi echo $ac_n "checking "for GNU style IPX support"""... $ac_c" 1>&6 -echo "configure:4094: checking "for GNU style IPX support"" >&5 +echo "configure:4180: checking "for GNU style IPX support"" >&5 if eval "test \"`echo '$''{'ac_cv_c_ipx_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4103,7 +4189,7 @@ int main() { ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX ; return 0; } EOF -if { (eval echo configure:4107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_ipx_gnu="yes" else @@ -4128,12 +4214,12 @@ fi if test "$ac_cv_c_ipx_gnu" = "no" then echo $ac_n "checking "for linux style IPX support"""... $ac_c" 1>&6 -echo "configure:4132: checking "for linux style IPX support"" >&5 +echo "configure:4218: checking "for linux style IPX support"" >&5 if eval "test \"`echo '$''{'ac_cv_c_ipx_linux'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4142,7 +4228,7 @@ int main() { ((struct sockaddr_ipx *)0)->sipx_family == AF_IPX ; return 0; } EOF -if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_ipx_linux="yes" else @@ -4169,17 +4255,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h soundcard.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4173: checking for $ac_hdr" >&5 +echo "configure:4259: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4207,12 +4293,12 @@ done echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6 -echo "configure:4211: checking "for Open Sound System"" >&5 +echo "configure:4297: checking "for Open Sound System"" >&5 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_opensoundsystem="yes" else @@ -4256,12 +4342,12 @@ EOF fi echo $ac_n "checking "for Open Sound System/MIDI interface"""... $ac_c" 1>&6 -echo "configure:4260: checking "for Open Sound System/MIDI interface"" >&5 +echo "configure:4346: checking "for Open Sound System/MIDI interface"" >&5 if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem_midi'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_opensoundsystem_midi="yes" else @@ -4311,7 +4397,7 @@ if test "x${GCC}" = "xyes" then CFLAGS="$CFLAGS -Wall" echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6 -echo "configure:4315: checking "for gcc strength-reduce bug"" >&5 +echo "configure:4401: checking "for gcc strength-reduce bug"" >&5 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4319,7 +4405,7 @@ else ac_cv_c_gcc_strength_bug="yes" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_gcc_strength_bug="no" else @@ -4353,7 +4439,7 @@ fi echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6 -echo "configure:4357: checking "whether external symbols need an underscore prefix"" >&5 +echo "configure:4443: checking "whether external symbols need an underscore prefix"" >&5 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4365,14 +4451,14 @@ _ac_test: .long 0 EOF cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_extern_prefix="yes" else @@ -4396,7 +4482,7 @@ fi echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6 -echo "configure:4400: checking "whether assembler accepts .string"" >&5 +echo "configure:4486: checking "whether assembler accepts .string"" >&5 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4406,14 +4492,14 @@ cat > conftest_asm.s < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_asm_string="yes" else @@ -4440,21 +4526,21 @@ LDSHARED="" if test "$LIBEXT" = "so" then echo $ac_n "checking "whether we can build a Linux dll"""... $ac_c" 1>&6 -echo "configure:4444: checking "whether we can build a Linux dll"" >&5 +echo "configure:4530: 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${ac_exeext}; then +if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_dll_linux="yes" else @@ -4474,21 +4560,21 @@ echo "$ac_t""$ac_cv_c_dll_linux" 1>&6 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)" else echo $ac_n "checking whether we can build a UnixWare (Solaris) dll""... $ac_c" 1>&6 -echo "configure:4478: checking whether we can build a UnixWare (Solaris) dll" >&5 +echo "configure:4564: checking whether we can build a UnixWare (Solaris) dll" >&5 if eval "test \"`echo '$''{'ac_cv_c_dll_unixware'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else saved_cflags=$CFLAGS CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_dll_unixware="yes" else @@ -4508,21 +4594,21 @@ echo "$ac_t""$ac_cv_c_dll_unixware" 1>&6 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)" else echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6 -echo "configure:4512: checking "whether we can build a NetBSD dll"" >&5 +echo "configure:4598: 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${ac_exeext}; then +if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_dll_netbsd="yes" else @@ -4557,21 +4643,21 @@ if test "$LIBEXT" = "so"; then else DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode \$(X_LIBS) \$(XLIB)" echo $ac_n "checking whether the linker supports --[no]-whole-archive (Linux)""... $ac_c" 1>&6 -echo "configure:4561: checking whether the linker supports --[no]-whole-archive (Linux)" >&5 +echo "configure:4647: checking whether the linker supports --[no]-whole-archive (Linux)" >&5 if eval "test \"`echo '$''{'ac_cv_c_whole_archive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else saved_cflags=$CFLAGS CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_whole_archive="yes" else @@ -4591,21 +4677,21 @@ echo "$ac_t""$ac_cv_c_whole_archive" 1>&6 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive" else echo $ac_n "checking whether the linker supports -z {all,default}extract (Linux)""... $ac_c" 1>&6 -echo "configure:4595: checking whether the linker supports -z {all,default}extract (Linux)" >&5 +echo "configure:4681: checking whether the linker supports -z {all,default}extract (Linux)" >&5 if eval "test \"`echo '$''{'ac_cv_c_allextract'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else saved_cflags=$CFLAGS CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_c_allextract="yes" else @@ -4635,7 +4721,7 @@ fi wine_cv_libc_reentrant=no echo $ac_n "checking "for reentrant libc: __errno_location"""... $ac_c" 1>&6 -echo "configure:4639: checking "for reentrant libc: __errno_location"" >&5 +echo "configure:4725: checking "for reentrant libc: __errno_location"" >&5 if eval "test \"`echo '$''{'wine_cv_libc_r__errno_location'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4643,14 +4729,14 @@ else wine_cv_libc_r__errno_location=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wine_cv_libc_r__errno_location=yes else @@ -4675,7 +4761,7 @@ EOF wine_cv_libc_reentrant=__errno_location fi echo $ac_n "checking "for reentrant libc: __error"""... $ac_c" 1>&6 -echo "configure:4679: checking "for reentrant libc: __error"" >&5 +echo "configure:4765: checking "for reentrant libc: __error"" >&5 if eval "test \"`echo '$''{'wine_cv_libc_r__error'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4683,14 +4769,14 @@ else wine_cv_libc_r__error=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wine_cv_libc_r__error=yes else @@ -4715,7 +4801,7 @@ EOF wine_cv_libc_reentrant=__error fi echo $ac_n "checking "for reentrant libc: ___errno"""... $ac_c" 1>&6 -echo "configure:4719: checking "for reentrant libc: ___errno"" >&5 +echo "configure:4805: checking "for reentrant libc: ___errno"" >&5 if eval "test \"`echo '$''{'wine_cv_libc_r___errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4723,14 +4809,14 @@ else wine_cv_libc_r___errno=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wine_cv_libc_r___errno=yes else @@ -4755,7 +4841,7 @@ EOF wine_cv_libc_reentrant=___errno fi echo $ac_n "checking "for reentrant libc: __thr_errno"""... $ac_c" 1>&6 -echo "configure:4759: checking "for reentrant libc: __thr_errno"" >&5 +echo "configure:4845: checking "for reentrant libc: __thr_errno"" >&5 if eval "test \"`echo '$''{'wine_cv_libc_r__thr_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4763,14 +4849,14 @@ else wine_cv_libc_r__thr_errno=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wine_cv_libc_r__thr_errno=yes else @@ -4806,7 +4892,7 @@ fi if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no" then echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6 -echo "configure:4810: checking "for reentrant X libraries"" >&5 +echo "configure:4896: checking "for reentrant X libraries"" >&5 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4852,14 +4938,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4856: checking whether byte ordering is bigendian" >&5 +echo "configure:4942: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4870,11 +4956,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4885,7 +4971,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4905,7 +4991,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -4946,19 +5032,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4950: checking for working alloca.h" >&5 +echo "configure:5036: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { void *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -4979,12 +5065,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4983: checking for alloca" >&5 +echo "configure:5069: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -5044,12 +5130,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5048: checking whether alloca needs Cray hooks" >&5 +echo "configure:5134: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5078: checking for $ac_func" >&5 +echo "configure:5164: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5129,7 +5215,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5133: checking stack direction for C alloca" >&5 +echo "configure:5219: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5137,7 +5223,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -5208,12 +5294,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5212: checking for $ac_func" >&5 +echo "configure:5298: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5314,17 +5400,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5318: checking for $ac_hdr" >&5 +echo "configure:5404: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5351,12 +5437,12 @@ fi done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:5355: checking whether stat file-mode macros are broken" >&5 +echo "configure:5441: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5409,12 +5495,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5413: checking for working const" >&5 +echo "configure:5499: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5484,21 +5570,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5488: checking for inline" >&5 +echo "configure:5574: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5524,12 +5610,12 @@ EOF esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5528: checking for ANSI C header files" >&5 +echo "configure:5614: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5537,7 +5623,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5554,7 +5640,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -5572,7 +5658,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -5593,7 +5679,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5604,7 +5690,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5628,12 +5714,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5632: checking for size_t" >&5 +echo "configure:5718: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5661,7 +5747,7 @@ EOF fi echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:5665: checking size of long long" >&5 +echo "configure:5751: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5669,7 +5755,7 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < main() @@ -5680,7 +5766,7 @@ main() exit(0); } EOF -if { (eval echo configure:5684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -5703,12 +5789,12 @@ EOF if test "$ac_cv_header_linux_joystick_h" = "yes" then echo $ac_n "checking "whether linux/joystick.h uses the Linux 2.2+ API"""... $ac_c" 1>&6 -echo "configure:5707: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5 +echo "configure:5793: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5723,7 +5809,7 @@ int main() { /*empty*/ ; return 0; } EOF -if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_linux_joystick_22_api=yes else @@ -5750,12 +5836,12 @@ fi if test "$ac_cv_header_sys_vfs_h" = "yes" then echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:5754: checking "whether sys/vfs.h defines statfs"" >&5 +echo "configure:5840: checking "whether sys/vfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5772,7 +5858,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_vfs_has_statfs=yes else @@ -5799,12 +5885,12 @@ fi if test "$ac_cv_header_sys_statfs_h" = "yes" then echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:5803: checking "whether sys/statfs.h defines statfs"" >&5 +echo "configure:5889: checking "whether sys/statfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5819,7 +5905,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_statfs_has_statfs=yes else @@ -5846,12 +5932,12 @@ fi if test "$ac_cv_header_sys_mount_h" = "yes" then echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6 -echo "configure:5850: checking "whether sys/mount.h defines statfs"" >&5 +echo "configure:5936: checking "whether sys/mount.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5866,7 +5952,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_mount_has_statfs=yes else @@ -5892,7 +5978,7 @@ fi echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6 -echo "configure:5896: checking "for statfs.f_bfree"" >&5 +echo "configure:5982: checking "for statfs.f_bfree"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5901,7 +5987,7 @@ else wine_cv_statfs_bfree=no else cat > conftest.$ac_ext < @@ -5928,7 +6014,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bfree=yes else @@ -5952,7 +6038,7 @@ EOF fi echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6 -echo "configure:5956: checking "for statfs.f_bavail"" >&5 +echo "configure:6042: checking "for statfs.f_bavail"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5961,7 +6047,7 @@ else wine_cv_statfs_bavail=no else cat > conftest.$ac_ext < @@ -5988,7 +6074,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bavail=yes else @@ -6013,12 +6099,12 @@ fi echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6 -echo "configure:6017: checking "for msg_accrights in struct msghdr"" >&5 +echo "configure:6103: checking "for msg_accrights in struct msghdr"" >&5 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6026,7 +6112,7 @@ int main() { struct msghdr hdr; hdr.msg_accrights=0 ; return 0; } EOF -if { (eval echo configure:6030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_msg_accrights="yes" else @@ -6049,12 +6135,12 @@ fi echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:6053: checking "for sun_len in struct sockaddr_un"" >&5 +echo "configure:6139: checking "for sun_len in struct sockaddr_un"" >&5 if eval "test \"`echo '$''{'ac_cv_c_sun_len'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6063,7 +6149,7 @@ int main() { static struct sockaddr_un addr; addr.sun_len = 1 ; return 0; } EOF -if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_sun_len="yes" else @@ -6086,12 +6172,12 @@ fi echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6 -echo "configure:6090: checking "whether we need to define __i386__"" >&5 +echo "configure:6176: checking "whether we need to define __i386__"" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include "ts_xlib.h" #include "ts_xutil.h" +#include "ts_shape.h" #include "winbase.h" #include "wine/winbase16.h" diff --git a/include/acconfig.h b/include/acconfig.h index a733147effe..88812d54d62 100644 --- a/include/acconfig.h +++ b/include/acconfig.h @@ -24,6 +24,9 @@ /* Define if you have the X Shm extension */ #undef HAVE_LIBXXSHM +/* Define if you have the X Shape extension */ +#undef HAVE_LIBXSHAPE + /* Define if you have the Xxf86vm library */ #undef HAVE_LIBXXF86VM diff --git a/include/config.h.in b/include/config.h.in index e6c620653c9..e6d67f3dc90 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -68,6 +68,9 @@ /* Define if you have the X Shm extension */ #undef HAVE_LIBXXSHM +/* Define if you have the X Shape extension */ +#undef HAVE_LIBXSHAPE + /* Define if you have the Xxf86vm library */ #undef HAVE_LIBXXF86VM @@ -257,6 +260,9 @@ /* Define if you have the header file. */ #undef HAVE_X11_EXTENSIONS_XSHM_H +/* Define if you have the header file. */ +#undef HAVE_X11_EXTENSIONS_SHAPE_H + /* Define if you have the header file. */ #undef HAVE_X11_EXTENSIONS_XF86DGA_H diff --git a/include/ts_shape.h b/include/ts_shape.h new file mode 100644 index 00000000000..a802340421d --- /dev/null +++ b/include/ts_shape.h @@ -0,0 +1,24 @@ +/* + * Thread safe wrappers around shape calls. + * Always include this file instead of . + * This file was generated automatically by tools/make_X11wrappers + * + * Copyright 1998 Kristian Nielsen + */ + +#ifndef __WINE_TS_SHAPE_H +#define __WINE_TS_SHAPE_H + +#include "config.h" + +#ifdef HAVE_LIBXSHAPE +#include + +#include + +extern void TSXShapeCombineRectangles(Display*, Window, int, int, int, XRectangle*, int, int, int); +extern void TSXShapeCombineMask(Display*, Window, int, int, int, Pixmap, int); + +#endif /* defined(HAVE_LIBXSHAPE) */ + +#endif /* __WINE_TS_SHAPE_H */ diff --git a/include/ttydrv.h b/include/ttydrv.h index b89a9da0d31..58412b47a71 100644 --- a/include/ttydrv.h +++ b/include/ttydrv.h @@ -201,5 +201,6 @@ extern void TTYDRV_WND_ScrollWindow(struct tagWND *wndPtr, struct tagDC *dcPtr, extern void TTYDRV_WND_SetDrawable(struct tagWND *wndPtr, struct tagDC *dc, WORD flags, BOOL bSetClipOrigin); extern BOOL TTYDRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value); extern BOOL TTYDRV_WND_IsSelfClipping(struct tagWND *wndPtr); +extern void TTYDRV_WND_SetWindowRgn(struct tagWND *wndPtr, HRGN hrgnWnd); #endif /* !defined(__WINE_TTYDRV_H) */ diff --git a/include/win.h b/include/win.h index 1e954ab249b..b02c9eeace9 100644 --- a/include/win.h +++ b/include/win.h @@ -78,6 +78,7 @@ typedef struct tagWND struct tagDCE *dce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */ HGLOBAL16 hmemTaskQ; /* Task queue global memory handle */ HRGN16 hrgnUpdate; /* Update region */ + HRGN hrgnWnd; /* window's region */ HWND hwndLastActive;/* Last active popup hwnd */ DWORD dwStyle; /* Window style (from CreateWindow) */ DWORD dwExStyle; /* Extended style (from CreateWindowEx) */ @@ -131,6 +132,7 @@ typedef struct tagWND_DRIVER void (*pSetDrawable)(WND *, struct tagDC *, WORD, BOOL); BOOL (*pSetHostAttr)(WND *, INT haKey, INT value); BOOL (*pIsSelfClipping)(WND *); + void (*pSetWindowRgn)(WND *, const HRGN); } WND_DRIVER; extern WND_DRIVER *WND_Driver; diff --git a/include/x11drv.h b/include/x11drv.h index d4a50f37d0f..9de72faec00 100644 --- a/include/x11drv.h +++ b/include/x11drv.h @@ -431,6 +431,7 @@ extern void X11DRV_WND_SetDrawable(struct tagWND *wndPtr, struct tagDC *dc, WORD extern BOOL X11DRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value); extern BOOL X11DRV_WND_IsSelfClipping(struct tagWND *wndPtr); extern void X11DRV_WND_DockWindow(struct tagWND *wndPtr); +extern void X11DRV_WND_SetWindowRgn(struct tagWND *wndPtr, HRGN hrgnWnd); extern int X11DRV_EVENT_PrepareShmCompletion( Drawable dw ); extern void X11DRV_EVENT_WaitShmCompletion( int compl ); diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers index c443ff3dd8b..1a919e91bf7 100755 --- a/tools/make_X11wrappers +++ b/tools/make_X11wrappers @@ -17,7 +17,7 @@ $X11_include_dir = "/usr/X11/include"; $outdir = "tsx11"; $wantfile = "$outdir/X11_calls"; -@dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga", "xf86dga2", "xf86vmode"); +@dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape"); # First read list of wanted function names. @@ -80,6 +80,14 @@ foreach $name (@dolist) { $pre_file = "#include \"windef.h\"\n#ifdef HAVE_LIBXXF86VM\n#define XMD_H\n#include \"basetsd.h\"\n"; $post_file = "#endif /* defined(HAVE_LIBXXF86VM) */\n"; } + if($name eq "shape") { + $extensions_dir = "extensions/"; + $pre_file = "#ifdef HAVE_LIBXSHAPE\n#include \n"; + $post_file = "#endif /* defined(HAVE_LIBXSHAPE) */\n"; + $inc_name = "shape"; + } + + print OUTH < + +#include + +#include "debugtools.h" +#include "ts_shape.h" +#include "x11drv.h" + +DEFAULT_DEBUG_CHANNEL(x11) + +void TSXShapeCombineRectangles(Display* a0, Window a1, int a2, int a3, int a4, XRectangle* a5, int a6, int a7, int a8) +{ + TRACE("Call XShapeCombineRectangles\n"); + EnterCriticalSection( &X11DRV_CritSection ); + XShapeCombineRectangles(a0, a1, a2, a3, a4, a5, a6, a7, a8); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE("Ret XShapeCombineRectangles\n"); +} + +void TSXShapeCombineMask(Display* a0, Window a1, int a2, int a3, int a4, Pixmap a5, int a6) +{ + TRACE("Call XShapeCombineMask\n"); + EnterCriticalSection( &X11DRV_CritSection ); + XShapeCombineMask(a0, a1, a2, a3, a4, a5, a6); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE("Ret XShapeCombineMask\n"); +} + +#endif /* defined(HAVE_LIBXSHAPE) */ + diff --git a/windows/ttydrv/init.c b/windows/ttydrv/init.c index 41dd14a6922..747a3e62bf8 100644 --- a/windows/ttydrv/init.c +++ b/windows/ttydrv/init.c @@ -39,7 +39,8 @@ WND_DRIVER TTYDRV_WND_Driver = TTYDRV_WND_ScrollWindow, TTYDRV_WND_SetDrawable, TTYDRV_WND_SetHostAttr, - TTYDRV_WND_IsSelfClipping + TTYDRV_WND_IsSelfClipping, + TTYDRV_WND_SetWindowRgn }; diff --git a/windows/ttydrv/wnd.c b/windows/ttydrv/wnd.c index 7c55553d2c5..696185ec582 100644 --- a/windows/ttydrv/wnd.c +++ b/windows/ttydrv/wnd.c @@ -241,3 +241,11 @@ BOOL TTYDRV_WND_IsSelfClipping(WND *wndPtr) return FALSE; } + +/*********************************************************************** + * TTYDRV_WND_SetWindowRgn + */ +void TTYDRV_WND_SetWindowRgn(struct tagWND *wndPtr, HRGN hrgnWnd) +{ +} + diff --git a/windows/winpos.c b/windows/winpos.c index 7ad713982d5..9b4b36ccbe6 100644 --- a/windows/winpos.c +++ b/windows/winpos.c @@ -6,6 +6,7 @@ */ #include +#include "winerror.h" #include "windef.h" #include "wingdi.h" #include "winerror.h" @@ -271,38 +272,74 @@ BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect ) /*********************************************************************** - * GetWindowRgn + * GetWindowRgn (USER32) */ -BOOL WINAPI GetWindowRgn ( HWND hwnd, HRGN hrgn ) - +int WINAPI GetWindowRgn ( HWND hwnd, HRGN hrgn ) { - RECT rect; - WND * wndPtr = WIN_FindWndPtr( hwnd ); - if (!wndPtr) return (ERROR); - - FIXME("GetWindowRgn: doesn't really do regions\n"); - - memset (&rect, 0, sizeof(rect)); - - GetWindowRect ( hwnd, &rect ); - - FIXME("Check whether a valid region here\n"); - - SetRectRgn ( hrgn, rect.left, rect.top, rect.right, rect.bottom ); - - WIN_ReleaseWndPtr(wndPtr); - return (SIMPLEREGION); + int nRet = ERROR; + WND *wndPtr = WIN_FindWndPtr( hwnd ); + if (wndPtr) + { + if (wndPtr->hrgnWnd) nRet = CombineRgn( hrgn, wndPtr->hrgnWnd, 0, RGN_COPY ); + WIN_ReleaseWndPtr(wndPtr); + } + return nRet; } /*********************************************************************** - * SetWindowRgn + * SetWindowRgn (USER32) */ -INT WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn,BOOL bRedraw) - +int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw ) { + int ret = FALSE; + RECT tempRect; - FIXME("SetWindowRgn: stub\n"); - return TRUE; + WND *wndPtr = WIN_FindWndPtr(hwnd); + + if (!wndPtr) return FALSE; + + /* a region exists for this window */ + if (hrgn != 0 && hrgn == wndPtr->hrgnWnd) + { + /* can't replace actual region with same region + since we're now owner of that region + */ + SetLastError(ERROR_INVALID_HANDLE); + goto done; + } + + if (wndPtr->hrgnWnd) + { + /* delete previous region */ + DeleteObject(wndPtr->hrgnWnd); + wndPtr->hrgnWnd = 0; + } + + /* we'd like to set it back to 0 */ + if (hrgn == 0) + { + GetWindowRect(hwnd, &tempRect); + } + else + { + /* verify that region really exists */ + if (GetRgnBox(hrgn, &tempRect) == ERROR) goto done; + } + + /* valid region handle */ + wndPtr->hrgnWnd = hrgn; + SetWindowPos( hwnd, NULL, tempRect.left, tempRect.top, + tempRect.right - tempRect.left, tempRect.bottom - tempRect.top, + SWP_NOSIZE | SWP_FRAMECHANGED | SWP_NOMOVE | + SWP_NOZORDER | (bRedraw ? 0 : SWP_NOREDRAW) ); + + wndPtr->pDriver->pSetWindowRgn(wndPtr, hrgn); + + ret = TRUE; + + done: + WIN_ReleaseWndPtr(wndPtr); + return ret; } /*********************************************************************** diff --git a/windows/x11drv/init.c b/windows/x11drv/init.c index e840d68004f..0b256c5cab8 100644 --- a/windows/x11drv/init.c +++ b/windows/x11drv/init.c @@ -39,7 +39,8 @@ WND_DRIVER X11DRV_WND_Driver = X11DRV_WND_SurfaceCopy, X11DRV_WND_SetDrawable, X11DRV_WND_SetHostAttr, - X11DRV_WND_IsSelfClipping + X11DRV_WND_IsSelfClipping, + X11DRV_WND_SetWindowRgn }; diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c index 3c19b6d5735..7eb3554437b 100644 --- a/windows/x11drv/wnd.c +++ b/windows/x11drv/wnd.c @@ -12,6 +12,7 @@ #include "ts_xlib.h" #include "ts_xutil.h" +#include "ts_shape.h" #include #include @@ -1010,3 +1011,62 @@ void X11DRV_WND_DockWindow(WND *wndPtr) ); } + +/*********************************************************************** + * X11DRV_WND_SetWindowRgn + * + * Assign specified region to window (for non-rectangular windows) + */ +void X11DRV_WND_SetWindowRgn(WND *wndPtr, HRGN hrgnWnd) +{ +#ifdef HAVE_LIBXSHAPE + Window win = X11DRV_WND_GetXWindow(wndPtr); + + if (!win) return; + + if (!hrgnWnd) + { + TSXShapeCombineMask( display, win, ShapeBounding, 0, 0, None, ShapeSet ); + } + else + { + XRectangle *aXRect; + DWORD size; + DWORD dwBufferSize = GetRegionData(hrgnWnd, 0, NULL); + PRGNDATA pRegionData = HeapAlloc(GetProcessHeap(), 0, dwBufferSize); + if (!pRegionData) return; + + GetRegionData(hrgnWnd, dwBufferSize, pRegionData); + size = pRegionData->rdh.nCount; + /* convert region's "Windows rectangles" to XRectangles */ + aXRect = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*aXRect) ); + if (aXRect) + { + XRectangle* pCurrRect = aXRect; + RECT *pRect = (RECT*) pRegionData->Buffer; + for (; pRect < ((RECT*) pRegionData->Buffer) + size ; ++pRect, ++pCurrRect) + { + pCurrRect->x = pRect->left; + pCurrRect->y = pRect->top; + pCurrRect->height = pRect->bottom - pRect->top; + pCurrRect->width = pRect->right - pRect->left; + + TRACE("Rectangle %04d of %04ld data: X=%04d, Y=%04d, Height=%04d, Width=%04d.\n", + pRect - (RECT*) pRegionData->Buffer, + size, + pCurrRect->x, + pCurrRect->y, + pCurrRect->height, + pCurrRect->width); + } + + /* shape = non-rectangular windows (X11/extensions) */ + TSXShapeCombineRectangles( display, win, ShapeBounding, + 0, 0, aXRect, + pCurrRect - aXRect, ShapeSet, YXBanded ); + HeapFree(GetProcessHeap(), 0, aXRect ); + } + HeapFree(GetProcessHeap(), 0, pRegionData); + } +#endif /* HAVE_LIBXSHAPE */ +}