CVS: winex configure.ac,1.105,1.106

[email protected]
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex configure.ac,1.105,1.106Update of /var/lib/cvsd/cvsroot/winex
In directory agravaine:/tmp/cvs-serv22038

Modified Files:
	configure.ac 
Log Message:

- various changes & configure checks to build on Leopard (MacOS X 10.5)


Index: configure.ac
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/configure.ac,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- configure.ac	27 Jun 2007 11:44:43 -0000	1.105
+++ configure.ac	27 Jun 2007 11:49:36 -0000	1.106
@@ -1259,7 +1259,7 @@
 
 dnl **** Check if we need to place .type inside a .def directive ****
 
-AC_CACHE_CHECK([whether .type must sit inside a .def directive],
+AC_CACHE_CHECK([whether .type can sit inside a .def directive],
 	       ac_cv_c_type_in_def,
 [saved_libs=$LIBS
 LIBS="conftest_asm.s $LIBS"
@@ -1275,6 +1275,23 @@
 then
   AC_DEFINE(NEED_TYPE_IN_DEF, 1, [Define if .type asm directive must be inside a .def directive])
 fi
+
+AC_CACHE_CHECK([whether .type directive is supported by itself],
+	       ac_cv_c_type_supported,
+[saved_libs=$LIBS
+LIBS="conftest_asm.s $LIBS"
+cat > conftest_asm.s <<EOF
+	.globl _ac_test
+	.type _ac_test,@function
+_ac_test:
+	.long 0
+EOF
+AC_TRY_LINK(,,ac_cv_c_type_supported="yes",ac_cv_c_type_supported="no")
+LIBS=$saved_libs])
+if test "$ac_cv_c_type_supported" = "yes"
+then
+  AC_DEFINE(TYPE_ASM_SUPPORTED, 1, [Define if .type asm directive is supported by itself])
+fi
  
 dnl **** Check for underscore on external symbols ****
 
@@ -1636,6 +1653,7 @@
 	linux/param.h \
 	linux/serial.h \
 	linux/ucdrom.h \
+	mach/mach.h \
 	netdb.h \
 	netinet/in.h \
 	netinet/in_systm.h \
@@ -1885,6 +1903,26 @@
     fi
 fi
 
+dnl *** Leopard defines a new type for sigaltstack
+if test "$ac_cv_func_sigaltstack" = "yes"
+then
+   AC_CACHE_CHECK( [whether sigaltstack takes a stack_t],
+		    wine_cv_type_sigaltstack_takes_stack_t,
+	AC_TRY_COMPILE([#include <signal.h>
+                #include <stdlib.h>],
+                [stack_t teststack;
+                sigaltstack (&teststack, NULL);
+	],wine_cv_type_sigaltstack_takes_stack_t=yes,
+        wine_cv_type_sigaltstack_takes_stack_t=no
+	)
+    )
+    if test "$wine_cv_type_sigaltstack_takes_stack_t" = "yes"
+    then
+      AC_DEFINE(SIGALTSTACK_TAKES_STACK_T, 1,
+                [Define if signal.h defines stack_t, which will then be used by sigaltstack])
+    fi
+fi
+
 dnl *** Check for some structure members
 
 dnl Macro to check if a structure contains a specified member
@@ -1989,6 +2027,31 @@
   ])
 fi
 
+dnl *** check for x86 Mach thread state and their structure member prefix
+if test "$ac_cv_header_mach_mach_h" = "yes"
+then
+  AC_CACHE_CHECK([for x86_thread_state32_t],
+                  ac_cv_mach_x86_state,
+                 [
+                   AC_TRY_COMPILE([#include <mach/mach.h>],
+                                  [x86_thread_state32_t regs;],
+                                  ac_cv_mach_x86_state="yes",
+                                  ac_cv_mach_x86_state="no"
+                                 )
+                 ])
+  if test "$ac_cv_mach_x86_state" = "yes"
+  then
+    AC_DEFINE(HAVE_MACH_X86_STATE,1,
+        [Define if we have Mach x86_thread_state32_t])
+
+        dnl *** Check whether members of the thread state are prefixed by __
+        WINE_CHECK_PLAIN_STRUCT_MEMBER(x86_thread_state32_t,__eax,
+                [#include <mach/mach.h>],
+                [AC_DEFINE(MACH_X86_STATE_NEEDS_PREFIX, 1,
+                        [Define if members of x86_thread_state32_t are prefixed by __])])
+  fi
+fi
+
 dnl *** check for the need to define __i386__
 
 X86FILES=""
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.