98 |
|
AC_PROG_CXX |
99 |
|
AC_PROG_MAKE_SET |
100 |
|
AC_PROG_INSTALL |
101 |
+ |
AC_PROG_EGREP |
102 |
|
|
103 |
|
dnl We use mon if possible. |
104 |
|
MONSRCS= |
145 |
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
146 |
|
AC_PATH_PROG(sdl_config, "sdl-config") |
147 |
|
if [[ -n "$sdl_config" ]]; then |
148 |
< |
sdl_cflags=`$sdl_config --cflags` |
149 |
< |
sdl_libs=`$sdl_config --libs` |
148 |
> |
case $target_os in |
149 |
> |
# Special treatment for Cygwin so that we can still use the POSIX layer |
150 |
> |
*cygwin*) |
151 |
> |
sdl_cflags="-I`$sdl_config --prefix`/include/SDL" |
152 |
> |
sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL" |
153 |
> |
;; |
154 |
> |
*) |
155 |
> |
sdl_cflags=`$sdl_config --cflags` |
156 |
> |
sdl_libs=`$sdl_config --libs` |
157 |
> |
;; |
158 |
> |
esac |
159 |
|
CFLAGS="$CFLAGS $sdl_cflags" |
160 |
|
CXXFLAGS="$CXXFLAGS $sdl_cflags" |
161 |
|
LIBS="$LIBS $sdl_libs" |
352 |
|
*-*-sco3.2v5*) |
353 |
|
no_dev_ptmx=1 |
354 |
|
;; |
355 |
+ |
*-*-cygwin*) |
356 |
+ |
no_dev_ptmx=1 |
357 |
+ |
;; |
358 |
|
esac |
359 |
|
|
360 |
|
if test -z "$no_dev_ptmx" ; then |
465 |
|
EXTRASYSSRCS="../MacOSX/sys_darwin.cpp" |
466 |
|
fi |
467 |
|
;; |
468 |
+ |
cygwin*) |
469 |
+ |
SERIALSRC="../dummy/serial_dummy.cpp" |
470 |
+ |
;; |
471 |
|
esac |
472 |
|
dnl SDL overrides |
473 |
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
859 |
|
AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions", |
860 |
|
[Define if your system supports Mach exceptions.]) |
861 |
|
|
862 |
+ |
dnl Check if Windows exceptions are supported. |
863 |
+ |
AC_CACHE_CHECK([whether your system supports Windows exceptions], |
864 |
+ |
ac_cv_have_win32_exceptions, [ |
865 |
+ |
AC_LANG_SAVE |
866 |
+ |
AC_LANG_CPLUSPLUS |
867 |
+ |
AC_TRY_RUN([ |
868 |
+ |
#define HAVE_WIN32_EXCEPTIONS 1 |
869 |
+ |
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
870 |
+ |
#include "vm_alloc.cpp" |
871 |
+ |
#include "sigsegv.cpp" |
872 |
+ |
], [ |
873 |
+ |
sigsegv_recovery=win32 |
874 |
+ |
ac_cv_have_win32_exceptions=yes |
875 |
+ |
], |
876 |
+ |
ac_cv_have_win32_exceptions=no, |
877 |
+ |
dnl When cross-compiling, do not assume anything. |
878 |
+ |
ac_cv_have_win32_exceptions=no |
879 |
+ |
) |
880 |
+ |
AC_LANG_RESTORE |
881 |
+ |
] |
882 |
+ |
) |
883 |
+ |
AC_TRANSLATE_DEFINE(HAVE_WIN32_EXCEPTIONS, "$ac_cv_have_win32_exceptions", |
884 |
+ |
[Define if your system supports Windows exceptions.]) |
885 |
+ |
|
886 |
|
dnl Otherwise, check if extended signals are supported. |
887 |
|
if [[ -z "$sigsegv_recovery" ]]; then |
888 |
|
AC_CACHE_CHECK([whether your system supports extended signal handlers], |