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" |
275 |
|
AC_HEADER_STDC |
276 |
|
AC_CHECK_HEADERS(unistd.h fcntl.h sys/types.h sys/time.h sys/mman.h mach/mach.h) |
277 |
|
AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) |
278 |
< |
AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h) |
278 |
> |
AC_CHECK_HEADERS(sys/socket.h) |
279 |
> |
AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h, [], [], [ |
280 |
> |
#ifdef HAVE_SYS_SOCKET_H |
281 |
> |
#include <sys/socket.h> |
282 |
> |
#endif |
283 |
> |
]) |
284 |
|
AC_CHECK_HEADERS(AvailabilityMacros.h) |
285 |
|
|
286 |
|
dnl Checks for typedefs, structures, and compiler characteristics. |
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 |
+ |
EXTRASYSSRCS="../Windows/BasiliskII.rc" |
471 |
+ |
;; |
472 |
|
esac |
473 |
|
dnl SDL overrides |
474 |
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
860 |
|
AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions", |
861 |
|
[Define if your system supports Mach exceptions.]) |
862 |
|
|
863 |
+ |
dnl Check if Windows exceptions are supported. |
864 |
+ |
AC_CACHE_CHECK([whether your system supports Windows exceptions], |
865 |
+ |
ac_cv_have_win32_exceptions, [ |
866 |
+ |
AC_LANG_SAVE |
867 |
+ |
AC_LANG_CPLUSPLUS |
868 |
+ |
AC_TRY_RUN([ |
869 |
+ |
#define HAVE_WIN32_EXCEPTIONS 1 |
870 |
+ |
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
871 |
+ |
#include "vm_alloc.cpp" |
872 |
+ |
#include "sigsegv.cpp" |
873 |
+ |
], [ |
874 |
+ |
sigsegv_recovery=win32 |
875 |
+ |
ac_cv_have_win32_exceptions=yes |
876 |
+ |
], |
877 |
+ |
ac_cv_have_win32_exceptions=no, |
878 |
+ |
dnl When cross-compiling, do not assume anything. |
879 |
+ |
ac_cv_have_win32_exceptions=no |
880 |
+ |
) |
881 |
+ |
AC_LANG_RESTORE |
882 |
+ |
] |
883 |
+ |
) |
884 |
+ |
AC_TRANSLATE_DEFINE(HAVE_WIN32_EXCEPTIONS, "$ac_cv_have_win32_exceptions", |
885 |
+ |
[Define if your system supports Windows exceptions.]) |
886 |
+ |
|
887 |
|
dnl Otherwise, check if extended signals are supported. |
888 |
|
if [[ -z "$sigsegv_recovery" ]]; then |
889 |
|
AC_CACHE_CHECK([whether your system supports extended signal handlers], |