1031: Replace jsrt with spidermonkey_runtime
[elinks.git] / config / m4 / os2.m4
blob148401f9cf37ca305b20936de76802e7a0536394
2 AC_DEFUN([EL_CONFIG_OS_OS2],
4         AC_MSG_CHECKING([for OS/2 threads])
6         EL_SAVE_FLAGS
7         CFLAGS="$CFLAGS -Zmt"
9         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]], [[_beginthread(NULL, NULL, 0, NULL)]])],[cf_result=yes],[cf_result=no])
10         AC_MSG_RESULT($cf_result)
12         if test "$cf_result" = yes; then
13                 EL_DEFINE(HAVE_BEGINTHREAD, [_beginthread()])
14         else
15                 EL_RESTORE_FLAGS
16         fi
18         AC_CHECK_FUNC(MouOpen, EL_DEFINE(HAVE_MOUOPEN, [MouOpen()]))
19         AC_CHECK_FUNC(_read_kbd, EL_DEFINE(HAVE_READ_KBD, [_read_kbd()]))
21         AC_MSG_CHECKING([for XFree for OS/2])
23         EL_SAVE_FLAGS
25         cf_result=no
27         if test -n "$X11ROOT"; then
28                 CFLAGS="$CFLAGS_X -I$X11ROOT/XFree86/include"
29                 LIBS="$LIBS_X -L$X11ROOT/XFree86/lib -lxf86_gcc"
30                 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pty.h>]], [[struct winsize win;ptioctl(1, TIOCGWINSZ, &win)]])],[cf_result=yes],[cf_result=no])
31                 if test "$cf_result" = no; then
32                         LIBS="$LIBS_X -L$X11ROOT/XFree86/lib -lxf86"
33                         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pty.h>]], [[struct winsize win;ptioctl(1, TIOCGWINSZ, &win)]])],[cf_result=yes],[cf_result=no])
34                 fi
35         fi
37         if test "$cf_result" != yes; then
38                 EL_RESTORE_FLAGS
39         else
40                 EL_DEFINE(X2, [XFree under OS/2])
41         fi
43         AC_MSG_RESULT($cf_result)