2 AC_DEFUN([EL_CONFIG_OS_OS2],
4 AC_MSG_CHECKING([for OS/2 threads])
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()])
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])
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])
37 if test "$cf_result" != yes; then
40 EL_DEFINE(X2, [XFree under OS/2])
43 AC_MSG_RESULT($cf_result)